Changeset 3112163
- Timestamp:
- 07/04/2024 06:46:54 AM (21 months ago)
- Location:
- gtm-kit
- Files:
-
- 6 added
- 40 edited
- 1 copied
-
tags/1.23 (copied) (copied from gtm-kit/trunk)
-
tags/1.23/assets/admin/settings.asset.php (modified) (1 diff)
-
tags/1.23/assets/admin/settings.js (modified) (1 diff)
-
tags/1.23/assets/admin/wizard.asset.php (modified) (1 diff)
-
tags/1.23/assets/admin/wizard.js (modified) (1 diff)
-
tags/1.23/assets/frontend/event-inspector-rtl.css (added)
-
tags/1.23/assets/frontend/event-inspector.asset.php (modified) (1 diff)
-
tags/1.23/gtm-kit.php (modified) (3 diffs)
-
tags/1.23/languages/gtm-kit.pot (modified) (11 diffs)
-
tags/1.23/readme.txt (modified) (2 diffs)
-
tags/1.23/src/Admin/AbstractOptionsPage.php (modified) (2 diffs)
-
tags/1.23/src/Admin/AssetsTrait.php (added)
-
tags/1.23/src/Admin/GeneralOptionsPage.php (modified) (2 diffs)
-
tags/1.23/src/Admin/Integrations.php (added)
-
tags/1.23/src/Admin/IntegrationsOptionsPage.php (modified) (2 diffs)
-
tags/1.23/src/Common/Util.php (modified) (1 diff)
-
tags/1.23/src/Frontend/Frontend.php (modified) (3 diffs)
-
tags/1.23/src/Installation/Upgrade.php (modified) (3 diffs)
-
tags/1.23/src/Options.php (modified) (1 diff)
-
tags/1.23/vendor/autoload.php (modified) (1 diff)
-
tags/1.23/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/1.23/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/1.23/vendor/composer/autoload_static.php (modified) (3 diffs)
-
tags/1.23/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/assets/frontend/event-inspector-rtl.css (added)
-
trunk/assets/frontend/event-inspector.asset.php (modified) (1 diff)
-
trunk/gtm-kit.php (modified) (3 diffs)
-
trunk/languages/gtm-kit.pot (modified) (11 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Admin/AbstractOptionsPage.php (modified) (2 diffs)
-
trunk/src/Admin/AssetsTrait.php (added)
-
trunk/src/Admin/GeneralOptionsPage.php (modified) (2 diffs)
-
trunk/src/Admin/Integrations.php (added)
-
trunk/src/Admin/IntegrationsOptionsPage.php (modified) (2 diffs)
-
trunk/src/Common/Util.php (modified) (1 diff)
-
trunk/src/Frontend/Frontend.php (modified) (3 diffs)
-
trunk/src/Installation/Upgrade.php (modified) (3 diffs)
-
trunk/src/Options.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gtm-kit/tags/1.23/assets/admin/settings.asset.php
r3094947 r3112163 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n' ), 'version' => '2238b13f608a72073e6c');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'a613e9bed392753e55fe'); -
gtm-kit/tags/1.23/assets/admin/settings.js
r3094947 r3112163 1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(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:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React;var a=t.n(e);const n=window.wp.i18n,i=window.wp.element,r=window.wp.components,o=window.lodash,l=window.wp.apiFetch;var s=t.n(l);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,a=null,n=!1)=>{let i={};try{i=await s()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},c=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,n.__)("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,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},g=(0,i.createContext)(),u=t=>{const[a,n]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},l=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{r()}),[]);const s={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=a.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:l,useUpdateStateSettings:async(t,e,n)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let r;i[t][e]=n,r=!(0,o.isEqual)(i,a.fetchedSettings),l({stateSettings:i,canSave:r})},useImportSettings:async(t,e)=>{const n=JSON.parse(JSON.stringify(a.stateSettings));let i;const r={};r.general={...n.general,...e.general},"integrations"in e&&(r.integrations={...n.integrations,...e.integrations}),i=!(0,o.isEqual)(r,a.fetchedSettings),l({stateSettings:r,canSave:i})},useUpdateSupportTicket:async t=>{l({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=a.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData,useIsSending:a.isSendingSystemData,useSupportTicket:a.supportTicket,useIsSystemDataSent:a.isSystemDataSent,useSystemDataMessage:a.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(g.Provider,{value:s},t.children)};function d(){return d=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},d.apply(this,arguments)}var p;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(p||(p={}));const h="popstate";function _(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function f(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?v(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function b(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 v(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 y;function x(t,e,a){void 0===a&&(a="/");let n=L(("string"==typeof e?v(e):e).pathname||"/",a);if(null==n)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,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)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t){let e=U(n);r=O(i[t],e)}return r}function S(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");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("/")&&(_(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(n.length));let l=H([n,o.relativePath]),s=a.concat(o);t.children&&t.children.length>0&&(_(!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:M(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of w(t.path))i(t,e,a);else i(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let o=w(n.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"}(y||(y={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,T=2,D=1,P=10,G=-2,I=t=>"*"===t;function M(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=G),e&&(n+=T),a.filter((t=>!I(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?D:P)),n)}function O(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=R({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},s);if(!m)return null;Object.assign(n,m.params);let c=o.route;r.push({params:n,pathname:H([i,m.pathname]),pathnameBase:B(H([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=H([i,m.pathnameBase]))}return r}function R(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),k("*"===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=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],o=r.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=l[a]||"";o=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=l[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:o,pattern:t}}function U(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!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 a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function A(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 j(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function F(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=v(t):(i=d({},t),_(!i.pathname||!i.pathname.includes("?"),A("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),A("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),A("#","search","hash",i)));let r,o=""===t||""===i.pathname,l=o?"/":i.pathname;if(null==l)r=a;else{let t=e.length-1;if(!n&&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:a,search:n="",hash:i=""}="string"==typeof t?v(t):t,r=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:r,search:W(n),hash:K(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(o||"."===l)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const H=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],z=(new Set(J),["get",...J]);function $(){return $=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},$.apply(this,arguments)}new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=e.createContext(null),q=e.createContext(null),Y=e.createContext(null),X=e.createContext(null),Q=e.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=e.createContext(null);function tt(){return null!=e.useContext(X)}function et(){return tt()||_(!1),e.useContext(X).location}function at(t){e.useContext(Y).static||e.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=e.useContext(Q);return t?function(){let{router:t}=function(t){let a=e.useContext(V);return a||_(!1),a}(ct.UseNavigateStable),a=ut(gt.UseNavigateStable),n=e.useRef(!1);return at((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,$({fromRouteId:a},i)))}),[t,a])}():function(){tt()||_(!1);let t=e.useContext(V),{basename:a,future:n,navigator:i}=e.useContext(Y),{matches:r}=e.useContext(Q),{pathname:o}=et(),l=JSON.stringify(j(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return at((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=F(e,JSON.parse(l),o,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:H([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,l,o,t])}()}function it(t,a){let{relative:n}=void 0===a?{}:a,{future:i}=e.useContext(Y),{matches:r}=e.useContext(Q),{pathname:o}=et(),l=JSON.stringify(j(r,i.v7_relativeSplatPath));return e.useMemo((()=>F(t,JSON.parse(l),o,"path"===n)),[t,l,o,n])}function rt(t,a,n,i){tt()||_(!1);let{navigator:r}=e.useContext(Y),{matches:o}=e.useContext(Q),l=o[o.length-1],s=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=et();if(a){var u;let t="string"==typeof a?v(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||_(!1),c=t}else c=g;let d=c.pathname||"/",h=d;if("/"!==m){let t=m.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=x(t,{pathname:h}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var o;if(null==(o=n)||!o.errors)return null;t=n.matches}let l=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=l.findIndex((t=>t.route.id&&void 0!==(null==s?void 0:s[t.route.id])));t>=0||_(!1),l=l.slice(0,Math.min(l.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<l.length;t++){let e=l[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,l=c>=0?l.slice(0,c+1):[l[0]];break}}}return l.reduceRight(((t,i,r)=>{let o,g=!1,u=null,d=null;var p;n&&(o=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||lt,m&&(c<0&&0===r?(dt[p="route-fallback"]||(dt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(l.slice(0,r+1)),_=()=>{let a;return a=o?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(mt,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(st,{location:n.location,revalidation:n.revalidation,component:u,error:o,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:H([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:H([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,n,i);return a&&f?e.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function ot(){let t=function(){var t;let a=e.useContext(Z),n=function(t){let a=e.useContext(q);return a||_(!1),a}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=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,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const lt=e.createElement(ot,null);class st extends e.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:void 0!==t.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 void 0!==this.state.error?e.createElement(Q.Provider,{value:this.props.routeContext},e.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mt(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(V);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(Q.Provider,{value:a},i)}var ct=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ct||{}),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 ut(t){let a=function(t){let a=e.useContext(Q);return a||_(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||_(!1),n.route.id}const dt={};function pt(t){let{to:a,replace:n,state:i,relative:r}=t;tt()||_(!1);let{future:o,static:l}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:m}=et(),c=nt(),g=F(a,j(s,o.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function ht(t){_(!1)}function _t(t){let{basename:a="/",children:n=null,location:i,navigationType:r=p.Pop,navigator:o,static:l=!1,future:s}=t;tt()&&_(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:o,static:l,future:$({v7_relativeSplatPath:!1},s)})),[m,s,o,l]);"string"==typeof i&&(i=v(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=e.useMemo((()=>{let t=L(g,m);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:k},navigationType:r}}),[m,g,u,d,h,k,r]);return null==f?null:e.createElement(Y.Provider,{value:c},e.createElement(X.Provider,{children:n,value:f}))}function kt(t){let{children:e,location:a}=t;return rt(ft(e),a)}function ft(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,ft(t.props.children,r));t.type!==ht&&_(!1),t.props.index&&t.props.children&&_(!1);let o={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&&(o.children=ft(t.props.children,r)),n.push(o)})),n}e.startTransition,new Promise((()=>{})),e.Component;const Et=window.ReactDOM;var bt=t.n(Et);function vt(){return vt=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},vt.apply(this,arguments)}function yt(t,e){if(null==t)return{};var a,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const xt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],St=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=e.createContext({isTransitioning:!1});new Map;const Nt=e.startTransition;function Ct(t){let{basename:a,children:n,future:i,window:r}=t,o=e.useRef();null==o.current&&(o.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,o=i.history,l=p.Pop,s=null,m=c();function c(){return(o.state||{idx:null}).idx}function g(){l=p.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:k.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:b(t);return a=a.replace(/ $/,"%20"),_(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,o.replaceState(d({},o.state,{idx:m}),""));let k={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(h,g),s=t,()=>{i.removeEventListener(h,g),s=null}},createHref:t=>e(i,t),createURL:u,encodeLocation(t){let e=u(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=p.Push;let n=E(k.location,t,e);a&&a(n,t),m=c()+1;let g=f(n,m),u=k.createHref(n);try{o.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:l,location:k.location,delta:1})},replace:function(t,e){l=p.Replace;let n=E(k.location,t,e);a&&a(n,t),m=c();let i=f(n,m),g=k.createHref(n);o.replaceState(i,"",g),r&&s&&s({action:l,location:k.location,delta:0})},go:t=>o.go(t)};return k}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=v(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:i},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:b(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let l=o.current,[s,m]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>l.listen(g)),[l,g]),e.createElement(_t,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:l,future:i})}Et.flushSync,e.useId;const Tt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pt=e.forwardRef((function(t,a){let n,{onClick:i,relative:r,reloadDocument:o,replace:l,state:s,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=t,d=yt(t,xt),{basename:p}=e.useContext(Y),h=!1;if("string"==typeof c&&Dt.test(c)&&(n=c,Tt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),a=L(e.pathname,p);e.origin===t.origin&&null!=a?c=a+e.search+e.hash:h=!0}catch(t){}let k=function(t,a){let{relative:n}=void 0===a?{}:a;tt()||_(!1);let{basename:i,navigator:r}=e.useContext(Y),{hash:o,pathname:l,search:s}=it(t,{relative:n}),m=l;return"/"!==i&&(m="/"===l?i:H([i,l])),r.createHref({pathname:m,search:s,hash:o})}(c,{relative:r}),f=function(t,a){let{target:n,replace:i,state:r,preventScrollReset:o,relative:l,unstable_viewTransition:s}=void 0===a?{}:a,m=nt(),c=et(),g=it(t,{relative:l});return e.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 a=void 0!==i?i:b(c)===b(g);m(t,{replace:a,state:r,preventScrollReset:o,relative:l,unstable_viewTransition:s})}}),[c,m,g,i,r,n,t,o,l,s])}(c,{replace:l,state:s,target:m,preventScrollReset:g,relative:r,unstable_viewTransition:u});return e.createElement("a",vt({},d,{href:n||k,onClick:h||o?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:a,target:m}))})),Gt=e.forwardRef((function(t,a){let{"aria-current":n="page",caseSensitive:i=!1,className:r="",end:o=!1,style:l,to:s,unstable_viewTransition:m,children:c}=t,g=yt(t,St),u=it(s,{relative:g.relative}),d=et(),p=e.useContext(q),{navigator:h,basename:k}=e.useContext(Y),f=null!=p&&function(t,a){void 0===a&&(a={});let n=e.useContext(wt);null==n&&_(!1);let{basename:i}=function(t){let a=e.useContext(V);return a||_(!1),a}(It.useViewTransitionState),r=it(t,{relative:a.relative});if(!n.isTransitioning)return!1;let o=L(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=L(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=R(r.pathname,l)||null!=R(r.pathname,o)}(u)&&!0===m,E=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,b=d.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),v=v?v.toLowerCase():null,E=E.toLowerCase()),v&&k&&(v=L(v,k)||v);const y="/"!==E&&E.endsWith("/")?E.length-1:E.length;let x,S=b===E||!o&&b.startsWith(E)&&"/"===b.charAt(y),w=null!=v&&(v===E||!o&&v.startsWith(E)&&"/"===v.charAt(E.length)),N={isActive:S,isPending:w,isTransitioning:f},C=S?n:void 0;x="function"==typeof r?r(N):[r,S?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof l?l(N):l;return e.createElement(Pt,vt({},g,{"aria-current":C,className:x,ref:a,style:T,to:s,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var It,Mt;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(It||(It={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Mt||(Mt={}));const Ot=({title:t})=>(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"}))),t)))),Rt=({to:t,title:a})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Gt,{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 ":"")},a)),Ut=({NavList:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-flex-wrap gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-[15px] gtmkit-space-x-9"},t.map((function(t){return(0,e.createElement)(Rt,{key:t.to,to:t.to,title:t.title})})));function Lt(){return Lt=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},Lt.apply(this,arguments)}function At(t,e){if(null==t)return{};var a,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function Ft(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jt(t,e)}function Ht(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Bt=a().createContext(null);var Wt=function(t){return t.scrollTop},Kt="unmounted",Jt="exited",zt="entering",$t="entered",Vt="exiting",qt=function(t){function e(e,a){var n;n=t.call(this,e,a)||this;var i,r=a&&!a.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?r?(i=Jt,n.appearStatus=zt):i=$t:i=e.unmountOnExit||e.mountOnEnter?Kt:Jt,n.state={status:i},n.nextCallback=null,n}Ft(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Kt?{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 a=this.state.status;this.props.in?a!==zt&&a!==$t&&(e=zt):a!==zt&&a!==$t||(e=Vt)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,a,n=this.props.timeout;return t=e=a=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,a=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:a}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);a&&Wt(a)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Kt})},n.performEnter=function(t){var e=this,a=this.props.enter,n=this.context?this.context.isMounting:t,i=this.props.nodeRef?[n]:[bt().findDOMNode(this),n],r=i[0],o=i[1],l=this.getTimeouts(),s=n?l.appear:l.enter;t||a?(this.props.onEnter(r,o),this.safeSetState({status:zt},(function(){e.props.onEntering(r,o),e.onTransitionEnd(s,(function(){e.safeSetState({status:$t},(function(){e.props.onEntered(r,o)}))}))}))):this.safeSetState({status:$t},(function(){e.props.onEntered(r)}))},n.performExit=function(){var t=this,e=this.props.exit,a=this.getTimeouts(),n=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(n),this.safeSetState({status:Vt},(function(){t.props.onExiting(n),t.onTransitionEnd(a.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(n)}))},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,a=!0;return this.nextCallback=function(n){a&&(a=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),n=null==t&&!this.props.addEndListener;if(a&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[a,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===Kt)return null;var e=this.props,n=e.children,i=(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,At(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(Bt.Provider,{value:null},"function"==typeof n?n(t,i):a().cloneElement(a().Children.only(n),i))},e}(a().Component);function Yt(){}qt.contextType=Bt,qt.propTypes={},qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yt,onEntering:Yt,onEntered:Yt,onExit:Yt,onExiting:Yt,onExited:Yt},qt.UNMOUNTED=Kt,qt.EXITED=Jt,qt.ENTERING=zt,qt.ENTERED=$t,qt.EXITING=Vt;const Xt=qt;var Qt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.remove(n):"string"==typeof a.className?a.className=Ht(a.className,n):a.setAttribute("class",Ht(a.className&&a.className.baseVal||"",n)));var a,n}))},Zt=function(t){function e(){for(var e,a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1];e.removeClasses(i,"exit"),e.addClass(i,r?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,a)},e.onEntering=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1]?"appear":"enter";e.addClass(i,r,"active"),e.props.onEntering&&e.props.onEntering(t,a)},e.onEntered=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1]?"appear":"enter";e.removeClasses(i,r),e.addClass(i,r,"done"),e.props.onEntered&&e.props.onEntered(t,a)},e.onExit=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"appear"),e.removeClasses(a,"enter"),e.addClass(a,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var a=e.resolveArguments(t)[0];e.addClass(a,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"exit"),e.addClass(a,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,a){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,a]},e.getClassNames=function(t){var a=e.props.classNames,n="string"==typeof a,i=n?(n&&a?a+"-":"")+t:a[t];return{baseClassName:i,activeClassName:n?i+"-active":a[t+"Active"],doneClassName:n?i+"-done":a[t+"Done"]}},e}Ft(e,t);var n=e.prototype;return n.addClass=function(t,e,a){var n=this.getClassNames(e)[a+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===a&&i&&(n+=" "+i),"active"===a&&t&&Wt(t),n&&(this.appliedClasses[e][a]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(a,n)||("string"==typeof a.className?a.className=a.className+" "+n:a.setAttribute("class",(a.className&&a.className.baseVal||"")+" "+n)));var a,n}))}(t,n))},n.removeClasses=function(t,e){var a=this.appliedClasses[e],n=a.base,i=a.active,r=a.done;this.appliedClasses[e]={},n&&Qt(t,n),i&&Qt(t,i),r&&Qt(t,r)},n.render=function(){var t=this.props,e=(t.classNames,At(t,["classNames"]));return a().createElement(Xt,Lt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(a().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:t=(0,n.__)("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:o,useIsPending:l,useCanSave:s}=(0,i.useContext)(g);return(0,e.createElement)(r.Button,{className:a,onClick:()=>o(),variant:"primary",disabled:l||!s},s?(0,n.__)(t,"gtm-kit"):(0,n.__)("Saved","gtm-kit"),l?(0,e.createElement)(r.Spinner,null):"")},ae=()=>{const{useCanSave:t}=(0,i.useContext)(g);return(0,e.createElement)(te,{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)(ee,null)))},ne=({subject:t})=>{const a=!0===t||"on"===t,i=!0===a?"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 "+i},a?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:t,className:a="",...n},i)=>(0,e.createElement)("div",{...n,className:"gtmkit-flex gtmkit-flex-col 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 "+a,ref:i},t)));ie.Header=({as:t="h3",title:a="",children:n,className:i="",...r})=>(0,e.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},a),n),ie.Content=({as:t="div",children:a,className:n="gtmkit-flex-auto",...i})=>(0,e.createElement)(t,{...i,className:n},a),ie.Button=({url:t,destination:a,newTab:n=!1,text:i,group:o="",...l})=>{const s=nt();return(0,e.createElement)("div",{...l,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,e.createElement)(r.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{a&&t&&!1===n?window.gtmkitSettings.current_poage===o?s(a,{replace:!0}):window.location.href=t+"#"+a:t?n?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"},i)))};const re=ie,oe=({title:t,data:a,className:r=""})=>{const{useSettings:o}=(0,i.useContext)(g);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] "+r},a.map(((t,a)=>!1===t.featured?null:(0,e.createElement)(re,{key:a},(0,e.createElement)(re.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:o[t.group][t.option]}):null),(0,e.createElement)(re.Content,null,t.text.map(((t,a)=>(0,e.createElement)("p",{key:a},t)))),(0,e.createElement)(re.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))},le=[{title:"WooCommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,n.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,n.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,n.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,n.__)("Setup integration","gtm-kit")}}],se=()=>{const{useSettings:t}=(0,i.useContext)(g),[a,r]=(0,i.useState)(window.gtmkitSettings.tutorials),o=Boolean(t.general.sgtm_domain&&t.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{r((t=>[...t,{title:(0,n.__)("See all tutorials...","gtm-kit"),text:[(0,n.__)("See all our tutorials 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,n.__)("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,n.__)("General","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(re.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:(0,n.__)("Server-side GTM","gtm-kit")},(0,e.createElement)(ne,{subject:o})),(0,e.createElement)(re.Content,null,(0,e.createElement)("p",null,(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(re.Content,null,(0,e.createElement)("p",null,(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(oe,{title:(0,n.__)("Tutorials","gtm-kit"),data:a}),(0,e.createElement)(oe,{title:(0,n.__)("Integrations","gtm-kit"),data:le}))},me=({title:t,placeholder:a,help:n,className:o="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:l="general",optionName:s,isDisabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(r.TextControl,{label:t,placeholder:a,help:n,className:o,value:c[l][s],onChange:t=>u(l,s,t),disabled:m})},ce=({title:t,label:a,optionGroup:n="general",optionName:o,disabled:l=!1})=>{const{useSettings:s,useUpdateStateSettings:m}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(r.BaseControl,{label:t},(0,e.createElement)(r.ToggleControl,{label:a,checked:!l&&s[n][o],onChange:()=>{m(n,o,!(s&&s[n][o]))},disabled:l}))))},ge=({title:t,options:a,help:n,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(r.RadioControl,{label:t,options:a,help:n,className:o,selected:parseInt(c[l][s]),onChange:t=>u(l,s,t),disabled:m})},ue=(0,i.forwardRef)((({children:t,className:a="",disabled:n=!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 "+a+(n?"gtmkit-opacity-60":""),ref:r},t)));ue.Header=({as:t="h3",title:a="",children:n,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},a,n),ue.Content=({as:t="div",children:a,className:n="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+n},a);const de=ue,pe=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),r=et();return(0,e.useEffect)((()=>{const t=new URLSearchParams(r.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[r]),(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,n.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("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,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("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,n.__)("Just the container","gtm-kit"),label:(0,n.__)("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,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("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 so.","gtm-kit")}))),(0,e.createElement)("div",{id:"sgtm"}),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(me,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain ...","gtm-kit"),help:(0,n.__)("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,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name ...","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:a})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/google-tag-manager-server-side-tagging/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=sgtm&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Hosting server-side GTM containers","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more about Stape.io","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("load_delayed_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_js' on page load.","gtm-kit"),optionName:"load_js_event"})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Delay JavaScript execution","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Page optimization plugins can delay the 'load_delayed_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/delay-javascript-execution-in-gtm/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=delay-js&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(me,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit")})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Environments","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Override settings in wp-config.php","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=container-settings&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("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)(ge,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('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(); } ?>")))))},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,n.__)("Post Data","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("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,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ce,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('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,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ce,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ce,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ce,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ce,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ce,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ce,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),_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,n.__)("User Data","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(de.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("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)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ce,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ce,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),ke=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!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,n.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,n.__)("Warning!","gtm-kit"))),(0,e.createElement)(de.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("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,n.__)("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,n.__)("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,n.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(de,{disabled:a},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:a}),(0,e.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,n.__)("Advanced","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Redact Ads Data","gtm-kit"),label:(0,n.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Pass through URL parameters","gtm-kit"),label:(0,n.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:a}),(0,e.createElement)(me,{title:(0,n.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,n.__)("Enter time in milliseconds","gtm-kit")}))))},fe=({label:t,value:a,tag:n})=>(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"===n?(0,e.createElement)("code",{className:"gtmkit-text-sm"},a):(0,e.createElement)("em",null,a))),Ee=()=>{const{useSiteData:t}=(0,i.useContext)(g),a=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,n.__)("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,n.__)("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"},a.map((function(t,a){return(0,e.createElement)(fe,{key:a,label:t.label,value:t.value,tag:t.tag})})))))},be=()=>{const{}=(0,i.useContext)(g);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,n.__)("Misc","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(Ee,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Event Inspector","gtm-kit"),label:(0,n.__)("The event inspector is placed in the footer of the front and it allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector"}),(0,e.createElement)(ce,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}),(0,e.createElement)(ce,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log"}))))},ve=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(oe,{title:(0,n.__)("Integrations","gtm-kit"),data:le})),ye=({pluginName:t})=>(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.sprintf)(1 (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React;var n=e.n(t);const a=window.wp.i18n,i=window.wp.element,r=window.wp.components,l=window.lodash,o=window.wp.apiFetch;var s=e.n(o);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(e,t,n=null,a=!1)=>{let i={};try{i=await s()({path:e,method:t,...n&&{data:n}})}catch(n){return console.log(`${t} ${e} Errors:`,n),{[`gtm_kit_api_${t}_${e}_errors`]:!0}}return!0===a?i:!0===i.success?i.data:options},c=(e,t)=>{const n={...e};switch(t.type){case"FETCH_SETTINGS":n.fetchedSettings={...t.payload.fetchedSettings,integrations:t.payload.fetchedSettings.integrations||{}},n.stateSettings=t.payload.stateSettings,n.siteData=t.payload.siteData,n.installData=t.payload.installData,n.isPending=!1,n.canSave=!1,t.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(n.notice=(0,a.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=t.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=t.payload.fetchedSettings,n.stateSettings=t.payload.stateSettings,n.isPending=!1,n.canSave=!!t.payload.fetchedSettings.gtm_kit_api_update_settings_errors,n.notice=t.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,a.__)("An error occurred.","gtm-kit"):(0,a.__)("Saved Successfully.","gtm-kit"),n.hasError=!!t.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":n.fetchedSettings=t.payload.fetchedSettings||n.fetchedSettings,n.stateSettings=t.payload.stateSettings||n.stateSettings,n.isPending=t.payload.isPending||n.isPending,n.notice=t.payload.notice||n.notice,n.hasError=t.payload.hasError||n.hasError,n.canSave=t.payload.canSave||n.canSave,n.isSendingSystemData=t.payload.isSendingSystemData||n.isSendingSystemData,n.supportTicket=t.payload.supportTicket||n.supportTicket,n.isSendingLicenseKey=t.payload.isSendingLicenseKey||n.isSendingLicenseKey,n.licenseKey=t.payload.licenseKey||n.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":n.isSendingSystemData=t.payload.isSendingSystemData||n.isSendingSystemData;break;case"SEND_SUPPORT_DATA":n.isSendingSystemData=!1,n.isSystemDataSent=t.payload.isSystemDataSent||n.isSystemDataSent,n.systemDataMessage=t.payload.systemDataMessage||n.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":n.isSendingLicenseKey=t.payload.isSendingLicenseKey||n.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":n.isSendingLicenseKey=!1,n.isLicenseKeySent=t.payload.isLicenseKeySent||n.isLicenseKeySent,n.licenseKeyMessage=t.payload.licenseKeyMessage||n.licenseKeyMessage}return n},g=(0,i.createContext)(),u=e=>{const[n,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),r=async()=>{const e=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},t=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:e,stateSettings:e,siteData:t,installData:n}})},o=async e=>{a({type:"UPDATE_STATE",payload:e})};(0,i.useEffect)((()=>{r()}),[]);const s={useDispatch:e=>{a(e)},useUpdateSettings:async()=>{a({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const e=await(t=n.stateSettings,m("gtmkit/v1/set-options","POST",t));var t;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:e,stateSettings:e}})},useFetchSettings:r,useUpdateState:o,useUpdateStateSettings:async(e,t,a)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let r;i[e][t]=a,r=!(0,l.isEqual)(i,n.fetchedSettings),o({stateSettings:i,canSave:r})},useImportSettings:async(e,t)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let i;const r={};r.general={...a.general,...t.general},"integrations"in t&&(r.integrations={...a.integrations,...t.integrations}),i=!(0,l.isEqual)(r,n.fetchedSettings),o({stateSettings:r,canSave:i})},useUpdateSupportTicket:async e=>{o({supportTicket:e})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const e=await(t=n.supportTicket,m("gtmkit/v1/send-support-data","POST",t,!0));var t;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:e.success,systemDataMessage:e.data}})},useUpdateLicenseKey:async e=>{o({licenseKey:e})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const e=await(t=n.licenseKey,m("gtmkit/v1/send-license-key","POST",t,!0));var t;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:e.success,licenseKeyMessage:e.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[]};return(0,t.createElement)(g.Provider,{value:s},e.children)};function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}var p;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(p||(p={}));const h="popstate";function _(e,t){if(!1===e||null==e)throw new Error(t)}function k(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function E(e,t,n,a){return void 0===n&&(n=null),d({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?v(t):t,{state:n,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function S(e){let{pathname:t="/",search:n="",hash:a=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function v(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}var b;function y(e,t,n){return void 0===n&&(n="/"),function(e,t,n,a){let i=L(("string"==typeof t?v(t):t).pathname||"/",n);if(null==i)return null;let r=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(r);let l=null;for(let e=0;null==l&&e<r.length;++e){let t=R(i);l=O(r[e],t,a)}return l}(e,t,n,!1)}function x(e,t,n,a){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(e,i,r)=>{let l={relativePath:void 0===r?e.path||"":r,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};l.relativePath.startsWith("/")&&(_(l.relativePath.startsWith(a),'Absolute route path "'+l.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(a.length));let o=j([a,l.relativePath]),s=n.concat(l);e.children&&e.children.length>0&&(_(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),x(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:G(o,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of w(e.path))i(e,t,n);else i(e,t)})),t}function w(e){let t=e.split("/");if(0===t.length)return[];let[n,...a]=t,i=n.endsWith("?"),r=n.replace(/\?$/,"");if(0===a.length)return i?[r,""]:[r];let l=w(a.join("/")),o=[];return o.push(...l.map((e=>""===e?r:[r,e].join("/")))),i&&o.push(...l),o.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,T=2,U=1,D=10,P=-2,I=e=>"*"===e;function G(e,t){let n=e.split("/"),a=n.length;return n.some(I)&&(a+=P),t&&(a+=T),n.filter((e=>!I(e))).reduce(((e,t)=>e+(N.test(t)?C:""===t?U:D)),a)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:a}=e,i={},r="/",l=[];for(let e=0;e<a.length;++e){let o=a[e],s=e===a.length-1,m="/"===r?t:t.slice(r.length)||"/",c=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:s},m),g=o.route;if(!c&&s&&n&&!a[a.length-1].route.index&&(c=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),l.push({params:i,pathname:j([r,c.pathname]),pathnameBase:H(j([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=j([r,c.pathnameBase]))}return l}function M(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),k("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let a=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(a.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(a.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),a]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:a.reduce(((e,t,n)=>{let{paramName:a,isOptional:i}=t;if("*"===a){let e=o[n]||"";l=r.slice(0,r.length-e.length).replace(/(.)\/+$/,"$1")}const s=o[n];return e[a]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:r,pathnameBase:l,pattern:e}}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return k(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function L(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&"/"!==a?null:e.slice(n)||"/"}function A(e,t,n,a){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` 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 K(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,a){let i;void 0===a&&(a=!1),"string"==typeof e?i=v(e):(i=d({},e),_(!i.pathname||!i.pathname.includes("?"),A("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),A("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),A("#","search","hash",i)));let r,l=""===e||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=n;else{let e=t.length-1;if(!a&&o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}r=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof e?v(e):e,r=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:r,search:B(a),hash:W(i)}}(i,r),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&n.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const j=e=>e.join("/").replace(/\/\/+/g,"/"),H=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",W=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const z=["post","put","patch","delete"],J=(new Set(z),["get",...z]);function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},$.apply(this,arguments)}new Set(J),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=t.createContext(null),q=t.createContext(null),Y=t.createContext(null),X=t.createContext(null),Q=t.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=t.createContext(null);function ee(){return null!=t.useContext(X)}function te(){return ee()||_(!1),t.useContext(X).location}function ne(e){t.useContext(Y).static||t.useLayoutEffect(e)}function ae(){let{isDataRoute:e}=t.useContext(Q);return e?function(){let{router:e}=function(e){let n=t.useContext(V);return n||_(!1),n}(ce.UseNavigateStable),n=ue(ge.UseNavigateStable),a=t.useRef(!1);return ne((()=>{a.current=!0})),t.useCallback((function(t,i){void 0===i&&(i={}),a.current&&("number"==typeof t?e.navigate(t):e.navigate(t,$({fromRouteId:n},i)))}),[e,n])}():function(){ee()||_(!1);let e=t.useContext(V),{basename:n,future:a,navigator:i}=t.useContext(Y),{matches:r}=t.useContext(Q),{pathname:l}=te(),o=JSON.stringify(K(r,a.v7_relativeSplatPath)),s=t.useRef(!1);return ne((()=>{s.current=!0})),t.useCallback((function(t,a){if(void 0===a&&(a={}),!s.current)return;if("number"==typeof t)return void i.go(t);let r=F(t,JSON.parse(o),l,"path"===a.relative);null==e&&"/"!==n&&(r.pathname="/"===r.pathname?n:j([n,r.pathname])),(a.replace?i.replace:i.push)(r,a.state,a)}),[n,i,o,l,e])}()}function ie(e,n){let{relative:a}=void 0===n?{}:n,{future:i}=t.useContext(Y),{matches:r}=t.useContext(Q),{pathname:l}=te(),o=JSON.stringify(K(r,i.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(o),l,"path"===a)),[e,o,l,a])}function re(e,n,a,i){ee()||_(!1);let{navigator:r}=t.useContext(Y),{matches:l}=t.useContext(Q),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=te();if(n){var u;let e="string"==typeof n?v(n):n;"/"===m||(null==(u=e.pathname)?void 0:u.startsWith(m))||_(!1),c=e}else c=g;let d=c.pathname||"/",h=d;if("/"!==m){let e=m.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let k=y(e,{pathname:h}),f=function(e,n,a,i){var r;if(void 0===n&&(n=[]),void 0===a&&(a=null),void 0===i&&(i=null),null==e){var l;if(null==(l=a)||!l.errors)return null;e=a.matches}let o=e,s=null==(r=a)?void 0:r.errors;if(null!=s){let e=o.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||_(!1),o=o.slice(0,Math.min(o.length,e+1))}let m=!1,c=-1;if(a&&i&&i.v7_partialHydration)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:n}=a,i=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((e,i,r)=>{let l,g=!1,u=null,d=null;var p;a&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||oe,m&&(c<0&&0===r?(de[p="route-fallback"]||(de[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=n.concat(o.slice(0,r+1)),_=()=>{let n;return n=l?u:g?d:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(me,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:null!=a},children:n})};return a&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?t.createElement(se,{location:a.location,revalidation:a.revalidation,component:u,error:l,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(k&&k.map((e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:j([m,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?m:j([m,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,a,i);return n&&f?t.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function le(){let e=function(){var e;let n=t.useContext(Z),a=function(e){let n=t.useContext(q);return n||_(!1),n}(ge.UseRouteError),i=ue(ge.UseRouteError);return void 0!==n?n:null==(e=a.errors)?void 0:e[i]}(),n=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),a?t.createElement("pre",{style:i},a):null,null)}const oe=t.createElement(le,null);class se extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(Q.Provider,{value:this.props.routeContext},t.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function me(e){let{routeContext:n,match:a,children:i}=e,r=t.useContext(V);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),t.createElement(Q.Provider,{value:n},i)}var ce=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ce||{}),ge=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ge||{});function ue(e){let n=function(e){let n=t.useContext(Q);return n||_(!1),n}(),a=n.matches[n.matches.length-1];return a.route.id||_(!1),a.route.id}const de={};function pe(e){let{to:n,replace:a,state:i,relative:r}=e;ee()||_(!1);let{future:l,static:o}=t.useContext(Y),{matches:s}=t.useContext(Q),{pathname:m}=te(),c=ae(),g=F(n,K(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return t.useEffect((()=>c(JSON.parse(u),{replace:a,state:i,relative:r})),[c,u,r,a,i]),null}function he(e){_(!1)}function _e(e){let{basename:n="/",children:a=null,location:i,navigationType:r=p.Pop,navigator:l,static:o=!1,future:s}=e;ee()&&_(!1);let m=n.replace(/^\/*/,"/"),c=t.useMemo((()=>({basename:m,navigator:l,static:o,future:$({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=v(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=t.useMemo((()=>{let e=L(g,m);return null==e?null:{location:{pathname:e,search:u,hash:d,state:h,key:k},navigationType:r}}),[m,g,u,d,h,k,r]);return null==f?null:t.createElement(Y.Provider,{value:c},t.createElement(X.Provider,{children:a,value:f}))}function ke(e){let{children:t,location:n}=e;return re(fe(t),n)}function fe(e,n){void 0===n&&(n=[]);let a=[];return t.Children.forEach(e,((e,i)=>{if(!t.isValidElement(e))return;let r=[...n,i];if(e.type===t.Fragment)return void a.push.apply(a,fe(e.props.children,r));e.type!==he&&_(!1),e.props.index&&e.props.children&&_(!1);let l={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(l.children=fe(e.props.children,r)),a.push(l)})),a}t.startTransition,new Promise((()=>{})),t.Component;const Ee=window.ReactDOM;var Se=e.n(Ee);function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ve.apply(this,arguments)}function be(e,t){if(null==e)return{};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ye=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],xe=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(e){}const we=t.createContext({isTransitioning:!1});new Map;const Ne=t.startTransition;function Ce(e){let{basename:n,children:a,future:i,window:r}=e,l=t.useRef();null==l.current&&(l.current=function(e){return void 0===e&&(e={}),function(e,t,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:r=!1}=a,l=i.history,o=p.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=p.Pop;let e=c(),t=null==e?null:e-m;m=e,s&&s({action:o,location:k.location,delta:t})}function u(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:S(e);return n=n.replace(/ $/,"%20"),_(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==m&&(m=0,l.replaceState(d({},l.state,{idx:m}),""));let k={get action(){return o},get location(){return e(i,l)},listen(e){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),s=e,()=>{i.removeEventListener(h,g),s=null}},createHref:e=>t(i,e),createURL:u,encodeLocation(e){let t=u(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){o=p.Push;let a=E(k.location,e,t);n&&n(a,e),m=c()+1;let g=f(a,m),u=k.createHref(a);try{l.pushState(g,"",u)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;i.location.assign(u)}r&&s&&s({action:o,location:k.location,delta:1})},replace:function(e,t){o=p.Replace;let a=E(k.location,e,t);n&&n(a,e),m=c();let i=f(a,m),g=k.createHref(a);l.replaceState(i,"",g),r&&s&&s({action:o,location:k.location,delta:0})},go:e=>l.go(e)};return k}((function(e,t){let{pathname:n="/",search:a="",hash:i=""}=v(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),E("",{pathname:n,search:a,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");a=-1===n?t:t.slice(0,n)}return a+"#"+("string"==typeof t?t:S(t))}),(function(e,t){k("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=t.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=t.useCallback((e=>{c&&Ne?Ne((()=>m(e))):m(e)}),[m,c]);return t.useLayoutEffect((()=>o.listen(g)),[o,g]),t.createElement(_e,{basename:n,children:a,location:s.location,navigationType:s.action,navigator:o,future:i})}Ee.flushSync,t.useId;const Te="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Ue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,De=t.forwardRef((function(e,n){let a,{onClick:i,relative:r,reloadDocument:l,replace:o,state:s,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=e,d=be(e,ye),{basename:p}=t.useContext(Y),h=!1;if("string"==typeof c&&Ue.test(c)&&(a=c,Te))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=L(t.pathname,p);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:h=!0}catch(e){}let k=function(e,n){let{relative:a}=void 0===n?{}:n;ee()||_(!1);let{basename:i,navigator:r}=t.useContext(Y),{hash:l,pathname:o,search:s}=ie(e,{relative:a}),m=o;return"/"!==i&&(m="/"===o?i:j([i,o])),r.createHref({pathname:m,search:s,hash:l})}(c,{relative:r}),f=function(e,n){let{target:a,replace:i,state:r,preventScrollReset:l,relative:o,unstable_viewTransition:s}=void 0===n?{}:n,m=ae(),c=te(),g=ie(e,{relative:o});return t.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,a)){t.preventDefault();let n=void 0!==i?i:S(c)===S(g);m(e,{replace:n,state:r,preventScrollReset:l,relative:o,unstable_viewTransition:s})}}),[c,m,g,i,r,a,e,l,o,s])}(c,{replace:o,state:s,target:m,preventScrollReset:g,relative:r,unstable_viewTransition:u});return t.createElement("a",ve({},d,{href:a||k,onClick:h||l?i:function(e){i&&i(e),e.defaultPrevented||f(e)},ref:n,target:m}))})),Pe=t.forwardRef((function(e,n){let{"aria-current":a="page",caseSensitive:i=!1,className:r="",end:l=!1,style:o,to:s,unstable_viewTransition:m,children:c}=e,g=be(e,xe),u=ie(s,{relative:g.relative}),d=te(),p=t.useContext(q),{navigator:h,basename:k}=t.useContext(Y),f=null!=p&&function(e,n){void 0===n&&(n={});let a=t.useContext(we);null==a&&_(!1);let{basename:i}=function(e){let n=t.useContext(V);return n||_(!1),n}(Ie.useViewTransitionState),r=ie(e,{relative:n.relative});if(!a.isTransitioning)return!1;let l=L(a.currentLocation.pathname,i)||a.currentLocation.pathname,o=L(a.nextLocation.pathname,i)||a.nextLocation.pathname;return null!=M(r.pathname,o)||null!=M(r.pathname,l)}(u)&&!0===m,E=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,S=d.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(S=S.toLowerCase(),v=v?v.toLowerCase():null,E=E.toLowerCase()),v&&k&&(v=L(v,k)||v);const b="/"!==E&&E.endsWith("/")?E.length-1:E.length;let y,x=S===E||!l&&S.startsWith(E)&&"/"===S.charAt(b),w=null!=v&&(v===E||!l&&v.startsWith(E)&&"/"===v.charAt(E.length)),N={isActive:x,isPending:w,isTransitioning:f},C=x?a:void 0;y="function"==typeof r?r(N):[r,x?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(N):o;return t.createElement(De,ve({},g,{"aria-current":C,className:y,ref:n,style:T,to:s,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var Ie,Ge;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ie||(Ie={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Ge||(Ge={}));const Oe=({title:e})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,t.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,t.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,t.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,t.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,t.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,t.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"}))),e)))),Me=({to:e,title:n})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Pe,{to:e,className:({isActive:e})=>"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 "+(e?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},n)),Re=({NavList:e})=>(0,t.createElement)("nav",{className:"gtmkit-flex gtmkit-flex-wrap gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-[15px] gtmkit-space-x-9"},e.map((function(e){return(0,t.createElement)(Me,{key:e.to,to:e.to,title:e.title})})));function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}function Ae(e,t){if(null==e)return{};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Ke(e,t){return Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ke(e,t)}function Fe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ke(e,t)}function je(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const He=n().createContext(null);var Be=function(e){return e.scrollTop},We="unmounted",ze="exited",Je="entering",$e="entered",Ve="exiting",qe=function(e){function t(t,n){var a;a=e.call(this,t,n)||this;var i,r=n&&!n.isMounting?t.enter:t.appear;return a.appearStatus=null,t.in?r?(i=ze,a.appearStatus=Je):i=$e:i=t.unmountOnExit||t.mountOnEnter?We:ze,a.state={status:i},a.nextCallback=null,a}Fe(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===We?{status:ze}:null};var a=t.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Je&&n!==$e&&(t=Je):n!==Je&&n!==$e||(t=Ve)}this.updateStatus(!1,t)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var e,t,n,a=this.props.timeout;return e=t=n=a,null!=a&&"number"!=typeof a&&(e=a.exit,t=a.enter,n=void 0!==a.appear?a.appear:t),{exit:e,enter:t,appear:n}},a.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Je){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Se().findDOMNode(this);n&&Be(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ze&&this.setState({status:We})},a.performEnter=function(e){var t=this,n=this.props.enter,a=this.context?this.context.isMounting:e,i=this.props.nodeRef?[a]:[Se().findDOMNode(this),a],r=i[0],l=i[1],o=this.getTimeouts(),s=a?o.appear:o.enter;e||n?(this.props.onEnter(r,l),this.safeSetState({status:Je},(function(){t.props.onEntering(r,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:$e},(function(){t.props.onEntered(r,l)}))}))}))):this.safeSetState({status:$e},(function(){t.props.onEntered(r)}))},a.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:Se().findDOMNode(this);t?(this.props.onExit(a),this.safeSetState({status:Ve},(function(){e.props.onExiting(a),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:ze},(function(){e.props.onExited(a)}))}))}))):this.safeSetState({status:ze},(function(){e.props.onExited(a)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},a.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,t.nextCallback=null,e(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Se().findDOMNode(this),a=null==e&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=i[0],l=i[1];this.props.addEndListener(r,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},a.render=function(){var e=this.state.status;if(e===We)return null;var t=this.props,a=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Ae(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return n().createElement(He.Provider,{value:null},"function"==typeof a?a(e,i):n().cloneElement(n().Children.only(a),i))},t}(n().Component);function Ye(){}qe.contextType=He,qe.propTypes={},qe.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ye,onEntering:Ye,onEntered:Ye,onExit:Ye,onExiting:Ye,onExited:Ye},qe.UNMOUNTED=We,qe.EXITED=ze,qe.ENTERING=Je,qe.ENTERED=$e,qe.EXITING=Ve;const Xe=qe;var Qe=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return a=t,void((n=e).classList?n.classList.remove(a):"string"==typeof n.className?n.className=je(n.className,a):n.setAttribute("class",je(n.className&&n.className.baseVal||"",a)));var n,a}))},Ze=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(t=e.call.apply(e,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var a=t.resolveArguments(e,n),i=a[0],r=a[1];t.removeClasses(i,"exit"),t.addClass(i,r?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var a=t.resolveArguments(e,n),i=a[0],r=a[1]?"appear":"enter";t.addClass(i,r,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var a=t.resolveArguments(e,n),i=a[0],r=a[1]?"appear":"enter";t.removeClasses(i,r),t.addClass(i,r,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:a?i+"-active":n[e+"Active"],doneClassName:a?i+"-done":n[e+"Done"]}},t}Fe(t,e);var a=t.prototype;return a.addClass=function(e,t,n){var a=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(a+=" "+i),"active"===n&&e&&Be(e),a&&(this.appliedClasses[t][n]=a,function(e,t){e&&t&&t.split(" ").forEach((function(t){return a=t,void((n=e).classList?n.classList.add(a):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(e,a))},a.removeClasses=function(e,t){var n=this.appliedClasses[t],a=n.base,i=n.active,r=n.done;this.appliedClasses[t]={},a&&Qe(e,a),i&&Qe(e,i),r&&Qe(e,r)},a.render=function(){var e=this.props,t=(e.classNames,Ae(e,["classNames"]));return n().createElement(Xe,Le({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(n().Component);Ze.defaultProps={classNames:""},Ze.propTypes={};const et=Ze,tt=({title:e=(0,a.__)("Save","gtm-kit"),className:n="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:l,useIsPending:o,useCanSave:s}=(0,i.useContext)(g);return(0,t.createElement)(r.Button,{className:n,onClick:()=>l(),variant:"primary",disabled:o||!s},s?(0,a.__)(e,"gtm-kit"):(0,a.__)("Saved","gtm-kit"),o?(0,t.createElement)(r.Spinner,null):"")},nt=()=>{const{useCanSave:e}=(0,i.useContext)(g);return(0,t.createElement)(et,{in:e,timeout:500,classNames:"slide",unmountOnExit:!0},(0,t.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,t.createElement)(tt,null)))},at=({subject:e})=>{const n=!0===e||"on"===e,i=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,t.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 "+i},n?(0,a.__)("Active","gtm-kit"):(0,a.__)("Inactive","gtm-kit"))},it=(0,i.forwardRef)((({children:e,className:n="",...a},i)=>(0,t.createElement)("div",{...a,className:"gtmkit-flex gtmkit-flex-col 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},e)));it.Header=({as:e="h3",title:n="",children:a,className:i="",...r})=>(0,t.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,t.createElement)(e,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},n),a),it.Content=({as:e="div",children:n,className:a="gtmkit-flex-auto",...i})=>(0,t.createElement)(e,{...i,className:a},n),it.Button=({url:e,destination:n,newTab:a=!1,text:i,group:l="",...o})=>{const s=ae();return(0,t.createElement)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,t.createElement)(r.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{n&&e&&!1===a?window.gtmkitSettings.current_poage===l?s(n,{replace:!0}):window.location.href=e+"#"+n:e?a?window.open(e):window.location.href=e:s(n,{replace:!0})}},(0,t.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const rt=it,lt=({title:e,data:n,className:r=""})=>{const{useSettings:l}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},e),(0,t.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] "+r},n.map(((e,n)=>!1===e.featured?null:(0,t.createElement)(rt,{key:n},(0,t.createElement)(rt.Header,{title:e.title},e.pill?(0,t.createElement)(at,{subject:l[e.group][e.option]}):null),(0,t.createElement)(rt.Content,null,e.text.map(((e,n)=>(0,t.createElement)("p",{key:n},e)))),(0,t.createElement)(rt.Button,{url:e.link.url,destination:e.link.destination,text:e.link.text?e.link.text:(0,a.__)("Read article","gtm-kit"),newTab:e.link.external,group:e.group}))))))},ot=e=>((e,t,n)=>{const a=(e,n)=>({...n,title:e.title,to:e.path,group:e.group||n.group,option:e.option||n.option,text:[e.description],link:{...n.link,url:window.gtmkitSettings[t+"Url"],destination:"/"+e.path}});return"templates"===t?Object.keys(e).map((t=>a(e[t][0],n))):Object.keys(e).map((t=>a(e[t],n)))})(window.gtmkitSettings[e],e,function(e){switch(e){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,a.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Read More","gtm-kit")}}}}(e)),st=()=>{const{useSettings:e}=(0,i.useContext)(g),[n,r]=(0,i.useState)(window.gtmkitSettings.tutorials),l=Boolean(e.general.sgtm_domain&&e.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{r((e=>[...e,{title:(0,a.__)("See all tutorials…","gtm-kit"),text:[(0,a.__)("See all our tutorials 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,a.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("General","gtm-kit")),(0,t.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,t.createElement)(rt,null,(0,t.createElement)(rt.Header,{title:"Google Tag Manager Container"},(0,t.createElement)(at,{subject:e.general.gtm_id&&e.general.container_active})),(0,t.createElement)(rt.Content,null,e.general.gtm_id&&e.general.container_active?(0,t.createElement)("p",null,(0,a.__)("Container ID:","gtm-kit")," ",e&&e.general.gtm_id):(0,t.createElement)("p",null,(0,a.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,t.createElement)(rt.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,t.createElement)(rt,null,(0,t.createElement)(rt.Header,{title:(0,a.__)("Server-side GTM","gtm-kit")},(0,t.createElement)(at,{subject:l})),(0,t.createElement)(rt.Content,null,(0,t.createElement)("p",null,(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,t.createElement)(rt.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,t.createElement)(rt,null,(0,t.createElement)(rt.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")},(0,t.createElement)(at,{subject:e.general.analytics_active})),(0,t.createElement)(rt.Content,null,(0,t.createElement)("p",null,(0,a.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,t.createElement)(rt.Button,{destination:"/misc",text:(0,a.__)("Share anonymous data","gtm-kit")}))),(0,t.createElement)(lt,{title:(0,a.__)("Tutorials","gtm-kit"),data:n}),(0,t.createElement)(lt,{title:(0,a.__)("Integrations","gtm-kit"),data:ot("integrations")}))},mt=({title:e,placeholder:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:l="general",optionName:o,isDisabled:s,useSettings:m,useUpdateStateSettings:c})=>(0,t.createElement)(r.TextControl,{label:e,placeholder:n,help:a,className:i,value:m[l][o],onChange:e=>c(l,o,e),disabled:s}),ct=({title:e,label:n,optionGroup:a="general",optionName:i,disabled:l=!1,useSettings:o,useUpdateStateSettings:s})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,t.createElement)(r.BaseControl,{label:e},(0,t.createElement)(r.ToggleControl,{label:n,checked:!l&&o[a][i],onChange:()=>{s(a,i,!(o&&o[a][i]))},disabled:l})))),gt=({title:e,options:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:o,disabled:s,useSettings:m,useUpdateStateSettings:c})=>(0,t.createElement)(r.RadioControl,{label:e,options:n,help:a,className:i,selected:parseInt(m[l][o]),onChange:e=>c(l,o,e),disabled:s}),ut=({title:e,help:n,items:a=[],optionGroup:l="general",optionName:o,disabled:s=!1,useSettings:m,useUpdateStateSettings:c})=>{const g=Array.isArray(m[l][o])?m[l][o]:[],[u,d]=(0,i.useState)(g);return(0,i.useEffect)((()=>{const e=Array.isArray(m[l][o])?m[l][o]:[];d(e)}),[m]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,t.createElement)(r.BaseControl,{label:e,help:n},a.map((e=>(0,t.createElement)(r.CheckboxControl,{key:e.role,label:e.name,disabled:s,checked:u.includes(e.role),onChange:t=>((e,t)=>{d((n=>{let a;return a=e?[...n,t]:n.filter((e=>e!==t)),c(l,o,a),a}))})(t,e.role)}))))))},dt=(0,i.forwardRef)((({children:e,className:n="",disabled:a=!1,...i},r)=>(0,t.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},e)));dt.Header=({as:e="h3",title:n="",children:a,className:i="",...r})=>(0,t.createElement)(e,{...r,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},n,a),dt.Content=({as:e="div",children:n,className:a="",...i})=>(0,t.createElement)(e,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+a},n);const pt=dt,ht=()=>{const{useSettings:e,useUpdateStateSettings:n,useUserRoles:r}=(0,i.useContext)(g),l=!(e.general.sgtm_domain&&e.general.sgtm_domain.trim()&&e.general.sgtm_container_identifier&&e.general.sgtm_container_identifier.trim()),o=te();return(0,t.useEffect)((()=>{const e=new URLSearchParams(o.search).get("focus");if(e){const t=document.getElementById(e);t&&t.scrollIntoView()}}),[o]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Google Tag Manager container","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("General Container Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,t.createElement)(mt,{title:(0,a.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,a.__)("Enter GTM Container ID","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Inject Container Code","gtm-kit"),label:(0,a.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Just the container","gtm-kit"),label:(0,a.__)("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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(mt,{title:(0,a.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,a.__)("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 so.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)("div",{id:"sgtm"}),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(mt,{title:(0,a.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,a.__)("Enter domain …","gtm-kit"),help:(0,a.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(mt,{title:(0,a.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,a.__)("Enter loader name …","gtm-kit"),help:(0,a.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,a.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:l,useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Google Tag Manager Server-side Tagging","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,t.createElement)("a",{href:"https://gtmkit.com/guides/google-tag-manager-server-side-tagging/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=sgtm&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more","gtm-kit"))),(0,t.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Hosting server-side GTM containers","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,a.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,t.createElement)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more about Stape.io","gtm-kit"))))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Page Speed Optimization","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("load_delayed_js event","gtm-kit"),label:(0,a.__)("Setting this to On will push the event 'load_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Delay JavaScript execution","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Page optimization plugins can delay the 'load_delayed_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,t.createElement)("a",{href:"https://gtmkit.com/guides/delay-javascript-execution-in-gtm/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=delay-js&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more","gtm-kit"))))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Tag Manager Environment","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(mt,{title:(0,a.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,a.__)("Enter gtm_auth code","gtm-kit"),help:(0,a.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(mt,{title:(0,a.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,a.__)("Enter gtm_preview code","gtm-kit"),help:(0,a.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Environments","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,a.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,a.__)("If left empty the default environment will be used.","gtm-kit")),(0,t.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Override settings in wp-config.php","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,t.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=container-settings&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more","gtm-kit"))))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Exclude User Roles","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(ut,{title:(0,a.__)("Exclude user roles","gtm-kit"),help:(0,a.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:r,optionName:"exclude_user_roles",useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600"},(0,a.__)("Warning!","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Excluding user roles is not compatible with all full-page cache solutions. Some full-page cache solutions may cache the page identically for all users, regardless of their user role. This could result in users being excluded who should not be.","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Please ensure thorough and proper testing of this.","gtm-kit")))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Container Code Implementation","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(gt,{title:(0,a.__)("Container code implementation:","gtm-kit"),options:[{label:(0,a.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,a.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,a.__)("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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(gt,{title:(0,a.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,a.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,a.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,a.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,a.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,a.__)('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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,t.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>")))))},_t=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Post Data","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Post Data Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,t.createElement)(ct,{title:(0,a.__)("Post type","gtm-kit"),id:"post-type",label:(0,a.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Page type","gtm-kit"),id:"page-type",label:(0,a.__)('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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Categories","gtm-kit"),id:"categories",label:(0,a.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Tags","gtm-kit"),id:"tags",label:(0,a.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post title","gtm-kit"),id:"post-title",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post ID","gtm-kit"),id:"post-id",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post data","gtm-kit"),id:"post-date",label:(0,a.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,a.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,a.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:e,useUpdateStateSettings:n}))))},kt=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("User Data","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,t.createElement)(pt.Content,{className:"gtmkit-space-y-2"},(0,t.createElement)("p",null,(0,a.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,t.createElement)("p",null,(0,a.__)("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,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("User Data Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,a.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("User ID","gtm-kit"),id:"user-id",label:(0,a.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("User role","gtm-kit"),id:"user-role",label:(0,a.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:e,useUpdateStateSettings:n}))))},ft=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r=!e.general.gcm_default_settings;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Google Consent Mode","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Consent Mode Activation","gtm-kit")},(0,t.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,a.__)("Warning!","gtm-kit"))),(0,t.createElement)(pt.Content,{className:"gtmkit-space-y-2"},(0,t.createElement)("p",null,(0,a.__)("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,t.createElement)("p",null,(0,a.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,t.createElement)("p",{className:"!gtmkit-mt-4"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,t.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,a.__)("See an example of how consent is updated","gtm-kit"))),(0,t.createElement)(ct,{title:(0,a.__)("Activate GCM settings","gtm-kit"),label:(0,a.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(pt,{disabled:r},(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Ad Personalization","gtm-kit"),label:(0,a.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Ad Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Ad User Data","gtm-kit"),label:(0,a.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Analytics Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Functionality Storage","gtm-kit"),label:(0,a.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Personalization Storage","gtm-kit"),label:(0,a.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Security Storage","gtm-kit"),label:(0,a.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,a.__)("Advanced","gtm-kit")),(0,t.createElement)(ct,{title:(0,a.__)("Redact Ads Data","gtm-kit"),label:(0,a.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Pass through URL parameters","gtm-kit"),label:(0,a.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(mt,{title:(0,a.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,a.__)("Enter time in milliseconds","gtm-kit"),useSettings:e,useUpdateStateSettings:n}))))},Et=({label:e,value:n,tag:a})=>(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,t.createElement)("strong",null,e)),(0,t.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===a?(0,t.createElement)("code",{className:"gtmkit-text-sm"},n):(0,t.createElement)("em",null,n))),St=()=>{const{useSiteData:e}=(0,i.useContext)(g),n=Object.values(e.shared_data);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("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,t.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,t.createElement)("tbody",{className:"gtmkit-py-6"},n.map((function(e,n){return(0,t.createElement)(Et,{key:n,label:e.label,value:e.value,tag:e.tag})})))))},vt=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Misc","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(St,null),(0,t.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,t.createElement)(ct,{title:(0,a.__)("Share anonymous data","gtm-kit"),label:(0,a.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Logging and debugging","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Event Inspector","gtm-kit"),label:(0,a.__)("The event inspector is placed in the footer of the front and it allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Console log","gtm-kit"),label:(0,a.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Debug log","gtm-kit"),label:(0,a.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:e,useUpdateStateSettings:n}))))},bt=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(lt,{title:(0,a.__)("Integrations","gtm-kit"),data:ot("integrations")})),yt=({pluginName:e})=>(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.sprintf)( 2 2 // translators: %s is the name of the plugin. 3 (0, n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,n.sprintf)(3 (0,a.__)("%s is not active","gtm-kit"),e),className:"gtmkit-text-red-600"}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-6"},(0,a.sprintf)( 4 4 // translators: %s is the name of the plugin. 5 (0, n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(r.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,n.sprintf)(5 (0,a.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),e)),(0,t.createElement)(r.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+e}},(0,a.sprintf)( 6 6 // translators: %s is the name of the plugin. 7 (0, n.__)("Install %s","gtm-kit"),t)))),xe=({title:t,options:a,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,n.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.SelectControl,{label:t,value:d&&d[l][s],options:h,className:o,onChange:t=>p(l,s,t),disabled:m,help:c}))},Se=({pluginName:t,optionName:a,pluginInactive:i})=>(0,e.createElement)(de,{disabled:i},(0,e.createElement)(de.Header,{title:(0,n.sprintf)(7 (0,a.__)("Install %s","gtm-kit"),e)))),xt=({title:e,options:n,className:l="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:s,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,a.__)("(not set)","gtm-kit"),value:""},...n]:n;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.SelectControl,{label:e,value:d&&d[o][s],options:h,className:l,onChange:e=>p(o,s,e),disabled:m,help:c}))},wt=({pluginName:e,optionName:n,pluginInactive:r})=>{const{useSettings:l,useUpdateStateSettings:o}=(0,i.useContext)(g);return(0,t.createElement)(pt,{disabled:r},(0,t.createElement)(pt.Header,{title:(0,a.sprintf)( 8 8 // translators: %s is the name of the plugin. 9 (0, n.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.sprintf)(9 (0,a.__)("%s Integration","gtm-kit"),e)}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.sprintf)( 10 10 // translators: %s is the name of the plugin. 11 (0, n.__)("Track %s","gtm-kit"),t),label:(0,n.sprintf)(11 (0,a.__)("Track %s","gtm-kit"),e),label:(0,a.sprintf)( 12 12 // translators: %s is the name of the plugin. 13 (0, n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:a,disabled:i}))),we=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Ne=()=>{const{useSettings:t,isWooAddonActive:a}=(0,i.useContext)(g),r="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,l=o||!t.integrations.woocommerce_integration,s=l||!a,m=s||!t.general.sgtm_domain,c=m||!t.premium.woocommerce_webhooks;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,n.__)("WooCommerce","gtm-kit")),o?(0,e.createElement)(ye,{pluginName:r}):null,(0,e.createElement)(Se,{pluginName:r,optionName:"woocommerce_integration",pluginInactive:o}),(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("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:l}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:l}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('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:l})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("User-Provided Data","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://support.google.com/google-ads/answer/13262500?sjid=9465166023214753583-EU#Code_snippet",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),a?(0,e.createElement)(de,{disabled:s},(0,e.createElement)(de.Header,{title:(0,n.__)("Webhooks for server-side tracking","gtm-kit")}),(0,e.createElement)(de.Content,null,m?(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm"},(0,n.__)("Go to sGTM settings","gtm-kit"))):(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging"},(0,n.__)("Go to GTM Templates","gtm-kit"))),(0,e.createElement)(ce,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:m}),(0,e.createElement)(ce,{title:(0,n.__)("Purchase webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c}),(0,e.createElement)(ce,{title:(0,n.__)("Refund webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c}))):null,(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Event customization","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:"view_item_list (with product filter)",options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:l}),(0,e.createElement)(ge,{title:"view_item",options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:l}),(0,e.createElement)(ge,{title:"add_shipping_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:l}),(0,e.createElement)(ge,{title:"add_payment_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:l}))),(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:we,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(me,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix ...","gtm-kit"),help:(0,n.__)("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:l}))),a?(0,e.createElement)(de,{disabled:s},(0,e.createElement)(de.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")),(0,e.createElement)(me,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector ...","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector ...","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector ...","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}))):null,(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("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:l}),(0,e.createElement)(ce,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("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:l}),(0,e.createElement)(ce,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("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:l}))))},Ce=()=>{const{useSettings:t}=(0,i.useContext)(g),a="Contact Form 7",r=!window.gtmkitSettings.plugins.cf7,o=r||!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,n.__)("Contact Form 7","gtm-kit")),r?(0,e.createElement)(ye,{pluginName:a}):null,(0,e.createElement)(Se,{pluginName:a,optionName:"cf7_integration",pluginInactive:r}),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o}))))},Te=()=>{const t="Easy Digital Downloads",a=!window.gtmkitSettings.plugins.edd,{useSettings:r}=(0,i.useContext)(g),o=a||!r.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,n.__)("Easy Digital Downloads","gtm-kit")),a?(0,e.createElement)(ye,{pluginName:t}):null,(0,e.createElement)(Se,{pluginName:t,optionName:"edd_integration",pluginInactive:a}),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("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:o}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o}),(0,e.createElement)(ce,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o}))),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:we,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,e.createElement)(me,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix ...","gtm-kit"),help:(0,n.__)("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:o}))),(0,e.createElement)(de,{disabled:a},(0,e.createElement)(de.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("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:o}))))},De=window.gtmkitSettings.templates||{},Pe=Object.keys(De).map((function(t){const e=De[t][0];return{title:e.title,to:e.path,pill:!1,text:[e.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+e.path,text:(0,n.__)("Get template","gtm-kit")}}})),Ge=()=>(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,n.__)("Getting Started","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("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-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,n.__)("Read the guide","gtm-kit"))))),(0,e.createElement)(oe,{title:(0,n.__)("Templates","gtm-kit"),data:Pe})),Ie=({title:t,description:a,link:i,templates:r})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:t}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},a),i&&i.url&&i.link_text?(0,e.createElement)("div",null,(0,e.createElement)("a",{href:i.url,target:"_blank",className:"gtmkit-text-color-primary gtmkit-text-base dgtmkit-font-semibold hover:gtmkit-underline",rel:"noreferrer"},i.link_text)):null,r&&r.length>0?(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},r.map((function(t){return(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},r.map((function(t){return(0,e.createElement)("li",null,t.help_text)}))))):null))),Me=({sectionData:t})=>{const a=t.collections;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"},t.title),Object.keys(a).map((function(t){return(0,e.createElement)(Ie,{title:a[t].title,description:a[t].description,link:a[t].link,templates:a[t].templates})})))},Oe=()=>{const t=nt(),a=window.gtmkitSettings.tutorials;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,n.__)("Help","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})}},(0,n.__)("See support options","gtm-kit"))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("ul",null,a.map(((t,a)=>(0,e.createElement)("li",{key:a,className:"gtmkit-mb-4"},(0,e.createElement)("a",{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,a)=>(0,e.createElement)("div",{key:a,className:"gtmkit-text-sm"},t))))))))))},Re=()=>{const{useIsSending:t,useSiteData:a,useUpdateSupportTicket:o,useSupportTicket:l,useSendSystemData:s,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);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,n.__)("Get support","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,e.createElement)(de.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,n.__)("WordPress.org 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,n.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,n.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,e.createElement)(de.Content,null,m?(0,e.createElement)("p",{className:"gtmkit-mb-2"},c):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2"},(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")),(0,e.createElement)(r.TextControl,{label:(0,e.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:l,onChange:t=>o(t)}),(0,e.createElement)(r.Button,{variant:"primary",className:"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",onClick:()=>{s()},disabled:!l.toUpperCase().startsWith("FS")},(0,e.createElement)("span",null,(0,n.__)("Send system data","gtm-kit")),t?(0,e.createElement)(r.Spinner,null):"")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("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,n.__)("Version:","gtm-kit")," ",a.gtmkit_version,")")),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",null,(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,n.__)("The changelog","gtm-kit")),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("The GitHub repository","gtm-kit"))))))};const Ue={integrations:(0,n.__)("Integrations","gtm-kit"),templates:(0,n.__)("Google Tag Manager Templates","gtm-kit"),help:(0,n.__)("Help","gtm-kit")},Le=()=>{const{useSettings:t}=(0,i.useContext)(g),a=window.gtmkitSettings.currentPage,o=function({page:t}){switch(t){case"general":return[{to:"general",title:(0,n.__)("Dashboard","gtm-kit")},{to:"container",title:(0,n.__)("Container","gtm-kit")},{to:"post-data",title:(0,n.__)("Post data","gtm-kit")},{to:"user-data",title:(0,n.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,n.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,n.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,n.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}];case"templates":return[{to:"templates",title:(0,n.__)("Templates","gtm-kit")},...Pe];case"help":return[{to:"help",title:(0,n.__)("Help","gtm-kit")},{to:"support",title:(0,n.__)("Support","gtm-kit")}]}}({page:a}),l=window.gtmkitSettings.templates,s=Ue[a]||(0,n.__)("Settings","gtm-kit");return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,{title:s}),(0,e.createElement)(Ut,{NavList:o}),(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)(pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(be,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(ve,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Ne,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Ce,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Te,null)}),(0,e.createElement)(ht,{exact:!0,path:"/templates",element:(0,e.createElement)(Ge,null)}),l&&Object.keys(l).map((function(t){return(0,e.createElement)(ht,{exact:!0,key:t,path:t,element:(0,e.createElement)(Me,{sectionData:l[t][0]})})})),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(Oe,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)(ae,null)):(0,e.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,e.createElement)(r.Spinner,null))},Ae=()=>(0,e.createElement)(Ct,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Le,null)));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,i.render)((0,e.createElement)(Ae,null),t)}))})();13 (0,a.__)("Activate the %s integration","gtm-kit"),e),optionGroup:"integrations",optionName:n,disabled:r,useSettings:l,useUpdateStateSettings:o})))},Nt=[{label:(0,a.__)("Retail","gtm-kit"),value:"retail"},{label:(0,a.__)("Education","gtm-kit"),value:"education"},{label:(0,a.__)("Flights","gtm-kit"),value:"flights"},{label:(0,a.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,a.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,a.__)("Local deals","gtm-kit"),value:"local"},{label:(0,a.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,a.__)("Travel","gtm-kit"),value:"travel"},{label:(0,a.__)("Custom","gtm-kit"),value:"custom"}],Ct=e=>{const{Fill:n,Slot:a}=(0,r.createSlotFill)(e),i=({children:e})=>(0,t.createElement)(n,null,e);return i.Slot=({fillProps:e})=>(0,t.createElement)(a,{fillProps:e},(e=>e.length?e:null)),i},Tt=Ct("GravityForms"),Ut=Ct("WooWebhooks"),Dt=Ct("WooCustomSelectors"),Pt=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r="WooCommerce",l=!window.gtmkitSettings.plugins.woocommerce,o=l||!e.integrations.woocommerce_integration,s=o||!e.general.sgtm_domain,m=s||!e.premium.woocommerce_webhooks;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("WooCommerce","gtm-kit")),l?(0,t.createElement)(yt,{pluginName:r}):null,(0,t.createElement)(wt,{pluginName:r,optionName:"woocommerce_integration",pluginInactive:l}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Basic settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(xt,{title:(0,a.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,a.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:o}),(0,t.createElement)(ct,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Exclude shipping from revenue","gtm-kit"),label:(0,a.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:o,useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("User Data","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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:o,useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("User-Provided Data","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,t.createElement)("a",{href:"https://support.google.com/google-ads/answer/13262500?sjid=9465166023214753583-EU#Code_snippet",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more","gtm-kit"))))))),(0,t.createElement)(Ut.Slot,{fillProps:{settingsInactive:o,useSettings:e,useUpdateStateSettings:n,sgtmInactive:s,webhooksInactive:m}}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Event customization","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(gt,{title:"view_item_list (with product filter)",options:[{label:(0,a.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,a.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,a.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(gt,{title:"view_item",options:[{label:(0,a.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,a.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,a.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,a.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(gt,{title:"add_shipping_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(gt,{title:"add_payment_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:o,useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(xt,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Nt,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,t.createElement)(mt,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,a.__)("Enter prefix …","gtm-kit"),help:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(Dt.Slot,{fillProps:{settingsInactive:o,useSettings:e,useUpdateStateSettings:n,sgtmInactive:s,webhooksInactive:m}}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Advanced settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Include permalink structure","gtm-kit"),label:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Include path of pages","gtm-kit"),label:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}))))},It=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r="Contact Form 7",l=!window.gtmkitSettings.plugins.cf7,o=l||!e.integrations.cf7_integration;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Contact Form 7","gtm-kit")),l?(0,t.createElement)(yt,{pluginName:r}):null,(0,t.createElement)(wt,{pluginName:r,optionName:"cf7_integration",pluginInactive:l}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(gt,{title:(0,a.__)("Load JavaScript","gtm-kit"),options:[{label:(0,a.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,a.__)("On all pages","gtm-kit"),value:2}],help:(0,a.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:e,useUpdateStateSettings:n}))))},Gt=()=>{const e="Easy Digital Downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:r,useUpdateStateSettings:l}=(0,i.useContext)(g),o=n||!r.integrations.edd_integration;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Easy Digital Downloads","gtm-kit")),n?(0,t.createElement)(yt,{pluginName:e}):null,(0,t.createElement)(wt,{pluginName:e,optionName:"edd_integration",pluginInactive:n}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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:o,useSettings:r,useUpdateStateSettings:l}),(0,t.createElement)(ct,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:r,useUpdateStateSettings:l}),(0,t.createElement)(ct,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o,useSettings:r,useUpdateStateSettings:l}))),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(xt,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Nt,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,t.createElement)(mt,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,a.__)("Enter prefix …","gtm-kit"),help:(0,a.__)("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:o,useSettings:r,useUpdateStateSettings:l}))),(0,t.createElement)(pt,{disabled:n},(0,t.createElement)(pt.Header,{title:(0,a.__)("Advanced settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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:o,useSettings:r,useUpdateStateSettings:l}))))},Ot=window.gtmkitSettings.templates||{},Mt=(Object.keys(Ot).map((function(e){const t=Ot[e][0];return{title:t.title,to:t.path,pill:!1,text:[t.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+t.path,text:(0,a.__)("Get template","gtm-kit")}}})),()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Getting Started","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,t.createElement)("p",null,(0,a.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,t.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,a.__)("Read the guide","gtm-kit"))))),(0,t.createElement)(lt,{title:(0,a.__)("Templates","gtm-kit"),data:ot("templates")}))),Rt=({title:e,description:n,link:i,templates:r})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:e}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},n),i&&i.url&&i.link_text?(0,t.createElement)("div",null,(0,t.createElement)("a",{href:i.url,target:"_blank",className:"gtmkit-text-color-primary gtmkit-text-base dgtmkit-font-semibold hover:gtmkit-underline",rel:"noreferrer"},i.link_text)):null,r&&r.length>0?(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,t.createElement)("div",null,(0,t.createElement)("h4",{className:"gtmkit-font-bold"},(0,a.__)("GTM container import files:","gtm-kit")),(0,t.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},r.map((function(e){return(0,t.createElement)("li",null,(0,t.createElement)("a",{className:"hover:gtmkit-underline",href:e.link,target:"_blank",rel:"noreferrer"},e.title))})))),(0,t.createElement)("div",null,(0,t.createElement)("h4",{className:"gtmkit-font-bold"},(0,a.__)("Necessary modifications:","gtm-kit")),(0,t.createElement)("ul",{className:"gtmkit-text-sm"},r.map((function(e){return(0,t.createElement)("li",null,e.help_text)}))))):null))),Lt=({sectionData:e})=>{const n=e.collections;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},e.title),Object.keys(n).map((function(e){return(0,t.createElement)(Rt,{title:n[e].title,description:n[e].description,link:n[e].link,templates:n[e].templates})})))},At=()=>{const e=ae(),n=window.gtmkitSettings.tutorials;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Help","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Need help?","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("We are here to help if you have any questions.","gtm-kit"),(0,t.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{e("/support",{replace:!0})}},(0,a.__)("See support options","gtm-kit"))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Tutorials","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("ul",null,n.map(((e,n)=>(0,t.createElement)("li",{key:n,className:"gtmkit-mb-4"},(0,t.createElement)("a",{href:e.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},e.title),e.text.map(((e,n)=>(0,t.createElement)("div",{key:n,className:"gtmkit-text-sm"},e))))))))))},Kt=()=>{const{useIsSending:e,useSiteData:n,useUpdateSupportTicket:l,useSupportTicket:o,useSendSystemData:s,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Get support","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Support options","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,a.__)("WordPress.org Support Forum","gtm-kit"))),(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,a.__)("GITHub repository","gtm-kit"))),(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,a.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,t.createElement)(pt.Content,null,m?(0,t.createElement)("p",{className:"gtmkit-mb-2"},c):(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"gtmkit-mb-2"},(0,a.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")),(0,t.createElement)(r.TextControl,{label:(0,t.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,a.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:o,onChange:e=>l(e)}),(0,t.createElement)(r.Button,{variant:"primary",className:"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",onClick:()=>{s()},disabled:!o.toUpperCase().startsWith("FS")},(0,t.createElement)("span",null,(0,a.__)("Send system data","gtm-kit")),e?(0,t.createElement)(r.Spinner,null):"")))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,t.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,a.__)("Version:","gtm-kit")," ",n.gtmkit_version,")")),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",null,(0,a.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,t.createElement)("br",null),(0,t.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,a.__)("The changelog","gtm-kit")),(0,t.createElement)("br",null),(0,t.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,a.__)("The GitHub repository","gtm-kit"))))))};const Ft=({integrationID:e,pluginName:n})=>{const{useSettings:a,useUpdateStateSettings:r}=(0,i.useContext)(g),l=!window.gtmkitSettings.plugins[e],o=l||!a.integrations[e+"_integration"];return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},n),l?(0,t.createElement)(yt,{pluginName:n}):null,(0,t.createElement)(wt,{pluginName:n,optionName:e+"_integration",pluginInactive:l}),"gf"===e?(0,t.createElement)(Tt.Slot,{fillProps:{settingsInactive:o,useSettings:a,useUpdateStateSettings:r}}):null)},jt=window.wp.plugins,Ht={integrations:(0,a.__)("Integrations","gtm-kit"),templates:(0,a.__)("Google Tag Manager Templates","gtm-kit"),help:(0,a.__)("Help","gtm-kit")},Bt=()=>{const{useSettings:e}=(0,i.useContext)(g),n=window.gtmkitSettings,l=n.currentPage,o=function({page:e}){switch(e){case"general":return[{to:"general",title:(0,a.__)("Dashboard","gtm-kit")},{to:"container",title:(0,a.__)("Container","gtm-kit")},{to:"post-data",title:(0,a.__)("Post data","gtm-kit")},{to:"user-data",title:(0,a.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,a.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,a.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,a.__)("Integrations","gtm-kit")},...ot("integrations")];case"templates":return[{to:"templates",title:(0,a.__)("Templates","gtm-kit")},...ot("templates")];case"help":return[{to:"help",title:(0,a.__)("Help","gtm-kit")},{to:"support",title:(0,a.__)("Support","gtm-kit")}]}}({page:l}),s=n.templates,m=n.integrations,c=Ht[l]||(0,a.__)("Settings","gtm-kit");return Object.keys(e).length?(0,t.createElement)(r.SlotFillProvider,null,(0,t.createElement)(Oe,{title:c}),(0,t.createElement)(Re,{NavList:o}),(0,t.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,t.createElement)(ke,null,(0,t.createElement)(he,{exact:!0,path:"/general",element:(0,t.createElement)(st,null)}),(0,t.createElement)(he,{exact:!0,path:"/container",element:(0,t.createElement)(ht,null)}),(0,t.createElement)(he,{exact:!0,path:"/post-data",element:(0,t.createElement)(_t,null)}),(0,t.createElement)(he,{exact:!0,path:"/user-data",element:(0,t.createElement)(kt,null)}),(0,t.createElement)(he,{exact:!0,path:"/google-consent-mode",element:(0,t.createElement)(ft,null)}),(0,t.createElement)(he,{exact:!0,path:"/misc",element:(0,t.createElement)(vt,null)}),(0,t.createElement)(he,{exact:!0,path:"/integrations",element:(0,t.createElement)(bt,null)}),(0,t.createElement)(he,{exact:!0,path:"/woocommerce",element:(0,t.createElement)(Pt,null)}),(0,t.createElement)(he,{exact:!0,path:"/cf7",element:(0,t.createElement)(It,null)}),(0,t.createElement)(he,{exact:!0,path:"/edd",element:(0,t.createElement)(Gt,null)}),m&&Object.keys(m).map((function(e){if("add-on"===m[e].type)return(0,t.createElement)(he,{exact:!0,key:e,path:e,element:(0,t.createElement)(Ft,{integrationID:e,pluginName:m[e].title})})})),(0,t.createElement)(he,{exact:!0,path:"/templates",element:(0,t.createElement)(Mt,null)}),s&&Object.keys(s).map((function(e){return(0,t.createElement)(he,{exact:!0,key:e,path:e,element:(0,t.createElement)(Lt,{sectionData:s[e][0]})})})),(0,t.createElement)(he,{exact:!0,path:"/help",element:(0,t.createElement)(At,null)}),(0,t.createElement)(he,{exact:!0,path:"/support",element:(0,t.createElement)(Kt,null)}),(0,t.createElement)(he,{path:"/",element:(0,t.createElement)(pe,{replace:!0,to:"/"+l})}))),(0,t.createElement)(nt,null),(0,t.createElement)(jt.PluginArea,null)):(0,t.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,t.createElement)(r.Spinner,null))},Wt=()=>(0,t.createElement)(Ce,{basename:"/"},(0,t.createElement)(u,null,(0,t.createElement)(Bt,null)));document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById(window.gtmkitSettings.rootId);null!=e&&(0,i.render)((0,t.createElement)(Wt,null),e)}))})(); -
gtm-kit/tags/1.23/assets/admin/wizard.asset.php
r3094947 r3112163 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' b6e046a3f90ec0389c04');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'c05e6e2acf0cb26b2f28'); -
gtm-kit/tags/1.23/assets/admin/wizard.js
r3082967 r3112163 1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(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:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_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,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket ;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=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},u.apply(this,arguments)}var d;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const p="popstate";function h(t,e){if(!1===t||null==t)throw new Error(e)}function k(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 f(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?S(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function E(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 S(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 x;function M(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?S(e):e).pathname||"/",a);if(null==n)return null;let i=N(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)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t){let e=A(n);r=C(i[t],e)}return r}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};l.relativePath.startsWith("/")&&(h(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&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:I(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 v(t.path))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...l),o.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 w=/^:[\w-]+$/,_=3,b=2,T=1,j=10,L=-2,D=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=L),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?_:""===e?T:j)),n)}function C(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;r.push({params:n,pathname:B([i,m.pathname]),pathnameBase:G(B([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=B([i,m.pathnameBase]))}return r}function O(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),k("*"===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=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function A(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!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 z(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 P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),z("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),z("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),z("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else{let t=e.length-1;if(!n&&o.startsWith("..")){let e=o.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:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=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:r,search:W(n),hash:Y(i)}}(i,r),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,"/"),G=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],Q=(new Set(F),["get",...F]);function J(){return J=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},J.apply(this,arguments)}new Set(Q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),K=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(K)}function tt(){return q()||h(!1),e.useContext(K).location}function et(t){e.useContext(Z).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(H);return a||h(!1),a}(st.UseNavigateStable),a=ct(mt.UseNavigateStable),n=e.useRef(!1);return et((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:B([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext(Z),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=p;if("/"!==m){let t=m.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:k}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&void 0!==(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:B([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:B([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&f?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},f):f}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=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,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const rt=e.createElement(it,null);class lt extends e.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:void 0!==t.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 void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(H);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=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}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:i,relative:r}=t;q()||h(!1);let{future:l,static:o}=e.useContext(Z),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:J({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,f=e.useMemo((()=>{let t=U(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);return null==f?null:e.createElement(Z.Provider,{value:c},e.createElement(K.Provider,{children:n,value:f}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={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&&(l.children=kt(t.props.children,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const ft=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:E(t);return a=a.replace(/ $/,"%20"),h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:i},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:E(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,e.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l}=(0,a.useContext)(c),o=at();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)(n.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=>i("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.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:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-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)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=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"))),n&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();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)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.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:()=>{i("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.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:()=>{i("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();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"},o.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"},o.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"},o.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"},o.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"},o.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"},o.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)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.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:()=>{i("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.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:window.gtmkitSettings.templatesUrl+"#/ga4"},"Google Analytics 4")),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.gtmkitSettings.templatesUrl+"#/google-ads"},"Google Ads")),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.gtmkitSettings.templatesUrl+"#/facebook"},"Facebook")))),(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)(n.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")))),Tt=[{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")}],jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:i})},Lt=({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,Dt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let i="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 i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=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:i},(0,e.createElement)(Lt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},It=()=>{const t=Tt.length-1+Tt[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}))})(Tt,{path:tt().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"},Tt.map((function(n){return(0,e.createElement)(Dt,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},Ct=()=>(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)(It,null)),Ot=()=>(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"))))),At=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ct,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)(wt,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)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Ut=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(Ut,null),document.getElementById(window.gtmkitSettings.rootId))}))})();1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(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:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_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,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket,a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey,a.licenseKey=e.payload.licenseKey||a.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":a.isSendingLicenseKey=!1,a.isLicenseKeySent=e.payload.isLicenseKeySent||a.isLicenseKeySent,a.licenseKeyMessage=e.payload.licenseKeyMessage||a.licenseKeyMessage}return a},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{r({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,o("gtmkit/v1/send-license-key","POST",e,!0));var e;r({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[]};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=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},u.apply(this,arguments)}var d;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const p="popstate";function h(t,e){if(!1===t||null==t)throw new Error(e)}function k(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),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?S(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function f(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 S(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 x;function M(t,e,a){return void 0===a&&(a="/"),function(t,e,a,n){let i=A(("string"==typeof e?S(e):e).pathname||"/",a);if(null==i)return null;let r=N(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 l=null;for(let t=0;null==l&&t<r.length;++t){let e=U(i);l=C(r[t],e,n)}return l}(t,e,a,!1)}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};l.relativePath.startsWith("/")&&(h(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&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:I(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 v(t.path))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...l),o.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 _=/^:[\w-]+$/,w=3,b=2,L=1,T=10,j=-2,D=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=j),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(_.test(e)?w:""===e?L:T)),n)}function C(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",l=[];for(let t=0;t<n.length;++t){let o=n[t],s=t===n.length-1,m="/"===r?e:e.slice(r.length)||"/",c=O({path:o.relativePath,caseSensitive:o.caseSensitive,end:s},m),g=o.route;if(!c&&s&&a&&!n[n.length-1].route.index&&(c=O({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),l.push({params:i,pathname:B([r,c.pathname]),pathnameBase:G(B([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=B([r,c.pathnameBase]))}return l}function O(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),k("*"===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=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function U(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!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 A(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 z(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 P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),z("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),z("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),z("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else{let t=e.length-1;if(!n&&o.startsWith("..")){let e=o.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:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=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:r,search:K(n),hash:Y(i)}}(i,r),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,"/"),G=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const W=["post","put","patch","delete"],F=(new Set(W),["get",...W]);function Q(){return Q=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},Q.apply(this,arguments)}new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const J=e.createContext(null),H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(Z)}function tt(){return q()||h(!1),e.useContext(Z).location}function et(t){e.useContext($).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(J);return a||h(!1),a}(st.UseNavigateStable),a=ct(mt.UseNavigateStable),n=e.useRef(!1);return et((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,Q({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(J),{basename:a,future:n,navigator:i}=e.useContext($),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:B([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext($),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=p;if("/"!==m){let t=m.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:k}),E=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&void 0!==(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:B([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:B([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&E?e.createElement(Z.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},E):E}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext(H);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=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,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const rt=e.createElement(it,null);class lt extends e.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:void 0!==t.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 void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(J);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=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}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:i,relative:r}=t;q()||h(!1);let{future:l,static:o}=e.useContext($),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:Q({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,E=e.useMemo((()=>{let t=A(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);return null==E?null:e.createElement($.Provider,{value:c},e.createElement(Z.Provider,{children:n,value:E}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={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&&(l.children=kt(t.props.children,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const Et=e.startTransition;function ft(t){let{basename:a,children:n,future:i,window:r}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:f(t);return a=a.replace(/ $/,"%20"),h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=E(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=E(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:i},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:f(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Et?Et((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,e.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l}=(0,a.useContext)(c),o=at();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)(n.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=>i("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.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:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-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)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=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"))),n&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();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)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.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:()=>{i("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.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:()=>{i("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();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"},o.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"},o.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"},o.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"},o.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"},o.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"},o.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)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.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:()=>{i("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.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:window.gtmkitSettings.templatesUrl+"#/ga4"},"Google Analytics 4")),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.gtmkitSettings.templatesUrl+"#/google-ads"},"Google Ads")),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.gtmkitSettings.templatesUrl+"#/facebook"},"Facebook")))),(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)(n.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")))),Lt=[{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")}],Tt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:i})},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,Dt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let i="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 i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=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:i},(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(Tt,{step:t,currentStep:a,totalSteps:n}))},It=()=>{const t=Lt.length-1+Lt[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}))})(Lt,{path:tt().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"},Lt.map((function(n){return(0,e.createElement)(Dt,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},Ct=()=>(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)(It,null)),Ot=()=>(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"))))),Ut=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ct,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)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(wt,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)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},At=()=>(0,e.createElement)(ft,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(Ut,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(At,null),document.getElementById(window.gtmkitSettings.rootId))}))})(); -
gtm-kit/tags/1.23/assets/frontend/event-inspector.asset.php
r3082967 r3112163 1 <?php return array('dependencies' => array(), 'version' => '3 506d902dd7332588568');1 <?php return array('dependencies' => array(), 'version' => '361fa528b625299cad80'); -
gtm-kit/tags/1.23/gtm-kit.php
r3094947 r3112163 4 4 * 5 5 * Plugin Name: GTM Kit 6 * Version: 1.2 2.46 * Version: 1.23 7 7 * Plugin URI: https://gtmkit.com/ 8 8 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed. … … 16 16 * 17 17 * WC requires at least: 8.0 18 * WC tested up to: 8.918 * WC tested up to: 9.1 19 19 * 20 20 * @package GTM Kit … … 28 28 } 29 29 30 const GTMKIT_VERSION = '1.2 2.4';30 const GTMKIT_VERSION = '1.23'; 31 31 32 32 if ( ! defined( 'GTMKIT_FILE' ) ) { -
gtm-kit/tags/1.23/languages/gtm-kit.pot
r3094947 r3112163 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: GTM Kit 1.2 2.4\n"5 "Project-Id-Version: GTM Kit 1.23\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: 2024-0 5-29T20:50:59+00:00\n"12 "POT-Creation-Date: 2024-07-03T14:47:54+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.9.0\n" … … 45 45 msgstr "" 46 46 47 #: src/Admin/AbstractOptionsPage.php:2 6447 #: src/Admin/AbstractOptionsPage.php:229 48 48 #: src/Admin/SetupWizard.php:213 49 49 msgid "Whoops, something's not working." 50 50 msgstr "" 51 51 52 #: src/Admin/AbstractOptionsPage.php:2 6752 #: src/Admin/AbstractOptionsPage.php:232 53 53 #: src/Admin/SetupWizard.php:216 54 54 msgid "It looks like something is preventing JavaScript from loading on your website. GTM Kit requires JavaScript in order to give you the best possible experience." 55 55 msgstr "" 56 56 57 #: src/Admin/AbstractOptionsPage.php:2 7257 #: src/Admin/AbstractOptionsPage.php:237 58 58 #: src/Admin/SetupWizard.php:164 59 59 #: src/Admin/SetupWizard.php:221 … … 88 88 #: assets/admin/settings.js:13 89 89 msgid "Help" 90 msgstr "" 91 92 #: src/Admin/Integrations.php:26 93 msgid "The #1 open source eCommerce platform built for WordPress" 94 msgstr "" 95 96 #: src/Admin/Integrations.php:33 97 msgid "Just another contact form plugin for WordPress. Simple but flexible" 98 msgstr "" 99 100 #: src/Admin/Integrations.php:40 101 msgid "Easy way to sell Digital Products With WordPress" 90 102 msgstr "" 91 103 … … 259 271 260 272 #: assets/admin/settings.js:1 261 msgid "The #1 open source eCommerce platform built for WordPress" 262 msgstr "" 263 264 #: assets/admin/settings.js:1 265 msgid "Setup integration" 266 msgstr "" 267 268 #: assets/admin/settings.js:1 269 msgid "Just another contact form plugin for WordPress. Simple but flexible" 270 msgstr "" 271 272 #: assets/admin/settings.js:1 273 msgid "Easy way to sell Digital Products With WordPress" 274 msgstr "" 275 276 #: assets/admin/settings.js:1 277 msgid "See all tutorials..." 273 msgid "Setup Integration" 274 msgstr "" 275 276 #: assets/admin/settings.js:1 277 msgid "Get Template" 278 msgstr "" 279 280 #: assets/admin/settings.js:1 281 msgid "Read More" 282 msgstr "" 283 284 #: assets/admin/settings.js:1 285 msgid "See all tutorials…" 278 286 msgstr "" 279 287 … … 380 388 381 389 #: assets/admin/settings.js:1 382 msgid "Enter domain ..."390 msgid "Enter domain …" 383 391 msgstr "" 384 392 … … 392 400 393 401 #: assets/admin/settings.js:1 394 msgid "Enter loader name ..."402 msgid "Enter loader name …" 395 403 msgstr "" 396 404 … … 509 517 510 518 #: assets/admin/settings.js:1 519 msgid "Exclude User Roles" 520 msgstr "" 521 522 #: assets/admin/settings.js:1 523 msgid "Exclude user roles" 524 msgstr "" 525 526 #: assets/admin/settings.js:1 527 msgid "Select the roles that you want to exclude from tracking." 528 msgstr "" 529 530 #: assets/admin/settings.js:1 531 msgid "Warning!" 532 msgstr "" 533 534 #: assets/admin/settings.js:1 535 msgid "Excluding user roles is not compatible with all full-page cache solutions. Some full-page cache solutions may cache the page identically for all users, regardless of their user role. This could result in users being excluded who should not be." 536 msgstr "" 537 538 #: assets/admin/settings.js:1 539 msgid "Please ensure thorough and proper testing of this." 540 msgstr "" 541 542 #: assets/admin/settings.js:1 511 543 msgid "Container Code Implementation" 512 544 msgstr "" … … 632 664 #: assets/admin/settings.js:13 633 665 msgid "User Data" 634 msgstr ""635 636 #: assets/admin/settings.js:1637 msgid "Warning!"638 666 msgstr "" 639 667 … … 969 997 970 998 #: assets/admin/settings.js:13 971 msgid "Webhooks for server-side tracking" 972 msgstr "" 973 974 #: assets/admin/settings.js:13 975 msgid "In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain" 976 msgstr "" 977 978 #: assets/admin/settings.js:13 979 msgid "Go to sGTM settings" 980 msgstr "" 981 982 #: assets/admin/settings.js:13 983 msgid "In order to use webhooks you must configure you server-side container to handle the webhooks" 984 msgstr "" 985 986 #: assets/admin/settings.js:13 987 msgid "Go to GTM Templates" 988 msgstr "" 989 990 #: assets/admin/settings.js:13 991 msgid "Send webhooks to server GTM container" 992 msgstr "" 993 994 #: assets/admin/settings.js:13 995 msgid "This option will allow webhooks to be sent to your server GTM container." 996 msgstr "" 997 998 #: assets/admin/settings.js:13 999 msgid "Purchase webhook" 999 msgid "Event customization" 1000 msgstr "" 1001 1002 #: assets/admin/settings.js:13 1003 msgid "Push view_item_list when the list is updated using a product filter." 1004 msgstr "" 1005 1006 #: assets/admin/settings.js:13 1007 msgid "Only only push view_item_list once per per page for each list." 1008 msgstr "" 1009 1010 #: assets/admin/settings.js:13 1011 msgid "Do you what to push the view_item_list event if the list is updated using a filter or just once per page view." 1012 msgstr "" 1013 1014 #: assets/admin/settings.js:13 1015 msgid "Only push view_item on the master product" 1016 msgstr "" 1017 1018 #: assets/admin/settings.js:13 1019 msgid "Push view_item on master and variation products (higher number of views)." 1020 msgstr "" 1021 1022 #: assets/admin/settings.js:13 1023 msgid "Only push view_item on variation products." 1024 msgstr "" 1025 1026 #: assets/admin/settings.js:13 1027 msgid "When do you want to fire the \"view_item\" event on variable products?" 1028 msgstr "" 1029 1030 #: assets/admin/settings.js:13 1031 msgid "When the 'Place order' button is clicked" 1032 msgstr "" 1033 1034 #: assets/admin/settings.js:13 1035 msgid "When a shipment method is selected with fallback to the 'Place order' button." 1036 msgstr "" 1037 1038 #: assets/admin/settings.js:13 1039 msgid "Disable the 'add_shipment_info' event." 1040 msgstr "" 1041 1042 #: assets/admin/settings.js:13 1043 msgid "When do you want to fire the \"add_shipment_info\" event?" 1044 msgstr "" 1045 1046 #: assets/admin/settings.js:13 1047 msgid "When a payment method is selected with fallback to the 'Place order' button." 1048 msgstr "" 1049 1050 #: assets/admin/settings.js:13 1051 msgid "Disable the 'add_payment_info' event." 1052 msgstr "" 1053 1054 #: assets/admin/settings.js:13 1055 msgid "When do you want to fire the \"add_payment_info\" event?" 1056 msgstr "" 1057 1058 #: assets/admin/settings.js:13 1059 msgid "Google Ads Settings" 1060 msgstr "" 1061 1062 #: assets/admin/settings.js:13 1063 msgid "Google Business Vertical" 1064 msgstr "" 1065 1066 #: assets/admin/settings.js:13 1067 msgid "In order to use Google Ads Remarketing you must select your business type (vertical)." 1068 msgstr "" 1069 1070 #: assets/admin/settings.js:13 1071 msgid "Product ID prefix" 1072 msgstr "" 1073 1074 #: assets/admin/settings.js:13 1075 msgid "Enter prefix …" 1076 msgstr "" 1077 1078 #: assets/admin/settings.js:13 1079 msgid "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." 1080 msgstr "" 1081 1082 #: assets/admin/settings.js:13 1083 msgid "Advanced settings" 1084 msgstr "" 1085 1086 #: assets/admin/settings.js:13 1087 msgid "Dequeue the default JavaScript" 1088 msgstr "" 1089 1090 #: assets/admin/settings.js:13 1091 msgid "Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript." 1092 msgstr "" 1093 1094 #: assets/admin/settings.js:13 1095 msgid "Include permalink structure" 1000 1096 msgstr "" 1001 1097 … … 1005 1101 1006 1102 #: assets/admin/settings.js:13 1007 msgid " Refund webhook"1103 msgid "Include path of pages" 1008 1104 msgstr "" 1009 1105 1010 1106 #: assets/admin/settings.js:13 1011 1107 msgid "Enable this option to include the path of cart, checkout, order received and my account page." 1012 msgstr ""1013 1014 #: assets/admin/settings.js:131015 msgid "Event customization"1016 msgstr ""1017 1018 #: assets/admin/settings.js:131019 msgid "Push view_item_list when the list is updated using a product filter."1020 msgstr ""1021 1022 #: assets/admin/settings.js:131023 msgid "Only only push view_item_list once per per page for each list."1024 msgstr ""1025 1026 #: assets/admin/settings.js:131027 msgid "Do you what to push the view_item_list event if the list is updated using a filter or just once per page view."1028 msgstr ""1029 1030 #: assets/admin/settings.js:131031 msgid "Only push view_item on the master product"1032 msgstr ""1033 1034 #: assets/admin/settings.js:131035 msgid "Push view_item on master and variation products (higher number of views)."1036 msgstr ""1037 1038 #: assets/admin/settings.js:131039 msgid "Only push view_item on variation products."1040 msgstr ""1041 1042 #: assets/admin/settings.js:131043 msgid "When do you want to fire the \"view_item\" event on variable products?"1044 msgstr ""1045 1046 #: assets/admin/settings.js:131047 msgid "When the 'Place order' button is clicked"1048 msgstr ""1049 1050 #: assets/admin/settings.js:131051 msgid "When a shipment method is selected with fallback to the 'Place order' button."1052 msgstr ""1053 1054 #: assets/admin/settings.js:131055 msgid "Disable the 'add_shipment_info' event."1056 msgstr ""1057 1058 #: assets/admin/settings.js:131059 msgid "When do you want to fire the \"add_shipment_info\" event?"1060 msgstr ""1061 1062 #: assets/admin/settings.js:131063 msgid "When a payment method is selected with fallback to the 'Place order' button."1064 msgstr ""1065 1066 #: assets/admin/settings.js:131067 msgid "Disable the 'add_payment_info' event."1068 msgstr ""1069 1070 #: assets/admin/settings.js:131071 msgid "When do you want to fire the \"add_payment_info\" event?"1072 msgstr ""1073 1074 #: assets/admin/settings.js:131075 msgid "Google Ads Settings"1076 msgstr ""1077 1078 #: assets/admin/settings.js:131079 msgid "Google Business Vertical"1080 msgstr ""1081 1082 #: assets/admin/settings.js:131083 msgid "In order to use Google Ads Remarketing you must select your business type (vertical)."1084 msgstr ""1085 1086 #: assets/admin/settings.js:131087 msgid "Product ID prefix"1088 msgstr ""1089 1090 #: assets/admin/settings.js:131091 msgid "Enter prefix ..."1092 msgstr ""1093 1094 #: assets/admin/settings.js:131095 msgid "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."1096 msgstr ""1097 1098 #: assets/admin/settings.js:131099 msgid "Custom CSS Selectors"1100 msgstr ""1101 1102 #: assets/admin/settings.js:131103 msgid "If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors."1104 msgstr ""1105 1106 #: assets/admin/settings.js:131107 msgid "Single Product (add_to_wishlist):"1108 msgstr ""1109 1110 #: assets/admin/settings.js:131111 msgid "Enter CSS selector ..."1112 msgstr ""1113 1114 #: assets/admin/settings.js:131115 msgid "Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event."1116 msgstr ""1117 1118 #: assets/admin/settings.js:131119 msgid "Product List (select_item):"1120 msgstr ""1121 1122 #: assets/admin/settings.js:131123 msgid "Enter the CSS selector that matches your product list item, which should be use to fire the select_item event."1124 msgstr ""1125 1126 #: assets/admin/settings.js:131127 msgid "Product List (add_to_wishlist):"1128 msgstr ""1129 1130 #: assets/admin/settings.js:131131 msgid "Advanced settings"1132 msgstr ""1133 1134 #: assets/admin/settings.js:131135 msgid "Dequeue the default JavaScript"1136 msgstr ""1137 1138 #: assets/admin/settings.js:131139 msgid "Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript."1140 msgstr ""1141 1142 #: assets/admin/settings.js:131143 msgid "Include permalink structure"1144 msgstr ""1145 1146 #: assets/admin/settings.js:131147 msgid "Include path of pages"1148 1108 msgstr "" 1149 1109 -
gtm-kit/tags/1.23/readme.txt
r3094947 r3112163 3 3 Donate link: https://github.com/tlamedia/gtm-kit 4 4 Tags: google tag manager, gtm, woocommerce, analytics, ga4 5 Tested up to: 6. 56 Stable tag: 1.2 2.45 Tested up to: 6.6 6 Stable tag: 1.23 7 7 License: GPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 89 89 == Changelog == 90 90 91 = 1.23 = 92 93 Release date: 2024-07-04 94 95 Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-23/). 96 97 #### Enhancements: 98 * Added an option to exclude selected user roles from tracking. 99 * Improve the flexibility of GTM Kit integrations. 100 101 #### Other: 102 * Tested up to WooCommerce 9.1. 103 * Tested up to WordPress 6.6. 104 91 105 = 1.22.4 = 92 106 93 107 Release date: 2024-05-30 94 95 Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-24/).96 108 97 109 #### Enhancements: -
gtm-kit/tags/1.23/src/Admin/AbstractOptionsPage.php
r3090572 r3112163 15 15 */ 16 16 abstract class AbstractOptionsPage { 17 18 use AssetsTrait; 17 19 18 20 /** … … 152 154 */ 153 155 abstract public function enqueue_page_assets( string $hook ): void; 154 155 /**156 * Enqueue assets.157 *158 * @param string $page_slug The page slug.159 * @param string $script_handle The script handle.160 * @param string $path The plugin path.161 * @param string $url The plugin URL.162 * @param string $domain The translation domain.163 */164 protected function enqueue_assets( string $page_slug, string $script_handle, string $path = '', string $url = '', string $domain = 'gtm-kit' ) {165 166 if ( empty( $path ) ) {167 $path = GTMKIT_PATH;168 }169 if ( empty( $url ) ) {170 $url = GTMKIT_URL;171 }172 173 $deps_file = $path . 'assets/admin/' . $script_handle . '.asset.php';174 $dependency = [];175 $version = false;176 177 if ( \file_exists( $deps_file ) ) {178 $deps_file = require $deps_file;179 $dependency = $deps_file['dependencies'];180 $version = $deps_file['version'];181 }182 183 \wp_enqueue_style( 'gtmkit-' . $script_handle . '-style', $url . 'assets/admin/' . $script_handle . '.css', array( 'wp-components' ), $version );184 185 \wp_enqueue_script( 'gtmkit-' . $script_handle . '-script', $url . 'assets/admin/' . $script_handle . '.js', $dependency, $version, true );186 187 $this->localize_script( $page_slug, $script_handle );188 189 \wp_set_script_translations( 'gtmkit-' . $script_handle . '-script', $domain );190 }191 156 192 157 /** -
gtm-kit/tags/1.23/src/Admin/GeneralOptionsPage.php
r3070452 r3112163 113 113 'nonce' => \wp_create_nonce( 'wp_rest' ), 114 114 'tutorials' => $this->get_tutorials(), 115 'integrations' => Integrations::get_integrations(), 115 116 'dashboardUrl' => \menu_page_url( 'gtmkit_general', false ), 116 117 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ), 117 118 'settings' => $this->options->get_all_raw(), 118 119 'site_data' => $this->util->get_site_data( $this->options->get_all_raw() ), 120 'user_roles' => $this->get_user_roles(), 119 121 ] 120 122 ); … … 129 131 return $this->util->get_data( '/get-tutorials', 'gtmkit_tutorials' ); 130 132 } 133 134 /** 135 * Get user roles 136 * 137 * @return array 138 */ 139 private function get_user_roles(): array { 140 141 $user_roles = []; 142 $roles = get_editable_roles(); 143 144 foreach ( $roles as $role_id => $role_info ) { 145 $user_roles[] = [ 146 'role' => $role_id, 147 'name' => translate_user_role( $role_info['name'] ), 148 ]; 149 } 150 151 return $user_roles; 152 } 131 153 } -
gtm-kit/tags/1.23/src/Admin/IntegrationsOptionsPage.php
r3090572 r3112163 111 111 'root' => \esc_url_raw( rest_url() ), 112 112 'nonce' => \wp_create_nonce( 'wp_rest' ), 113 ' wa' => $this->util->is_premium(),113 'integrations' => Integrations::get_integrations(), 114 114 'dashboardUrl' => \menu_page_url( 'gtmkit_general', false ), 115 115 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ), 116 116 'templatesUrl' => \menu_page_url( 'gtmkit_templates', false ), 117 117 'pluginInstallUrl' => $admin_url . 'plugin-install.php?tab=search&type=term&s=', 118 'plugins' => [ 119 'woocommerce' => \is_plugin_active( 'woocommerce/woocommerce.php' ), 120 'cf7' => \is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ), 121 'edd' => ( \is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) || \is_plugin_active( 'easy-digital-downloads-pro/easy-digital-downloads.php' ) ), 122 ], 118 'plugins' => $this->get_plugins(), 123 119 'taxonomyOptions' => $taxonomy_options, 124 120 'settings' => $this->options->get_all_raw(), … … 126 122 ); 127 123 } 124 125 /** 126 * Get the plugins. 127 * 128 * @return array 129 */ 130 private function get_plugins(): array { 131 $plugins = [ 132 'woocommerce' => \is_plugin_active( 'woocommerce/woocommerce.php' ), 133 'cf7' => \is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ), 134 'edd' => ( \is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) || \is_plugin_active( 'easy-digital-downloads-pro/easy-digital-downloads.php' ) ), 135 ]; 136 137 return apply_filters( 'gtmkit_integrations_plugins', $plugins ); 138 } 128 139 } -
gtm-kit/tags/1.23/src/Common/Util.php
r3094947 r3112163 82 82 $this->api_host = GTMKIT_API_HOST; 83 83 } else { 84 $this->api_host = 'https://ap p.gtmkit.com';84 $this->api_host = 'https://api.gtmkit.com'; 85 85 } 86 86 } -
gtm-kit/tags/1.23/src/Frontend/Frontend.php
r3090572 r3112163 54 54 } 55 55 56 if ( $container_active ) {56 if ( $container_active && $page->is_user_allowed() ) { 57 57 add_action( 'wp_enqueue_scripts', [ $page, 'enqueue_header_script' ] ); 58 58 } elseif ( $options->get( 'general', 'console_log' ) ) { … … 302 302 public function container_disabled(): void { 303 303 echo '<script>console.warn("[GTM Kit] Google Tag Manager container is disabled.");</script>'; 304 305 if ( ! $this->is_user_allowed() ) { 306 echo '<script>console.warn("[GTM Kit] The current user role is excluded from tracking.");</script>'; 307 } 304 308 } 305 309 … … 350 354 <?php 351 355 } 356 357 /** 358 * Is user allowed 359 * 360 * @return bool 361 */ 362 public function is_user_allowed(): bool { 363 364 $is_user_allowed = true; 365 $excluded_user_roles = $this->options->get( 'general', 'exclude_user_roles' ); 366 367 if ( ! empty( $excluded_user_roles ) ) { 368 foreach ( wp_get_current_user()->roles as $role ) { 369 if ( in_array( $role, $excluded_user_roles, true ) ) { 370 $is_user_allowed = false; 371 break; 372 } 373 } 374 } 375 376 return $is_user_allowed; 377 } 352 378 } -
gtm-kit/tags/1.23/src/Installation/Upgrade.php
r3082967 r3112163 45 45 '1.20' => 'v120_upgrade', 46 46 '1.22' => 'v122_upgrade', 47 '1.23' => 'v123_upgrade', 47 48 ]; 48 49 … … 142 143 143 144 /** 144 * Upgrade routine for v1.2 0145 * Upgrade routine for v1.22 145 146 */ 146 147 protected function v122_upgrade(): void { … … 154 155 Options::init()->set( $values, false, false ); 155 156 } 157 158 /** 159 * Upgrade routine for v1.23 160 */ 161 protected function v123_upgrade(): void { 162 163 $values = [ 164 'general' => [ 165 'exclude_user_roles' => [], 166 ], 167 ]; 168 169 Options::init()->set( $values, false, false ); 170 } 156 171 } -
gtm-kit/tags/1.23/src/Options.php
r3082967 r3112163 73 73 'type' => 'boolean', 74 74 ], 75 'exclude_user_roles' => [ 'default' => [] ], 75 76 ], 76 77 'integrations' => [ -
gtm-kit/tags/1.23/vendor/autoload.php
r2853698 r3112163 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 3b585b55966a016a3d1b071eb261592a::getLoader();25 return ComposerAutoloaderInit12fa396dcd6fc263a33fd78c6d8551b8::getLoader(); -
gtm-kit/tags/1.23/vendor/composer/autoload_classmap.php
r3055017 r3112163 11 11 'TLA_Media\\GTM_Kit\\Admin\\AdminAPI' => $baseDir . '/src/Admin/AdminAPI.php', 12 12 'TLA_Media\\GTM_Kit\\Admin\\Analytics' => $baseDir . '/src/Admin/Analytics.php', 13 'TLA_Media\\GTM_Kit\\Admin\\AssetsTrait' => $baseDir . '/src/Admin/AssetsTrait.php', 13 14 'TLA_Media\\GTM_Kit\\Admin\\GeneralOptionsPage' => $baseDir . '/src/Admin/GeneralOptionsPage.php', 14 15 'TLA_Media\\GTM_Kit\\Admin\\HelpOptionsPage' => $baseDir . '/src/Admin/HelpOptionsPage.php', 16 'TLA_Media\\GTM_Kit\\Admin\\Integrations' => $baseDir . '/src/Admin/Integrations.php', 15 17 'TLA_Media\\GTM_Kit\\Admin\\IntegrationsOptionsPage' => $baseDir . '/src/Admin/IntegrationsOptionsPage.php', 16 18 'TLA_Media\\GTM_Kit\\Admin\\MetaBox' => $baseDir . '/src/Admin/MetaBox.php', -
gtm-kit/tags/1.23/vendor/composer/autoload_real.php
r2961341 r3112163 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 3b585b55966a016a3d1b071eb261592a5 class ComposerAutoloaderInit12fa396dcd6fc263a33fd78c6d8551b8 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 3b585b55966a016a3d1b071eb261592a', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit12fa396dcd6fc263a33fd78c6d8551b8', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 3b585b55966a016a3d1b071eb261592a', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit12fa396dcd6fc263a33fd78c6d8551b8', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 3b585b55966a016a3d1b071eb261592a::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
gtm-kit/tags/1.23/vendor/composer/autoload_static.php
r3055017 r3112163 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 3b585b55966a016a3d1b071eb261592a7 class ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 26 26 'TLA_Media\\GTM_Kit\\Admin\\AdminAPI' => __DIR__ . '/../..' . '/src/Admin/AdminAPI.php', 27 27 'TLA_Media\\GTM_Kit\\Admin\\Analytics' => __DIR__ . '/../..' . '/src/Admin/Analytics.php', 28 'TLA_Media\\GTM_Kit\\Admin\\AssetsTrait' => __DIR__ . '/../..' . '/src/Admin/AssetsTrait.php', 28 29 'TLA_Media\\GTM_Kit\\Admin\\GeneralOptionsPage' => __DIR__ . '/../..' . '/src/Admin/GeneralOptionsPage.php', 29 30 'TLA_Media\\GTM_Kit\\Admin\\HelpOptionsPage' => __DIR__ . '/../..' . '/src/Admin/HelpOptionsPage.php', 31 'TLA_Media\\GTM_Kit\\Admin\\Integrations' => __DIR__ . '/../..' . '/src/Admin/Integrations.php', 30 32 'TLA_Media\\GTM_Kit\\Admin\\IntegrationsOptionsPage' => __DIR__ . '/../..' . '/src/Admin/IntegrationsOptionsPage.php', 31 33 'TLA_Media\\GTM_Kit\\Admin\\MetaBox' => __DIR__ . '/../..' . '/src/Admin/MetaBox.php', … … 52 54 { 53 55 return \Closure::bind(function () use ($loader) { 54 $loader->prefixLengthsPsr4 = ComposerStaticInit 3b585b55966a016a3d1b071eb261592a::$prefixLengthsPsr4;55 $loader->prefixDirsPsr4 = ComposerStaticInit 3b585b55966a016a3d1b071eb261592a::$prefixDirsPsr4;56 $loader->classMap = ComposerStaticInit 3b585b55966a016a3d1b071eb261592a::$classMap;56 $loader->prefixLengthsPsr4 = ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8::$prefixLengthsPsr4; 57 $loader->prefixDirsPsr4 = ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8::$prefixDirsPsr4; 58 $loader->classMap = ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8::$classMap; 57 59 58 60 }, null, ClassLoader::class); -
gtm-kit/tags/1.23/vendor/composer/installed.php
r3094947 r3112163 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => '6 f604c7f7b8529f79b914357dc825fb02186ea95',6 'reference' => '692626a6b2391e017e7c78b1feecc3e477351f91', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => '6 f604c7f7b8529f79b914357dc825fb02186ea95',16 'reference' => '692626a6b2391e017e7c78b1feecc3e477351f91', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
gtm-kit/trunk/assets/admin/settings.asset.php
r3094947 r3112163 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n' ), 'version' => '2238b13f608a72073e6c');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'a613e9bed392753e55fe'); -
gtm-kit/trunk/assets/admin/settings.js
r3094947 r3112163 1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(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:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React;var a=t.n(e);const n=window.wp.i18n,i=window.wp.element,r=window.wp.components,o=window.lodash,l=window.wp.apiFetch;var s=t.n(l);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,a=null,n=!1)=>{let i={};try{i=await s()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},c=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,n.__)("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,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},g=(0,i.createContext)(),u=t=>{const[a,n]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},l=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,i.useEffect)((()=>{r()}),[]);const s={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=a.stateSettings,m("gtmkit/v1/set-options","POST",e));var e;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:l,useUpdateStateSettings:async(t,e,n)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let r;i[t][e]=n,r=!(0,o.isEqual)(i,a.fetchedSettings),l({stateSettings:i,canSave:r})},useImportSettings:async(t,e)=>{const n=JSON.parse(JSON.stringify(a.stateSettings));let i;const r={};r.general={...n.general,...e.general},"integrations"in e&&(r.integrations={...n.integrations,...e.integrations}),i=!(0,o.isEqual)(r,a.fetchedSettings),l({stateSettings:r,canSave:i})},useUpdateSupportTicket:async t=>{l({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=a.supportTicket,m("gtmkit/v1/send-support-data","POST",e,!0));var e;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData,useIsSending:a.isSendingSystemData,useSupportTicket:a.supportTicket,useIsSystemDataSent:a.isSystemDataSent,useSystemDataMessage:a.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(g.Provider,{value:s},t.children)};function d(){return d=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},d.apply(this,arguments)}var p;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(p||(p={}));const h="popstate";function _(t,e){if(!1===t||null==t)throw new Error(e)}function k(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function f(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?v(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function b(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 v(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 y;function x(t,e,a){void 0===a&&(a="/");let n=L(("string"==typeof e?v(e):e).pathname||"/",a);if(null==n)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,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)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t){let e=U(n);r=O(i[t],e)}return r}function S(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");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("/")&&(_(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(n.length));let l=H([n,o.relativePath]),s=a.concat(o);t.children&&t.children.length>0&&(_(!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:M(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of w(t.path))i(t,e,a);else i(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let o=w(n.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"}(y||(y={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,T=2,D=1,P=10,G=-2,I=t=>"*"===t;function M(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=G),e&&(n+=T),a.filter((t=>!I(t))).reduce(((t,e)=>t+(N.test(e)?C:""===e?D:P)),n)}function O(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let o=a[t],l=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=R({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},s);if(!m)return null;Object.assign(n,m.params);let c=o.route;r.push({params:n,pathname:H([i,m.pathname]),pathnameBase:B(H([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=H([i,m.pathnameBase]))}return r}function R(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),k("*"===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=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],o=r.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=l[a]||"";o=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=l[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:o,pattern:t}}function U(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!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 a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function A(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 j(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function F(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=v(t):(i=d({},t),_(!i.pathname||!i.pathname.includes("?"),A("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),A("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),A("#","search","hash",i)));let r,o=""===t||""===i.pathname,l=o?"/":i.pathname;if(null==l)r=a;else{let t=e.length-1;if(!n&&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:a,search:n="",hash:i=""}="string"==typeof t?v(t):t,r=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:r,search:W(n),hash:K(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(o||"."===l)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const H=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],z=(new Set(J),["get",...J]);function $(){return $=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},$.apply(this,arguments)}new Set(z),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=e.createContext(null),q=e.createContext(null),Y=e.createContext(null),X=e.createContext(null),Q=e.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=e.createContext(null);function tt(){return null!=e.useContext(X)}function et(){return tt()||_(!1),e.useContext(X).location}function at(t){e.useContext(Y).static||e.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=e.useContext(Q);return t?function(){let{router:t}=function(t){let a=e.useContext(V);return a||_(!1),a}(ct.UseNavigateStable),a=ut(gt.UseNavigateStable),n=e.useRef(!1);return at((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,$({fromRouteId:a},i)))}),[t,a])}():function(){tt()||_(!1);let t=e.useContext(V),{basename:a,future:n,navigator:i}=e.useContext(Y),{matches:r}=e.useContext(Q),{pathname:o}=et(),l=JSON.stringify(j(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return at((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=F(e,JSON.parse(l),o,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:H([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,l,o,t])}()}function it(t,a){let{relative:n}=void 0===a?{}:a,{future:i}=e.useContext(Y),{matches:r}=e.useContext(Q),{pathname:o}=et(),l=JSON.stringify(j(r,i.v7_relativeSplatPath));return e.useMemo((()=>F(t,JSON.parse(l),o,"path"===n)),[t,l,o,n])}function rt(t,a,n,i){tt()||_(!1);let{navigator:r}=e.useContext(Y),{matches:o}=e.useContext(Q),l=o[o.length-1],s=l?l.params:{},m=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,g=et();if(a){var u;let t="string"==typeof a?v(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||_(!1),c=t}else c=g;let d=c.pathname||"/",h=d;if("/"!==m){let t=m.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=x(t,{pathname:h}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var o;if(null==(o=n)||!o.errors)return null;t=n.matches}let l=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=l.findIndex((t=>t.route.id&&void 0!==(null==s?void 0:s[t.route.id])));t>=0||_(!1),l=l.slice(0,Math.min(l.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<l.length;t++){let e=l[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,l=c>=0?l.slice(0,c+1):[l[0]];break}}}return l.reduceRight(((t,i,r)=>{let o,g=!1,u=null,d=null;var p;n&&(o=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||lt,m&&(c<0&&0===r?(dt[p="route-fallback"]||(dt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(l.slice(0,r+1)),_=()=>{let a;return a=o?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(mt,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(st,{location:n.location,revalidation:n.revalidation,component:u,error:o,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:H([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:H([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,n,i);return a&&f?e.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function ot(){let t=function(){var t;let a=e.useContext(Z),n=function(t){let a=e.useContext(q);return a||_(!1),a}(gt.UseRouteError),i=ut(gt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=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,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const lt=e.createElement(ot,null);class st extends e.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:void 0!==t.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 void 0!==this.state.error?e.createElement(Q.Provider,{value:this.props.routeContext},e.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mt(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(V);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(Q.Provider,{value:a},i)}var ct=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ct||{}),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 ut(t){let a=function(t){let a=e.useContext(Q);return a||_(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||_(!1),n.route.id}const dt={};function pt(t){let{to:a,replace:n,state:i,relative:r}=t;tt()||_(!1);let{future:o,static:l}=e.useContext(Y),{matches:s}=e.useContext(Q),{pathname:m}=et(),c=nt(),g=F(a,j(s,o.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function ht(t){_(!1)}function _t(t){let{basename:a="/",children:n=null,location:i,navigationType:r=p.Pop,navigator:o,static:l=!1,future:s}=t;tt()&&_(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:o,static:l,future:$({v7_relativeSplatPath:!1},s)})),[m,s,o,l]);"string"==typeof i&&(i=v(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=e.useMemo((()=>{let t=L(g,m);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:k},navigationType:r}}),[m,g,u,d,h,k,r]);return null==f?null:e.createElement(Y.Provider,{value:c},e.createElement(X.Provider,{children:n,value:f}))}function kt(t){let{children:e,location:a}=t;return rt(ft(e),a)}function ft(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,ft(t.props.children,r));t.type!==ht&&_(!1),t.props.index&&t.props.children&&_(!1);let o={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&&(o.children=ft(t.props.children,r)),n.push(o)})),n}e.startTransition,new Promise((()=>{})),e.Component;const Et=window.ReactDOM;var bt=t.n(Et);function vt(){return vt=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},vt.apply(this,arguments)}function yt(t,e){if(null==t)return{};var a,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const xt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],St=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=e.createContext({isTransitioning:!1});new Map;const Nt=e.startTransition;function Ct(t){let{basename:a,children:n,future:i,window:r}=t,o=e.useRef();null==o.current&&(o.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,o=i.history,l=p.Pop,s=null,m=c();function c(){return(o.state||{idx:null}).idx}function g(){l=p.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:k.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:b(t);return a=a.replace(/ $/,"%20"),_(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,o.replaceState(d({},o.state,{idx:m}),""));let k={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(h,g),s=t,()=>{i.removeEventListener(h,g),s=null}},createHref:t=>e(i,t),createURL:u,encodeLocation(t){let e=u(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=p.Push;let n=E(k.location,t,e);a&&a(n,t),m=c()+1;let g=f(n,m),u=k.createHref(n);try{o.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:l,location:k.location,delta:1})},replace:function(t,e){l=p.Replace;let n=E(k.location,t,e);a&&a(n,t),m=c();let i=f(n,m),g=k.createHref(n);o.replaceState(i,"",g),r&&s&&s({action:l,location:k.location,delta:0})},go:t=>o.go(t)};return k}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=v(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:i},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:b(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let l=o.current,[s,m]=e.useState({action:l.action,location:l.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Nt?Nt((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>l.listen(g)),[l,g]),e.createElement(_t,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:l,future:i})}Et.flushSync,e.useId;const Tt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pt=e.forwardRef((function(t,a){let n,{onClick:i,relative:r,reloadDocument:o,replace:l,state:s,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=t,d=yt(t,xt),{basename:p}=e.useContext(Y),h=!1;if("string"==typeof c&&Dt.test(c)&&(n=c,Tt))try{let t=new URL(window.location.href),e=c.startsWith("//")?new URL(t.protocol+c):new URL(c),a=L(e.pathname,p);e.origin===t.origin&&null!=a?c=a+e.search+e.hash:h=!0}catch(t){}let k=function(t,a){let{relative:n}=void 0===a?{}:a;tt()||_(!1);let{basename:i,navigator:r}=e.useContext(Y),{hash:o,pathname:l,search:s}=it(t,{relative:n}),m=l;return"/"!==i&&(m="/"===l?i:H([i,l])),r.createHref({pathname:m,search:s,hash:o})}(c,{relative:r}),f=function(t,a){let{target:n,replace:i,state:r,preventScrollReset:o,relative:l,unstable_viewTransition:s}=void 0===a?{}:a,m=nt(),c=et(),g=it(t,{relative:l});return e.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 a=void 0!==i?i:b(c)===b(g);m(t,{replace:a,state:r,preventScrollReset:o,relative:l,unstable_viewTransition:s})}}),[c,m,g,i,r,n,t,o,l,s])}(c,{replace:l,state:s,target:m,preventScrollReset:g,relative:r,unstable_viewTransition:u});return e.createElement("a",vt({},d,{href:n||k,onClick:h||o?i:function(t){i&&i(t),t.defaultPrevented||f(t)},ref:a,target:m}))})),Gt=e.forwardRef((function(t,a){let{"aria-current":n="page",caseSensitive:i=!1,className:r="",end:o=!1,style:l,to:s,unstable_viewTransition:m,children:c}=t,g=yt(t,St),u=it(s,{relative:g.relative}),d=et(),p=e.useContext(q),{navigator:h,basename:k}=e.useContext(Y),f=null!=p&&function(t,a){void 0===a&&(a={});let n=e.useContext(wt);null==n&&_(!1);let{basename:i}=function(t){let a=e.useContext(V);return a||_(!1),a}(It.useViewTransitionState),r=it(t,{relative:a.relative});if(!n.isTransitioning)return!1;let o=L(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=L(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=R(r.pathname,l)||null!=R(r.pathname,o)}(u)&&!0===m,E=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,b=d.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),v=v?v.toLowerCase():null,E=E.toLowerCase()),v&&k&&(v=L(v,k)||v);const y="/"!==E&&E.endsWith("/")?E.length-1:E.length;let x,S=b===E||!o&&b.startsWith(E)&&"/"===b.charAt(y),w=null!=v&&(v===E||!o&&v.startsWith(E)&&"/"===v.charAt(E.length)),N={isActive:S,isPending:w,isTransitioning:f},C=S?n:void 0;x="function"==typeof r?r(N):[r,S?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof l?l(N):l;return e.createElement(Pt,vt({},g,{"aria-current":C,className:x,ref:a,style:T,to:s,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var It,Mt;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(It||(It={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Mt||(Mt={}));const Ot=({title:t})=>(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"}))),t)))),Rt=({to:t,title:a})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Gt,{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 ":"")},a)),Ut=({NavList:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-flex-wrap gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-[15px] gtmkit-space-x-9"},t.map((function(t){return(0,e.createElement)(Rt,{key:t.to,to:t.to,title:t.title})})));function Lt(){return Lt=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},Lt.apply(this,arguments)}function At(t,e){if(null==t)return{};var a,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)a=r[n],e.indexOf(a)>=0||(i[a]=t[a]);return i}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function Ft(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jt(t,e)}function Ht(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Bt=a().createContext(null);var Wt=function(t){return t.scrollTop},Kt="unmounted",Jt="exited",zt="entering",$t="entered",Vt="exiting",qt=function(t){function e(e,a){var n;n=t.call(this,e,a)||this;var i,r=a&&!a.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?r?(i=Jt,n.appearStatus=zt):i=$t:i=e.unmountOnExit||e.mountOnEnter?Kt:Jt,n.state={status:i},n.nextCallback=null,n}Ft(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Kt?{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 a=this.state.status;this.props.in?a!==zt&&a!==$t&&(e=zt):a!==zt&&a!==$t||(e=Vt)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,a,n=this.props.timeout;return t=e=a=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,a=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:a}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this);a&&Wt(a)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Kt})},n.performEnter=function(t){var e=this,a=this.props.enter,n=this.context?this.context.isMounting:t,i=this.props.nodeRef?[n]:[bt().findDOMNode(this),n],r=i[0],o=i[1],l=this.getTimeouts(),s=n?l.appear:l.enter;t||a?(this.props.onEnter(r,o),this.safeSetState({status:zt},(function(){e.props.onEntering(r,o),e.onTransitionEnd(s,(function(){e.safeSetState({status:$t},(function(){e.props.onEntered(r,o)}))}))}))):this.safeSetState({status:$t},(function(){e.props.onEntered(r)}))},n.performExit=function(){var t=this,e=this.props.exit,a=this.getTimeouts(),n=this.props.nodeRef?void 0:bt().findDOMNode(this);e?(this.props.onExit(n),this.safeSetState({status:Vt},(function(){t.props.onExiting(n),t.onTransitionEnd(a.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(n)}))},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,a=!0;return this.nextCallback=function(n){a&&(a=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var a=this.props.nodeRef?this.props.nodeRef.current:bt().findDOMNode(this),n=null==t&&!this.props.addEndListener;if(a&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[a,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===Kt)return null;var e=this.props,n=e.children,i=(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,At(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(Bt.Provider,{value:null},"function"==typeof n?n(t,i):a().cloneElement(a().Children.only(n),i))},e}(a().Component);function Yt(){}qt.contextType=Bt,qt.propTypes={},qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yt,onEntering:Yt,onEntered:Yt,onExit:Yt,onExiting:Yt,onExited:Yt},qt.UNMOUNTED=Kt,qt.EXITED=Jt,qt.ENTERING=zt,qt.ENTERED=$t,qt.EXITING=Vt;const Xt=qt;var Qt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.remove(n):"string"==typeof a.className?a.className=Ht(a.className,n):a.setAttribute("class",Ht(a.className&&a.className.baseVal||"",n)));var a,n}))},Zt=function(t){function e(){for(var e,a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1];e.removeClasses(i,"exit"),e.addClass(i,r?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,a)},e.onEntering=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1]?"appear":"enter";e.addClass(i,r,"active"),e.props.onEntering&&e.props.onEntering(t,a)},e.onEntered=function(t,a){var n=e.resolveArguments(t,a),i=n[0],r=n[1]?"appear":"enter";e.removeClasses(i,r),e.addClass(i,r,"done"),e.props.onEntered&&e.props.onEntered(t,a)},e.onExit=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"appear"),e.removeClasses(a,"enter"),e.addClass(a,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var a=e.resolveArguments(t)[0];e.addClass(a,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var a=e.resolveArguments(t)[0];e.removeClasses(a,"exit"),e.addClass(a,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,a){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,a]},e.getClassNames=function(t){var a=e.props.classNames,n="string"==typeof a,i=n?(n&&a?a+"-":"")+t:a[t];return{baseClassName:i,activeClassName:n?i+"-active":a[t+"Active"],doneClassName:n?i+"-done":a[t+"Done"]}},e}Ft(e,t);var n=e.prototype;return n.addClass=function(t,e,a){var n=this.getClassNames(e)[a+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===a&&i&&(n+=" "+i),"active"===a&&t&&Wt(t),n&&(this.appliedClasses[e][a]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((a=t).classList?a.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(a,n)||("string"==typeof a.className?a.className=a.className+" "+n:a.setAttribute("class",(a.className&&a.className.baseVal||"")+" "+n)));var a,n}))}(t,n))},n.removeClasses=function(t,e){var a=this.appliedClasses[e],n=a.base,i=a.active,r=a.done;this.appliedClasses[e]={},n&&Qt(t,n),i&&Qt(t,i),r&&Qt(t,r)},n.render=function(){var t=this.props,e=(t.classNames,At(t,["classNames"]));return a().createElement(Xt,Lt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(a().Component);Zt.defaultProps={classNames:""},Zt.propTypes={};const te=Zt,ee=({title:t=(0,n.__)("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:o,useIsPending:l,useCanSave:s}=(0,i.useContext)(g);return(0,e.createElement)(r.Button,{className:a,onClick:()=>o(),variant:"primary",disabled:l||!s},s?(0,n.__)(t,"gtm-kit"):(0,n.__)("Saved","gtm-kit"),l?(0,e.createElement)(r.Spinner,null):"")},ae=()=>{const{useCanSave:t}=(0,i.useContext)(g);return(0,e.createElement)(te,{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)(ee,null)))},ne=({subject:t})=>{const a=!0===t||"on"===t,i=!0===a?"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 "+i},a?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit"))},ie=(0,i.forwardRef)((({children:t,className:a="",...n},i)=>(0,e.createElement)("div",{...n,className:"gtmkit-flex gtmkit-flex-col 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 "+a,ref:i},t)));ie.Header=({as:t="h3",title:a="",children:n,className:i="",...r})=>(0,e.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},a),n),ie.Content=({as:t="div",children:a,className:n="gtmkit-flex-auto",...i})=>(0,e.createElement)(t,{...i,className:n},a),ie.Button=({url:t,destination:a,newTab:n=!1,text:i,group:o="",...l})=>{const s=nt();return(0,e.createElement)("div",{...l,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,e.createElement)(r.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{a&&t&&!1===n?window.gtmkitSettings.current_poage===o?s(a,{replace:!0}):window.location.href=t+"#"+a:t?n?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"},i)))};const re=ie,oe=({title:t,data:a,className:r=""})=>{const{useSettings:o}=(0,i.useContext)(g);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] "+r},a.map(((t,a)=>!1===t.featured?null:(0,e.createElement)(re,{key:a},(0,e.createElement)(re.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:o[t.group][t.option]}):null),(0,e.createElement)(re.Content,null,t.text.map(((t,a)=>(0,e.createElement)("p",{key:a},t)))),(0,e.createElement)(re.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,n.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))},le=[{title:"WooCommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,n.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,n.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,n.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,n.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,n.__)("Setup integration","gtm-kit")}}],se=()=>{const{useSettings:t}=(0,i.useContext)(g),[a,r]=(0,i.useState)(window.gtmkitSettings.tutorials),o=Boolean(t.general.sgtm_domain&&t.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{r((t=>[...t,{title:(0,n.__)("See all tutorials...","gtm-kit"),text:[(0,n.__)("See all our tutorials 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,n.__)("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,n.__)("General","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(re.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:(0,n.__)("Server-side GTM","gtm-kit")},(0,e.createElement)(ne,{subject:o})),(0,e.createElement)(re.Content,null,(0,e.createElement)("p",null,(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})),(0,e.createElement)(re,null,(0,e.createElement)(re.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(re.Content,null,(0,e.createElement)("p",null,(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(re.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(oe,{title:(0,n.__)("Tutorials","gtm-kit"),data:a}),(0,e.createElement)(oe,{title:(0,n.__)("Integrations","gtm-kit"),data:le}))},me=({title:t,placeholder:a,help:n,className:o="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:l="general",optionName:s,isDisabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(r.TextControl,{label:t,placeholder:a,help:n,className:o,value:c[l][s],onChange:t=>u(l,s,t),disabled:m})},ce=({title:t,label:a,optionGroup:n="general",optionName:o,disabled:l=!1})=>{const{useSettings:s,useUpdateStateSettings:m}=(0,i.useContext)(g);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(r.BaseControl,{label:t},(0,e.createElement)(r.ToggleControl,{label:a,checked:!l&&s[n][o],onChange:()=>{m(n,o,!(s&&s[n][o]))},disabled:l}))))},ge=({title:t,options:a,help:n,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m})=>{const{useSettings:c,useUpdateStateSettings:u}=(0,i.useContext)(g);return(0,e.createElement)(r.RadioControl,{label:t,options:a,help:n,className:o,selected:parseInt(c[l][s]),onChange:t=>u(l,s,t),disabled:m})},ue=(0,i.forwardRef)((({children:t,className:a="",disabled:n=!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 "+a+(n?"gtmkit-opacity-60":""),ref:r},t)));ue.Header=({as:t="h3",title:a="",children:n,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},a,n),ue.Content=({as:t="div",children:a,className:n="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+n},a);const de=ue,pe=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),r=et();return(0,e.useEffect)((()=>{const t=new URLSearchParams(r.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[r]),(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,n.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("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,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Inject Container Code","gtm-kit"),label:(0,n.__)("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,n.__)("Just the container","gtm-kit"),label:(0,n.__)("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,n.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,n.__)("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 so.","gtm-kit")}))),(0,e.createElement)("div",{id:"sgtm"}),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(me,{title:(0,n.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,n.__)("Enter domain ...","gtm-kit"),help:(0,n.__)("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,n.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,n.__)("Enter loader name ...","gtm-kit"),help:(0,n.__)("Only use if you are using a custom loader.","gtm-kit")}),(0,e.createElement)(ce,{title:(0,n.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,n.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:a})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/google-tag-manager-server-side-tagging/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=sgtm&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Hosting server-side GTM containers","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,n.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more about Stape.io","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("load_delayed_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_js' on page load.","gtm-kit"),optionName:"load_js_event"})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Delay JavaScript execution","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Page optimization plugins can delay the 'load_delayed_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/guides/delay-javascript-execution-in-gtm/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=delay-js&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(me,{title:(0,n.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,n.__)("Enter gtm_auth code","gtm-kit"),help:(0,n.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,n.__)("Enter gtm_preview code","gtm-kit"),help:(0,n.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit")})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Environments","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,n.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,n.__)("If left empty the default environment will be used.","gtm-kit")),(0,e.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("Override settings in wp-config.php","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=container-settings&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Container code implementation:","gtm-kit"),options:[{label:(0,n.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,n.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,n.__)("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)(ge,{title:(0,n.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,n.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,n.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,n.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,n.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,n.__)('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(); } ?>")))))},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,n.__)("Post Data","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("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,n.__)("Post type","gtm-kit"),id:"post-type",label:(0,n.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ce,{title:(0,n.__)("Page type","gtm-kit"),id:"page-type",label:(0,n.__)('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,n.__)("Categories","gtm-kit"),id:"categories",label:(0,n.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ce,{title:(0,n.__)("Tags","gtm-kit"),id:"tags",label:(0,n.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ce,{title:(0,n.__)("Post title","gtm-kit"),id:"post-title",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ce,{title:(0,n.__)("Post ID","gtm-kit"),id:"post-id",label:(0,n.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ce,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ce,{title:(0,n.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,n.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ce,{title:(0,n.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,n.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),_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,n.__)("User Data","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(de.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("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)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,n.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ce,{title:(0,n.__)("User ID","gtm-kit"),id:"user-id",label:(0,n.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ce,{title:(0,n.__)("User role","gtm-kit"),id:"user-role",label:(0,n.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),ke=()=>{const{useSettings:t}=(0,i.useContext)(g),a=!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,n.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,n.__)("Warning!","gtm-kit"))),(0,e.createElement)(de.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,n.__)("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,n.__)("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,n.__)("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,n.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,n.__)("Activate GCM settings","gtm-kit"),label:(0,n.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(de,{disabled:a},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Ad Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Ad User Data","gtm-kit"),label:(0,n.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Analytics Storage","gtm-kit"),label:(0,n.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Functionality Storage","gtm-kit"),label:(0,n.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Personalization Storage","gtm-kit"),label:(0,n.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Security Storage","gtm-kit"),label:(0,n.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:a}),(0,e.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,n.__)("Advanced","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Redact Ads Data","gtm-kit"),label:(0,n.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:a}),(0,e.createElement)(ce,{title:(0,n.__)("Pass through URL parameters","gtm-kit"),label:(0,n.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:a}),(0,e.createElement)(me,{title:(0,n.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,n.__)("Enter time in milliseconds","gtm-kit")}))))},fe=({label:t,value:a,tag:n})=>(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"===n?(0,e.createElement)("code",{className:"gtmkit-text-sm"},a):(0,e.createElement)("em",null,a))),Ee=()=>{const{useSiteData:t}=(0,i.useContext)(g),a=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,n.__)("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,n.__)("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"},a.map((function(t,a){return(0,e.createElement)(fe,{key:a,label:t.label,value:t.value,tag:t.tag})})))))},be=()=>{const{}=(0,i.useContext)(g);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,n.__)("Misc","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(Ee,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,n.__)("Share anonymous data","gtm-kit"),label:(0,n.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Event Inspector","gtm-kit"),label:(0,n.__)("The event inspector is placed in the footer of the front and it allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector"}),(0,e.createElement)(ce,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}),(0,e.createElement)(ce,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log"}))))},ve=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(oe,{title:(0,n.__)("Integrations","gtm-kit"),data:le})),ye=({pluginName:t})=>(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.sprintf)(1 (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React;var n=e.n(t);const a=window.wp.i18n,i=window.wp.element,r=window.wp.components,l=window.lodash,o=window.wp.apiFetch;var s=e.n(o);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(e,t,n=null,a=!1)=>{let i={};try{i=await s()({path:e,method:t,...n&&{data:n}})}catch(n){return console.log(`${t} ${e} Errors:`,n),{[`gtm_kit_api_${t}_${e}_errors`]:!0}}return!0===a?i:!0===i.success?i.data:options},c=(e,t)=>{const n={...e};switch(t.type){case"FETCH_SETTINGS":n.fetchedSettings={...t.payload.fetchedSettings,integrations:t.payload.fetchedSettings.integrations||{}},n.stateSettings=t.payload.stateSettings,n.siteData=t.payload.siteData,n.installData=t.payload.installData,n.isPending=!1,n.canSave=!1,t.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(n.notice=(0,a.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=t.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=t.payload.fetchedSettings,n.stateSettings=t.payload.stateSettings,n.isPending=!1,n.canSave=!!t.payload.fetchedSettings.gtm_kit_api_update_settings_errors,n.notice=t.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,a.__)("An error occurred.","gtm-kit"):(0,a.__)("Saved Successfully.","gtm-kit"),n.hasError=!!t.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":n.fetchedSettings=t.payload.fetchedSettings||n.fetchedSettings,n.stateSettings=t.payload.stateSettings||n.stateSettings,n.isPending=t.payload.isPending||n.isPending,n.notice=t.payload.notice||n.notice,n.hasError=t.payload.hasError||n.hasError,n.canSave=t.payload.canSave||n.canSave,n.isSendingSystemData=t.payload.isSendingSystemData||n.isSendingSystemData,n.supportTicket=t.payload.supportTicket||n.supportTicket,n.isSendingLicenseKey=t.payload.isSendingLicenseKey||n.isSendingLicenseKey,n.licenseKey=t.payload.licenseKey||n.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":n.isSendingSystemData=t.payload.isSendingSystemData||n.isSendingSystemData;break;case"SEND_SUPPORT_DATA":n.isSendingSystemData=!1,n.isSystemDataSent=t.payload.isSystemDataSent||n.isSystemDataSent,n.systemDataMessage=t.payload.systemDataMessage||n.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":n.isSendingLicenseKey=t.payload.isSendingLicenseKey||n.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":n.isSendingLicenseKey=!1,n.isLicenseKeySent=t.payload.isLicenseKeySent||n.isLicenseKeySent,n.licenseKeyMessage=t.payload.licenseKeyMessage||n.licenseKeyMessage}return n},g=(0,i.createContext)(),u=e=>{const[n,a]=(0,i.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),r=async()=>{const e=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},t=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};a({type:"FETCH_SETTINGS",payload:{fetchedSettings:e,stateSettings:e,siteData:t,installData:n}})},o=async e=>{a({type:"UPDATE_STATE",payload:e})};(0,i.useEffect)((()=>{r()}),[]);const s={useDispatch:e=>{a(e)},useUpdateSettings:async()=>{a({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const e=await(t=n.stateSettings,m("gtmkit/v1/set-options","POST",t));var t;a({type:"UPDATE_SETTINGS",payload:{fetchedSettings:e,stateSettings:e}})},useFetchSettings:r,useUpdateState:o,useUpdateStateSettings:async(e,t,a)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let r;i[e][t]=a,r=!(0,l.isEqual)(i,n.fetchedSettings),o({stateSettings:i,canSave:r})},useImportSettings:async(e,t)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let i;const r={};r.general={...a.general,...t.general},"integrations"in t&&(r.integrations={...a.integrations,...t.integrations}),i=!(0,l.isEqual)(r,n.fetchedSettings),o({stateSettings:r,canSave:i})},useUpdateSupportTicket:async e=>{o({supportTicket:e})},useSendSystemData:async()=>{a({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const e=await(t=n.supportTicket,m("gtmkit/v1/send-support-data","POST",t,!0));var t;a({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:e.success,systemDataMessage:e.data}})},useUpdateLicenseKey:async e=>{o({licenseKey:e})},useSendLicenseKey:async()=>{a({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const e=await(t=n.licenseKey,m("gtmkit/v1/send-license-key","POST",t,!0));var t;a({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:e.success,licenseKeyMessage:e.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[]};return(0,t.createElement)(g.Provider,{value:s},e.children)};function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}var p;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(p||(p={}));const h="popstate";function _(e,t){if(!1===e||null==e)throw new Error(t)}function k(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function E(e,t,n,a){return void 0===n&&(n=null),d({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?v(t):t,{state:n,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function S(e){let{pathname:t="/",search:n="",hash:a=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function v(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}var b;function y(e,t,n){return void 0===n&&(n="/"),function(e,t,n,a){let i=L(("string"==typeof t?v(t):t).pathname||"/",n);if(null==i)return null;let r=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(r);let l=null;for(let e=0;null==l&&e<r.length;++e){let t=R(i);l=O(r[e],t,a)}return l}(e,t,n,!1)}function x(e,t,n,a){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(e,i,r)=>{let l={relativePath:void 0===r?e.path||"":r,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};l.relativePath.startsWith("/")&&(_(l.relativePath.startsWith(a),'Absolute route path "'+l.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(a.length));let o=j([a,l.relativePath]),s=n.concat(l);e.children&&e.children.length>0&&(_(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),x(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:G(o,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of w(e.path))i(e,t,n);else i(e,t)})),t}function w(e){let t=e.split("/");if(0===t.length)return[];let[n,...a]=t,i=n.endsWith("?"),r=n.replace(/\?$/,"");if(0===a.length)return i?[r,""]:[r];let l=w(a.join("/")),o=[];return o.push(...l.map((e=>""===e?r:[r,e].join("/")))),i&&o.push(...l),o.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const N=/^:[\w-]+$/,C=3,T=2,U=1,D=10,P=-2,I=e=>"*"===e;function G(e,t){let n=e.split("/"),a=n.length;return n.some(I)&&(a+=P),t&&(a+=T),n.filter((e=>!I(e))).reduce(((e,t)=>e+(N.test(t)?C:""===t?U:D)),a)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:a}=e,i={},r="/",l=[];for(let e=0;e<a.length;++e){let o=a[e],s=e===a.length-1,m="/"===r?t:t.slice(r.length)||"/",c=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:s},m),g=o.route;if(!c&&s&&n&&!a[a.length-1].route.index&&(c=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),l.push({params:i,pathname:j([r,c.pathname]),pathnameBase:H(j([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=j([r,c.pathnameBase]))}return l}function M(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),k("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let a=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(a.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(a.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),a]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:a.reduce(((e,t,n)=>{let{paramName:a,isOptional:i}=t;if("*"===a){let e=o[n]||"";l=r.slice(0,r.length-e.length).replace(/(.)\/+$/,"$1")}const s=o[n];return e[a]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:r,pathnameBase:l,pattern:e}}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return k(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function L(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&"/"!==a?null:e.slice(n)||"/"}function A(e,t,n,a){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` 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 K(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,a){let i;void 0===a&&(a=!1),"string"==typeof e?i=v(e):(i=d({},e),_(!i.pathname||!i.pathname.includes("?"),A("?","pathname","search",i)),_(!i.pathname||!i.pathname.includes("#"),A("#","pathname","hash",i)),_(!i.search||!i.search.includes("#"),A("#","search","hash",i)));let r,l=""===e||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=n;else{let e=t.length-1;if(!a&&o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}r=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof e?v(e):e,r=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:r,search:B(a),hash:W(i)}}(i,r),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&n.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const j=e=>e.join("/").replace(/\/\/+/g,"/"),H=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",W=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const z=["post","put","patch","delete"],J=(new Set(z),["get",...z]);function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},$.apply(this,arguments)}new Set(J),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=t.createContext(null),q=t.createContext(null),Y=t.createContext(null),X=t.createContext(null),Q=t.createContext({outlet:null,matches:[],isDataRoute:!1}),Z=t.createContext(null);function ee(){return null!=t.useContext(X)}function te(){return ee()||_(!1),t.useContext(X).location}function ne(e){t.useContext(Y).static||t.useLayoutEffect(e)}function ae(){let{isDataRoute:e}=t.useContext(Q);return e?function(){let{router:e}=function(e){let n=t.useContext(V);return n||_(!1),n}(ce.UseNavigateStable),n=ue(ge.UseNavigateStable),a=t.useRef(!1);return ne((()=>{a.current=!0})),t.useCallback((function(t,i){void 0===i&&(i={}),a.current&&("number"==typeof t?e.navigate(t):e.navigate(t,$({fromRouteId:n},i)))}),[e,n])}():function(){ee()||_(!1);let e=t.useContext(V),{basename:n,future:a,navigator:i}=t.useContext(Y),{matches:r}=t.useContext(Q),{pathname:l}=te(),o=JSON.stringify(K(r,a.v7_relativeSplatPath)),s=t.useRef(!1);return ne((()=>{s.current=!0})),t.useCallback((function(t,a){if(void 0===a&&(a={}),!s.current)return;if("number"==typeof t)return void i.go(t);let r=F(t,JSON.parse(o),l,"path"===a.relative);null==e&&"/"!==n&&(r.pathname="/"===r.pathname?n:j([n,r.pathname])),(a.replace?i.replace:i.push)(r,a.state,a)}),[n,i,o,l,e])}()}function ie(e,n){let{relative:a}=void 0===n?{}:n,{future:i}=t.useContext(Y),{matches:r}=t.useContext(Q),{pathname:l}=te(),o=JSON.stringify(K(r,i.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(o),l,"path"===a)),[e,o,l,a])}function re(e,n,a,i){ee()||_(!1);let{navigator:r}=t.useContext(Y),{matches:l}=t.useContext(Q),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=te();if(n){var u;let e="string"==typeof n?v(n):n;"/"===m||(null==(u=e.pathname)?void 0:u.startsWith(m))||_(!1),c=e}else c=g;let d=c.pathname||"/",h=d;if("/"!==m){let e=m.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let k=y(e,{pathname:h}),f=function(e,n,a,i){var r;if(void 0===n&&(n=[]),void 0===a&&(a=null),void 0===i&&(i=null),null==e){var l;if(null==(l=a)||!l.errors)return null;e=a.matches}let o=e,s=null==(r=a)?void 0:r.errors;if(null!=s){let e=o.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||_(!1),o=o.slice(0,Math.min(o.length,e+1))}let m=!1,c=-1;if(a&&i&&i.v7_partialHydration)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:n}=a,i=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((e,i,r)=>{let l,g=!1,u=null,d=null;var p;a&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||oe,m&&(c<0&&0===r?(de[p="route-fallback"]||(de[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=n.concat(o.slice(0,r+1)),_=()=>{let n;return n=l?u:g?d:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(me,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:null!=a},children:n})};return a&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?t.createElement(se,{location:a.location,revalidation:a.revalidation,component:u,error:l,children:_(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):_()}),null)}(k&&k.map((e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:j([m,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?m:j([m,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,a,i);return n&&f?t.createElement(X.Provider,{value:{location:$({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:p.Pop}},f):f}function le(){let e=function(){var e;let n=t.useContext(Z),a=function(e){let n=t.useContext(q);return n||_(!1),n}(ge.UseRouteError),i=ue(ge.UseRouteError);return void 0!==n?n:null==(e=a.errors)?void 0:e[i]}(),n=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),a?t.createElement("pre",{style:i},a):null,null)}const oe=t.createElement(le,null);class se extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(Q.Provider,{value:this.props.routeContext},t.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function me(e){let{routeContext:n,match:a,children:i}=e,r=t.useContext(V);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),t.createElement(Q.Provider,{value:n},i)}var ce=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ce||{}),ge=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ge||{});function ue(e){let n=function(e){let n=t.useContext(Q);return n||_(!1),n}(),a=n.matches[n.matches.length-1];return a.route.id||_(!1),a.route.id}const de={};function pe(e){let{to:n,replace:a,state:i,relative:r}=e;ee()||_(!1);let{future:l,static:o}=t.useContext(Y),{matches:s}=t.useContext(Q),{pathname:m}=te(),c=ae(),g=F(n,K(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return t.useEffect((()=>c(JSON.parse(u),{replace:a,state:i,relative:r})),[c,u,r,a,i]),null}function he(e){_(!1)}function _e(e){let{basename:n="/",children:a=null,location:i,navigationType:r=p.Pop,navigator:l,static:o=!1,future:s}=e;ee()&&_(!1);let m=n.replace(/^\/*/,"/"),c=t.useMemo((()=>({basename:m,navigator:l,static:o,future:$({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=v(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:k="default"}=i,f=t.useMemo((()=>{let e=L(g,m);return null==e?null:{location:{pathname:e,search:u,hash:d,state:h,key:k},navigationType:r}}),[m,g,u,d,h,k,r]);return null==f?null:t.createElement(Y.Provider,{value:c},t.createElement(X.Provider,{children:a,value:f}))}function ke(e){let{children:t,location:n}=e;return re(fe(t),n)}function fe(e,n){void 0===n&&(n=[]);let a=[];return t.Children.forEach(e,((e,i)=>{if(!t.isValidElement(e))return;let r=[...n,i];if(e.type===t.Fragment)return void a.push.apply(a,fe(e.props.children,r));e.type!==he&&_(!1),e.props.index&&e.props.children&&_(!1);let l={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(l.children=fe(e.props.children,r)),a.push(l)})),a}t.startTransition,new Promise((()=>{})),t.Component;const Ee=window.ReactDOM;var Se=e.n(Ee);function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ve.apply(this,arguments)}function be(e,t){if(null==e)return{};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ye=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],xe=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(e){}const we=t.createContext({isTransitioning:!1});new Map;const Ne=t.startTransition;function Ce(e){let{basename:n,children:a,future:i,window:r}=e,l=t.useRef();null==l.current&&(l.current=function(e){return void 0===e&&(e={}),function(e,t,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:r=!1}=a,l=i.history,o=p.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=p.Pop;let e=c(),t=null==e?null:e-m;m=e,s&&s({action:o,location:k.location,delta:t})}function u(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:S(e);return n=n.replace(/ $/,"%20"),_(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==m&&(m=0,l.replaceState(d({},l.state,{idx:m}),""));let k={get action(){return o},get location(){return e(i,l)},listen(e){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),s=e,()=>{i.removeEventListener(h,g),s=null}},createHref:e=>t(i,e),createURL:u,encodeLocation(e){let t=u(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){o=p.Push;let a=E(k.location,e,t);n&&n(a,e),m=c()+1;let g=f(a,m),u=k.createHref(a);try{l.pushState(g,"",u)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;i.location.assign(u)}r&&s&&s({action:o,location:k.location,delta:1})},replace:function(e,t){o=p.Replace;let a=E(k.location,e,t);n&&n(a,e),m=c();let i=f(a,m),g=k.createHref(a);l.replaceState(i,"",g),r&&s&&s({action:o,location:k.location,delta:0})},go:e=>l.go(e)};return k}((function(e,t){let{pathname:n="/",search:a="",hash:i=""}=v(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),E("",{pathname:n,search:a,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");a=-1===n?t:t.slice(0,n)}return a+"#"+("string"==typeof t?t:S(t))}),(function(e,t){k("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=t.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=t.useCallback((e=>{c&&Ne?Ne((()=>m(e))):m(e)}),[m,c]);return t.useLayoutEffect((()=>o.listen(g)),[o,g]),t.createElement(_e,{basename:n,children:a,location:s.location,navigationType:s.action,navigator:o,future:i})}Ee.flushSync,t.useId;const Te="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Ue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,De=t.forwardRef((function(e,n){let a,{onClick:i,relative:r,reloadDocument:l,replace:o,state:s,target:m,to:c,preventScrollReset:g,unstable_viewTransition:u}=e,d=be(e,ye),{basename:p}=t.useContext(Y),h=!1;if("string"==typeof c&&Ue.test(c)&&(a=c,Te))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=L(t.pathname,p);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:h=!0}catch(e){}let k=function(e,n){let{relative:a}=void 0===n?{}:n;ee()||_(!1);let{basename:i,navigator:r}=t.useContext(Y),{hash:l,pathname:o,search:s}=ie(e,{relative:a}),m=o;return"/"!==i&&(m="/"===o?i:j([i,o])),r.createHref({pathname:m,search:s,hash:l})}(c,{relative:r}),f=function(e,n){let{target:a,replace:i,state:r,preventScrollReset:l,relative:o,unstable_viewTransition:s}=void 0===n?{}:n,m=ae(),c=te(),g=ie(e,{relative:o});return t.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,a)){t.preventDefault();let n=void 0!==i?i:S(c)===S(g);m(e,{replace:n,state:r,preventScrollReset:l,relative:o,unstable_viewTransition:s})}}),[c,m,g,i,r,a,e,l,o,s])}(c,{replace:o,state:s,target:m,preventScrollReset:g,relative:r,unstable_viewTransition:u});return t.createElement("a",ve({},d,{href:a||k,onClick:h||l?i:function(e){i&&i(e),e.defaultPrevented||f(e)},ref:n,target:m}))})),Pe=t.forwardRef((function(e,n){let{"aria-current":a="page",caseSensitive:i=!1,className:r="",end:l=!1,style:o,to:s,unstable_viewTransition:m,children:c}=e,g=be(e,xe),u=ie(s,{relative:g.relative}),d=te(),p=t.useContext(q),{navigator:h,basename:k}=t.useContext(Y),f=null!=p&&function(e,n){void 0===n&&(n={});let a=t.useContext(we);null==a&&_(!1);let{basename:i}=function(e){let n=t.useContext(V);return n||_(!1),n}(Ie.useViewTransitionState),r=ie(e,{relative:n.relative});if(!a.isTransitioning)return!1;let l=L(a.currentLocation.pathname,i)||a.currentLocation.pathname,o=L(a.nextLocation.pathname,i)||a.nextLocation.pathname;return null!=M(r.pathname,o)||null!=M(r.pathname,l)}(u)&&!0===m,E=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,S=d.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(S=S.toLowerCase(),v=v?v.toLowerCase():null,E=E.toLowerCase()),v&&k&&(v=L(v,k)||v);const b="/"!==E&&E.endsWith("/")?E.length-1:E.length;let y,x=S===E||!l&&S.startsWith(E)&&"/"===S.charAt(b),w=null!=v&&(v===E||!l&&v.startsWith(E)&&"/"===v.charAt(E.length)),N={isActive:x,isPending:w,isTransitioning:f},C=x?a:void 0;y="function"==typeof r?r(N):[r,x?"active":null,w?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(N):o;return t.createElement(De,ve({},g,{"aria-current":C,className:y,ref:n,style:T,to:s,unstable_viewTransition:m}),"function"==typeof c?c(N):c)}));var Ie,Ge;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ie||(Ie={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Ge||(Ge={}));const Oe=({title:e})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,t.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,t.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,t.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,t.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,t.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,t.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,t.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"}))),e)))),Me=({to:e,title:n})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(Pe,{to:e,className:({isActive:e})=>"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 "+(e?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},n)),Re=({NavList:e})=>(0,t.createElement)("nav",{className:"gtmkit-flex gtmkit-flex-wrap gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-[15px] gtmkit-space-x-9"},e.map((function(e){return(0,t.createElement)(Me,{key:e.to,to:e.to,title:e.title})})));function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}function Ae(e,t){if(null==e)return{};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Ke(e,t){return Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ke(e,t)}function Fe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ke(e,t)}function je(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const He=n().createContext(null);var Be=function(e){return e.scrollTop},We="unmounted",ze="exited",Je="entering",$e="entered",Ve="exiting",qe=function(e){function t(t,n){var a;a=e.call(this,t,n)||this;var i,r=n&&!n.isMounting?t.enter:t.appear;return a.appearStatus=null,t.in?r?(i=ze,a.appearStatus=Je):i=$e:i=t.unmountOnExit||t.mountOnEnter?We:ze,a.state={status:i},a.nextCallback=null,a}Fe(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===We?{status:ze}:null};var a=t.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Je&&n!==$e&&(t=Je):n!==Je&&n!==$e||(t=Ve)}this.updateStatus(!1,t)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var e,t,n,a=this.props.timeout;return e=t=n=a,null!=a&&"number"!=typeof a&&(e=a.exit,t=a.enter,n=void 0!==a.appear?a.appear:t),{exit:e,enter:t,appear:n}},a.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Je){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Se().findDOMNode(this);n&&Be(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ze&&this.setState({status:We})},a.performEnter=function(e){var t=this,n=this.props.enter,a=this.context?this.context.isMounting:e,i=this.props.nodeRef?[a]:[Se().findDOMNode(this),a],r=i[0],l=i[1],o=this.getTimeouts(),s=a?o.appear:o.enter;e||n?(this.props.onEnter(r,l),this.safeSetState({status:Je},(function(){t.props.onEntering(r,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:$e},(function(){t.props.onEntered(r,l)}))}))}))):this.safeSetState({status:$e},(function(){t.props.onEntered(r)}))},a.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:Se().findDOMNode(this);t?(this.props.onExit(a),this.safeSetState({status:Ve},(function(){e.props.onExiting(a),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:ze},(function(){e.props.onExited(a)}))}))}))):this.safeSetState({status:ze},(function(){e.props.onExited(a)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},a.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,t.nextCallback=null,e(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Se().findDOMNode(this),a=null==e&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=i[0],l=i[1];this.props.addEndListener(r,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},a.render=function(){var e=this.state.status;if(e===We)return null;var t=this.props,a=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Ae(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return n().createElement(He.Provider,{value:null},"function"==typeof a?a(e,i):n().cloneElement(n().Children.only(a),i))},t}(n().Component);function Ye(){}qe.contextType=He,qe.propTypes={},qe.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ye,onEntering:Ye,onEntered:Ye,onExit:Ye,onExiting:Ye,onExited:Ye},qe.UNMOUNTED=We,qe.EXITED=ze,qe.ENTERING=Je,qe.ENTERED=$e,qe.EXITING=Ve;const Xe=qe;var Qe=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return a=t,void((n=e).classList?n.classList.remove(a):"string"==typeof n.className?n.className=je(n.className,a):n.setAttribute("class",je(n.className&&n.className.baseVal||"",a)));var n,a}))},Ze=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(t=e.call.apply(e,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var a=t.resolveArguments(e,n),i=a[0],r=a[1];t.removeClasses(i,"exit"),t.addClass(i,r?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var a=t.resolveArguments(e,n),i=a[0],r=a[1]?"appear":"enter";t.addClass(i,r,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var a=t.resolveArguments(e,n),i=a[0],r=a[1]?"appear":"enter";t.removeClasses(i,r),t.addClass(i,r,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:a?i+"-active":n[e+"Active"],doneClassName:a?i+"-done":n[e+"Done"]}},t}Fe(t,e);var a=t.prototype;return a.addClass=function(e,t,n){var a=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(a+=" "+i),"active"===n&&e&&Be(e),a&&(this.appliedClasses[t][n]=a,function(e,t){e&&t&&t.split(" ").forEach((function(t){return a=t,void((n=e).classList?n.classList.add(a):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(e,a))},a.removeClasses=function(e,t){var n=this.appliedClasses[t],a=n.base,i=n.active,r=n.done;this.appliedClasses[t]={},a&&Qe(e,a),i&&Qe(e,i),r&&Qe(e,r)},a.render=function(){var e=this.props,t=(e.classNames,Ae(e,["classNames"]));return n().createElement(Xe,Le({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(n().Component);Ze.defaultProps={classNames:""},Ze.propTypes={};const et=Ze,tt=({title:e=(0,a.__)("Save","gtm-kit"),className:n="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:l,useIsPending:o,useCanSave:s}=(0,i.useContext)(g);return(0,t.createElement)(r.Button,{className:n,onClick:()=>l(),variant:"primary",disabled:o||!s},s?(0,a.__)(e,"gtm-kit"):(0,a.__)("Saved","gtm-kit"),o?(0,t.createElement)(r.Spinner,null):"")},nt=()=>{const{useCanSave:e}=(0,i.useContext)(g);return(0,t.createElement)(et,{in:e,timeout:500,classNames:"slide",unmountOnExit:!0},(0,t.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,t.createElement)(tt,null)))},at=({subject:e})=>{const n=!0===e||"on"===e,i=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,t.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 "+i},n?(0,a.__)("Active","gtm-kit"):(0,a.__)("Inactive","gtm-kit"))},it=(0,i.forwardRef)((({children:e,className:n="",...a},i)=>(0,t.createElement)("div",{...a,className:"gtmkit-flex gtmkit-flex-col 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},e)));it.Header=({as:e="h3",title:n="",children:a,className:i="",...r})=>(0,t.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,t.createElement)(e,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},n),a),it.Content=({as:e="div",children:n,className:a="gtmkit-flex-auto",...i})=>(0,t.createElement)(e,{...i,className:a},n),it.Button=({url:e,destination:n,newTab:a=!1,text:i,group:l="",...o})=>{const s=ae();return(0,t.createElement)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,t.createElement)(r.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{n&&e&&!1===a?window.gtmkitSettings.current_poage===l?s(n,{replace:!0}):window.location.href=e+"#"+n:e?a?window.open(e):window.location.href=e:s(n,{replace:!0})}},(0,t.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},i)))};const rt=it,lt=({title:e,data:n,className:r=""})=>{const{useSettings:l}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},e),(0,t.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] "+r},n.map(((e,n)=>!1===e.featured?null:(0,t.createElement)(rt,{key:n},(0,t.createElement)(rt.Header,{title:e.title},e.pill?(0,t.createElement)(at,{subject:l[e.group][e.option]}):null),(0,t.createElement)(rt.Content,null,e.text.map(((e,n)=>(0,t.createElement)("p",{key:n},e)))),(0,t.createElement)(rt.Button,{url:e.link.url,destination:e.link.destination,text:e.link.text?e.link.text:(0,a.__)("Read article","gtm-kit"),newTab:e.link.external,group:e.group}))))))},ot=e=>((e,t,n)=>{const a=(e,n)=>({...n,title:e.title,to:e.path,group:e.group||n.group,option:e.option||n.option,text:[e.description],link:{...n.link,url:window.gtmkitSettings[t+"Url"],destination:"/"+e.path}});return"templates"===t?Object.keys(e).map((t=>a(e[t][0],n))):Object.keys(e).map((t=>a(e[t],n)))})(window.gtmkitSettings[e],e,function(e){switch(e){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,a.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,a.__)("Read More","gtm-kit")}}}}(e)),st=()=>{const{useSettings:e}=(0,i.useContext)(g),[n,r]=(0,i.useState)(window.gtmkitSettings.tutorials),l=Boolean(e.general.sgtm_domain&&e.general.sgtm_domain.trim());return(0,i.useEffect)((()=>{r((e=>[...e,{title:(0,a.__)("See all tutorials…","gtm-kit"),text:[(0,a.__)("See all our tutorials 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,a.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("General","gtm-kit")),(0,t.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,t.createElement)(rt,null,(0,t.createElement)(rt.Header,{title:"Google Tag Manager Container"},(0,t.createElement)(at,{subject:e.general.gtm_id&&e.general.container_active})),(0,t.createElement)(rt.Content,null,e.general.gtm_id&&e.general.container_active?(0,t.createElement)("p",null,(0,a.__)("Container ID:","gtm-kit")," ",e&&e.general.gtm_id):(0,t.createElement)("p",null,(0,a.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,t.createElement)(rt.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,t.createElement)(rt,null,(0,t.createElement)(rt.Header,{title:(0,a.__)("Server-side GTM","gtm-kit")},(0,t.createElement)(at,{subject:l})),(0,t.createElement)(rt.Content,null,(0,t.createElement)("p",null,(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit"))),(0,t.createElement)(rt.Button,{destination:"/container",text:(0,a.__)("Edit container","gtm-kit")})),(0,t.createElement)(rt,null,(0,t.createElement)(rt.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")},(0,t.createElement)(at,{subject:e.general.analytics_active})),(0,t.createElement)(rt.Content,null,(0,t.createElement)("p",null,(0,a.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,t.createElement)(rt.Button,{destination:"/misc",text:(0,a.__)("Share anonymous data","gtm-kit")}))),(0,t.createElement)(lt,{title:(0,a.__)("Tutorials","gtm-kit"),data:n}),(0,t.createElement)(lt,{title:(0,a.__)("Integrations","gtm-kit"),data:ot("integrations")}))},mt=({title:e,placeholder:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:l="general",optionName:o,isDisabled:s,useSettings:m,useUpdateStateSettings:c})=>(0,t.createElement)(r.TextControl,{label:e,placeholder:n,help:a,className:i,value:m[l][o],onChange:e=>c(l,o,e),disabled:s}),ct=({title:e,label:n,optionGroup:a="general",optionName:i,disabled:l=!1,useSettings:o,useUpdateStateSettings:s})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,t.createElement)(r.BaseControl,{label:e},(0,t.createElement)(r.ToggleControl,{label:n,checked:!l&&o[a][i],onChange:()=>{s(a,i,!(o&&o[a][i]))},disabled:l})))),gt=({title:e,options:n,help:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:o,disabled:s,useSettings:m,useUpdateStateSettings:c})=>(0,t.createElement)(r.RadioControl,{label:e,options:n,help:a,className:i,selected:parseInt(m[l][o]),onChange:e=>c(l,o,e),disabled:s}),ut=({title:e,help:n,items:a=[],optionGroup:l="general",optionName:o,disabled:s=!1,useSettings:m,useUpdateStateSettings:c})=>{const g=Array.isArray(m[l][o])?m[l][o]:[],[u,d]=(0,i.useState)(g);return(0,i.useEffect)((()=>{const e=Array.isArray(m[l][o])?m[l][o]:[];d(e)}),[m]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,t.createElement)(r.BaseControl,{label:e,help:n},a.map((e=>(0,t.createElement)(r.CheckboxControl,{key:e.role,label:e.name,disabled:s,checked:u.includes(e.role),onChange:t=>((e,t)=>{d((n=>{let a;return a=e?[...n,t]:n.filter((e=>e!==t)),c(l,o,a),a}))})(t,e.role)}))))))},dt=(0,i.forwardRef)((({children:e,className:n="",disabled:a=!1,...i},r)=>(0,t.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},e)));dt.Header=({as:e="h3",title:n="",children:a,className:i="",...r})=>(0,t.createElement)(e,{...r,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},n,a),dt.Content=({as:e="div",children:n,className:a="",...i})=>(0,t.createElement)(e,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+a},n);const pt=dt,ht=()=>{const{useSettings:e,useUpdateStateSettings:n,useUserRoles:r}=(0,i.useContext)(g),l=!(e.general.sgtm_domain&&e.general.sgtm_domain.trim()&&e.general.sgtm_container_identifier&&e.general.sgtm_container_identifier.trim()),o=te();return(0,t.useEffect)((()=>{const e=new URLSearchParams(o.search).get("focus");if(e){const t=document.getElementById(e);t&&t.scrollIntoView()}}),[o]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Google Tag Manager container","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("General Container Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,t.createElement)(mt,{title:(0,a.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,a.__)("Enter GTM Container ID","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Inject Container Code","gtm-kit"),label:(0,a.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Just the container","gtm-kit"),label:(0,a.__)("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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(mt,{title:(0,a.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,a.__)("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 so.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)("div",{id:"sgtm"}),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(mt,{title:(0,a.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,a.__)("Enter domain …","gtm-kit"),help:(0,a.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(mt,{title:(0,a.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,a.__)("Enter loader name …","gtm-kit"),help:(0,a.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,a.__)("Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up.","gtm-kit"),optionName:"sgtm_cookie_keeper",disabled:l,useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Google Tag Manager Server-side Tagging","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,t.createElement)("a",{href:"https://gtmkit.com/guides/google-tag-manager-server-side-tagging/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=sgtm&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more","gtm-kit"))),(0,t.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Hosting server-side GTM containers","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform.","gtm-kit")," ",(0,a.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,t.createElement)("a",{href:"https://stape.io/?pt=tlam&rs=plugin",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more about Stape.io","gtm-kit"))))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Page Speed Optimization","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("load_delayed_js event","gtm-kit"),label:(0,a.__)("Setting this to On will push the event 'load_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Delay JavaScript execution","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Page optimization plugins can delay the 'load_delayed_js' event and this can be used to delay the triggering og tags in Google Tag Manager.","gtm-kit")," ",(0,t.createElement)("a",{href:"https://gtmkit.com/guides/delay-javascript-execution-in-gtm/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=delay-js&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more","gtm-kit"))))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Tag Manager Environment","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(mt,{title:(0,a.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,a.__)("Enter gtm_auth code","gtm-kit"),help:(0,a.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(mt,{title:(0,a.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,a.__)("Enter gtm_preview code","gtm-kit"),help:(0,a.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Environments","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,a.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,a.__)("If left empty the default environment will be used.","gtm-kit")),(0,t.createElement)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("Override settings in wp-config.php","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("You can override the values by using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments.","gtm-kit")," ",(0,t.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=container-settings&utm_content=dashboard-container",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more","gtm-kit"))))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Exclude User Roles","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(ut,{title:(0,a.__)("Exclude user roles","gtm-kit"),help:(0,a.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:r,optionName:"exclude_user_roles",useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600"},(0,a.__)("Warning!","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Excluding user roles is not compatible with all full-page cache solutions. Some full-page cache solutions may cache the page identically for all users, regardless of their user role. This could result in users being excluded who should not be.","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Please ensure thorough and proper testing of this.","gtm-kit")))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Container Code Implementation","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(gt,{title:(0,a.__)("Container code implementation:","gtm-kit"),options:[{label:(0,a.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,a.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,a.__)("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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(gt,{title:(0,a.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,a.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,a.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,a.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,a.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,a.__)('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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,t.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>")))))},_t=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Post Data","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Post Data Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,t.createElement)(ct,{title:(0,a.__)("Post type","gtm-kit"),id:"post-type",label:(0,a.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Page type","gtm-kit"),id:"page-type",label:(0,a.__)('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",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Categories","gtm-kit"),id:"categories",label:(0,a.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Tags","gtm-kit"),id:"tags",label:(0,a.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post title","gtm-kit"),id:"post-title",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post ID","gtm-kit"),id:"post-id",label:(0,a.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post data","gtm-kit"),id:"post-date",label:(0,a.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,a.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,a.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:e,useUpdateStateSettings:n}))))},kt=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("User Data","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,t.createElement)(pt.Content,{className:"gtmkit-space-y-2"},(0,t.createElement)("p",null,(0,a.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,t.createElement)("p",null,(0,a.__)("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,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("User Data Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,a.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("User ID","gtm-kit"),id:"user-id",label:(0,a.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("User role","gtm-kit"),id:"user-role",label:(0,a.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:e,useUpdateStateSettings:n}))))},ft=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r=!e.general.gcm_default_settings;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Google Consent Mode","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Consent Mode Activation","gtm-kit")},(0,t.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,a.__)("Warning!","gtm-kit"))),(0,t.createElement)(pt.Content,{className:"gtmkit-space-y-2"},(0,t.createElement)("p",null,(0,a.__)("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,t.createElement)("p",null,(0,a.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,t.createElement)("p",{className:"!gtmkit-mt-4"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,t.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,a.__)("See an example of how consent is updated","gtm-kit"))),(0,t.createElement)(ct,{title:(0,a.__)("Activate GCM settings","gtm-kit"),label:(0,a.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(pt,{disabled:r},(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Ad Personalization","gtm-kit"),label:(0,a.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Ad Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Ad User Data","gtm-kit"),label:(0,a.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Analytics Storage","gtm-kit"),label:(0,a.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Functionality Storage","gtm-kit"),label:(0,a.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Personalization Storage","gtm-kit"),label:(0,a.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Security Storage","gtm-kit"),label:(0,a.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,a.__)("Advanced","gtm-kit")),(0,t.createElement)(ct,{title:(0,a.__)("Redact Ads Data","gtm-kit"),label:(0,a.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Pass through URL parameters","gtm-kit"),label:(0,a.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:r,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(mt,{title:(0,a.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,a.__)("Enter time in milliseconds","gtm-kit"),useSettings:e,useUpdateStateSettings:n}))))},Et=({label:e,value:n,tag:a})=>(0,t.createElement)("tr",null,(0,t.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,t.createElement)("strong",null,e)),(0,t.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===a?(0,t.createElement)("code",{className:"gtmkit-text-sm"},n):(0,t.createElement)("em",null,n))),St=()=>{const{useSiteData:e}=(0,i.useContext)(g),n=Object.values(e.shared_data);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("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,t.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("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,t.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,t.createElement)("tbody",{className:"gtmkit-py-6"},n.map((function(e,n){return(0,t.createElement)(Et,{key:n,label:e.label,value:e.value,tag:e.tag})})))))},vt=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Misc","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Help improve GTM Kit","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(St,null),(0,t.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,a.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,t.createElement)(ct,{title:(0,a.__)("Share anonymous data","gtm-kit"),label:(0,a.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Logging and debugging","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Event Inspector","gtm-kit"),label:(0,a.__)("The event inspector is placed in the footer of the front and it allows you to see all the fired GTM events.","gtm-kit"),optionName:"event_inspector",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Console log","gtm-kit"),label:(0,a.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Debug log","gtm-kit"),label:(0,a.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:e,useUpdateStateSettings:n}))))},bt=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(lt,{title:(0,a.__)("Integrations","gtm-kit"),data:ot("integrations")})),yt=({pluginName:e})=>(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.sprintf)( 2 2 // translators: %s is the name of the plugin. 3 (0, n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,n.sprintf)(3 (0,a.__)("%s is not active","gtm-kit"),e),className:"gtmkit-text-red-600"}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-6"},(0,a.sprintf)( 4 4 // translators: %s is the name of the plugin. 5 (0, n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(r.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,n.sprintf)(5 (0,a.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),e)),(0,t.createElement)(r.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+e}},(0,a.sprintf)( 6 6 // translators: %s is the name of the plugin. 7 (0, n.__)("Install %s","gtm-kit"),t)))),xe=({title:t,options:a,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:l="general",optionName:s,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,n.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.SelectControl,{label:t,value:d&&d[l][s],options:h,className:o,onChange:t=>p(l,s,t),disabled:m,help:c}))},Se=({pluginName:t,optionName:a,pluginInactive:i})=>(0,e.createElement)(de,{disabled:i},(0,e.createElement)(de.Header,{title:(0,n.sprintf)(7 (0,a.__)("Install %s","gtm-kit"),e)))),xt=({title:e,options:n,className:l="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:s,disabled:m=!1,help:c="",notSet:u=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,i.useContext)(g),h=u?[{label:(0,a.__)("(not set)","gtm-kit"),value:""},...n]:n;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.SelectControl,{label:e,value:d&&d[o][s],options:h,className:l,onChange:e=>p(o,s,e),disabled:m,help:c}))},wt=({pluginName:e,optionName:n,pluginInactive:r})=>{const{useSettings:l,useUpdateStateSettings:o}=(0,i.useContext)(g);return(0,t.createElement)(pt,{disabled:r},(0,t.createElement)(pt.Header,{title:(0,a.sprintf)( 8 8 // translators: %s is the name of the plugin. 9 (0, n.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.sprintf)(9 (0,a.__)("%s Integration","gtm-kit"),e)}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.sprintf)( 10 10 // translators: %s is the name of the plugin. 11 (0, n.__)("Track %s","gtm-kit"),t),label:(0,n.sprintf)(11 (0,a.__)("Track %s","gtm-kit"),e),label:(0,a.sprintf)( 12 12 // translators: %s is the name of the plugin. 13 (0, n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:a,disabled:i}))),we=[{label:(0,n.__)("Retail","gtm-kit"),value:"retail"},{label:(0,n.__)("Education","gtm-kit"),value:"education"},{label:(0,n.__)("Flights","gtm-kit"),value:"flights"},{label:(0,n.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,n.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,n.__)("Local deals","gtm-kit"),value:"local"},{label:(0,n.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,n.__)("Travel","gtm-kit"),value:"travel"},{label:(0,n.__)("Custom","gtm-kit"),value:"custom"}],Ne=()=>{const{useSettings:t,isWooAddonActive:a}=(0,i.useContext)(g),r="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,l=o||!t.integrations.woocommerce_integration,s=l||!a,m=s||!t.general.sgtm_domain,c=m||!t.premium.woocommerce_webhooks;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,n.__)("WooCommerce","gtm-kit")),o?(0,e.createElement)(ye,{pluginName:r}):null,(0,e.createElement)(Se,{pluginName:r,optionName:"woocommerce_integration",pluginInactive:o}),(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,n.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("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:l}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:l}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude shipping from revenue","gtm-kit"),label:(0,n.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:l}))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('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:l})),(0,e.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,e.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,n.__)("User-Provided Data","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,e.createElement)("a",{href:"https://support.google.com/google-ads/answer/13262500?sjid=9465166023214753583-EU#Code_snippet",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,n.__)("Learn more","gtm-kit"))))))),a?(0,e.createElement)(de,{disabled:s},(0,e.createElement)(de.Header,{title:(0,n.__)("Webhooks for server-side tracking","gtm-kit")}),(0,e.createElement)(de.Content,null,m?(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm"},(0,n.__)("Go to sGTM settings","gtm-kit"))):(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging"},(0,n.__)("Go to GTM Templates","gtm-kit"))),(0,e.createElement)(ce,{title:(0,n.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,n.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:m}),(0,e.createElement)(ce,{title:(0,n.__)("Purchase webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_purchase_webhook",disabled:c}),(0,e.createElement)(ce,{title:(0,n.__)("Refund webhook","gtm-kit"),label:(0,n.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_refund_webhook",disabled:c}))):null,(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Event customization","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:"view_item_list (with product filter)",options:[{label:(0,n.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,n.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,n.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:l}),(0,e.createElement)(ge,{title:"view_item",options:[{label:(0,n.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,n.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,n.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,n.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:l}),(0,e.createElement)(ge,{title:"add_shipping_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:l}),(0,e.createElement)(ge,{title:"add_payment_info ",options:[{label:(0,n.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,n.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,n.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,n.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:l}))),(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:we,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:l}),(0,e.createElement)(me,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,n.__)("Enter prefix ...","gtm-kit"),help:(0,n.__)("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:l}))),a?(0,e.createElement)(de,{disabled:s},(0,e.createElement)(de.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")),(0,e.createElement)(me,{title:(0,n.__)("Single Product (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_single_product_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector ...","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector ...","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit")}),(0,e.createElement)(me,{title:(0,n.__)("Product List (add_to_wishlist):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_add_to_wishlist",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,n.__)("Enter CSS selector ...","gtm-kit"),help:(0,n.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit")}))):null,(0,e.createElement)(de,{disabled:l},(0,e.createElement)(de.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("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:l}),(0,e.createElement)(ce,{title:(0,n.__)("Include permalink structure","gtm-kit"),label:(0,n.__)("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:l}),(0,e.createElement)(ce,{title:(0,n.__)("Include path of pages","gtm-kit"),label:(0,n.__)("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:l}))))},Ce=()=>{const{useSettings:t}=(0,i.useContext)(g),a="Contact Form 7",r=!window.gtmkitSettings.plugins.cf7,o=r||!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,n.__)("Contact Form 7","gtm-kit")),r?(0,e.createElement)(ye,{pluginName:a}):null,(0,e.createElement)(Se,{pluginName:a,optionName:"cf7_integration",pluginInactive:r}),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ge,{title:(0,n.__)("Load JavaScript","gtm-kit"),options:[{label:(0,n.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,n.__)("On all pages","gtm-kit"),value:2}],help:(0,n.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o}))))},Te=()=>{const t="Easy Digital Downloads",a=!window.gtmkitSettings.plugins.edd,{useSettings:r}=(0,i.useContext)(g),o=a||!r.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,n.__)("Easy Digital Downloads","gtm-kit")),a?(0,e.createElement)(ye,{pluginName:t}):null,(0,e.createElement)(Se,{pluginName:t,optionName:"edd_integration",pluginInactive:a}),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Use SKU instead of ID","gtm-kit"),label:(0,n.__)("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:o}),(0,e.createElement)(ce,{title:(0,n.__)("Exclude tax","gtm-kit"),label:(0,n.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o}),(0,e.createElement)(ce,{title:(0,n.__)("Include customer data","gtm-kit"),label:(0,n.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o}))),(0,e.createElement)(de,{disabled:o},(0,e.createElement)(de.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(xe,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:we,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,e.createElement)(me,{title:(0,n.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,n.__)("Enter prefix ...","gtm-kit"),help:(0,n.__)("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:o}))),(0,e.createElement)(de,{disabled:a},(0,e.createElement)(de.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)(ce,{title:(0,n.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,n.__)("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:o}))))},De=window.gtmkitSettings.templates||{},Pe=Object.keys(De).map((function(t){const e=De[t][0];return{title:e.title,to:e.path,pill:!1,text:[e.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+e.path,text:(0,n.__)("Get template","gtm-kit")}}})),Ge=()=>(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,n.__)("Getting Started","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,e.createElement)("p",null,(0,n.__)("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-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,n.__)("Read the guide","gtm-kit"))))),(0,e.createElement)(oe,{title:(0,n.__)("Templates","gtm-kit"),data:Pe})),Ie=({title:t,description:a,link:i,templates:r})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:t}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},a),i&&i.url&&i.link_text?(0,e.createElement)("div",null,(0,e.createElement)("a",{href:i.url,target:"_blank",className:"gtmkit-text-color-primary gtmkit-text-base dgtmkit-font-semibold hover:gtmkit-underline",rel:"noreferrer"},i.link_text)):null,r&&r.length>0?(0,e.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},r.map((function(t){return(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,e.createElement)("div",null,(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-sm"},r.map((function(t){return(0,e.createElement)("li",null,t.help_text)}))))):null))),Me=({sectionData:t})=>{const a=t.collections;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"},t.title),Object.keys(a).map((function(t){return(0,e.createElement)(Ie,{title:a[t].title,description:a[t].description,link:a[t].link,templates:a[t].templates})})))},Oe=()=>{const t=nt(),a=window.gtmkitSettings.tutorials;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,n.__)("Help","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{t("/support",{replace:!0})}},(0,n.__)("See support options","gtm-kit"))))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,e.createElement)(de.Content,null,(0,e.createElement)("ul",null,a.map(((t,a)=>(0,e.createElement)("li",{key:a,className:"gtmkit-mb-4"},(0,e.createElement)("a",{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,a)=>(0,e.createElement)("div",{key:a,className:"gtmkit-text-sm"},t))))))))))},Re=()=>{const{useIsSending:t,useSiteData:a,useUpdateSupportTicket:o,useSupportTicket:l,useSendSystemData:s,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);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,n.__)("Get support","gtm-kit")),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,e.createElement)(de.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,n.__)("WordPress.org 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,n.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,n.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,e.createElement)(de.Content,null,m?(0,e.createElement)("p",{className:"gtmkit-mb-2"},c):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2"},(0,n.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")),(0,e.createElement)(r.TextControl,{label:(0,e.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:l,onChange:t=>o(t)}),(0,e.createElement)(r.Button,{variant:"primary",className:"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",onClick:()=>{s()},disabled:!l.toUpperCase().startsWith("FS")},(0,e.createElement)("span",null,(0,n.__)("Send system data","gtm-kit")),t?(0,e.createElement)(r.Spinner,null):"")))),(0,e.createElement)(de,null,(0,e.createElement)(de.Header,{title:(0,n.__)("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,n.__)("Version:","gtm-kit")," ",a.gtmkit_version,")")),(0,e.createElement)(de.Content,null,(0,e.createElement)("p",null,(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,n.__)("The changelog","gtm-kit")),(0,e.createElement)("br",null),(0,e.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,n.__)("The GitHub repository","gtm-kit"))))))};const Ue={integrations:(0,n.__)("Integrations","gtm-kit"),templates:(0,n.__)("Google Tag Manager Templates","gtm-kit"),help:(0,n.__)("Help","gtm-kit")},Le=()=>{const{useSettings:t}=(0,i.useContext)(g),a=window.gtmkitSettings.currentPage,o=function({page:t}){switch(t){case"general":return[{to:"general",title:(0,n.__)("Dashboard","gtm-kit")},{to:"container",title:(0,n.__)("Container","gtm-kit")},{to:"post-data",title:(0,n.__)("Post data","gtm-kit")},{to:"user-data",title:(0,n.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,n.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,n.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,n.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}];case"templates":return[{to:"templates",title:(0,n.__)("Templates","gtm-kit")},...Pe];case"help":return[{to:"help",title:(0,n.__)("Help","gtm-kit")},{to:"support",title:(0,n.__)("Support","gtm-kit")}]}}({page:a}),l=window.gtmkitSettings.templates,s=Ue[a]||(0,n.__)("Settings","gtm-kit");return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,{title:s}),(0,e.createElement)(Ut,{NavList:o}),(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)(pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(be,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(ve,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Ne,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Ce,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Te,null)}),(0,e.createElement)(ht,{exact:!0,path:"/templates",element:(0,e.createElement)(Ge,null)}),l&&Object.keys(l).map((function(t){return(0,e.createElement)(ht,{exact:!0,key:t,path:t,element:(0,e.createElement)(Me,{sectionData:l[t][0]})})})),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(Oe,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)(ae,null)):(0,e.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,e.createElement)(r.Spinner,null))},Ae=()=>(0,e.createElement)(Ct,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Le,null)));document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,i.render)((0,e.createElement)(Ae,null),t)}))})();13 (0,a.__)("Activate the %s integration","gtm-kit"),e),optionGroup:"integrations",optionName:n,disabled:r,useSettings:l,useUpdateStateSettings:o})))},Nt=[{label:(0,a.__)("Retail","gtm-kit"),value:"retail"},{label:(0,a.__)("Education","gtm-kit"),value:"education"},{label:(0,a.__)("Flights","gtm-kit"),value:"flights"},{label:(0,a.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,a.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,a.__)("Local deals","gtm-kit"),value:"local"},{label:(0,a.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,a.__)("Travel","gtm-kit"),value:"travel"},{label:(0,a.__)("Custom","gtm-kit"),value:"custom"}],Ct=e=>{const{Fill:n,Slot:a}=(0,r.createSlotFill)(e),i=({children:e})=>(0,t.createElement)(n,null,e);return i.Slot=({fillProps:e})=>(0,t.createElement)(a,{fillProps:e},(e=>e.length?e:null)),i},Tt=Ct("GravityForms"),Ut=Ct("WooWebhooks"),Dt=Ct("WooCustomSelectors"),Pt=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r="WooCommerce",l=!window.gtmkitSettings.plugins.woocommerce,o=l||!e.integrations.woocommerce_integration,s=o||!e.general.sgtm_domain,m=s||!e.premium.woocommerce_webhooks;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("WooCommerce","gtm-kit")),l?(0,t.createElement)(yt,{pluginName:r}):null,(0,t.createElement)(wt,{pluginName:r,optionName:"woocommerce_integration",pluginInactive:l}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Basic settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(xt,{title:(0,a.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,a.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:o}),(0,t.createElement)(ct,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Exclude shipping from revenue","gtm-kit"),label:(0,a.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:o,useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("User Data","gtm-kit")}),(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4"},(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('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:o,useSettings:e,useUpdateStateSettings:n})),(0,t.createElement)("div",{className:"gtmkit-px-8 gtmkit-py-6"},(0,t.createElement)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3"},(0,t.createElement)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold"},(0,a.__)("User-Provided Data","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'.","gtm-kit")," ",(0,t.createElement)("a",{href:"https://support.google.com/google-ads/answer/13262500?sjid=9465166023214753583-EU#Code_snippet",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer"},(0,a.__)("Learn more","gtm-kit"))))))),(0,t.createElement)(Ut.Slot,{fillProps:{settingsInactive:o,useSettings:e,useUpdateStateSettings:n,sgtmInactive:s,webhooksInactive:m}}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Event customization","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(gt,{title:"view_item_list (with product filter)",options:[{label:(0,a.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,a.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,a.__)("Do you what to push the view_item_list event if the list is updated using a filter or just once per page view.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_view_item_list_limit",disabled:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(gt,{title:"view_item",options:[{label:(0,a.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,a.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,a.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,a.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(gt,{title:"add_shipping_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(gt,{title:"add_payment_info ",options:[{label:(0,a.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,a.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,a.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,a.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:o,useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(xt,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Nt,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,t.createElement)(mt,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,a.__)("Enter prefix …","gtm-kit"),help:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}))),(0,t.createElement)(Dt.Slot,{fillProps:{settingsInactive:o,useSettings:e,useUpdateStateSettings:n,sgtmInactive:s,webhooksInactive:m}}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Advanced settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Include permalink structure","gtm-kit"),label:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}),(0,t.createElement)(ct,{title:(0,a.__)("Include path of pages","gtm-kit"),label:(0,a.__)("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:o,useSettings:e,useUpdateStateSettings:n}))))},It=()=>{const{useSettings:e,useUpdateStateSettings:n}=(0,i.useContext)(g),r="Contact Form 7",l=!window.gtmkitSettings.plugins.cf7,o=l||!e.integrations.cf7_integration;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Contact Form 7","gtm-kit")),l?(0,t.createElement)(yt,{pluginName:r}):null,(0,t.createElement)(wt,{pluginName:r,optionName:"cf7_integration",pluginInactive:l}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(gt,{title:(0,a.__)("Load JavaScript","gtm-kit"),options:[{label:(0,a.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,a.__)("On all pages","gtm-kit"),value:2}],help:(0,a.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:o,useSettings:e,useUpdateStateSettings:n}))))},Gt=()=>{const e="Easy Digital Downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:r,useUpdateStateSettings:l}=(0,i.useContext)(g),o=n||!r.integrations.edd_integration;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Easy Digital Downloads","gtm-kit")),n?(0,t.createElement)(yt,{pluginName:e}):null,(0,t.createElement)(wt,{pluginName:e,optionName:"edd_integration",pluginInactive:n}),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Basic Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Use SKU instead of ID","gtm-kit"),label:(0,a.__)("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:o,useSettings:r,useUpdateStateSettings:l}),(0,t.createElement)(ct,{title:(0,a.__)("Exclude tax","gtm-kit"),label:(0,a.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:o,useSettings:r,useUpdateStateSettings:l}),(0,t.createElement)(ct,{title:(0,a.__)("Include customer data","gtm-kit"),label:(0,a.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"edd_include_customer_data",disabled:o,useSettings:r,useUpdateStateSettings:l}))),(0,t.createElement)(pt,{disabled:o},(0,t.createElement)(pt.Header,{title:(0,a.__)("Google Ads Settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(xt,{title:(0,a.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Nt,help:(0,a.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,t.createElement)(mt,{title:(0,a.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,a.__)("Enter prefix …","gtm-kit"),help:(0,a.__)("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:o,useSettings:r,useUpdateStateSettings:l}))),(0,t.createElement)(pt,{disabled:n},(0,t.createElement)(pt.Header,{title:(0,a.__)("Advanced settings","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)(ct,{title:(0,a.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,a.__)("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:o,useSettings:r,useUpdateStateSettings:l}))))},Ot=window.gtmkitSettings.templates||{},Mt=(Object.keys(Ot).map((function(e){const t=Ot[e][0];return{title:t.title,to:t.path,pill:!1,text:[t.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+t.path,text:(0,a.__)("Get template","gtm-kit")}}})),()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Getting Started","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("GTM Kit is sending data to your Google Tag Manger container but you still need to configure Tags, Triggers and Variables in GTM to use the data.","gtm-kit")),(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,t.createElement)("p",null,(0,a.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,t.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-import-a-google-tag-manager-container/",target:"_blank",rel:"noreferrer"},(0,a.__)("Read the guide","gtm-kit"))))),(0,t.createElement)(lt,{title:(0,a.__)("Templates","gtm-kit"),data:ot("templates")}))),Rt=({title:e,description:n,link:i,templates:r})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:e}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},n),i&&i.url&&i.link_text?(0,t.createElement)("div",null,(0,t.createElement)("a",{href:i.url,target:"_blank",className:"gtmkit-text-color-primary gtmkit-text-base dgtmkit-font-semibold hover:gtmkit-underline",rel:"noreferrer"},i.link_text)):null,r&&r.length>0?(0,t.createElement)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-8 gtmkit-mt-8 gtmkit-border-2 gtmkit-px-6 gtmkit-py-4"},(0,t.createElement)("div",null,(0,t.createElement)("h4",{className:"gtmkit-font-bold"},(0,a.__)("GTM container import files:","gtm-kit")),(0,t.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},r.map((function(e){return(0,t.createElement)("li",null,(0,t.createElement)("a",{className:"hover:gtmkit-underline",href:e.link,target:"_blank",rel:"noreferrer"},e.title))})))),(0,t.createElement)("div",null,(0,t.createElement)("h4",{className:"gtmkit-font-bold"},(0,a.__)("Necessary modifications:","gtm-kit")),(0,t.createElement)("ul",{className:"gtmkit-text-sm"},r.map((function(e){return(0,t.createElement)("li",null,e.help_text)}))))):null))),Lt=({sectionData:e})=>{const n=e.collections;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},e.title),Object.keys(n).map((function(e){return(0,t.createElement)(Rt,{title:n[e].title,description:n[e].description,link:n[e].link,templates:n[e].templates})})))},At=()=>{const e=ae(),n=window.gtmkitSettings.tutorials;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Help","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Need help?","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",{className:"gtmkit-mb-4"},(0,a.__)("We are here to help if you have any questions.","gtm-kit"),(0,t.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{e("/support",{replace:!0})}},(0,a.__)("See support options","gtm-kit"))))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Tutorials","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("ul",null,n.map(((e,n)=>(0,t.createElement)("li",{key:n,className:"gtmkit-mb-4"},(0,t.createElement)("a",{href:e.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},e.title),e.text.map(((e,n)=>(0,t.createElement)("div",{key:n,className:"gtmkit-text-sm"},e))))))))))},Kt=()=>{const{useIsSending:e,useSiteData:n,useUpdateSupportTicket:l,useSupportTicket:o,useSendSystemData:s,useIsSystemDataSent:m,useSystemDataMessage:c}=(0,i.useContext)(g);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,a.__)("Get support","gtm-kit")),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Support options","gtm-kit")}),(0,t.createElement)(pt.Content,null,(0,t.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,a.__)("WordPress.org Support Forum","gtm-kit"))),(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,a.__)("GITHub repository","gtm-kit"))),(0,t.createElement)("li",null,(0,t.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,a.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)")))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,t.createElement)(pt.Content,null,m?(0,t.createElement)("p",{className:"gtmkit-mb-2"},c):(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"gtmkit-mb-2"},(0,a.__)("If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:","gtm-kit")),(0,t.createElement)(r.TextControl,{label:(0,t.createElement)("span",{className:"gtmkit-text-red-600"},c," "),placeholder:(0,a.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:o,onChange:e=>l(e)}),(0,t.createElement)(r.Button,{variant:"primary",className:"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",onClick:()=>{s()},disabled:!o.toUpperCase().startsWith("FS")},(0,t.createElement)("span",null,(0,a.__)("Send system data","gtm-kit")),e?(0,t.createElement)(r.Spinner,null):"")))),(0,t.createElement)(pt,null,(0,t.createElement)(pt.Header,{title:(0,a.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,t.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,a.__)("Version:","gtm-kit")," ",n.gtmkit_version,")")),(0,t.createElement)(pt.Content,null,(0,t.createElement)("p",null,(0,a.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,t.createElement)("br",null),(0,t.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer"},(0,a.__)("The changelog","gtm-kit")),(0,t.createElement)("br",null),(0,t.createElement)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,a.__)("The GitHub repository","gtm-kit"))))))};const Ft=({integrationID:e,pluginName:n})=>{const{useSettings:a,useUpdateStateSettings:r}=(0,i.useContext)(g),l=!window.gtmkitSettings.plugins[e],o=l||!a.integrations[e+"_integration"];return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},n),l?(0,t.createElement)(yt,{pluginName:n}):null,(0,t.createElement)(wt,{pluginName:n,optionName:e+"_integration",pluginInactive:l}),"gf"===e?(0,t.createElement)(Tt.Slot,{fillProps:{settingsInactive:o,useSettings:a,useUpdateStateSettings:r}}):null)},jt=window.wp.plugins,Ht={integrations:(0,a.__)("Integrations","gtm-kit"),templates:(0,a.__)("Google Tag Manager Templates","gtm-kit"),help:(0,a.__)("Help","gtm-kit")},Bt=()=>{const{useSettings:e}=(0,i.useContext)(g),n=window.gtmkitSettings,l=n.currentPage,o=function({page:e}){switch(e){case"general":return[{to:"general",title:(0,a.__)("Dashboard","gtm-kit")},{to:"container",title:(0,a.__)("Container","gtm-kit")},{to:"post-data",title:(0,a.__)("Post data","gtm-kit")},{to:"user-data",title:(0,a.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,a.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,a.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,a.__)("Integrations","gtm-kit")},...ot("integrations")];case"templates":return[{to:"templates",title:(0,a.__)("Templates","gtm-kit")},...ot("templates")];case"help":return[{to:"help",title:(0,a.__)("Help","gtm-kit")},{to:"support",title:(0,a.__)("Support","gtm-kit")}]}}({page:l}),s=n.templates,m=n.integrations,c=Ht[l]||(0,a.__)("Settings","gtm-kit");return Object.keys(e).length?(0,t.createElement)(r.SlotFillProvider,null,(0,t.createElement)(Oe,{title:c}),(0,t.createElement)(Re,{NavList:o}),(0,t.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,t.createElement)(ke,null,(0,t.createElement)(he,{exact:!0,path:"/general",element:(0,t.createElement)(st,null)}),(0,t.createElement)(he,{exact:!0,path:"/container",element:(0,t.createElement)(ht,null)}),(0,t.createElement)(he,{exact:!0,path:"/post-data",element:(0,t.createElement)(_t,null)}),(0,t.createElement)(he,{exact:!0,path:"/user-data",element:(0,t.createElement)(kt,null)}),(0,t.createElement)(he,{exact:!0,path:"/google-consent-mode",element:(0,t.createElement)(ft,null)}),(0,t.createElement)(he,{exact:!0,path:"/misc",element:(0,t.createElement)(vt,null)}),(0,t.createElement)(he,{exact:!0,path:"/integrations",element:(0,t.createElement)(bt,null)}),(0,t.createElement)(he,{exact:!0,path:"/woocommerce",element:(0,t.createElement)(Pt,null)}),(0,t.createElement)(he,{exact:!0,path:"/cf7",element:(0,t.createElement)(It,null)}),(0,t.createElement)(he,{exact:!0,path:"/edd",element:(0,t.createElement)(Gt,null)}),m&&Object.keys(m).map((function(e){if("add-on"===m[e].type)return(0,t.createElement)(he,{exact:!0,key:e,path:e,element:(0,t.createElement)(Ft,{integrationID:e,pluginName:m[e].title})})})),(0,t.createElement)(he,{exact:!0,path:"/templates",element:(0,t.createElement)(Mt,null)}),s&&Object.keys(s).map((function(e){return(0,t.createElement)(he,{exact:!0,key:e,path:e,element:(0,t.createElement)(Lt,{sectionData:s[e][0]})})})),(0,t.createElement)(he,{exact:!0,path:"/help",element:(0,t.createElement)(At,null)}),(0,t.createElement)(he,{exact:!0,path:"/support",element:(0,t.createElement)(Kt,null)}),(0,t.createElement)(he,{path:"/",element:(0,t.createElement)(pe,{replace:!0,to:"/"+l})}))),(0,t.createElement)(nt,null),(0,t.createElement)(jt.PluginArea,null)):(0,t.createElement)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center"},(0,t.createElement)(r.Spinner,null))},Wt=()=>(0,t.createElement)(Ce,{basename:"/"},(0,t.createElement)(u,null,(0,t.createElement)(Bt,null)));document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById(window.gtmkitSettings.rootId);null!=e&&(0,i.render)((0,t.createElement)(Wt,null),e)}))})(); -
gtm-kit/trunk/assets/admin/wizard.asset.php
r3094947 r3112163 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' b6e046a3f90ec0389c04');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'c05e6e2acf0cb26b2f28'); -
gtm-kit/trunk/assets/admin/wizard.js
r3082967 r3112163 1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(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:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_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,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket ;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=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},u.apply(this,arguments)}var d;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const p="popstate";function h(t,e){if(!1===t||null==t)throw new Error(e)}function k(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 f(t,e,a,n){return void 0===a&&(a=null),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?S(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function E(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 S(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 x;function M(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?S(e):e).pathname||"/",a);if(null==n)return null;let i=N(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)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t){let e=A(n);r=C(i[t],e)}return r}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};l.relativePath.startsWith("/")&&(h(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&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:I(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 v(t.path))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...l),o.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 w=/^:[\w-]+$/,_=3,b=2,T=1,j=10,L=-2,D=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=L),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?_:""===e?T:j)),n)}function C(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===i?e:e.slice(i.length)||"/",m=O({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;r.push({params:n,pathname:B([i,m.pathname]),pathnameBase:G(B([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=B([i,m.pathnameBase]))}return r}function O(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),k("*"===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=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function A(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!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 z(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 P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),z("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),z("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),z("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else{let t=e.length-1;if(!n&&o.startsWith("..")){let e=o.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:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=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:r,search:W(n),hash:Y(i)}}(i,r),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,"/"),G=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],Q=(new Set(F),["get",...F]);function J(){return J=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},J.apply(this,arguments)}new Set(Q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),K=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(K)}function tt(){return q()||h(!1),e.useContext(K).location}function et(t){e.useContext(Z).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(H);return a||h(!1),a}(st.UseNavigateStable),a=ct(mt.UseNavigateStable),n=e.useRef(!1);return et((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:B([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext(Z),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=p;if("/"!==m){let t=m.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:k}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&void 0!==(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:B([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:B([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&f?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},f):f}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=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,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const rt=e.createElement(it,null);class lt extends e.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:void 0!==t.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 void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(H);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=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}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:i,relative:r}=t;q()||h(!1);let{future:l,static:o}=e.useContext(Z),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:J({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,f=e.useMemo((()=>{let t=U(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);return null==f?null:e.createElement(Z.Provider,{value:c},e.createElement(K.Provider,{children:n,value:f}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={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&&(l.children=kt(t.props.children,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const ft=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:E(t);return a=a.replace(/ $/,"%20"),h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:i},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:E(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,e.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l}=(0,a.useContext)(c),o=at();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)(n.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=>i("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.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:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-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)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=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"))),n&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();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)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.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:()=>{i("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.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:()=>{i("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();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"},o.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"},o.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"},o.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"},o.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"},o.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"},o.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)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.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:()=>{i("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.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:window.gtmkitSettings.templatesUrl+"#/ga4"},"Google Analytics 4")),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.gtmkitSettings.templatesUrl+"#/google-ads"},"Google Ads")),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.gtmkitSettings.templatesUrl+"#/facebook"},"Facebook")))),(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)(n.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")))),Tt=[{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")}],jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:i})},Lt=({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,Dt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let i="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 i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=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:i},(0,e.createElement)(Lt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},It=()=>{const t=Tt.length-1+Tt[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}))})(Tt,{path:tt().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"},Tt.map((function(n){return(0,e.createElement)(Dt,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},Ct=()=>(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)(It,null)),Ot=()=>(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"))))),At=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ct,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)(wt,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)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Ut=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(Ut,null),document.getElementById(window.gtmkitSettings.rootId))}))})();1 (()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(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:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:options},s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_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,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket,a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey,a.licenseKey=e.payload.licenseKey||a.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":a.isSendingLicenseKey=e.payload.isSendingLicenseKey||a.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":a.isSendingLicenseKey=!1,a.isLicenseKeySent=e.payload.isLicenseKeySent||a.isLicenseKeySent,a.licenseKeyMessage=e.payload.licenseKeyMessage||a.licenseKeyMessage}return a},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;r({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{r({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,o("gtmkit/v1/send-license-key","POST",e,!0));var e;r({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage,useIsSendingLicenseKey:n.isSendingLicenseKey,useLicenseKey:n.licenseKey,useIsLicenseKeySent:n.isLicenseKeySent,useLicenseKeyMessage:n.licenseKeyMessage,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[]};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=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},u.apply(this,arguments)}var d;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const p="popstate";function h(t,e){if(!1===t||null==t)throw new Error(e)}function k(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),u({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?S(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function f(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 S(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 x;function M(t,e,a){return void 0===a&&(a="/"),function(t,e,a,n){let i=A(("string"==typeof e?S(e):e).pathname||"/",a);if(null==i)return null;let r=N(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 l=null;for(let t=0;null==l&&t<r.length;++t){let e=U(i);l=C(r[t],e,n)}return l}(t,e,a,!1)}function N(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};l.relativePath.startsWith("/")&&(h(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&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:I(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 v(t.path))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...l),o.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 _=/^:[\w-]+$/,w=3,b=2,L=1,T=10,j=-2,D=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=j),e&&(n+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(_.test(e)?w:""===e?L:T)),n)}function C(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",l=[];for(let t=0;t<n.length;++t){let o=n[t],s=t===n.length-1,m="/"===r?e:e.slice(r.length)||"/",c=O({path:o.relativePath,caseSensitive:o.caseSensitive,end:s},m),g=o.route;if(!c&&s&&a&&!n[n.length-1].route.index&&(c=O({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},m)),!c)return null;Object.assign(i,c.params),l.push({params:i,pathname:B([r,c.pathname]),pathnameBase:G(B([r,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(r=B([r,c.pathnameBase]))}return l}function O(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),k("*"===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=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,a)=>(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function U(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return k(!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 A(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 z(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 P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),z("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),z("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),z("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else{let t=e.length-1;if(!n&&o.startsWith("..")){let e=o.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:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=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:r,search:K(n),hash:Y(i)}}(i,r),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,"/"),G=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const W=["post","put","patch","delete"],F=(new Set(W),["get",...W]);function Q(){return Q=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},Q.apply(this,arguments)}new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const J=e.createContext(null),H=e.createContext(null),$=e.createContext(null),Z=e.createContext(null),V=e.createContext({outlet:null,matches:[],isDataRoute:!1}),X=e.createContext(null);function q(){return null!=e.useContext(Z)}function tt(){return q()||h(!1),e.useContext(Z).location}function et(t){e.useContext($).static||e.useLayoutEffect(t)}function at(){let{isDataRoute:t}=e.useContext(V);return t?function(){let{router:t}=function(t){let a=e.useContext(J);return a||h(!1),a}(st.UseNavigateStable),a=ct(mt.UseNavigateStable),n=e.useRef(!1);return et((()=>{n.current=!0})),e.useCallback((function(e,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,Q({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(J),{basename:a,future:n,navigator:i}=e.useContext($),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:B([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=e.useContext($),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=p;if("/"!==m){let t=m.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:k}),E=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&void 0!==(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:a}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!a||void 0===a[e.route.id]);if(e.route.lazy||i){m=!0,o=c>=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:B([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:B([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&E?e.createElement(Z.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},E):E}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext(H);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),a=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,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:i},n):null,null)}const rt=e.createElement(it,null);class lt extends e.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:void 0!==t.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 void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:i}=t,r=e.useContext(J);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=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}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:i,relative:r}=t;q()||h(!1);let{future:l,static:o}=e.useContext($),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:Q({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,E=e.useMemo((()=>{let t=A(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);return null==E?null:e.createElement($.Provider,{value:c},e.createElement(Z.Provider,{children:n,value:E}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={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&&(l.children=kt(t.props.children,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const Et=e.startTransition;function ft(t){let{basename:a,children:n,future:i,window:r}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:f(t);return a=a.replace(/ $/,"%20"),h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=E(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=E(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:i},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:f(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&Et?Et((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,e.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l}=(0,a.useContext)(c),o=at();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)(n.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=>i("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.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:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-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)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=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"))),n&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();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)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.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:()=>{i("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{i("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{i("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.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:()=>{i("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();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"},o.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"},o.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"},o.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"},o.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"},o.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"},o.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)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.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:()=>{i("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.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(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.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:window.gtmkitSettings.templatesUrl+"#/ga4"},"Google Analytics 4")),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.gtmkitSettings.templatesUrl+"#/google-ads"},"Google Ads")),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.gtmkitSettings.templatesUrl+"#/facebook"},"Facebook")))),(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)(n.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")))),Lt=[{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")}],Tt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:i})},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,Dt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let i="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 i+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",i+=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:i},(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(Tt,{step:t,currentStep:a,totalSteps:n}))},It=()=>{const t=Lt.length-1+Lt[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}))})(Lt,{path:tt().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"},Lt.map((function(n){return(0,e.createElement)(Dt,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},Ct=()=>(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)(It,null)),Ot=()=>(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"))))),Ut=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ct,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)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(wt,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)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},At=()=>(0,e.createElement)(ft,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(Ut,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(At,null),document.getElementById(window.gtmkitSettings.rootId))}))})(); -
gtm-kit/trunk/assets/frontend/event-inspector.asset.php
r3082967 r3112163 1 <?php return array('dependencies' => array(), 'version' => '3 506d902dd7332588568');1 <?php return array('dependencies' => array(), 'version' => '361fa528b625299cad80'); -
gtm-kit/trunk/gtm-kit.php
r3094947 r3112163 4 4 * 5 5 * Plugin Name: GTM Kit 6 * Version: 1.2 2.46 * Version: 1.23 7 7 * Plugin URI: https://gtmkit.com/ 8 8 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed. … … 16 16 * 17 17 * WC requires at least: 8.0 18 * WC tested up to: 8.918 * WC tested up to: 9.1 19 19 * 20 20 * @package GTM Kit … … 28 28 } 29 29 30 const GTMKIT_VERSION = '1.2 2.4';30 const GTMKIT_VERSION = '1.23'; 31 31 32 32 if ( ! defined( 'GTMKIT_FILE' ) ) { -
gtm-kit/trunk/languages/gtm-kit.pot
r3094947 r3112163 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: GTM Kit 1.2 2.4\n"5 "Project-Id-Version: GTM Kit 1.23\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: 2024-0 5-29T20:50:59+00:00\n"12 "POT-Creation-Date: 2024-07-03T14:47:54+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.9.0\n" … … 45 45 msgstr "" 46 46 47 #: src/Admin/AbstractOptionsPage.php:2 6447 #: src/Admin/AbstractOptionsPage.php:229 48 48 #: src/Admin/SetupWizard.php:213 49 49 msgid "Whoops, something's not working." 50 50 msgstr "" 51 51 52 #: src/Admin/AbstractOptionsPage.php:2 6752 #: src/Admin/AbstractOptionsPage.php:232 53 53 #: src/Admin/SetupWizard.php:216 54 54 msgid "It looks like something is preventing JavaScript from loading on your website. GTM Kit requires JavaScript in order to give you the best possible experience." 55 55 msgstr "" 56 56 57 #: src/Admin/AbstractOptionsPage.php:2 7257 #: src/Admin/AbstractOptionsPage.php:237 58 58 #: src/Admin/SetupWizard.php:164 59 59 #: src/Admin/SetupWizard.php:221 … … 88 88 #: assets/admin/settings.js:13 89 89 msgid "Help" 90 msgstr "" 91 92 #: src/Admin/Integrations.php:26 93 msgid "The #1 open source eCommerce platform built for WordPress" 94 msgstr "" 95 96 #: src/Admin/Integrations.php:33 97 msgid "Just another contact form plugin for WordPress. Simple but flexible" 98 msgstr "" 99 100 #: src/Admin/Integrations.php:40 101 msgid "Easy way to sell Digital Products With WordPress" 90 102 msgstr "" 91 103 … … 259 271 260 272 #: assets/admin/settings.js:1 261 msgid "The #1 open source eCommerce platform built for WordPress" 262 msgstr "" 263 264 #: assets/admin/settings.js:1 265 msgid "Setup integration" 266 msgstr "" 267 268 #: assets/admin/settings.js:1 269 msgid "Just another contact form plugin for WordPress. Simple but flexible" 270 msgstr "" 271 272 #: assets/admin/settings.js:1 273 msgid "Easy way to sell Digital Products With WordPress" 274 msgstr "" 275 276 #: assets/admin/settings.js:1 277 msgid "See all tutorials..." 273 msgid "Setup Integration" 274 msgstr "" 275 276 #: assets/admin/settings.js:1 277 msgid "Get Template" 278 msgstr "" 279 280 #: assets/admin/settings.js:1 281 msgid "Read More" 282 msgstr "" 283 284 #: assets/admin/settings.js:1 285 msgid "See all tutorials…" 278 286 msgstr "" 279 287 … … 380 388 381 389 #: assets/admin/settings.js:1 382 msgid "Enter domain ..."390 msgid "Enter domain …" 383 391 msgstr "" 384 392 … … 392 400 393 401 #: assets/admin/settings.js:1 394 msgid "Enter loader name ..."402 msgid "Enter loader name …" 395 403 msgstr "" 396 404 … … 509 517 510 518 #: assets/admin/settings.js:1 519 msgid "Exclude User Roles" 520 msgstr "" 521 522 #: assets/admin/settings.js:1 523 msgid "Exclude user roles" 524 msgstr "" 525 526 #: assets/admin/settings.js:1 527 msgid "Select the roles that you want to exclude from tracking." 528 msgstr "" 529 530 #: assets/admin/settings.js:1 531 msgid "Warning!" 532 msgstr "" 533 534 #: assets/admin/settings.js:1 535 msgid "Excluding user roles is not compatible with all full-page cache solutions. Some full-page cache solutions may cache the page identically for all users, regardless of their user role. This could result in users being excluded who should not be." 536 msgstr "" 537 538 #: assets/admin/settings.js:1 539 msgid "Please ensure thorough and proper testing of this." 540 msgstr "" 541 542 #: assets/admin/settings.js:1 511 543 msgid "Container Code Implementation" 512 544 msgstr "" … … 632 664 #: assets/admin/settings.js:13 633 665 msgid "User Data" 634 msgstr ""635 636 #: assets/admin/settings.js:1637 msgid "Warning!"638 666 msgstr "" 639 667 … … 969 997 970 998 #: assets/admin/settings.js:13 971 msgid "Webhooks for server-side tracking" 972 msgstr "" 973 974 #: assets/admin/settings.js:13 975 msgid "In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain" 976 msgstr "" 977 978 #: assets/admin/settings.js:13 979 msgid "Go to sGTM settings" 980 msgstr "" 981 982 #: assets/admin/settings.js:13 983 msgid "In order to use webhooks you must configure you server-side container to handle the webhooks" 984 msgstr "" 985 986 #: assets/admin/settings.js:13 987 msgid "Go to GTM Templates" 988 msgstr "" 989 990 #: assets/admin/settings.js:13 991 msgid "Send webhooks to server GTM container" 992 msgstr "" 993 994 #: assets/admin/settings.js:13 995 msgid "This option will allow webhooks to be sent to your server GTM container." 996 msgstr "" 997 998 #: assets/admin/settings.js:13 999 msgid "Purchase webhook" 999 msgid "Event customization" 1000 msgstr "" 1001 1002 #: assets/admin/settings.js:13 1003 msgid "Push view_item_list when the list is updated using a product filter." 1004 msgstr "" 1005 1006 #: assets/admin/settings.js:13 1007 msgid "Only only push view_item_list once per per page for each list." 1008 msgstr "" 1009 1010 #: assets/admin/settings.js:13 1011 msgid "Do you what to push the view_item_list event if the list is updated using a filter or just once per page view." 1012 msgstr "" 1013 1014 #: assets/admin/settings.js:13 1015 msgid "Only push view_item on the master product" 1016 msgstr "" 1017 1018 #: assets/admin/settings.js:13 1019 msgid "Push view_item on master and variation products (higher number of views)." 1020 msgstr "" 1021 1022 #: assets/admin/settings.js:13 1023 msgid "Only push view_item on variation products." 1024 msgstr "" 1025 1026 #: assets/admin/settings.js:13 1027 msgid "When do you want to fire the \"view_item\" event on variable products?" 1028 msgstr "" 1029 1030 #: assets/admin/settings.js:13 1031 msgid "When the 'Place order' button is clicked" 1032 msgstr "" 1033 1034 #: assets/admin/settings.js:13 1035 msgid "When a shipment method is selected with fallback to the 'Place order' button." 1036 msgstr "" 1037 1038 #: assets/admin/settings.js:13 1039 msgid "Disable the 'add_shipment_info' event." 1040 msgstr "" 1041 1042 #: assets/admin/settings.js:13 1043 msgid "When do you want to fire the \"add_shipment_info\" event?" 1044 msgstr "" 1045 1046 #: assets/admin/settings.js:13 1047 msgid "When a payment method is selected with fallback to the 'Place order' button." 1048 msgstr "" 1049 1050 #: assets/admin/settings.js:13 1051 msgid "Disable the 'add_payment_info' event." 1052 msgstr "" 1053 1054 #: assets/admin/settings.js:13 1055 msgid "When do you want to fire the \"add_payment_info\" event?" 1056 msgstr "" 1057 1058 #: assets/admin/settings.js:13 1059 msgid "Google Ads Settings" 1060 msgstr "" 1061 1062 #: assets/admin/settings.js:13 1063 msgid "Google Business Vertical" 1064 msgstr "" 1065 1066 #: assets/admin/settings.js:13 1067 msgid "In order to use Google Ads Remarketing you must select your business type (vertical)." 1068 msgstr "" 1069 1070 #: assets/admin/settings.js:13 1071 msgid "Product ID prefix" 1072 msgstr "" 1073 1074 #: assets/admin/settings.js:13 1075 msgid "Enter prefix …" 1076 msgstr "" 1077 1078 #: assets/admin/settings.js:13 1079 msgid "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." 1080 msgstr "" 1081 1082 #: assets/admin/settings.js:13 1083 msgid "Advanced settings" 1084 msgstr "" 1085 1086 #: assets/admin/settings.js:13 1087 msgid "Dequeue the default JavaScript" 1088 msgstr "" 1089 1090 #: assets/admin/settings.js:13 1091 msgid "Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript." 1092 msgstr "" 1093 1094 #: assets/admin/settings.js:13 1095 msgid "Include permalink structure" 1000 1096 msgstr "" 1001 1097 … … 1005 1101 1006 1102 #: assets/admin/settings.js:13 1007 msgid " Refund webhook"1103 msgid "Include path of pages" 1008 1104 msgstr "" 1009 1105 1010 1106 #: assets/admin/settings.js:13 1011 1107 msgid "Enable this option to include the path of cart, checkout, order received and my account page." 1012 msgstr ""1013 1014 #: assets/admin/settings.js:131015 msgid "Event customization"1016 msgstr ""1017 1018 #: assets/admin/settings.js:131019 msgid "Push view_item_list when the list is updated using a product filter."1020 msgstr ""1021 1022 #: assets/admin/settings.js:131023 msgid "Only only push view_item_list once per per page for each list."1024 msgstr ""1025 1026 #: assets/admin/settings.js:131027 msgid "Do you what to push the view_item_list event if the list is updated using a filter or just once per page view."1028 msgstr ""1029 1030 #: assets/admin/settings.js:131031 msgid "Only push view_item on the master product"1032 msgstr ""1033 1034 #: assets/admin/settings.js:131035 msgid "Push view_item on master and variation products (higher number of views)."1036 msgstr ""1037 1038 #: assets/admin/settings.js:131039 msgid "Only push view_item on variation products."1040 msgstr ""1041 1042 #: assets/admin/settings.js:131043 msgid "When do you want to fire the \"view_item\" event on variable products?"1044 msgstr ""1045 1046 #: assets/admin/settings.js:131047 msgid "When the 'Place order' button is clicked"1048 msgstr ""1049 1050 #: assets/admin/settings.js:131051 msgid "When a shipment method is selected with fallback to the 'Place order' button."1052 msgstr ""1053 1054 #: assets/admin/settings.js:131055 msgid "Disable the 'add_shipment_info' event."1056 msgstr ""1057 1058 #: assets/admin/settings.js:131059 msgid "When do you want to fire the \"add_shipment_info\" event?"1060 msgstr ""1061 1062 #: assets/admin/settings.js:131063 msgid "When a payment method is selected with fallback to the 'Place order' button."1064 msgstr ""1065 1066 #: assets/admin/settings.js:131067 msgid "Disable the 'add_payment_info' event."1068 msgstr ""1069 1070 #: assets/admin/settings.js:131071 msgid "When do you want to fire the \"add_payment_info\" event?"1072 msgstr ""1073 1074 #: assets/admin/settings.js:131075 msgid "Google Ads Settings"1076 msgstr ""1077 1078 #: assets/admin/settings.js:131079 msgid "Google Business Vertical"1080 msgstr ""1081 1082 #: assets/admin/settings.js:131083 msgid "In order to use Google Ads Remarketing you must select your business type (vertical)."1084 msgstr ""1085 1086 #: assets/admin/settings.js:131087 msgid "Product ID prefix"1088 msgstr ""1089 1090 #: assets/admin/settings.js:131091 msgid "Enter prefix ..."1092 msgstr ""1093 1094 #: assets/admin/settings.js:131095 msgid "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."1096 msgstr ""1097 1098 #: assets/admin/settings.js:131099 msgid "Custom CSS Selectors"1100 msgstr ""1101 1102 #: assets/admin/settings.js:131103 msgid "If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors."1104 msgstr ""1105 1106 #: assets/admin/settings.js:131107 msgid "Single Product (add_to_wishlist):"1108 msgstr ""1109 1110 #: assets/admin/settings.js:131111 msgid "Enter CSS selector ..."1112 msgstr ""1113 1114 #: assets/admin/settings.js:131115 msgid "Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event."1116 msgstr ""1117 1118 #: assets/admin/settings.js:131119 msgid "Product List (select_item):"1120 msgstr ""1121 1122 #: assets/admin/settings.js:131123 msgid "Enter the CSS selector that matches your product list item, which should be use to fire the select_item event."1124 msgstr ""1125 1126 #: assets/admin/settings.js:131127 msgid "Product List (add_to_wishlist):"1128 msgstr ""1129 1130 #: assets/admin/settings.js:131131 msgid "Advanced settings"1132 msgstr ""1133 1134 #: assets/admin/settings.js:131135 msgid "Dequeue the default JavaScript"1136 msgstr ""1137 1138 #: assets/admin/settings.js:131139 msgid "Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript."1140 msgstr ""1141 1142 #: assets/admin/settings.js:131143 msgid "Include permalink structure"1144 msgstr ""1145 1146 #: assets/admin/settings.js:131147 msgid "Include path of pages"1148 1108 msgstr "" 1149 1109 -
gtm-kit/trunk/readme.txt
r3094947 r3112163 3 3 Donate link: https://github.com/tlamedia/gtm-kit 4 4 Tags: google tag manager, gtm, woocommerce, analytics, ga4 5 Tested up to: 6. 56 Stable tag: 1.2 2.45 Tested up to: 6.6 6 Stable tag: 1.23 7 7 License: GPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 89 89 == Changelog == 90 90 91 = 1.23 = 92 93 Release date: 2024-07-04 94 95 Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-23/). 96 97 #### Enhancements: 98 * Added an option to exclude selected user roles from tracking. 99 * Improve the flexibility of GTM Kit integrations. 100 101 #### Other: 102 * Tested up to WooCommerce 9.1. 103 * Tested up to WordPress 6.6. 104 91 105 = 1.22.4 = 92 106 93 107 Release date: 2024-05-30 94 95 Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-24/).96 108 97 109 #### Enhancements: -
gtm-kit/trunk/src/Admin/AbstractOptionsPage.php
r3090572 r3112163 15 15 */ 16 16 abstract class AbstractOptionsPage { 17 18 use AssetsTrait; 17 19 18 20 /** … … 152 154 */ 153 155 abstract public function enqueue_page_assets( string $hook ): void; 154 155 /**156 * Enqueue assets.157 *158 * @param string $page_slug The page slug.159 * @param string $script_handle The script handle.160 * @param string $path The plugin path.161 * @param string $url The plugin URL.162 * @param string $domain The translation domain.163 */164 protected function enqueue_assets( string $page_slug, string $script_handle, string $path = '', string $url = '', string $domain = 'gtm-kit' ) {165 166 if ( empty( $path ) ) {167 $path = GTMKIT_PATH;168 }169 if ( empty( $url ) ) {170 $url = GTMKIT_URL;171 }172 173 $deps_file = $path . 'assets/admin/' . $script_handle . '.asset.php';174 $dependency = [];175 $version = false;176 177 if ( \file_exists( $deps_file ) ) {178 $deps_file = require $deps_file;179 $dependency = $deps_file['dependencies'];180 $version = $deps_file['version'];181 }182 183 \wp_enqueue_style( 'gtmkit-' . $script_handle . '-style', $url . 'assets/admin/' . $script_handle . '.css', array( 'wp-components' ), $version );184 185 \wp_enqueue_script( 'gtmkit-' . $script_handle . '-script', $url . 'assets/admin/' . $script_handle . '.js', $dependency, $version, true );186 187 $this->localize_script( $page_slug, $script_handle );188 189 \wp_set_script_translations( 'gtmkit-' . $script_handle . '-script', $domain );190 }191 156 192 157 /** -
gtm-kit/trunk/src/Admin/GeneralOptionsPage.php
r3070452 r3112163 113 113 'nonce' => \wp_create_nonce( 'wp_rest' ), 114 114 'tutorials' => $this->get_tutorials(), 115 'integrations' => Integrations::get_integrations(), 115 116 'dashboardUrl' => \menu_page_url( 'gtmkit_general', false ), 116 117 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ), 117 118 'settings' => $this->options->get_all_raw(), 118 119 'site_data' => $this->util->get_site_data( $this->options->get_all_raw() ), 120 'user_roles' => $this->get_user_roles(), 119 121 ] 120 122 ); … … 129 131 return $this->util->get_data( '/get-tutorials', 'gtmkit_tutorials' ); 130 132 } 133 134 /** 135 * Get user roles 136 * 137 * @return array 138 */ 139 private function get_user_roles(): array { 140 141 $user_roles = []; 142 $roles = get_editable_roles(); 143 144 foreach ( $roles as $role_id => $role_info ) { 145 $user_roles[] = [ 146 'role' => $role_id, 147 'name' => translate_user_role( $role_info['name'] ), 148 ]; 149 } 150 151 return $user_roles; 152 } 131 153 } -
gtm-kit/trunk/src/Admin/IntegrationsOptionsPage.php
r3090572 r3112163 111 111 'root' => \esc_url_raw( rest_url() ), 112 112 'nonce' => \wp_create_nonce( 'wp_rest' ), 113 ' wa' => $this->util->is_premium(),113 'integrations' => Integrations::get_integrations(), 114 114 'dashboardUrl' => \menu_page_url( 'gtmkit_general', false ), 115 115 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ), 116 116 'templatesUrl' => \menu_page_url( 'gtmkit_templates', false ), 117 117 'pluginInstallUrl' => $admin_url . 'plugin-install.php?tab=search&type=term&s=', 118 'plugins' => [ 119 'woocommerce' => \is_plugin_active( 'woocommerce/woocommerce.php' ), 120 'cf7' => \is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ), 121 'edd' => ( \is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) || \is_plugin_active( 'easy-digital-downloads-pro/easy-digital-downloads.php' ) ), 122 ], 118 'plugins' => $this->get_plugins(), 123 119 'taxonomyOptions' => $taxonomy_options, 124 120 'settings' => $this->options->get_all_raw(), … … 126 122 ); 127 123 } 124 125 /** 126 * Get the plugins. 127 * 128 * @return array 129 */ 130 private function get_plugins(): array { 131 $plugins = [ 132 'woocommerce' => \is_plugin_active( 'woocommerce/woocommerce.php' ), 133 'cf7' => \is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ), 134 'edd' => ( \is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) || \is_plugin_active( 'easy-digital-downloads-pro/easy-digital-downloads.php' ) ), 135 ]; 136 137 return apply_filters( 'gtmkit_integrations_plugins', $plugins ); 138 } 128 139 } -
gtm-kit/trunk/src/Common/Util.php
r3094947 r3112163 82 82 $this->api_host = GTMKIT_API_HOST; 83 83 } else { 84 $this->api_host = 'https://ap p.gtmkit.com';84 $this->api_host = 'https://api.gtmkit.com'; 85 85 } 86 86 } -
gtm-kit/trunk/src/Frontend/Frontend.php
r3090572 r3112163 54 54 } 55 55 56 if ( $container_active ) {56 if ( $container_active && $page->is_user_allowed() ) { 57 57 add_action( 'wp_enqueue_scripts', [ $page, 'enqueue_header_script' ] ); 58 58 } elseif ( $options->get( 'general', 'console_log' ) ) { … … 302 302 public function container_disabled(): void { 303 303 echo '<script>console.warn("[GTM Kit] Google Tag Manager container is disabled.");</script>'; 304 305 if ( ! $this->is_user_allowed() ) { 306 echo '<script>console.warn("[GTM Kit] The current user role is excluded from tracking.");</script>'; 307 } 304 308 } 305 309 … … 350 354 <?php 351 355 } 356 357 /** 358 * Is user allowed 359 * 360 * @return bool 361 */ 362 public function is_user_allowed(): bool { 363 364 $is_user_allowed = true; 365 $excluded_user_roles = $this->options->get( 'general', 'exclude_user_roles' ); 366 367 if ( ! empty( $excluded_user_roles ) ) { 368 foreach ( wp_get_current_user()->roles as $role ) { 369 if ( in_array( $role, $excluded_user_roles, true ) ) { 370 $is_user_allowed = false; 371 break; 372 } 373 } 374 } 375 376 return $is_user_allowed; 377 } 352 378 } -
gtm-kit/trunk/src/Installation/Upgrade.php
r3082967 r3112163 45 45 '1.20' => 'v120_upgrade', 46 46 '1.22' => 'v122_upgrade', 47 '1.23' => 'v123_upgrade', 47 48 ]; 48 49 … … 142 143 143 144 /** 144 * Upgrade routine for v1.2 0145 * Upgrade routine for v1.22 145 146 */ 146 147 protected function v122_upgrade(): void { … … 154 155 Options::init()->set( $values, false, false ); 155 156 } 157 158 /** 159 * Upgrade routine for v1.23 160 */ 161 protected function v123_upgrade(): void { 162 163 $values = [ 164 'general' => [ 165 'exclude_user_roles' => [], 166 ], 167 ]; 168 169 Options::init()->set( $values, false, false ); 170 } 156 171 } -
gtm-kit/trunk/src/Options.php
r3082967 r3112163 73 73 'type' => 'boolean', 74 74 ], 75 'exclude_user_roles' => [ 'default' => [] ], 75 76 ], 76 77 'integrations' => [ -
gtm-kit/trunk/vendor/autoload.php
r2853698 r3112163 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 3b585b55966a016a3d1b071eb261592a::getLoader();25 return ComposerAutoloaderInit12fa396dcd6fc263a33fd78c6d8551b8::getLoader(); -
gtm-kit/trunk/vendor/composer/autoload_classmap.php
r3055017 r3112163 11 11 'TLA_Media\\GTM_Kit\\Admin\\AdminAPI' => $baseDir . '/src/Admin/AdminAPI.php', 12 12 'TLA_Media\\GTM_Kit\\Admin\\Analytics' => $baseDir . '/src/Admin/Analytics.php', 13 'TLA_Media\\GTM_Kit\\Admin\\AssetsTrait' => $baseDir . '/src/Admin/AssetsTrait.php', 13 14 'TLA_Media\\GTM_Kit\\Admin\\GeneralOptionsPage' => $baseDir . '/src/Admin/GeneralOptionsPage.php', 14 15 'TLA_Media\\GTM_Kit\\Admin\\HelpOptionsPage' => $baseDir . '/src/Admin/HelpOptionsPage.php', 16 'TLA_Media\\GTM_Kit\\Admin\\Integrations' => $baseDir . '/src/Admin/Integrations.php', 15 17 'TLA_Media\\GTM_Kit\\Admin\\IntegrationsOptionsPage' => $baseDir . '/src/Admin/IntegrationsOptionsPage.php', 16 18 'TLA_Media\\GTM_Kit\\Admin\\MetaBox' => $baseDir . '/src/Admin/MetaBox.php', -
gtm-kit/trunk/vendor/composer/autoload_real.php
r2961341 r3112163 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 3b585b55966a016a3d1b071eb261592a5 class ComposerAutoloaderInit12fa396dcd6fc263a33fd78c6d8551b8 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 3b585b55966a016a3d1b071eb261592a', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit12fa396dcd6fc263a33fd78c6d8551b8', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 3b585b55966a016a3d1b071eb261592a', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit12fa396dcd6fc263a33fd78c6d8551b8', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 3b585b55966a016a3d1b071eb261592a::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8::getInitializer($loader)); 33 33 34 34 $loader->register(true); -
gtm-kit/trunk/vendor/composer/autoload_static.php
r3055017 r3112163 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 3b585b55966a016a3d1b071eb261592a7 class ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 26 26 'TLA_Media\\GTM_Kit\\Admin\\AdminAPI' => __DIR__ . '/../..' . '/src/Admin/AdminAPI.php', 27 27 'TLA_Media\\GTM_Kit\\Admin\\Analytics' => __DIR__ . '/../..' . '/src/Admin/Analytics.php', 28 'TLA_Media\\GTM_Kit\\Admin\\AssetsTrait' => __DIR__ . '/../..' . '/src/Admin/AssetsTrait.php', 28 29 'TLA_Media\\GTM_Kit\\Admin\\GeneralOptionsPage' => __DIR__ . '/../..' . '/src/Admin/GeneralOptionsPage.php', 29 30 'TLA_Media\\GTM_Kit\\Admin\\HelpOptionsPage' => __DIR__ . '/../..' . '/src/Admin/HelpOptionsPage.php', 31 'TLA_Media\\GTM_Kit\\Admin\\Integrations' => __DIR__ . '/../..' . '/src/Admin/Integrations.php', 30 32 'TLA_Media\\GTM_Kit\\Admin\\IntegrationsOptionsPage' => __DIR__ . '/../..' . '/src/Admin/IntegrationsOptionsPage.php', 31 33 'TLA_Media\\GTM_Kit\\Admin\\MetaBox' => __DIR__ . '/../..' . '/src/Admin/MetaBox.php', … … 52 54 { 53 55 return \Closure::bind(function () use ($loader) { 54 $loader->prefixLengthsPsr4 = ComposerStaticInit 3b585b55966a016a3d1b071eb261592a::$prefixLengthsPsr4;55 $loader->prefixDirsPsr4 = ComposerStaticInit 3b585b55966a016a3d1b071eb261592a::$prefixDirsPsr4;56 $loader->classMap = ComposerStaticInit 3b585b55966a016a3d1b071eb261592a::$classMap;56 $loader->prefixLengthsPsr4 = ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8::$prefixLengthsPsr4; 57 $loader->prefixDirsPsr4 = ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8::$prefixDirsPsr4; 58 $loader->classMap = ComposerStaticInit12fa396dcd6fc263a33fd78c6d8551b8::$classMap; 57 59 58 60 }, null, ClassLoader::class); -
gtm-kit/trunk/vendor/composer/installed.php
r3094947 r3112163 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => '6 f604c7f7b8529f79b914357dc825fb02186ea95',6 'reference' => '692626a6b2391e017e7c78b1feecc3e477351f91', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => '6 f604c7f7b8529f79b914357dc825fb02186ea95',16 'reference' => '692626a6b2391e017e7c78b1feecc3e477351f91', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.