Plugin Directory

Changeset 3156080


Ignore:
Timestamp:
09/23/2024 06:13:06 AM (18 months ago)
Author:
tlamedia
Message:

Update to version 2.0.1 from GitHub

Location:
gtm-kit
Files:
46 edited
1 copied

Legend:

Unmodified
Added
Removed
  • gtm-kit/tags/2.0.1/assets/admin/settings.asset.php

    r3149785 r3156080  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'e9e4e88a99fd728885a0');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'a518367e05cc33818189');
  • gtm-kit/tags/2.0.1/assets/admin/settings.js

    r3149785 r3156080  
    1 (()=>{var t={838:function(t){t.exports=function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:o,seal:s,create:r}=Object,{apply:l,construct:m}="undefined"!=typeof Reflect&&Reflect;o||(o=function(t){return t}),s||(s=function(t){return t}),l||(l=function(t,e,n){return t.apply(e,n)}),m||(m=function(t,e){return new t(...e)});const c=v(Array.prototype.forEach),g=v(Array.prototype.pop),u=v(Array.prototype.push),d=v(String.prototype.toLowerCase),p=v(String.prototype.toString),h=v(String.prototype.match),k=v(String.prototype.replace),f=v(String.prototype.indexOf),_=v(String.prototype.trim),x=v(Object.prototype.hasOwnProperty),b=v(RegExp.prototype.test),S=(y=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return m(y,e)});var y;function v(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return l(t,e,i)}}function E(t,i){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;e&&e(t,null);let o=i.length;for(;o--;){let e=i[o];if("string"==typeof e){const t=a(e);t!==e&&(n(i)||(i[o]=t),e=t)}t[e]=!0}return t}function N(t){for(let e=0;e<t.length;e++)x(t,e)||(t[e]=null);return t}function w(e){const n=r(null);for(const[i,a]of t(e))x(e,i)&&(Array.isArray(a)?n[i]=N(a):a&&"object"==typeof a&&a.constructor===Object?n[i]=w(a):n[i]=a);return n}function j(t,e){for(;null!==t;){const n=a(t,e);if(n){if(n.get)return v(n.get);if("function"==typeof n.value)return v(n.value)}t=i(t)}return function(){return null}}const T=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),A=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=o(["#text"]),R=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),L=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),M=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=s(/<%[\w\W]*|[\w\W]*%>/gm),H=s(/\${[\w\W]*}/gm),B=s(/^data-[\-\w.\u00B7-\uFFFF]/),W=s(/^aria-[\-\w]+$/),K=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=s(/^(?:\w+script|data):/i),Y=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$=s(/^html$/i),J=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:G,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:B,ARIA_ATTR:W,IS_ALLOWED_URI:K,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:Y,DOCTYPE_NAME:$,CUSTOM_ELEMENT:J});const V=1,X=3,Z=7,Q=8,tt=9,et=function(){return"undefined"==typeof window?null:window};return function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const i=t=>e(t);if(i.version="3.1.6",i.removed=[],!n||!n.document||n.document.nodeType!==tt)return i.isSupported=!1,i;let{document:a}=n;const s=a,l=s.currentScript,{DocumentFragment:m,HTMLTemplateElement:y,Node:v,Element:N,NodeFilter:G,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:B,trustedTypes:W}=n,z=N.prototype,Y=j(z,"cloneNode"),J=j(z,"remove"),nt=j(z,"nextSibling"),it=j(z,"childNodes"),at=j(z,"parentNode");if("function"==typeof y){const t=a.createElement("template");t.content&&t.content.ownerDocument&&(a=t.content.ownerDocument)}let ot,st="";const{implementation:rt,createNodeIterator:lt,createDocumentFragment:mt,getElementsByTagName:ct}=a,{importNode:gt}=s;let ut={};i.isSupported="function"==typeof t&&"function"==typeof at&&rt&&void 0!==rt.createHTMLDocument;const{MUSTACHE_EXPR:dt,ERB_EXPR:pt,TMPLIT_EXPR:ht,DATA_ATTR:kt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:_t,ATTR_WHITESPACE:xt,CUSTOM_ELEMENT:bt}=q;let{IS_ALLOWED_URI:St}=q,yt=null;const vt=E({},[...T,...C,...D,...A,...O]);let Et=null;const Nt=E({},[...R,...L,...M,...P]);let wt=Object.seal(r(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),jt=null,Tt=null,Ct=!0,Dt=!0,Ut=!1,At=!0,It=!1,Ot=!0,Rt=!1,Lt=!1,Mt=!1,Pt=!1,Gt=!1,Ft=!1,Ht=!0,Bt=!1,Wt=!0,Kt=!1,zt={},Yt=null;const $t=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Jt=null;const qt=E({},["audio","video","img","source","image","track"]);let Vt=null;const Xt=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml";let ee=te,ne=!1,ie=null;const ae=E({},[Zt,Qt,te],p);let oe=null;const se=["application/xhtml+xml","text/html"];let re=null,le=null;const me=a.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},ge=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!le||le!==t){if(t&&"object"==typeof t||(t={}),t=w(t),oe=-1===se.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,re="application/xhtml+xml"===oe?p:d,yt=x(t,"ALLOWED_TAGS")?E({},t.ALLOWED_TAGS,re):vt,Et=x(t,"ALLOWED_ATTR")?E({},t.ALLOWED_ATTR,re):Nt,ie=x(t,"ALLOWED_NAMESPACES")?E({},t.ALLOWED_NAMESPACES,p):ae,Vt=x(t,"ADD_URI_SAFE_ATTR")?E(w(Xt),t.ADD_URI_SAFE_ATTR,re):Xt,Jt=x(t,"ADD_DATA_URI_TAGS")?E(w(qt),t.ADD_DATA_URI_TAGS,re):qt,Yt=x(t,"FORBID_CONTENTS")?E({},t.FORBID_CONTENTS,re):$t,jt=x(t,"FORBID_TAGS")?E({},t.FORBID_TAGS,re):{},Tt=x(t,"FORBID_ATTR")?E({},t.FORBID_ATTR,re):{},zt=!!x(t,"USE_PROFILES")&&t.USE_PROFILES,Ct=!1!==t.ALLOW_ARIA_ATTR,Dt=!1!==t.ALLOW_DATA_ATTR,Ut=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,Ot=!1!==t.SAFE_FOR_XML,Rt=t.WHOLE_DOCUMENT||!1,Pt=t.RETURN_DOM||!1,Gt=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Mt=t.FORCE_BODY||!1,Ht=!1!==t.SANITIZE_DOM,Bt=t.SANITIZE_NAMED_PROPS||!1,Wt=!1!==t.KEEP_CONTENT,Kt=t.IN_PLACE||!1,St=t.ALLOWED_URI_REGEXP||K,ee=t.NAMESPACE||te,wt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(wt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(wt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(wt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Dt=!1),Gt&&(Pt=!0),zt&&(yt=E({},O),Et=[],!0===zt.html&&(E(yt,T),E(Et,R)),!0===zt.svg&&(E(yt,C),E(Et,L),E(Et,P)),!0===zt.svgFilters&&(E(yt,D),E(Et,L),E(Et,P)),!0===zt.mathMl&&(E(yt,A),E(Et,M),E(Et,P))),t.ADD_TAGS&&(yt===vt&&(yt=w(yt)),E(yt,t.ADD_TAGS,re)),t.ADD_ATTR&&(Et===Nt&&(Et=w(Et)),E(Et,t.ADD_ATTR,re)),t.ADD_URI_SAFE_ATTR&&E(Vt,t.ADD_URI_SAFE_ATTR,re),t.FORBID_CONTENTS&&(Yt===$t&&(Yt=w(Yt)),E(Yt,t.FORBID_CONTENTS,re)),Wt&&(yt["#text"]=!0),Rt&&E(yt,["html","head","body"]),yt.table&&(E(yt,["tbody"]),delete jt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ot=t.TRUSTED_TYPES_POLICY,st=ot.createHTML("")}else void 0===ot&&(ot=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(W,l)),null!==ot&&"string"==typeof st&&(st=ot.createHTML(""));o&&o(t),le=t}},ue=E({},["mi","mo","mn","ms","mtext"]),de=E({},["foreignobject","annotation-xml"]),pe=E({},["title","style","font","a","script"]),he=E({},[...C,...D,...U]),ke=E({},[...A,...I]),fe=function(t){u(i.removed,{element:t});try{at(t).removeChild(t)}catch(e){J(t)}},_e=function(t,e){try{u(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){u(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Et[t])if(Pt||Gt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},xe=function(t){let e=null,n=null;if(Mt)t="<remove></remove>"+t;else{const e=h(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===oe&&ee===te&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=ot?ot.createHTML(t):t;if(ee===te)try{e=(new B).parseFromString(i,oe)}catch(t){}if(!e||!e.documentElement){e=rt.createDocument(ee,"template",null);try{e.documentElement.innerHTML=ne?st:i}catch(t){}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(a.createTextNode(n),o.childNodes[0]||null),ee===te?ct.call(e,Rt?"html":"body")[0]:Rt?e.documentElement:o},be=function(t){return lt.call(t.ownerDocument||t,t,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Se=function(t){return t instanceof H&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof F)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ye=function(t){return"function"==typeof v&&t instanceof v},ve=function(t,e,n){ut[t]&&c(ut[t],(t=>{t.call(i,e,n,le)}))},Ee=function(t){let e=null;if(ve("beforeSanitizeElements",t,null),Se(t))return fe(t),!0;const n=re(t.nodeName);if(ve("uponSanitizeElement",t,{tagName:n,allowedTags:yt}),t.hasChildNodes()&&!ye(t.firstElementChild)&&b(/<[/\w]/g,t.innerHTML)&&b(/<[/\w]/g,t.textContent))return fe(t),!0;if(t.nodeType===Z)return fe(t),!0;if(Ot&&t.nodeType===Q&&b(/<[/\w]/g,t.data))return fe(t),!0;if(!yt[n]||jt[n]){if(!jt[n]&&we(n)){if(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,n))return!1;if(wt.tagNameCheck instanceof Function&&wt.tagNameCheck(n))return!1}if(Wt&&!Yt[n]){const e=at(t)||t.parentNode,n=it(t)||t.childNodes;if(n&&e)for(let i=n.length-1;i>=0;--i){const a=Y(n[i],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,nt(t))}}return fe(t),!0}return t instanceof N&&!function(t){let e=at(t);e&&e.tagName||(e={namespaceURI:ee,tagName:"template"});const n=d(t.tagName),i=d(e.tagName);return!!ie[t.namespaceURI]&&(t.namespaceURI===Qt?e.namespaceURI===te?"svg"===n:e.namespaceURI===Zt?"svg"===n&&("annotation-xml"===i||ue[i]):Boolean(he[n]):t.namespaceURI===Zt?e.namespaceURI===te?"math"===n:e.namespaceURI===Qt?"math"===n&&de[i]:Boolean(ke[n]):t.namespaceURI===te?!(e.namespaceURI===Qt&&!de[i])&&!(e.namespaceURI===Zt&&!ue[i])&&!ke[n]&&(pe[n]||!he[n]):!("application/xhtml+xml"!==oe||!ie[t.namespaceURI]))}(t)?(fe(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&t.nodeType===X&&(e=t.textContent,c([dt,pt,ht],(t=>{e=k(e,t," ")})),t.textContent!==e&&(u(i.removed,{element:t.cloneNode()}),t.textContent=e)),ve("afterSanitizeElements",t,null),!1):(fe(t),!0)},Ne=function(t,e,n){if(Ht&&("id"===e||"name"===e)&&(n in a||n in me))return!1;if(Dt&&!Tt[e]&&b(kt,e));else if(Ct&&b(ft,e));else if(!Et[e]||Tt[e]){if(!(we(t)&&(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,t)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(t))&&(wt.attributeNameCheck instanceof RegExp&&b(wt.attributeNameCheck,e)||wt.attributeNameCheck instanceof Function&&wt.attributeNameCheck(e))||"is"===e&&wt.allowCustomizedBuiltInElements&&(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,n)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(n))))return!1}else if(Vt[e]);else if(b(St,k(n,xt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==f(n,"data:")||!Jt[t])if(Ut&&!b(_t,k(n,xt,"")));else if(n)return!1;return!0},we=function(t){return"annotation-xml"!==t&&h(t,bt)},je=function(t){ve("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Et};let a=e.length;for(;a--;){const o=e[a],{name:s,namespaceURI:r,value:l}=o,m=re(s);let u="value"===s?l:_(l);if(n.attrName=m,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,ve("uponSanitizeAttribute",t,n),u=n.attrValue,Ot&&b(/((--!?|])>)|<\/(style|title)/i,u)){_e(s,t);continue}if(n.forceKeepAttr)continue;if(_e(s,t),!n.keepAttr)continue;if(!At&&b(/\/>/i,u)){_e(s,t);continue}It&&c([dt,pt,ht],(t=>{u=k(u,t," ")}));const d=re(t.nodeName);if(Ne(d,m,u)){if(!Bt||"id"!==m&&"name"!==m||(_e(s,t),u="user-content-"+u),ot&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(r);else switch(W.getAttributeType(d,m)){case"TrustedHTML":u=ot.createHTML(u);break;case"TrustedScriptURL":u=ot.createScriptURL(u)}try{r?t.setAttributeNS(r,s,u):t.setAttribute(s,u),Se(t)?fe(t):g(i.removed)}catch(t){}}}ve("afterSanitizeAttributes",t,null)},Te=function t(e){let n=null;const i=be(e);for(ve("beforeSanitizeShadowDOM",e,null);n=i.nextNode();)ve("uponSanitizeShadowNode",n,null),Ee(n)||(n.content instanceof m&&t(n.content),je(n));ve("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,o=null,r=null;if(ne=!t,ne&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ye(t)){if("function"!=typeof t.toString)throw S("toString is not a function");if("string"!=typeof(t=t.toString()))throw S("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Lt||ge(e),i.removed=[],"string"==typeof t&&(Kt=!1),Kt){if(t.nodeName){const e=re(t.nodeName);if(!yt[e]||jt[e])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof v)n=xe("\x3c!----\x3e"),a=n.ownerDocument.importNode(t,!0),a.nodeType===V&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!Pt&&!It&&!Rt&&-1===t.indexOf("<"))return ot&&Ft?ot.createHTML(t):t;if(n=xe(t),!n)return Pt?null:Ft?st:""}n&&Mt&&fe(n.firstChild);const l=be(Kt?t:n);for(;o=l.nextNode();)Ee(o)||(o.content instanceof m&&Te(o.content),je(o));if(Kt)return t;if(Pt){if(Gt)for(r=mt.call(n.ownerDocument);n.firstChild;)r.appendChild(n.firstChild);else r=n;return(Et.shadowroot||Et.shadowrootmode)&&(r=gt.call(s,r,!0)),r}let g=Rt?n.outerHTML:n.innerHTML;return Rt&&yt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b($,n.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+g),It&&c([dt,pt,ht],(t=>{g=k(g,t," ")})),ot&&Ft?ot.createHTML(g):g},i.setConfig=function(){ge(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},i.clearConfig=function(){le=null,Lt=!1},i.isValidAttribute=function(t,e,n){le||ge({});const i=re(t),a=re(e);return Ne(i,a,n)},i.addHook=function(t,e){"function"==typeof e&&(ut[t]=ut[t]||[],u(ut[t],e))},i.removeHook=function(t){if(ut[t])return g(ut[t])},i.removeHooks=function(t){ut[t]&&(ut[t]=[])},i.removeAllHooks=function(){ut={}},i}()}()},942:(t,e)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=s(t,o(n)))}return t}function o(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)i.call(t,n)&&t[n]&&(e=s(e,n));return e}function s(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(n=function(){return a}.apply(e,[]))||(t.exports=n)}()}},e={};function n(i){var a=e[i];if(void 0!==a)return a.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.wp.i18n,e=window.wp.element,i=window.wp.components,a=window.lodash,o=window.wp.apiFetch;var s=n.n(o);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const r=async(t,e,n=null,i=!1)=>{let a={};try{a=await s()({path:t,method:e,...n&&{data:n}})}catch(n){return console.log(`${e} ${t} Errors:`,n),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===i?a:!0===a.success?a.data:options},l=(e,n)=>{const i={...e};switch(n.type){case"FETCH_SETTINGS":i.fetchedSettings={...n.payload.fetchedSettings,integrations:n.payload.fetchedSettings.integrations||{}},i.stateSettings=n.payload.stateSettings,i.siteData=n.payload.siteData,i.notifications=n.payload.notifications,i.installData=n.payload.installData,i.isPending=!1,i.canSave=!1,n.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,t.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=n.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=n.payload.fetchedSettings,i.stateSettings=n.payload.stateSettings,i.isPending=!1,i.canSave=!!n.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=n.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,t.__)("An error occurred.","gtm-kit"):(0,t.__)("Saved Successfully.","gtm-kit"),i.hasError=!!n.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=n.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=n.payload.stateSettings||i.stateSettings,i.isPending=n.payload.isPending||i.isPending,i.notice=n.payload.notice||i.notice,i.hasError=n.payload.hasError||i.hasError,i.canSave=n.payload.canSave||i.canSave,i.isSendingSystemData=n.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=n.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=n.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=n.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=n.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=n.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=n.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=n.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=n.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=n.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=n.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.isNotificationStatusSent=n.payload.isNotificationStatusSent||i.isNotificationStatusSent,i.notifications=n.payload.notifications||i.Notifications}return i},m=window.ReactJSXRuntime,c=(0,e.createContext)(),g=t=>{const[n,i]=(0,e.useReducer)(l,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),o=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:n,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{o()}),[]);const g={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,r("gtmkit/v1/set-options","POST",e));var e;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:o,useUpdateState:s,useUpdateStateSettings:async(t,e,i)=>{const o=JSON.parse(JSON.stringify(n.stateSettings));let r;o[t][e]=i,r=!(0,a.isEqual)(o,n.fetchedSettings),s({stateSettings:o,canSave:r})},useImportSettings:async(t,e)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let o;const r={};r.general={...i.general,...e.general},"integrations"in e&&(r.integrations={...i.integrations,...e.integrations}),o=!(0,a.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:o})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,r("gtmkit/v1/send-support-data","POST",e,!0));var e;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{i({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,r("gtmkit/v1/send-license-key","POST",e,!0));var e;i({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{i({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:!0}});const n={"notification-id":t,action:e},a=await(t=>r("gtmkit/v1/set-notification-status","POST",t,!0))(n);i({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,isNotificationStatusSent:a.success,notifications:a.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,useNotifications:n.notifications,useIsUpdatingNotifications:n.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(c.Provider,{value:g,children:t.children})},u=window.React;var d,p=n.n(u);function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},h.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const k="popstate";function f(t,e){if(!1===t||null==t)throw new Error(e)}function _(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function x(t,e){return{usr:t.state,key:t.key,idx:e}}function b(t,e,n,i){return void 0===n&&(n=null),h({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?y(e):e,{state:n,key:e&&e.key||i||Math.random().toString(36).substr(2,8)})}function S(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(e+="#"===i.charAt(0)?i:"#"+i),e}function y(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}var v;function E(t,e,n){return void 0===n&&(n="/"),function(t,e,n,i){let a=P(("string"==typeof e?y(e):e).pathname||"/",n);if(null==a)return null;let o=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,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(o);let s=null;for(let t=0;null==s&&t<o.length;++t){let e=M(a);s=R(o[t],e,i)}return s}(t,e,n,!1)}function N(t,e,n,i){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===i&&(i="");let a=(t,a,o)=>{let s={relativePath:void 0===o?t.path||"":o,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};s.relativePath.startsWith("/")&&(f(s.relativePath.startsWith(i),'Absolute route path "'+s.relativePath+'" nested under path "'+i+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(i.length));let r=B([i,s.relativePath]),l=n.concat(s);t.children&&t.children.length>0&&(f(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+r+'".'),N(t.children,e,l,r)),(null!=t.path||t.index)&&e.push({path:r,score:O(r,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of w(t.path))a(t,e,n);else a(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[n,...i]=e,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===i.length)return a?[o,""]:[o];let s=w(i.join("/")),r=[];return r.push(...s.map((t=>""===t?o:[o,t].join("/")))),a&&r.push(...s),r.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(v||(v={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const j=/^:[\w-]+$/,T=3,C=2,D=1,U=10,A=-2,I=t=>"*"===t;function O(t,e){let n=t.split("/"),i=n.length;return n.some(I)&&(i+=A),e&&(i+=C),n.filter((t=>!I(t))).reduce(((t,e)=>t+(j.test(e)?T:""===e?D:U)),i)}function R(t,e,n){void 0===n&&(n=!1);let{routesMeta:i}=t,a={},o="/",s=[];for(let t=0;t<i.length;++t){let r=i[t],l=t===i.length-1,m="/"===o?e:e.slice(o.length)||"/",c=L({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},m),g=r.route;if(!c&&l&&n&&!i[i.length-1].route.index&&(c=L({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},m)),!c)return null;Object.assign(a,c.params),s.push({params:a,pathname:B([o,c.pathname]),pathnameBase:W(B([o,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(o=B([o,c.pathnameBase]))}return s}function L(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),_("*"===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 i=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,n)=>(i.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(i.push({paramName:"*"}),a+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==t&&"/"!==t&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),i]}(t.path,t.caseSensitive,t.end),a=e.match(n);if(!a)return null;let o=a[0],s=o.replace(/(.)\/+$/,"$1"),r=a.slice(1);return{params:i.reduce(((t,e,n)=>{let{paramName:i,isOptional:a}=e;if("*"===i){let t=r[n]||"";s=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}const l=r[n];return t[i]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:o,pathnameBase:s,pattern:t}}function M(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return _(!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 P(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&"/"!==i?null:t.slice(n)||"/"}function G(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(i)+"].  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 F(t,e){let n=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?n.map(((t,e)=>e===n.length-1?t.pathname:t.pathnameBase)):n.map((t=>t.pathnameBase))}function H(t,e,n,i){let a;void 0===i&&(i=!1),"string"==typeof t?a=y(t):(a=h({},t),f(!a.pathname||!a.pathname.includes("?"),G("?","pathname","search",a)),f(!a.pathname||!a.pathname.includes("#"),G("#","pathname","hash",a)),f(!a.search||!a.search.includes("#"),G("#","search","hash",a)));let o,s=""===t||""===a.pathname,r=s?"/":a.pathname;if(null==r)o=n;else{let t=e.length-1;if(!i&&r.startsWith("..")){let e=r.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}o=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:n,search:i="",hash:a=""}="string"==typeof t?y(t):t,o=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:o,search:K(i),hash:z(a)}}(a,o),m=r&&"/"!==r&&r.endsWith("/"),c=(s||"."===r)&&n.endsWith("/");return l.pathname.endsWith("/")||!m&&!c||(l.pathname+="/"),l}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",z=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Y=["post","put","patch","delete"],$=(new Set(Y),["get",...Y]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},J.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const q=u.createContext(null),V=u.createContext(null),X=u.createContext(null),Z=u.createContext(null),Q=u.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=u.createContext(null);function et(){return null!=u.useContext(Z)}function nt(){return et()||f(!1),u.useContext(Z).location}function it(t){u.useContext(X).static||u.useLayoutEffect(t)}function at(){let{isDataRoute:t}=u.useContext(Q);return t?function(){let{router:t}=function(){let t=u.useContext(q);return t||f(!1),t}(gt.UseNavigateStable),e=dt(ut.UseNavigateStable),n=u.useRef(!1);return it((()=>{n.current=!0})),u.useCallback((function(i,a){void 0===a&&(a={}),n.current&&("number"==typeof i?t.navigate(i):t.navigate(i,J({fromRouteId:e},a)))}),[t,e])}():function(){et()||f(!1);let t=u.useContext(q),{basename:e,future:n,navigator:i}=u.useContext(X),{matches:a}=u.useContext(Q),{pathname:o}=nt(),s=JSON.stringify(F(a,n.v7_relativeSplatPath)),r=u.useRef(!1);return it((()=>{r.current=!0})),u.useCallback((function(n,a){if(void 0===a&&(a={}),!r.current)return;if("number"==typeof n)return void i.go(n);let l=H(n,JSON.parse(s),o,"path"===a.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:B([e,l.pathname])),(a.replace?i.replace:i.push)(l,a.state,a)}),[e,i,s,o,t])}()}function ot(t,e){let{relative:n}=void 0===e?{}:e,{future:i}=u.useContext(X),{matches:a}=u.useContext(Q),{pathname:o}=nt(),s=JSON.stringify(F(a,i.v7_relativeSplatPath));return u.useMemo((()=>H(t,JSON.parse(s),o,"path"===n)),[t,s,o,n])}function st(t,e,n,i){et()||f(!1);let{navigator:a}=u.useContext(X),{matches:o}=u.useContext(Q),s=o[o.length-1],r=s?s.params:{},l=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let m,c=nt();if(e){var g;let t="string"==typeof e?y(e):e;"/"===l||(null==(g=t.pathname)?void 0:g.startsWith(l))||f(!1),m=t}else m=c;let p=m.pathname||"/",h=p;if("/"!==l){let t=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=E(t,{pathname:h}),_=function(t,e,n,i){var a;if(void 0===e&&(e=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var o;if(!n)return null;if(n.errors)t=n.matches;else{if(!(null!=(o=i)&&o.v7_partialHydration&&0===e.length&&!n.initialized&&n.matches.length>0))return null;t=n.matches}}let s=t,r=null==(a=n)?void 0:a.errors;if(null!=r){let t=s.findIndex((t=>t.route.id&&void 0!==(null==r?void 0:r[t.route.id])));t>=0||f(!1),s=s.slice(0,Math.min(s.length,t+1))}let l=!1,m=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<s.length;t++){let e=s[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(m=t),e.route.id){let{loaderData:t,errors:i}=n,a=e.route.loader&&void 0===t[e.route.id]&&(!i||void 0===i[e.route.id]);if(e.route.lazy||a){l=!0,s=m>=0?s.slice(0,m+1):[s[0]];break}}}return s.reduceRight(((t,i,a)=>{let o,c=!1,g=null,d=null;var p;n&&(o=r&&i.route.id?r[i.route.id]:void 0,g=i.route.errorElement||lt,l&&(m<0&&0===a?(pt[p="route-fallback"]||(pt[p]=!0),c=!0,d=null):m===a&&(c=!0,d=i.route.hydrateFallbackElement||null)));let h=e.concat(s.slice(0,a+1)),k=()=>{let e;return e=o?g:c?d:i.route.Component?u.createElement(i.route.Component,null):i.route.element?i.route.element:t,u.createElement(ct,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:e})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===a)?u.createElement(mt,{location:n.location,revalidation:n.revalidation,component:g,error:o,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},r,t.params),pathname:B([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:B([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,n,i);return e&&_?u.createElement(Z.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:d.Pop}},_):_}function rt(){let t=function(){var t;let e=u.useContext(tt),n=function(){let t=u.useContext(V);return t||f(!1),t}(ut.UseRouteError),i=dt(ut.UseRouteError);return void 0!==e?e:null==(t=n.errors)?void 0:t[i]}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},e),n?u.createElement("pre",{style:i},n):null,null)}const lt=u.createElement(rt,null);class mt extends u.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?u.createElement(Q.Provider,{value:this.props.routeContext},u.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:n,children:i}=t,a=u.useContext(q);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),u.createElement(Q.Provider,{value:e},i)}var gt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(gt||{}),ut=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}(ut||{});function dt(t){let e=function(){let t=u.useContext(Q);return t||f(!1),t}(),n=e.matches[e.matches.length-1];return n.route.id||f(!1),n.route.id}const pt={};function ht(t){let{to:e,replace:n,state:i,relative:a}=t;et()||f(!1);let{future:o,static:s}=u.useContext(X),{matches:r}=u.useContext(Q),{pathname:l}=nt(),m=at(),c=H(e,F(r,o.v7_relativeSplatPath),l,"path"===a),g=JSON.stringify(c);return u.useEffect((()=>m(JSON.parse(g),{replace:n,state:i,relative:a})),[m,g,a,n,i]),null}function kt(t){f(!1)}function ft(t){let{basename:e="/",children:n=null,location:i,navigationType:a=d.Pop,navigator:o,static:s=!1,future:r}=t;et()&&f(!1);let l=e.replace(/^\/*/,"/"),m=u.useMemo((()=>({basename:l,navigator:o,static:s,future:J({v7_relativeSplatPath:!1},r)})),[l,r,o,s]);"string"==typeof i&&(i=y(i));let{pathname:c="/",search:g="",hash:p="",state:h=null,key:k="default"}=i,_=u.useMemo((()=>{let t=P(c,l);return null==t?null:{location:{pathname:t,search:g,hash:p,state:h,key:k},navigationType:a}}),[l,c,g,p,h,k,a]);return null==_?null:u.createElement(X.Provider,{value:m},u.createElement(Z.Provider,{children:n,value:_}))}function _t(t){let{children:e,location:n}=t;return st(xt(e),n)}function xt(t,e){void 0===e&&(e=[]);let n=[];return u.Children.forEach(t,((t,i)=>{if(!u.isValidElement(t))return;let a=[...e,i];if(t.type===u.Fragment)return void n.push.apply(n,xt(t.props.children,a));t.type!==kt&&f(!1),t.props.index&&t.props.children&&f(!1);let o={id:t.props.id||a.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=xt(t.props.children,a)),n.push(o)})),n}u.startTransition,new Promise((()=>{})),u.Component;const bt=window.ReactDOM;var St=n.n(bt);function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},yt.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,i,a={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(a[n]=t[n]);return a}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Et=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Nt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=u.createContext({isTransitioning:!1});new Map;const jt=u.startTransition;function Tt(t){let{basename:e,children:n,future:i,window:a}=t,o=u.useRef();null==o.current&&(o.current=function(t){return void 0===t&&(t={}),function(t,e,n,i){void 0===i&&(i={});let{window:a=document.defaultView,v5Compat:o=!1}=i,s=a.history,r=d.Pop,l=null,m=c();function c(){return(s.state||{idx:null}).idx}function g(){r=d.Pop;let t=c(),e=null==t?null:t-m;m=t,l&&l({action:r,location:p.location,delta:e})}function u(t){let e="null"!==a.location.origin?a.location.origin:a.location.href,n="string"==typeof t?t:S(t);return n=n.replace(/ $/,"%20"),f(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,s.replaceState(h({},s.state,{idx:m}),""));let p={get action(){return r},get location(){return t(a,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(k,g),l=t,()=>{a.removeEventListener(k,g),l=null}},createHref:t=>e(a,t),createURL:u,encodeLocation(t){let e=u(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){r=d.Push;let i=b(p.location,t,e);n&&n(i,t),m=c()+1;let g=x(i,m),u=p.createHref(i);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(u)}o&&l&&l({action:r,location:p.location,delta:1})},replace:function(t,e){r=d.Replace;let i=b(p.location,t,e);n&&n(i,t),m=c();let a=x(i,m),g=p.createHref(i);s.replaceState(a,"",g),o&&l&&l({action:r,location:p.location,delta:0})},go:t=>s.go(t)};return p}((function(t,e){let{pathname:n="/",search:i="",hash:a=""}=y(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),b("",{pathname:n,search:i,hash:a},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),i="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");i=-1===n?e:e.slice(0,n)}return i+"#"+("string"==typeof e?e:S(e))}),(function(t,e){_("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:a,v5Compat:!0}));let s=o.current,[r,l]=u.useState({action:s.action,location:s.location}),{v7_startTransition:m}=i||{},c=u.useCallback((t=>{m&&jt?jt((()=>l(t))):l(t)}),[l,m]);return u.useLayoutEffect((()=>s.listen(c)),[s,c]),u.createElement(ft,{basename:e,children:n,location:r.location,navigationType:r.action,navigator:s,future:i})}bt.flushSync,u.useId;const Ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=u.forwardRef((function(t,e){let n,{onClick:i,relative:a,reloadDocument:o,replace:s,state:r,target:l,to:m,preventScrollReset:c,unstable_viewTransition:g}=t,d=vt(t,Et),{basename:p}=u.useContext(X),h=!1;if("string"==typeof m&&Dt.test(m)&&(n=m,Ct))try{let t=new URL(window.location.href),e=m.startsWith("//")?new URL(t.protocol+m):new URL(m),n=P(e.pathname,p);e.origin===t.origin&&null!=n?m=n+e.search+e.hash:h=!0}catch(t){}let k=function(t,e){let{relative:n}=void 0===e?{}:e;et()||f(!1);let{basename:i,navigator:a}=u.useContext(X),{hash:o,pathname:s,search:r}=ot(t,{relative:n}),l=s;return"/"!==i&&(l="/"===s?i:B([i,s])),a.createHref({pathname:l,search:r,hash:o})}(m,{relative:a}),_=function(t,e){let{target:n,replace:i,state:a,preventScrollReset:o,relative:s,unstable_viewTransition:r}=void 0===e?{}:e,l=at(),m=nt(),c=ot(t,{relative:s});return u.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let n=void 0!==i?i:S(m)===S(c);l(t,{replace:n,state:a,preventScrollReset:o,relative:s,unstable_viewTransition:r})}}),[m,l,c,i,a,n,t,o,s,r])}(m,{replace:s,state:r,target:l,preventScrollReset:c,relative:a,unstable_viewTransition:g});return u.createElement("a",yt({},d,{href:n||k,onClick:h||o?i:function(t){i&&i(t),t.defaultPrevented||_(t)},ref:e,target:l}))})),At=u.forwardRef((function(t,e){let{"aria-current":n="page",caseSensitive:i=!1,className:a="",end:o=!1,style:s,to:r,unstable_viewTransition:l,children:m}=t,c=vt(t,Nt),g=ot(r,{relative:c.relative}),d=nt(),p=u.useContext(V),{navigator:h,basename:k}=u.useContext(X),_=null!=p&&function(t,e){void 0===e&&(e={});let n=u.useContext(wt);null==n&&f(!1);let{basename:i}=function(){let t=u.useContext(q);return t||f(!1),t}(It.useViewTransitionState),a=ot(t,{relative:e.relative});if(!n.isTransitioning)return!1;let o=P(n.currentLocation.pathname,i)||n.currentLocation.pathname,s=P(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=L(a.pathname,s)||null!=L(a.pathname,o)}(g)&&!0===l,x=h.encodeLocation?h.encodeLocation(g).pathname:g.pathname,b=d.pathname,S=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),S=S?S.toLowerCase():null,x=x.toLowerCase()),S&&k&&(S=P(S,k)||S);const y="/"!==x&&x.endsWith("/")?x.length-1:x.length;let v,E=b===x||!o&&b.startsWith(x)&&"/"===b.charAt(y),N=null!=S&&(S===x||!o&&S.startsWith(x)&&"/"===S.charAt(x.length)),w={isActive:E,isPending:N,isTransitioning:_},j=E?n:void 0;v="function"==typeof a?a(w):[a,E?"active":null,N?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof s?s(w):s;return u.createElement(Ut,yt({},c,{"aria-current":j,className:v,ref:e,style:T,to:r,unstable_viewTransition:l}),"function"==typeof m?m(w):m)}));var It,Ot;(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"}(Ot||(Ot={}));const Rt=({title:t})=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,u.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,u.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,u.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,u.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,u.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,u.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,u.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))));var Lt=n(942),Mt=n.n(Lt);const Pt=({count:t,important:e,nav:n=!1})=>(0,m.jsx)(m.Fragment,{children:t>0&&(0,m.jsx)("span",{className:Mt()("gtmkit-ml-2 gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py-px gtmkit-leading-[1.125rem] gtmkit-uppercase",{"gtmkit-bg-color-error":e},{"gtmkit-bg-color-success":!e},{"gtmkit-px-1.5":n},{"gtmkit-px-2":!n}),children:t})}),Gt=({metrics:t})=>(0,m.jsx)(Pt,{count:t.total,important:t.problem>0,nav:!0}),Ft=Pt,Ht=({to:t,title:n})=>{const{useNotifications:i}=(0,e.useContext)(c);return i.metrics.total,(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(At,{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 ":""),children:[n,"notifications"===t&&(0,m.jsx)(Gt,{metrics:i.metrics})]})})},Bt=({NavList:t})=>(0,u.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,u.createElement)(Ht,{key:t.to,to:t.to,title:t.title})})));function Wt(){return Wt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Wt.apply(this,arguments)}function Kt(t,e){if(null==t)return{};var n,i,a={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(a[n]=t[n]);return a}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function Yt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zt(t,e)}function $t(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Jt=p().createContext(null);var qt=function(t){return t.scrollTop},Vt="unmounted",Xt="exited",Zt="entering",Qt="entered",te="exiting",ee=function(t){function e(e,n){var i;i=t.call(this,e,n)||this;var a,o=n&&!n.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?o?(a=Xt,i.appearStatus=Zt):a=Qt:a=e.unmountOnExit||e.mountOnEnter?Vt:Xt,i.state={status:a},i.nextCallback=null,i}Yt(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Vt?{status:Xt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==Zt&&n!==Qt&&(e=Zt):n!==Zt&&n!==Qt||(e=te)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,i=this.props.timeout;return t=e=n=i,null!=i&&"number"!=typeof i&&(t=i.exit,e=i.enter,n=void 0!==i.appear?i.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===Zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:St().findDOMNode(this);n&&qt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xt&&this.setState({status:Vt})},n.performEnter=function(t){var e=this,n=this.props.enter,i=this.context?this.context.isMounting:t,a=this.props.nodeRef?[i]:[St().findDOMNode(this),i],o=a[0],s=a[1],r=this.getTimeouts(),l=i?r.appear:r.enter;t||n?(this.props.onEnter(o,s),this.safeSetState({status:Zt},(function(){e.props.onEntering(o,s),e.onTransitionEnd(l,(function(){e.safeSetState({status:Qt},(function(){e.props.onEntered(o,s)}))}))}))):this.safeSetState({status:Qt},(function(){e.props.onEntered(o)}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:St().findDOMNode(this);e?(this.props.onExit(i),this.safeSetState({status:te},(function(){t.props.onExiting(i),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Xt},(function(){t.props.onExited(i)}))}))}))):this.safeSetState({status:Xt},(function(){t.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,e.nextCallback=null,t(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:St().findDOMNode(this),i=null==t&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],s=a[1];this.props.addEndListener(o,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Vt)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,Kt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return p().createElement(Jt.Provider,{value:null},"function"==typeof n?n(t,i):p().cloneElement(p().Children.only(n),i))},e}(p().Component);function ne(){}ee.contextType=Jt,ee.propTypes={},ee.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ne,onEntering:ne,onEntered:ne,onExit:ne,onExiting:ne,onExited:ne},ee.UNMOUNTED=Vt,ee.EXITED=Xt,ee.ENTERING=Zt,ee.ENTERED=Qt,ee.EXITING=te;const ie=ee;var ae=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return i=e,void((n=t).classList?n.classList.remove(i):"string"==typeof n.className?n.className=$t(n.className,i):n.setAttribute("class",$t(n.className&&n.className.baseVal||"",i)));var n,i}))},oe=function(t){function e(){for(var e,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var i=e.resolveArguments(t,n),a=i[0],o=i[1];e.removeClasses(a,"exit"),e.addClass(a,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var i=e.resolveArguments(t,n),a=i[0],o=i[1]?"appear":"enter";e.addClass(a,o,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var i=e.resolveArguments(t,n),a=i[0],o=i[1]?"appear":"enter";e.removeClasses(a,o),e.addClass(a,o,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,i="string"==typeof n,a=i?(i&&n?n+"-":"")+t:n[t];return{baseClassName:a,activeClassName:i?a+"-active":n[t+"Active"],doneClassName:i?a+"-done":n[t+"Done"]}},e}Yt(e,t);var n=e.prototype;return n.addClass=function(t,e,n){var i=this.getClassNames(e)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&a&&(i+=" "+a),"active"===n&&t&&qt(t),i&&(this.appliedClasses[e][n]=i,function(t,e){t&&e&&e.split(" ").forEach((function(e){return i=e,void((n=t).classList?n.classList.add(i):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,i)||("string"==typeof n.className?n.className=n.className+" "+i:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+i)));var n,i}))}(t,i))},n.removeClasses=function(t,e){var n=this.appliedClasses[e],i=n.base,a=n.active,o=n.done;this.appliedClasses[e]={},i&&ae(t,i),a&&ae(t,a),o&&ae(t,o)},n.render=function(){var t=this.props,e=(t.classNames,Kt(t,["classNames"]));return p().createElement(ie,Wt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(p().Component);oe.defaultProps={classNames:""},oe.propTypes={};const se=oe,re=({title:n=(0,t.__)("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:s,useCanSave:r}=(0,e.useContext)(c);return(0,u.createElement)(i.Button,{className:a,onClick:()=>o(),variant:"primary",disabled:s||!r},r?(0,t.__)(n,"gtm-kit"):(0,t.__)("Saved","gtm-kit"),s?(0,u.createElement)(i.Spinner,null):"")},le=()=>{const{useCanSave:t}=(0,e.useContext)(c);return(0,u.createElement)(se,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,u.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,u.createElement)(re,null)))},me=({subject:e})=>{const n=!0===e||"on"===e,i=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,u.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,t.__)("Active","gtm-kit"):(0,t.__)("Inactive","gtm-kit"))},ce=(0,e.forwardRef)((({children:t,className:e="",...n},i)=>(0,u.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 "+e,ref:i},t)));ce.Header=({as:t="h3",title:e="",children:n,className:i="",...a})=>(0,u.createElement)("div",{...a,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,u.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},e),n),ce.Content=({as:t="div",children:e,className:n="gtmkit-flex-auto",...i})=>(0,u.createElement)(t,{...i,className:n},e),ce.Button=({url:t,destination:e,newTab:n=!1,text:a,group:o="",...s})=>{const r=at();return(0,u.createElement)("div",{...s,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,u.createElement)(i.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{e&&t&&!1===n?window.gtmkitSettings.current_poage===o?r(e,{replace:!0}):window.location.href=t+"#"+e:t?n?window.open(t):window.location.href=t:r(e,{replace:!0})}},(0,u.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},a)))};const ge=ce,ue=({title:n,data:i,className:a=""})=>{const{useSettings:o}=(0,e.useContext)(c);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},n),(0,u.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+a},i.map(((e,n)=>!1===e.featured?null:(0,u.createElement)(ge,{key:n},(0,u.createElement)(ge.Header,{title:e.title},e.pill?(0,u.createElement)(me,{subject:o[e.group][e.option]}):null),(0,u.createElement)(ge.Content,null,e.text.map(((t,e)=>(0,u.createElement)("p",{key:e},t)))),(0,u.createElement)(ge.Button,{url:e.link.url,destination:e.link.destination,text:e.link.text?e.link.text:(0,t.__)("Read article","gtm-kit"),newTab:e.link.external,group:e.group}))))))},de=e=>((t,e,n)=>{const i=(t,n)=>({...n,title:t.title,to:t.path,group:t.group||n.group,option:t.option||n.option,text:[t.description],link:{...n.link,url:window.gtmkitSettings[e+"Url"],destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>i(t[e][0],n))):Object.keys(t).map((e=>i(t[e],n)))})(window.gtmkitSettings[e],e,function(e){switch(e){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,t.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,t.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,t.__)("Read More","gtm-kit")}}}}(e)),pe=()=>{const{useSettings:n,useNotifications:i}=(0,e.useContext)(c),[a,o]=(0,e.useState)(window.gtmkitSettings.tutorials),s=(Boolean(n.general.sgtm_domain&&n.general.sgtm_domain.trim()),i.metrics);return(0,e.useEffect)((()=>{o((e=>[...e,{title:(0,t.__)("See all tutorials","gtm-kit"),text:[(0,t.__)("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,t.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("General","gtm-kit")}),(0,m.jsxs)("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]",children:[(0,m.jsxs)(ge,{children:[(0,m.jsx)(ge.Header,{title:"Google Tag Manager Container",children:(0,m.jsx)(me,{subject:n.general.gtm_id&&n.general.container_active})}),(0,m.jsx)(ge.Content,{children:n.general.gtm_id&&n.general.container_active?(0,m.jsxs)("p",{children:[(0,t.__)("Container ID:","gtm-kit")," ",n&&n.general.gtm_id]}):(0,m.jsx)("p",{children:(0,t.__)("The container is not active but the datalayer is generated.","gtm-kit")})}),(0,m.jsx)(ge.Button,{destination:"/container",text:(0,t.__)("Edit container","gtm-kit")})]}),(0,m.jsxs)(ge,{children:[(0,m.jsx)(ge.Header,{title:(0,t.__)("Notifications","gtm-kit"),className:"!gtmkit-justify-start",children:(0,m.jsx)(Ft,{count:s.total,important:s.problem>0})}),(0,m.jsx)(ge.Content,{children:s.total?(0,m.jsx)(m.Fragment,{children:s.problem?(0,m.jsx)("p",{children:(0,t.__)("There are some problems that require your attention.","gtm-kit")}):(0,m.jsx)("p",{children:(0,t.__)("There are some notifications that may require your attention.","gtm-kit")})}):(0,m.jsx)("p",{children:(0,t.__)("No notifications at the moment.","gtm-kit")})}),(0,m.jsx)(ge.Button,{destination:"/notifications",text:(0,t.__)("See all notifications","gtm-kit")})]}),(0,m.jsxs)(ge,{children:[(0,m.jsx)(ge.Header,{title:(0,t.__)("Help improve GTM Kit","gtm-kit"),children:(0,m.jsx)(me,{subject:n.general.analytics_active})}),(0,m.jsx)(ge.Content,{children:(0,m.jsx)("p",{children:(0,t.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit")})}),(0,m.jsx)(ge.Button,{destination:"/misc",text:(0,t.__)("Share anonymous data","gtm-kit")})]})]}),(0,m.jsx)(ue,{title:(0,t.__)("Tutorials","gtm-kit"),data:a}),(0,m.jsx)(ue,{title:(0,t.__)("Integrations","gtm-kit"),data:de("integrations")})]})},he=({title:t,placeholder:e,help:n,className:a="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:o="general",optionName:s,isDisabled:r,useSettings:l,useUpdateStateSettings:m})=>(0,u.createElement)(i.TextControl,{label:t,placeholder:e,help:n,className:a,value:l[o][s],onChange:t=>m(o,s,t),disabled:r}),ke=({title:t,label:e,optionGroup:n="general",optionName:a,disabled:o=!1,useSettings:s,useUpdateStateSettings:r})=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,u.createElement)(i.BaseControl,{label:t},(0,u.createElement)(i.ToggleControl,{label:e,checked:!o&&s[n][a],onChange:()=>{r(n,a,!(s&&s[n][a]))},disabled:o})))),fe=({title:t,options:e,help:n,className:a="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:s,disabled:r,useSettings:l,useUpdateStateSettings:m})=>(0,u.createElement)(i.RadioControl,{label:t,options:e,help:n,className:a,selected:parseInt(l[o][s]),onChange:t=>m(o,s,t),disabled:r}),_e=({title:t,help:n,items:a=[],optionGroup:o="general",optionName:s,disabled:r=!1,useSettings:l,useUpdateStateSettings:m})=>{const c=Array.isArray(l[o][s])?l[o][s]:[],[g,d]=(0,e.useState)(c);return(0,e.useEffect)((()=>{const t=Array.isArray(l[o][s])?l[o][s]:[];d(t)}),[l]),(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,u.createElement)(i.BaseControl,{label:t,help:n},a.map((t=>(0,u.createElement)(i.CheckboxControl,{key:t.role,label:t.name,disabled:r,checked:g.includes(t.role),onChange:e=>((t,e)=>{d((n=>{let i;return i=t?[...n,e]:n.filter((t=>t!==e)),m(o,s,i),i}))})(e,t.role)}))))))},xe=(0,e.forwardRef)((({children:t,className:e="",disabled:n=!1,...i},a)=>(0,m.jsx)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(n?"gtmkit-opacity-60":""),ref:a,children:t})));xe.Header=({as:t="h3",title:e="",children:n,className:i="",...a})=>(0,m.jsxs)(t,{...a,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+i,children:[e,n]}),xe.Content=({as:t="div",children:e,className:n="",...i})=>(0,m.jsx)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+n,children:e});const be=xe,Se=()=>{const{useSettings:n,useUpdateStateSettings:i,useUserRoles:a}=(0,e.useContext)(c),o=!(n.general.sgtm_domain&&n.general.sgtm_domain.trim()&&n.general.sgtm_container_identifier&&n.general.sgtm_container_identifier.trim()),s=nt();return(0,u.useEffect)((()=>{const t=new URLSearchParams(s.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[s]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Google Tag Manager container","gtm-kit")}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("General Container Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,m.jsx)(he,{title:(0,t.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,t.__)("Enter GTM Container ID","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Inject Container Code","gtm-kit"),label:(0,t.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Just the container","gtm-kit"),label:(0,t.__)("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:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,t.__)("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:n,useUpdateStateSettings:i})]})]}),(0,m.jsx)("div",{id:"sgtm"}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(he,{title:(0,t.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,t.__)("Enter domain","gtm-kit"),help:(0,t.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,t.__)("Enter loader name","gtm-kit"),help:(0,t.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,t.__)("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:o,useSettings:n,useUpdateStateSettings:i})]}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,m.jsx)("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",children:(0,t.__)("Learn more","gtm-kit")})]}),(0,m.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Hosting server-side GTM containers","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("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,t.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,m.jsx)("a",{href:"https://jump.gtmkit.com/link/1-AC1E5",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,t.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Page Speed Optimization","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsx)(be.Content,{children:(0,m.jsx)(ke,{title:(0,t.__)("load_delayed_js event","gtm-kit"),label:(0,t.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:n,useUpdateStateSettings:i})}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Delay JavaScript execution","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("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,m.jsx)("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",children:(0,t.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Google Tag Manager Environment","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(he,{title:(0,t.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,t.__)("Enter gtm_auth code","gtm-kit"),help:(0,t.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,t.__)("Enter gtm_preview code","gtm-kit"),help:(0,t.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:n,useUpdateStateSettings:i})]}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Environments","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,t.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,t.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,m.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Override settings in wp-config.php","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("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,m.jsx)("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",children:(0,t.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Exclude User Roles","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsx)(be.Content,{children:(0,m.jsx)(_e,{title:(0,t.__)("Exclude user roles","gtm-kit"),help:(0,t.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:a,optionName:"exclude_user_roles",useSettings:n,useUpdateStateSettings:i})}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,t.__)("Warning!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("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,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Container Code Implementation","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(fe,{title:(0,t.__)("Container code implementation:","gtm-kit"),options:[{label:(0,t.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,t.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,t.__)("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:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:(0,t.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,t.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,t.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,t.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,t.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,t.__)('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:n,useUpdateStateSettings:i}),(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,m.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ye=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Post Data","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Post Data Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,u.createElement)(ke,{title:(0,t.__)("Post type","gtm-kit"),id:"post-type",label:(0,t.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Page type","gtm-kit"),id:"page-type",label:(0,t.__)('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:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Categories","gtm-kit"),id:"categories",label:(0,t.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Tags","gtm-kit"),id:"tags",label:(0,t.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post title","gtm-kit"),id:"post-title",label:(0,t.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post ID","gtm-kit"),id:"post-id",label:(0,t.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post data","gtm-kit"),id:"post-date",label:(0,t.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,t.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,t.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:n,useUpdateStateSettings:i}))))},ve=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("User Data","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,u.createElement)(be.Content,{className:"gtmkit-space-y-2"},(0,u.createElement)("p",null,(0,t.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,u.createElement)("p",null,(0,t.__)("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,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("User Data Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,t.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("User ID","gtm-kit"),id:"user-id",label:(0,t.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("User role","gtm-kit"),id:"user-role",label:(0,t.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:n,useUpdateStateSettings:i}))))},Ee=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c),a=!n.general.gcm_default_settings;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Google Consent Mode","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Google Consent Mode Activation","gtm-kit")},(0,u.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,t.__)("Warning!","gtm-kit"))),(0,u.createElement)(be.Content,{className:"gtmkit-space-y-2"},(0,u.createElement)("p",null,(0,t.__)("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,u.createElement)("p",null,(0,t.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,u.createElement)("p",{className:"!gtmkit-mt-4"},(0,t.__)("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,u.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,u.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,t.__)("See an example of how consent is updated","gtm-kit"))),(0,u.createElement)(ke,{title:(0,t.__)("Activate GCM settings","gtm-kit"),label:(0,t.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:n,useUpdateStateSettings:i}))),(0,u.createElement)(be,{disabled:a},(0,u.createElement)(be.Header,{title:(0,t.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Ad Personalization","gtm-kit"),label:(0,t.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Ad Storage","gtm-kit"),label:(0,t.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Ad User Data","gtm-kit"),label:(0,t.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Analytics Storage","gtm-kit"),label:(0,t.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Functionality Storage","gtm-kit"),label:(0,t.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Personalization Storage","gtm-kit"),label:(0,t.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Security Storage","gtm-kit"),label:(0,t.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,t.__)("Advanced","gtm-kit")),(0,u.createElement)(ke,{title:(0,t.__)("Redact Ads Data","gtm-kit"),label:(0,t.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Pass through URL parameters","gtm-kit"),label:(0,t.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(he,{title:(0,t.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,t.__)("Enter time in milliseconds","gtm-kit"),useSettings:n,useUpdateStateSettings:i}))))},Ne=({label:t,value:e,tag:n})=>(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,u.createElement)("strong",null,t)),(0,u.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===n?(0,u.createElement)("code",{className:"gtmkit-text-sm"},e):(0,u.createElement)("em",null,e))),we=()=>{const{useSiteData:n}=(0,e.useContext)(c),i=Object.values(n.shared_data);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,t.__)("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,u.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,t.__)("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,u.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,u.createElement)("tbody",{className:"gtmkit-py-6"},i.map((function(t,e){return(0,u.createElement)(Ne,{key:e,label:t.label,value:t.value,tag:t.tag})})))))},je=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Misc","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Help improve GTM Kit","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(we,null),(0,u.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,t.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,u.createElement)(ke,{title:(0,t.__)("Share anonymous data","gtm-kit"),label:(0,t.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:n,useUpdateStateSettings:i}))),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Logging and debugging","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Event Inspector","gtm-kit"),label:(0,t.__)("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:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Console log","gtm-kit"),label:(0,t.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Debug log","gtm-kit"),label:(0,t.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:n,useUpdateStateSettings:i}))))},Te=()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ue,{title:(0,t.__)("Integrations","gtm-kit"),data:de("integrations")})),Ce=({pluginName:e})=>(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.sprintf)(
     1(()=>{var t={838:function(t){t.exports=function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:i,getPrototypeOf:n,getOwnPropertyDescriptor:a}=Object;let{freeze:s,seal:o,create:r}=Object,{apply:l,construct:m}="undefined"!=typeof Reflect&&Reflect;s||(s=function(t){return t}),o||(o=function(t){return t}),l||(l=function(t,e,i){return t.apply(e,i)}),m||(m=function(t,e){return new t(...e)});const c=v(Array.prototype.forEach),g=v(Array.prototype.pop),d=v(Array.prototype.push),u=v(String.prototype.toLowerCase),p=v(String.prototype.toString),h=v(String.prototype.match),k=v(String.prototype.replace),f=v(String.prototype.indexOf),_=v(String.prototype.trim),x=v(Object.prototype.hasOwnProperty),b=v(RegExp.prototype.test),S=(y=TypeError,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return m(y,e)});var y;function v(t){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return l(t,e,n)}}function E(t,n){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;e&&e(t,null);let s=n.length;for(;s--;){let e=n[s];if("string"==typeof e){const t=a(e);t!==e&&(i(n)||(n[s]=t),e=t)}t[e]=!0}return t}function N(t){for(let e=0;e<t.length;e++)x(t,e)||(t[e]=null);return t}function w(e){const i=r(null);for(const[n,a]of t(e))x(e,n)&&(Array.isArray(a)?i[n]=N(a):a&&"object"==typeof a&&a.constructor===Object?i[n]=w(a):i[n]=a);return i}function j(t,e){for(;null!==t;){const i=a(t,e);if(i){if(i.get)return v(i.get);if("function"==typeof i.value)return v(i.value)}t=n(t)}return function(){return null}}const T=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),A=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=s(["#text"]),R=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),L=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),M=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=o(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=o(/<%[\w\W]*|[\w\W]*%>/gm),H=o(/\${[\w\W]*}/gm),B=o(/^data-[\-\w.\u00B7-\uFFFF]/),W=o(/^aria-[\-\w]+$/),K=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=o(/^(?:\w+script|data):/i),$=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=o(/^html$/i),J=o(/^[a-z][.\w]*(-[.\w]+)+$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:G,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:B,ARIA_ATTR:W,IS_ALLOWED_URI:K,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:$,DOCTYPE_NAME:Y,CUSTOM_ELEMENT:J});const V=1,X=3,Z=7,Q=8,tt=9,et=function(){return"undefined"==typeof window?null:window};return function e(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const n=t=>e(t);if(n.version="3.1.6",n.removed=[],!i||!i.document||i.document.nodeType!==tt)return n.isSupported=!1,n;let{document:a}=i;const o=a,l=o.currentScript,{DocumentFragment:m,HTMLTemplateElement:y,Node:v,Element:N,NodeFilter:G,NamedNodeMap:F=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:H,DOMParser:B,trustedTypes:W}=i,z=N.prototype,$=j(z,"cloneNode"),J=j(z,"remove"),it=j(z,"nextSibling"),nt=j(z,"childNodes"),at=j(z,"parentNode");if("function"==typeof y){const t=a.createElement("template");t.content&&t.content.ownerDocument&&(a=t.content.ownerDocument)}let st,ot="";const{implementation:rt,createNodeIterator:lt,createDocumentFragment:mt,getElementsByTagName:ct}=a,{importNode:gt}=o;let dt={};n.isSupported="function"==typeof t&&"function"==typeof at&&rt&&void 0!==rt.createHTMLDocument;const{MUSTACHE_EXPR:ut,ERB_EXPR:pt,TMPLIT_EXPR:ht,DATA_ATTR:kt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:_t,ATTR_WHITESPACE:xt,CUSTOM_ELEMENT:bt}=q;let{IS_ALLOWED_URI:St}=q,yt=null;const vt=E({},[...T,...C,...D,...A,...O]);let Et=null;const Nt=E({},[...R,...L,...M,...P]);let wt=Object.seal(r(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),jt=null,Tt=null,Ct=!0,Dt=!0,Ut=!1,At=!0,It=!1,Ot=!0,Rt=!1,Lt=!1,Mt=!1,Pt=!1,Gt=!1,Ft=!1,Ht=!0,Bt=!1,Wt=!0,Kt=!1,zt={},$t=null;const Yt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Jt=null;const qt=E({},["audio","video","img","source","image","track"]);let Vt=null;const Xt=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml";let ee=te,ie=!1,ne=null;const ae=E({},[Zt,Qt,te],p);let se=null;const oe=["application/xhtml+xml","text/html"];let re=null,le=null;const me=a.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},ge=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!le||le!==t){if(t&&"object"==typeof t||(t={}),t=w(t),se=-1===oe.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,re="application/xhtml+xml"===se?p:u,yt=x(t,"ALLOWED_TAGS")?E({},t.ALLOWED_TAGS,re):vt,Et=x(t,"ALLOWED_ATTR")?E({},t.ALLOWED_ATTR,re):Nt,ne=x(t,"ALLOWED_NAMESPACES")?E({},t.ALLOWED_NAMESPACES,p):ae,Vt=x(t,"ADD_URI_SAFE_ATTR")?E(w(Xt),t.ADD_URI_SAFE_ATTR,re):Xt,Jt=x(t,"ADD_DATA_URI_TAGS")?E(w(qt),t.ADD_DATA_URI_TAGS,re):qt,$t=x(t,"FORBID_CONTENTS")?E({},t.FORBID_CONTENTS,re):Yt,jt=x(t,"FORBID_TAGS")?E({},t.FORBID_TAGS,re):{},Tt=x(t,"FORBID_ATTR")?E({},t.FORBID_ATTR,re):{},zt=!!x(t,"USE_PROFILES")&&t.USE_PROFILES,Ct=!1!==t.ALLOW_ARIA_ATTR,Dt=!1!==t.ALLOW_DATA_ATTR,Ut=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,Ot=!1!==t.SAFE_FOR_XML,Rt=t.WHOLE_DOCUMENT||!1,Pt=t.RETURN_DOM||!1,Gt=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Mt=t.FORCE_BODY||!1,Ht=!1!==t.SANITIZE_DOM,Bt=t.SANITIZE_NAMED_PROPS||!1,Wt=!1!==t.KEEP_CONTENT,Kt=t.IN_PLACE||!1,St=t.ALLOWED_URI_REGEXP||K,ee=t.NAMESPACE||te,wt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(wt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(wt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(wt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Dt=!1),Gt&&(Pt=!0),zt&&(yt=E({},O),Et=[],!0===zt.html&&(E(yt,T),E(Et,R)),!0===zt.svg&&(E(yt,C),E(Et,L),E(Et,P)),!0===zt.svgFilters&&(E(yt,D),E(Et,L),E(Et,P)),!0===zt.mathMl&&(E(yt,A),E(Et,M),E(Et,P))),t.ADD_TAGS&&(yt===vt&&(yt=w(yt)),E(yt,t.ADD_TAGS,re)),t.ADD_ATTR&&(Et===Nt&&(Et=w(Et)),E(Et,t.ADD_ATTR,re)),t.ADD_URI_SAFE_ATTR&&E(Vt,t.ADD_URI_SAFE_ATTR,re),t.FORBID_CONTENTS&&($t===Yt&&($t=w($t)),E($t,t.FORBID_CONTENTS,re)),Wt&&(yt["#text"]=!0),Rt&&E(yt,["html","head","body"]),yt.table&&(E(yt,["tbody"]),delete jt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');st=t.TRUSTED_TYPES_POLICY,ot=st.createHTML("")}else void 0===st&&(st=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(i=e.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(W,l)),null!==st&&"string"==typeof ot&&(ot=st.createHTML(""));s&&s(t),le=t}},de=E({},["mi","mo","mn","ms","mtext"]),ue=E({},["foreignobject","annotation-xml"]),pe=E({},["title","style","font","a","script"]),he=E({},[...C,...D,...U]),ke=E({},[...A,...I]),fe=function(t){d(n.removed,{element:t});try{at(t).removeChild(t)}catch(e){J(t)}},_e=function(t,e){try{d(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Et[t])if(Pt||Gt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},xe=function(t){let e=null,i=null;if(Mt)t="<remove></remove>"+t;else{const e=h(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===se&&ee===te&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const n=st?st.createHTML(t):t;if(ee===te)try{e=(new B).parseFromString(n,se)}catch(t){}if(!e||!e.documentElement){e=rt.createDocument(ee,"template",null);try{e.documentElement.innerHTML=ie?ot:n}catch(t){}}const s=e.body||e.documentElement;return t&&i&&s.insertBefore(a.createTextNode(i),s.childNodes[0]||null),ee===te?ct.call(e,Rt?"html":"body")[0]:Rt?e.documentElement:s},be=function(t){return lt.call(t.ownerDocument||t,t,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Se=function(t){return t instanceof H&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof F)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ye=function(t){return"function"==typeof v&&t instanceof v},ve=function(t,e,i){dt[t]&&c(dt[t],(t=>{t.call(n,e,i,le)}))},Ee=function(t){let e=null;if(ve("beforeSanitizeElements",t,null),Se(t))return fe(t),!0;const i=re(t.nodeName);if(ve("uponSanitizeElement",t,{tagName:i,allowedTags:yt}),t.hasChildNodes()&&!ye(t.firstElementChild)&&b(/<[/\w]/g,t.innerHTML)&&b(/<[/\w]/g,t.textContent))return fe(t),!0;if(t.nodeType===Z)return fe(t),!0;if(Ot&&t.nodeType===Q&&b(/<[/\w]/g,t.data))return fe(t),!0;if(!yt[i]||jt[i]){if(!jt[i]&&we(i)){if(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,i))return!1;if(wt.tagNameCheck instanceof Function&&wt.tagNameCheck(i))return!1}if(Wt&&!$t[i]){const e=at(t)||t.parentNode,i=nt(t)||t.childNodes;if(i&&e)for(let n=i.length-1;n>=0;--n){const a=$(i[n],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,it(t))}}return fe(t),!0}return t instanceof N&&!function(t){let e=at(t);e&&e.tagName||(e={namespaceURI:ee,tagName:"template"});const i=u(t.tagName),n=u(e.tagName);return!!ne[t.namespaceURI]&&(t.namespaceURI===Qt?e.namespaceURI===te?"svg"===i:e.namespaceURI===Zt?"svg"===i&&("annotation-xml"===n||de[n]):Boolean(he[i]):t.namespaceURI===Zt?e.namespaceURI===te?"math"===i:e.namespaceURI===Qt?"math"===i&&ue[n]:Boolean(ke[i]):t.namespaceURI===te?!(e.namespaceURI===Qt&&!ue[n])&&!(e.namespaceURI===Zt&&!de[n])&&!ke[i]&&(pe[i]||!he[i]):!("application/xhtml+xml"!==se||!ne[t.namespaceURI]))}(t)?(fe(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!b(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&t.nodeType===X&&(e=t.textContent,c([ut,pt,ht],(t=>{e=k(e,t," ")})),t.textContent!==e&&(d(n.removed,{element:t.cloneNode()}),t.textContent=e)),ve("afterSanitizeElements",t,null),!1):(fe(t),!0)},Ne=function(t,e,i){if(Ht&&("id"===e||"name"===e)&&(i in a||i in me))return!1;if(Dt&&!Tt[e]&&b(kt,e));else if(Ct&&b(ft,e));else if(!Et[e]||Tt[e]){if(!(we(t)&&(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,t)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(t))&&(wt.attributeNameCheck instanceof RegExp&&b(wt.attributeNameCheck,e)||wt.attributeNameCheck instanceof Function&&wt.attributeNameCheck(e))||"is"===e&&wt.allowCustomizedBuiltInElements&&(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,i)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(i))))return!1}else if(Vt[e]);else if(b(St,k(i,xt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==f(i,"data:")||!Jt[t])if(Ut&&!b(_t,k(i,xt,"")));else if(i)return!1;return!0},we=function(t){return"annotation-xml"!==t&&h(t,bt)},je=function(t){ve("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Et};let a=e.length;for(;a--;){const s=e[a],{name:o,namespaceURI:r,value:l}=s,m=re(o);let d="value"===o?l:_(l);if(i.attrName=m,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,ve("uponSanitizeAttribute",t,i),d=i.attrValue,Ot&&b(/((--!?|])>)|<\/(style|title)/i,d)){_e(o,t);continue}if(i.forceKeepAttr)continue;if(_e(o,t),!i.keepAttr)continue;if(!At&&b(/\/>/i,d)){_e(o,t);continue}It&&c([ut,pt,ht],(t=>{d=k(d,t," ")}));const u=re(t.nodeName);if(Ne(u,m,d)){if(!Bt||"id"!==m&&"name"!==m||(_e(o,t),d="user-content-"+d),st&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(r);else switch(W.getAttributeType(u,m)){case"TrustedHTML":d=st.createHTML(d);break;case"TrustedScriptURL":d=st.createScriptURL(d)}try{r?t.setAttributeNS(r,o,d):t.setAttribute(o,d),Se(t)?fe(t):g(n.removed)}catch(t){}}}ve("afterSanitizeAttributes",t,null)},Te=function t(e){let i=null;const n=be(e);for(ve("beforeSanitizeShadowDOM",e,null);i=n.nextNode();)ve("uponSanitizeShadowNode",i,null),Ee(i)||(i.content instanceof m&&t(i.content),je(i));ve("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,a=null,s=null,r=null;if(ie=!t,ie&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ye(t)){if("function"!=typeof t.toString)throw S("toString is not a function");if("string"!=typeof(t=t.toString()))throw S("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Lt||ge(e),n.removed=[],"string"==typeof t&&(Kt=!1),Kt){if(t.nodeName){const e=re(t.nodeName);if(!yt[e]||jt[e])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof v)i=xe("\x3c!----\x3e"),a=i.ownerDocument.importNode(t,!0),a.nodeType===V&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!Pt&&!It&&!Rt&&-1===t.indexOf("<"))return st&&Ft?st.createHTML(t):t;if(i=xe(t),!i)return Pt?null:Ft?ot:""}i&&Mt&&fe(i.firstChild);const l=be(Kt?t:i);for(;s=l.nextNode();)Ee(s)||(s.content instanceof m&&Te(s.content),je(s));if(Kt)return t;if(Pt){if(Gt)for(r=mt.call(i.ownerDocument);i.firstChild;)r.appendChild(i.firstChild);else r=i;return(Et.shadowroot||Et.shadowrootmode)&&(r=gt.call(o,r,!0)),r}let g=Rt?i.outerHTML:i.innerHTML;return Rt&&yt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&b(Y,i.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+g),It&&c([ut,pt,ht],(t=>{g=k(g,t," ")})),st&&Ft?st.createHTML(g):g},n.setConfig=function(){ge(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},n.clearConfig=function(){le=null,Lt=!1},n.isValidAttribute=function(t,e,i){le||ge({});const n=re(t),a=re(e);return Ne(n,a,i)},n.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],d(dt[t],e))},n.removeHook=function(t){if(dt[t])return g(dt[t])},n.removeHooks=function(t){dt[t]&&(dt[t]=[])},n.removeAllHooks=function(){dt={}},n}()}()},942:(t,e)=>{var i;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=o(t,s(i)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var i in t)n.call(t,i)&&t[i]&&(e=o(e,i));return e}function o(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(i=function(){return a}.apply(e,[]))||(t.exports=i)}()}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.ReactDOM;var e=i.n(t);const n=window.wp.i18n,a=window.wp.element,s=window.wp.components,o=window.lodash,r=window.wp.apiFetch;var l=i.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,i=null,n=!1)=>{let a={};try{a=await l()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?a:!0===a.success?a.data:{}},c=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,n.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.isNotificationStatusSent=e.payload.isNotificationStatusSent||i.isNotificationStatusSent,i.notifications=e.payload.notifications||i.Notifications}return i},g=window.ReactJSXRuntime,d=(0,a.createContext)(),u=t=>{const[e,i]=(0,a.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),n=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:n,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{n()}),[]);const r={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(n=e.stateSettings,m("gtmkit/v1/set-options","POST",n));var n;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:n,useUpdateState:s,useUpdateStateSettings:async(t,i,n)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let r;a[t][i]=n,r=!(0,o.isEqual)(a,e.fetchedSettings),s({stateSettings:a,canSave:r})},useImportSettings:async(t,i)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let a;const r={};r.general={...n.general,...i.general},"integrations"in i&&(r.integrations={...n.integrations,...i.integrations}),a=!(0,o.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:a})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(n=e.supportTicket,m("gtmkit/v1/send-support-data","POST",n,!0));var n;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{i({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(n=e.licenseKey,m("gtmkit/v1/send-license-key","POST",n,!0));var n;i({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{i({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:!0}});const n={"notification-id":t,action:e},a=await(t=>m("gtmkit/v1/set-notification-status","POST",t,!0))(n);i({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,isNotificationStatusSent:a.success,notifications:a.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,g.jsx)(d.Provider,{value:r,children:t.children})},p=window.React;var h,k=i.n(p);function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},f.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const _="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function b(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function S(t,e){return{usr:t.state,key:t.key,idx:e}}function y(t,e,i,n){return void 0===i&&(i=null),f({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:i,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function v(t){let{pathname:e="/",search:i="",hash:n=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function E(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function w(t,e,i){return void 0===i&&(i="/"),function(t,e,i,n){let a=F(("string"==typeof e?E(e):e).pathname||"/",i);if(null==a)return null;let s=j(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,i)=>t===e[i]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let o=null;for(let t=0;null==o&&t<s.length;++t){let e=G(a);o=M(s[t],e,n)}return o}(t,e,i,!1)}function j(t,e,i,n){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===n&&(n="");let a=(t,a,s)=>{let o={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};o.relativePath.startsWith("/")&&(x(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 r=K([n,o.relativePath]),l=i.concat(o);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+r+'".'),j(t.children,e,l,r)),(null!=t.path||t.index)&&e.push({path:r,score:L(r,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of T(t.path))a(t,e,i);else a(t,e)})),e}function T(t){let e=t.split("/");if(0===e.length)return[];let[i,...n]=e,a=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===n.length)return a?[s,""]:[s];let o=T(n.join("/")),r=[];return r.push(...o.map((t=>""===t?s:[s,t].join("/")))),a&&r.push(...o),r.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:[\w-]+$/,D=3,U=2,A=1,I=10,O=-2,R=t=>"*"===t;function L(t,e){let i=t.split("/"),n=i.length;return i.some(R)&&(n+=O),e&&(n+=U),i.filter((t=>!R(t))).reduce(((t,e)=>t+(C.test(e)?D:""===e?A:I)),n)}function M(t,e,i){void 0===i&&(i=!1);let{routesMeta:n}=t,a={},s="/",o=[];for(let t=0;t<n.length;++t){let r=n[t],l=t===n.length-1,m="/"===s?e:e.slice(s.length)||"/",c=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},m),g=r.route;if(!c&&l&&i&&!n[n.length-1].route.index&&(c=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},m)),!c)return null;Object.assign(a,c.params),o.push({params:a,pathname:K([s,c.pathname]),pathnameBase:z(K([s,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(s=K([s,c.pathnameBase]))}return o}function P(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,n]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),b("*"===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=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(n.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),a+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?a+="\\/*$":""!==t&&"/"!==t&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),a=e.match(i);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),r=a.slice(1);return{params:n.reduce(((t,e,i)=>{let{paramName:n,isOptional:a}=e;if("*"===n){let t=r[i]||"";o=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=r[i];return t[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:o,pattern:t}}function G(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return b(!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 F(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let i=e.endsWith("/")?e.length-1:e.length,n=t.charAt(i);return n&&"/"!==n?null:t.slice(i)||"/"}function H(t,e,i,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function B(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function W(t,e,i,n){let a;void 0===n&&(n=!1),"string"==typeof t?a=E(t):(a=f({},t),x(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let s,o=""===t||""===a.pathname,r=o?"/":a.pathname;if(null==r)s=i;else{let t=e.length-1;if(!n&&r.startsWith("..")){let e=r.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:n="",hash:a=""}="string"==typeof t?E(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:$(n),hash:Y(a)}}(a,s),m=r&&"/"!==r&&r.endsWith("/"),c=(o||"."===r)&&i.endsWith("/");return l.pathname.endsWith("/")||!m&&!c||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),z=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],q=(new Set(J),["get",...J]);function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},V.apply(this,arguments)}new Set(q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const X=p.createContext(null),Z=p.createContext(null),Q=p.createContext(null),tt=p.createContext(null),et=p.createContext({outlet:null,matches:[],isDataRoute:!1}),it=p.createContext(null);function nt(){return null!=p.useContext(tt)}function at(){return nt()||x(!1),p.useContext(tt).location}function st(t){p.useContext(Q).static||p.useLayoutEffect(t)}function ot(){let{isDataRoute:t}=p.useContext(et);return t?function(){let{router:t}=function(){let t=p.useContext(X);return t||x(!1),t}(ut.UseNavigateStable),e=ht(pt.UseNavigateStable),i=p.useRef(!1);return st((()=>{i.current=!0})),p.useCallback((function(n,a){void 0===a&&(a={}),i.current&&("number"==typeof n?t.navigate(n):t.navigate(n,V({fromRouteId:e},a)))}),[t,e])}():function(){nt()||x(!1);let t=p.useContext(X),{basename:e,future:i,navigator:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(B(a,i.v7_relativeSplatPath)),r=p.useRef(!1);return st((()=>{r.current=!0})),p.useCallback((function(i,a){if(void 0===a&&(a={}),!r.current)return;if("number"==typeof i)return void n.go(i);let l=W(i,JSON.parse(o),s,"path"===a.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:K([e,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[e,n,o,s,t])}()}function rt(t,e){let{relative:i}=void 0===e?{}:e,{future:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(B(a,n.v7_relativeSplatPath));return p.useMemo((()=>W(t,JSON.parse(o),s,"path"===i)),[t,o,s,i])}function lt(t,e,i,n){nt()||x(!1);let{navigator:a}=p.useContext(Q),{matches:s}=p.useContext(et),o=s[s.length-1],r=o?o.params:{},l=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let m,c=at();if(e){var g;let t="string"==typeof e?E(e):e;"/"===l||(null==(g=t.pathname)?void 0:g.startsWith(l))||x(!1),m=t}else m=c;let d=m.pathname||"/",u=d;if("/"!==l){let t=l.replace(/^\//,"").split("/");u="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=w(t,{pathname:u}),f=function(t,e,i,n){var a;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===n&&(n=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=n)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let o=t,r=null==(a=i)?void 0:a.errors;if(null!=r){let t=o.findIndex((t=>t.route.id&&void 0!==(null==r?void 0:r[t.route.id])));t>=0||x(!1),o=o.slice(0,Math.min(o.length,t+1))}let l=!1,m=-1;if(i&&n&&n.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(m=t),e.route.id){let{loaderData:t,errors:n}=i,a=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||a){l=!0,o=m>=0?o.slice(0,m+1):[o[0]];break}}}return o.reduceRight(((t,n,a)=>{let s,c=!1,g=null,d=null;var u;i&&(s=r&&n.route.id?r[n.route.id]:void 0,g=n.route.errorElement||ct,l&&(m<0&&0===a?(kt[u="route-fallback"]||(kt[u]=!0),c=!0,d=null):m===a&&(c=!0,d=n.route.hydrateFallbackElement||null)));let h=e.concat(o.slice(0,a+1)),k=()=>{let e;return e=s?g:c?d:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:t,p.createElement(dt,{match:n,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?p.createElement(gt,{location:i.location,revalidation:i.revalidation,component:g,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},r,t.params),pathname:K([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:K([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,i,n);return e&&f?p.createElement(tt.Provider,{value:{location:V({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:h.Pop}},f):f}function mt(){let t=function(){var t;let e=p.useContext(it),i=function(){let t=p.useContext(Z);return t||x(!1),t}(pt.UseRouteError),n=ht(pt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[n]}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),i?p.createElement("pre",{style:n},i):null,null)}const ct=p.createElement(mt,null);class gt extends p.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?p.createElement(et.Provider,{value:this.props.routeContext},p.createElement(it.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dt(t){let{routeContext:e,match:i,children:n}=t,a=p.useContext(X);return a&&a.static&&a.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=i.route.id),p.createElement(et.Provider,{value:e},n)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),pt=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}(pt||{});function ht(t){let e=function(){let t=p.useContext(et);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const kt={};function ft(t){let{to:e,replace:i,state:n,relative:a}=t;nt()||x(!1);let{future:s,static:o}=p.useContext(Q),{matches:r}=p.useContext(et),{pathname:l}=at(),m=ot(),c=W(e,B(r,s.v7_relativeSplatPath),l,"path"===a),g=JSON.stringify(c);return p.useEffect((()=>m(JSON.parse(g),{replace:i,state:n,relative:a})),[m,g,a,i,n]),null}function _t(t){x(!1)}function xt(t){let{basename:e="/",children:i=null,location:n,navigationType:a=h.Pop,navigator:s,static:o=!1,future:r}=t;nt()&&x(!1);let l=e.replace(/^\/*/,"/"),m=p.useMemo((()=>({basename:l,navigator:s,static:o,future:V({v7_relativeSplatPath:!1},r)})),[l,r,s,o]);"string"==typeof n&&(n=E(n));let{pathname:c="/",search:g="",hash:d="",state:u=null,key:k="default"}=n,f=p.useMemo((()=>{let t=F(c,l);return null==t?null:{location:{pathname:t,search:g,hash:d,state:u,key:k},navigationType:a}}),[l,c,g,d,u,k,a]);return null==f?null:p.createElement(Q.Provider,{value:m},p.createElement(tt.Provider,{children:i,value:f}))}function bt(t){let{children:e,location:i}=t;return lt(St(e),i)}function St(t,e){void 0===e&&(e=[]);let i=[];return p.Children.forEach(t,((t,n)=>{if(!p.isValidElement(t))return;let a=[...e,n];if(t.type===p.Fragment)return void i.push.apply(i,St(t.props.children,a));t.type!==_t&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||a.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&&(s.children=St(t.props.children,a)),i.push(s)})),i}function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yt.apply(this,arguments)}function vt(t,e){if(null==t)return{};var i,n,a={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(a[i]=t[i]);return a}p.startTransition,new Promise((()=>{})),p.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Et=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Nt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=p.createContext({isTransitioning:!1});new Map;const jt=p.startTransition;function Tt(t){let{basename:e,children:i,future:n,window:a}=t,s=p.useRef();var o;null==s.current&&(s.current=(void 0===(o={window:a,v5Compat:!0})&&(o={}),function(t,e,i,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,r=h.Pop,l=null,m=c();function c(){return(o.state||{idx:null}).idx}function g(){r=h.Pop;let t=c(),e=null==t?null:t-m;m=t,l&&l({action:r,location:u.location,delta:e})}function d(t){let e="null"!==a.location.origin?a.location.origin:a.location.href,i="string"==typeof t?t:v(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==m&&(m=0,o.replaceState(f({},o.state,{idx:m}),""));let u={get action(){return r},get location(){return t(a,o)},listen(t){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(_,g),l=t,()=>{a.removeEventListener(_,g),l=null}},createHref:t=>e(a,t),createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){r=h.Push;let n=y(u.location,t,e);i&&i(n,t),m=c()+1;let g=S(n,m),d=u.createHref(n);try{o.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(d)}s&&l&&l({action:r,location:u.location,delta:1})},replace:function(t,e){r=h.Replace;let n=y(u.location,t,e);i&&i(n,t),m=c();let a=S(n,m),g=u.createHref(n);o.replaceState(a,"",g),s&&l&&l({action:r,location:u.location,delta:0})},go:t=>o.go(t)};return u}((function(t,e){let{pathname:i="/",search:n="",hash:a=""}=E(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),y("",{pathname:i,search:n,hash:a},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),n="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");n=-1===i?e:e.slice(0,i)}return n+"#"+("string"==typeof e?e:v(e))}),(function(t,e){b("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let r=s.current,[l,m]=p.useState({action:r.action,location:r.location}),{v7_startTransition:c}=n||{},g=p.useCallback((t=>{c&&jt?jt((()=>m(t))):m(t)}),[m,c]);return p.useLayoutEffect((()=>r.listen(g)),[r,g]),p.createElement(xt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:r,future:n})}t.flushSync,p.useId;const Ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=p.forwardRef((function(t,e){let i,{onClick:n,relative:a,reloadDocument:s,replace:o,state:r,target:l,to:m,preventScrollReset:c,unstable_viewTransition:g}=t,d=vt(t,Et),{basename:u}=p.useContext(Q),h=!1;if("string"==typeof m&&Dt.test(m)&&(i=m,Ct))try{let t=new URL(window.location.href),e=m.startsWith("//")?new URL(t.protocol+m):new URL(m),i=F(e.pathname,u);e.origin===t.origin&&null!=i?m=i+e.search+e.hash:h=!0}catch(t){}let k=function(t,e){let{relative:i}=void 0===e?{}:e;nt()||x(!1);let{basename:n,navigator:a}=p.useContext(Q),{hash:s,pathname:o,search:r}=rt(t,{relative:i}),l=o;return"/"!==n&&(l="/"===o?n:K([n,o])),a.createHref({pathname:l,search:r,hash:s})}(m,{relative:a}),f=function(t,e){let{target:i,replace:n,state:a,preventScrollReset:s,relative:o,unstable_viewTransition:r}=void 0===e?{}:e,l=ot(),m=at(),c=rt(t,{relative:o});return p.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,i)){e.preventDefault();let i=void 0!==n?n:v(m)===v(c);l(t,{replace:i,state:a,preventScrollReset:s,relative:o,unstable_viewTransition:r})}}),[m,l,c,n,a,i,t,s,o,r])}(m,{replace:o,state:r,target:l,preventScrollReset:c,relative:a,unstable_viewTransition:g});return p.createElement("a",yt({},d,{href:i||k,onClick:h||s?n:function(t){n&&n(t),t.defaultPrevented||f(t)},ref:e,target:l}))})),At=p.forwardRef((function(t,e){let{"aria-current":i="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:r,unstable_viewTransition:l,children:m}=t,c=vt(t,Nt),g=rt(r,{relative:c.relative}),d=at(),u=p.useContext(Z),{navigator:h,basename:k}=p.useContext(Q),f=null!=u&&function(t,e){void 0===e&&(e={});let i=p.useContext(wt);null==i&&x(!1);let{basename:n}=function(){let t=p.useContext(X);return t||x(!1),t}(It.useViewTransitionState),a=rt(t,{relative:e.relative});if(!i.isTransitioning)return!1;let s=F(i.currentLocation.pathname,n)||i.currentLocation.pathname,o=F(i.nextLocation.pathname,n)||i.nextLocation.pathname;return null!=P(a.pathname,o)||null!=P(a.pathname,s)}(g)&&!0===l,_=h.encodeLocation?h.encodeLocation(g).pathname:g.pathname,b=d.pathname,S=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;n||(b=b.toLowerCase(),S=S?S.toLowerCase():null,_=_.toLowerCase()),S&&k&&(S=F(S,k)||S);const y="/"!==_&&_.endsWith("/")?_.length-1:_.length;let v,E=b===_||!s&&b.startsWith(_)&&"/"===b.charAt(y),N=null!=S&&(S===_||!s&&S.startsWith(_)&&"/"===S.charAt(_.length)),w={isActive:E,isPending:N,isTransitioning:f},j=E?i:void 0;v="function"==typeof a?a(w):[a,E?"active":null,N?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(w):o;return p.createElement(Ut,yt({},c,{"aria-current":j,className:v,ref:e,style:T,to:r,unstable_viewTransition:l}),"function"==typeof m?m(w):m)}));var It,Ot;(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"}(Ot||(Ot={}));const Rt=({title:t})=>(0,p.createElement)(p.Fragment,null,(0,p.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,p.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,p.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,p.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,p.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,p.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,p.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,p.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,p.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))));var Lt=i(942),Mt=i.n(Lt);const Pt=({count:t,important:e,nav:i=!1})=>(0,g.jsx)(g.Fragment,{children:t>0&&(0,g.jsx)("span",{className:Mt()("gtmkit-ml-2 gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py-px gtmkit-leading-[1.125rem] gtmkit-uppercase",{"gtmkit-bg-color-error":e},{"gtmkit-bg-color-success":!e},{"gtmkit-px-1.5":i},{"gtmkit-px-2":!i}),children:t})}),Gt=({metrics:t})=>(0,g.jsx)(Pt,{count:t.total,important:t.problem>0,nav:!0}),Ft=Pt,Ht=({to:t,title:e})=>{const{useNotifications:i}=(0,a.useContext)(d);return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(At,{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 ":""),children:[e,"notifications"===t&&(0,g.jsx)(Gt,{metrics:i.metrics})]})})},Bt=({NavList:t})=>(0,p.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,p.createElement)(Ht,{key:t.to,to:t.to,title:t.title})})));function Wt(){return Wt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Wt.apply(this,arguments)}function Kt(t,e){if(null==t)return{};var i,n,a={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(a[i]=t[i]);return a}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function $t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zt(t,e)}function Yt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Jt=k().createContext(null);var qt=function(t){return t.scrollTop},Vt="unmounted",Xt="exited",Zt="entering",Qt="entered",te="exiting",ee=function(t){function i(e,i){var n;n=t.call(this,e,i)||this;var a,s=i&&!i.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?s?(a=Xt,n.appearStatus=Zt):a=Qt:a=e.unmountOnExit||e.mountOnEnter?Vt:Xt,n.state={status:a},n.nextCallback=null,n}$t(i,t),i.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Vt?{status:Xt}:null};var n=i.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==Zt&&i!==Qt&&(e=Zt):i!==Zt&&i!==Qt||(e=te)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,i,n=this.props.timeout;return t=e=i=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,i=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:i}},n.updateStatus=function(t,i){if(void 0===t&&(t=!1),null!==i)if(this.cancelNextCallback(),i===Zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this);n&&qt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xt&&this.setState({status:Vt})},n.performEnter=function(t){var i=this,n=this.props.enter,a=this.context?this.context.isMounting:t,s=this.props.nodeRef?[a]:[e().findDOMNode(this),a],o=s[0],r=s[1],l=this.getTimeouts(),m=a?l.appear:l.enter;t||n?(this.props.onEnter(o,r),this.safeSetState({status:Zt},(function(){i.props.onEntering(o,r),i.onTransitionEnd(m,(function(){i.safeSetState({status:Qt},(function(){i.props.onEntered(o,r)}))}))}))):this.safeSetState({status:Qt},(function(){i.props.onEntered(o)}))},n.performExit=function(){var t=this,i=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:e().findDOMNode(this);i?(this.props.onExit(a),this.safeSetState({status:te},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Xt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Xt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,i=!0;return this.nextCallback=function(n){i&&(i=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(t,i){this.setNextCallback(i);var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=s[0],r=s[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Vt)return null;var e=this.props,i=e.children,n=(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,Kt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return k().createElement(Jt.Provider,{value:null},"function"==typeof i?i(t,n):k().cloneElement(k().Children.only(i),n))},i}(k().Component);function ie(){}ee.contextType=Jt,ee.propTypes={},ee.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ie,onEntering:ie,onEntered:ie,onExit:ie,onExiting:ie,onExited:ie},ee.UNMOUNTED=Vt,ee.EXITED=Xt,ee.ENTERING=Zt,ee.ENTERED=Qt,ee.EXITING=te;const ne=ee;var ae=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.remove(n):"string"==typeof i.className?i.className=Yt(i.className,n):i.setAttribute("class",Yt(i.className&&i.className.baseVal||"",n)));var i,n}))},se=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1];e.removeClasses(a,"exit"),e.addClass(a,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,i)},e.onEntering=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.addClass(a,s,"active"),e.props.onEntering&&e.props.onEntering(t,i)},e.onEntered=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.removeClasses(a,s),e.addClass(a,s,"done"),e.props.onEntered&&e.props.onEntered(t,i)},e.onExit=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"appear"),e.removeClasses(i,"enter"),e.addClass(i,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var i=e.resolveArguments(t)[0];e.addClass(i,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"exit"),e.addClass(i,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,i){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,i]},e.getClassNames=function(t){var i=e.props.classNames,n="string"==typeof i,a=n?(n&&i?i+"-":"")+t:i[t];return{baseClassName:a,activeClassName:n?a+"-active":i[t+"Active"],doneClassName:n?a+"-done":i[t+"Done"]}},e}$t(e,t);var i=e.prototype;return i.addClass=function(t,e,i){var n=this.getClassNames(e)[i+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===i&&a&&(n+=" "+a),"active"===i&&t&&qt(t),n&&(this.appliedClasses[e][i]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(i,n)||("string"==typeof i.className?i.className=i.className+" "+n:i.setAttribute("class",(i.className&&i.className.baseVal||"")+" "+n)));var i,n}))}(t,n))},i.removeClasses=function(t,e){var i=this.appliedClasses[e],n=i.base,a=i.active,s=i.done;this.appliedClasses[e]={},n&&ae(t,n),a&&ae(t,a),s&&ae(t,s)},i.render=function(){var t=this.props,e=(t.classNames,Kt(t,["classNames"]));return k().createElement(ne,Wt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(k().Component);se.defaultProps={classNames:""},se.propTypes={};const oe=se,re=({title:t=(0,n.__)("Save","gtm-kit"),className:e="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:i,useIsPending:o,useCanSave:r}=(0,a.useContext)(d);return(0,g.jsxs)(s.Button,{className:e,onClick:()=>i(),variant:"primary",disabled:o||!r,children:[r?t:(0,n.__)("Saved","gtm-kit"),o?(0,g.jsx)(s.Spinner,{}):""]})},le=()=>{const{useCanSave:t}=(0,a.useContext)(d);return(0,p.createElement)(oe,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,p.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,p.createElement)(re,null)))},me=({subject:t})=>{const e=!0===t||"on"===t,i=!0===e?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,p.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},e?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit"))},ce=(0,a.forwardRef)((({children:t,className:e="",...i},n)=>(0,g.jsx)("div",{...i,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 "+e,ref:n,children:t})));ce.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,g.jsxs)("div",{...a,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+n,children:[(0,g.jsx)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading",children:e}),i]}),ce.Content=({as:t="div",children:e,className:i="gtmkit-flex-auto",...n})=>(0,g.jsx)(t,{...n,className:i,children:e}),ce.Button=({url:t,destination:e,newTab:i=!1,text:n,group:a="",...o})=>{const r=ot();return(0,g.jsx)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5",children:(0,g.jsx)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{e&&t&&!1===i?window.gtmkitSettings.current_page===a?r(e,{replace:!0}):window.location.href=t+"#"+e:t?i?window.open(t):window.location.href=t:r(e,{replace:!0})},children:(0,g.jsx)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold",children:n})})})};const ge=ce,de=({title:t,data:e,className:i=""})=>{const{useSettings:s}=(0,a.useContext)(d);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,p.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] "+i},e.map(((t,e)=>!1===t.featured?null:(0,p.createElement)(ge,{key:e},(0,p.createElement)(ge.Header,{title:t.title},t.pill?(0,p.createElement)(me,{subject:s[t.group][t.option]}):null),(0,p.createElement)(ge.Content,null,t.text.map(((t,e)=>(0,p.createElement)("p",{key:e},t)))),(0,p.createElement)(ge.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}))))))},ue=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},pe=t=>((t,e,i)=>{const n=(t,i)=>({...i,title:t.title,to:t.path,group:t.group||i.group,option:t.option||i.option,text:[t.description],link:{...i.link,url:ue(e,""),destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>n(t[e][0],i))):Object.keys(t).map((e=>n(t[e],i)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,n.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Read More","gtm-kit")}}}}(t)),he=()=>{const{useSettings:t,useNotifications:e}=(0,a.useContext)(d),[i,s]=(0,a.useState)(window.gtmkitSettings.tutorials),o=e.metrics;return(0,a.useEffect)((()=>{s((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,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("General","gtm-kit")}),(0,g.jsxs)("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]",children:[(0,g.jsxs)(ge,{children:[(0,g.jsx)(ge.Header,{title:"Google Tag Manager Container",children:(0,g.jsx)(me,{subject:t.general.gtm_id&&t.general.container_active})}),(0,g.jsx)(ge.Content,{children:t.general.gtm_id&&t.general.container_active?(0,g.jsxs)("p",{children:[(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id]}):(0,g.jsx)("p",{children:(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit")})}),(0,g.jsx)(ge.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})]}),(0,g.jsxs)(ge,{children:[(0,g.jsx)(ge.Header,{title:(0,n.__)("Notifications","gtm-kit"),className:"!gtmkit-justify-start",children:(0,g.jsx)(Ft,{count:o.total,important:o.problem>0})}),(0,g.jsx)(ge.Content,{children:o.total?(0,g.jsx)(g.Fragment,{children:o.problem?(0,g.jsx)("p",{children:(0,n.__)("There are some problems that require your attention.","gtm-kit")}):(0,g.jsx)("p",{children:(0,n.__)("There are some notifications that may require your attention.","gtm-kit")})}):(0,g.jsx)("p",{children:(0,n.__)("No notifications at the moment.","gtm-kit")})}),(0,g.jsx)(ge.Button,{destination:"/notifications",text:(0,n.__)("See all notifications","gtm-kit")})]}),(0,g.jsxs)(ge,{children:[(0,g.jsx)(ge.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit"),children:(0,g.jsx)(me,{subject:t.general.analytics_active})}),(0,g.jsx)(ge.Content,{children:(0,g.jsx)("p",{children:(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit")})}),(0,g.jsx)(ge.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")})]})]}),(0,g.jsx)(de,{title:(0,n.__)("Tutorials","gtm-kit"),data:i}),(0,g.jsx)(de,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})]})},ke=({title:t,placeholder:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:a="general",optionName:o,isDisabled:r,useSettings:l,useUpdateStateSettings:m})=>(0,p.createElement)(s.TextControl,{label:t,placeholder:e,help:i,className:n,value:l[a][o],onChange:t=>m(a,o,t),disabled:r}),fe=({title:t,label:e,optionGroup:i="general",optionName:n,disabled:o=!1,useSettings:r,useUpdateStateSettings:l})=>{const m=(0,a.useId)();return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:(0,g.jsx)(s.BaseControl,{label:t,id:m,children:(0,g.jsx)(s.ToggleControl,{label:e,checked:!o&&r[i][n],onChange:()=>{l(i,n,!(r&&r[i][n]))},disabled:o})})})})},_e=({title:t,options:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:a="general",optionName:o,disabled:r,useSettings:l,useUpdateStateSettings:m})=>(0,p.createElement)(s.RadioControl,{label:t,options:e,help:i,className:n,selected:parseInt(l[a][o]),onChange:t=>m(a,o,t),disabled:r}),xe=({title:t,help:e,items:i=[],optionGroup:n="general",optionName:o,disabled:r=!1,useSettings:l,useUpdateStateSettings:m})=>{const c=(0,a.useId)(),d=Array.isArray(l[n][o])?l[n][o]:[],[u,p]=(0,a.useState)(d);return(0,a.useEffect)((()=>{const t=Array.isArray(l[n][o])?l[n][o]:[];p(t)}),[l]),(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:(0,g.jsx)(s.BaseControl,{label:t,help:e,id:c,children:i.map((t=>(0,g.jsx)(s.CheckboxControl,{label:t.name,disabled:r,checked:u.includes(t.role),onChange:e=>((t,e)=>{p((i=>{let a;return a=t?[...i,e]:i.filter((t=>t!==e)),m(n,o,a),a}))})(e,t.role)},t.role)))})})})},be=(0,a.forwardRef)((({children:t,className:e="",disabled:i=!1,...n},a)=>(0,g.jsx)("div",{...n,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(i?"gtmkit-opacity-60":""),ref:a,children:t})));be.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,g.jsxs)(t,{...a,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+n,children:[e,i]}),be.Content=({as:t="div",children:e,className:i="",...n})=>(0,g.jsx)(t,{...n,className:"gtmkit-px-8 gtmkit-py-6 "+i,children:e});const Se=be,ye=()=>{const{useSettings:t,useUpdateStateSettings:e,useUserRoles:i}=(0,a.useContext)(d),s=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),o=at();return(0,p.useEffect)((()=>{const t=new URLSearchParams(o.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[o]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Tag Manager container","gtm-kit")}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(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,g.jsx)(ke,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsx)("div",{id:"sgtm"}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:s,useSettings:t,useUpdateStateSettings:e})]}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,g.jsx)("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",children:(0,n.__)("Learn more","gtm-kit")})]}),(0,g.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Hosting server-side GTM containers","gtm-kit")}),(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,g.jsx)("a",{href:"https://jump.gtmkit.com/link/1-AC1E5",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,n.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsx)(Se.Content,{children:(0,g.jsx)(fe,{title:(0,n.__)("load_delayed_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:t,useUpdateStateSettings:e})}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Delay JavaScript execution","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("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",children:(0,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e})]}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Environments","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Override settings in wp-config.php","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("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",children:(0,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Exclude User Roles","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsx)(Se.Content,{children:(0,g.jsx)(xe,{title:(0,n.__)("Exclude user roles","gtm-kit"),help:(0,n.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:i,optionName:"exclude_user_roles",useSettings:t,useUpdateStateSettings:e})}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,n.__)("Warning!","gtm-kit")}),(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("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,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(_e,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(_e,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,g.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ve=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(d);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Post Data","gtm-kit")),(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.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,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}))))},Ee=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(d);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("User Data","gtm-kit")),(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,p.createElement)(Se.Content,{className:"gtmkit-space-y-2"},(0,p.createElement)("p",null,(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,p.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,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}))))},Ne=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(d),i=!t.general.gcm_default_settings;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Consent Mode","gtm-kit")),(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit")},(0,p.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,n.__)("Warning!","gtm-kit"))),(0,p.createElement)(Se.Content,{className:"gtmkit-space-y-2"},(0,p.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,p.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,p.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,p.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,p.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,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}))),(0,p.createElement)(Se,{disabled:i},(0,p.createElement)(Se.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,n.__)("Advanced","gtm-kit")),(0,p.createElement)(fe,{title:(0,n.__)("Redact Ads Data","gtm-kit"),label:(0,n.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(ke,{title:(0,n.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,n.__)("Enter time in milliseconds","gtm-kit"),useSettings:t,useUpdateStateSettings:e}))))},we=({label:t,value:e,tag:i})=>(0,p.createElement)("tr",null,(0,p.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,p.createElement)("strong",null,t)),(0,p.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===i?(0,p.createElement)("code",{className:"gtmkit-text-sm"},e):(0,p.createElement)("em",null,e))),je=()=>{const{useSiteData:t}=(0,a.useContext)(d),e=Object.values(t.shared_data);return(0,p.createElement)(p.Fragment,null,(0,p.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,p.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,p.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,p.createElement)("tbody",{className:"gtmkit-py-6"},e.map((function(t,e){return(0,p.createElement)(we,{key:e,label:t.label,value:t.value,tag:t.tag})})))))},Te=()=>{const{useSettings:t,useUpdateStateSettings:e,useSiteData:i}=(0,a.useContext)(d);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Misc","gtm-kit")}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(je,{}),(0,g.jsx)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")}),(0,g.jsx)(fe,{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",useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,g.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,n.__)("Version:","gtm-kit")," ",i.gtmkit_version,")"]})}),(0,g.jsx)(Se.Content,{children:(0,g.jsxs)("p",{children:[(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,g.jsx)("br",{}),(0,g.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,n.__)("The changelog","gtm-kit")}),(0,g.jsx)("br",{}),(0,g.jsx)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("The GitHub repository","gtm-kit")})]})})]})]})},Ce=()=>(0,p.createElement)(p.Fragment,null,(0,p.createElement)(de,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})),De=({pluginName:t})=>(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.sprintf)(
    22// translators: %s is the name of the plugin.
    33// translators: %s is the name of the plugin.
    4 (0,t.__)("%s is not active","gtm-kit"),e),className:"gtmkit-text-red-600"}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-6"},(0,t.sprintf)(
     4(0,n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,p.createElement)(Se.Content,null,(0,p.createElement)("p",{className:"gtmkit-mb-6"},(0,n.sprintf)(
    55// translators: %s is the name of the plugin.
    66// translators: %s is the name of the plugin.
    7 (0,t.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),e)),(0,u.createElement)(i.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,t.sprintf)(
     7(0,n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,p.createElement)(s.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)(
    88// translators: %s is the name of the plugin.
    99// translators: %s is the name of the plugin.
    10 (0,t.__)("Install %s","gtm-kit"),e)))),De=({title:n,options:a,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:s="general",optionName:r,disabled:l=!1,help:m="",notSet:g=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,e.useContext)(c),h=g?[{label:(0,t.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(i.SelectControl,{label:n,value:d&&d[s][r],options:h,className:o,onChange:t=>p(s,r,t),disabled:l,help:m}))},Ue=({pluginName:n,optionName:i,pluginInactive:a})=>{const{useSettings:o,useUpdateStateSettings:s}=(0,e.useContext)(c);return(0,u.createElement)(be,{disabled:a},(0,u.createElement)(be.Header,{title:(0,t.sprintf)(
     10(0,n.__)("Install %s","gtm-kit"),t)))),Ue=({title:t,options:e,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:r,disabled:l=!1,help:m="",notSet:c=!1})=>{const{useSettings:g,useUpdateStateSettings:u}=(0,a.useContext)(d),h=c?[{label:(0,n.__)("(not set)","gtm-kit"),value:""},...e]:e;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)(s.SelectControl,{label:t,value:g&&g[o][r],options:h,className:i,onChange:t=>u(o,r,t),disabled:l,help:m}))},Ae=({pluginName:t,optionName:e,pluginInactive:i})=>{const{useSettings:s,useUpdateStateSettings:o}=(0,a.useContext)(d);return(0,p.createElement)(Se,{disabled:i},(0,p.createElement)(Se.Header,{title:(0,n.sprintf)(
    1111// translators: %s is the name of the plugin.
    1212// translators: %s is the name of the plugin.
    13 (0,t.__)("%s Integration","gtm-kit"),n)}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.sprintf)(
     13(0,n.__)("%s Integration","gtm-kit"),t)}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{title:(0,n.sprintf)(
    1414// translators: %s is the name of the plugin.
    1515// translators: %s is the name of the plugin.
    16 (0,t.__)("Track %s","gtm-kit"),n),label:(0,t.sprintf)(
     16(0,n.__)("Track %s","gtm-kit"),t),label:(0,n.sprintf)(
    1717// translators: %s is the name of the plugin.
    1818// translators: %s is the name of the plugin.
    19 (0,t.__)("Activate the %s integration","gtm-kit"),n),optionGroup:"integrations",optionName:i,disabled:a,useSettings:o,useUpdateStateSettings:s})))},Ae=[{label:(0,t.__)("Retail","gtm-kit"),value:"retail"},{label:(0,t.__)("Education","gtm-kit"),value:"education"},{label:(0,t.__)("Flights","gtm-kit"),value:"flights"},{label:(0,t.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,t.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,t.__)("Local deals","gtm-kit"),value:"local"},{label:(0,t.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,t.__)("Travel","gtm-kit"),value:"travel"},{label:(0,t.__)("Custom","gtm-kit"),value:"custom"}],Ie={variant:{default:"gtmkit-feature-upsell--default",card:"gtmkit-feature-upsell--card"}},Oe=({children:e,shouldUpsell:n=!0,className:a="",variant:o="card",cardLink:s="",cardText:r=(0,t.__)("Unlock with premium","gtm-kit"),...l})=>n?(0,m.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Ie.variant[o],a),children:[(0,m.jsx)("div",{className:"gtmkit-space-y-8 gtmkit-opacity-30",children:e}),(0,m.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,m.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,m.jsx)(i.Button,{as:"a",className:"gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-lg fgtmkit-font-bold gtmkit-py-6 gtmkit-px-8 is-primary",variant:"upsell",href:s,target:"_blank",rel:"noopener",...l,children:r})})]}):e,Re=()=>{const{useSettings:n,useUpdateStateSettings:i,isPremium:a}=(0,e.useContext)(c),o="WooCommerce",s=!window.gtmkitSettings.plugins.woocommerce,r=s||!n.integrations.woocommerce_integration,l=r||!a||!n.general.sgtm_domain,g=l||!n.premium.woocommerce_webhooks;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("WooCommerce","gtm-kit")}),s?(0,m.jsx)(Ce,{pluginName:o}):null,(0,m.jsx)(Ue,{pluginName:o,optionName:"woocommerce_integration",pluginInactive:s}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Basic settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(De,{title:(0,t.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,t.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:r}),(0,m.jsx)(ke,{title:(0,t.__)("Use SKU instead of ID","gtm-kit"),label:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Exclude tax","gtm-kit"),label:(0,t.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Exclude shipping from revenue","gtm-kit"),label:(0,t.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("User Data","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsx)(be.Content,{children:(0,m.jsx)(ke,{title:(0,t.__)("Include customer data","gtm-kit"),label:(0,t.__)('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:r,useSettings:n,useUpdateStateSettings:i})}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("User-Provided Data","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("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,m.jsx)("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",children:(0,t.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,m.jsx)(Oe,{shouldUpsell:!a,cardLink:"https://jump.gtmkit.com/link/2-30DDC",children:(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Webhooks for server-side tracking","gtm-kit"),children:a?(0,m.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,m.jsxs)(be.Content,{children:[l?(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm",children:(0,t.__)("Go to sGTM settings","gtm-kit")})]}):(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging",children:(0,t.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsx)(ke,{title:(0,t.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,t.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Purchase webhook","gtm-kit"),label:(0,t.__)("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:g,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Refund webhook","gtm-kit"),label:(0,t.__)("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:g,useSettings:n,useUpdateStateSettings:i})]})]})}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Event customization","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(fe,{title:"view_item_list (with product filter)",options:[{label:(0,t.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,t.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"view_item (variable product)",options:[{label:(0,t.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,t.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,t.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,t.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"add_shipping_info ",options:[{label:(0,t.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,t.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,t.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,t.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"add_payment_info ",options:[{label:(0,t.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,t.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,t.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,t.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Google Ads Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(De,{title:(0,t.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ae,help:(0,t.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,m.jsx)(he,{title:(0,t.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,t.__)("Enter prefix","gtm-kit"),help:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsx)(Oe,{shouldUpsell:!a,cardLink:"https://jump.gtmkit.com/link/2-30DDC",children:(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Custom CSS Selectors","gtm-kit"),children:a?(0,m.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,m.jsx)(he,{title:(0,t.__)("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,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("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,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i})]})]})}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Advanced Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(ke,{title:(0,t.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Include permalink structure","gtm-kit"),label:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Include path of pages","gtm-kit"),label:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i})]})]})]})},Le=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c),a="Contact Form 7",o=!window.gtmkitSettings.plugins.cf7,s=o||!n.integrations.cf7_integration;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Contact Form 7","gtm-kit")),o?(0,u.createElement)(Ce,{pluginName:a}):null,(0,u.createElement)(Ue,{pluginName:a,optionName:"cf7_integration",pluginInactive:o}),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Basic Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(fe,{title:(0,t.__)("Load JavaScript","gtm-kit"),options:[{label:(0,t.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,t.__)("On all pages","gtm-kit"),value:2}],help:(0,t.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:s,useSettings:n,useUpdateStateSettings:i}))))},Me=()=>{const n="Easy Digital Downloads",i=!window.gtmkitSettings.plugins.edd,{useSettings:a,useUpdateStateSettings:o}=(0,e.useContext)(c),s=i||!a.integrations.edd_integration;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Easy Digital Downloads","gtm-kit")),i?(0,u.createElement)(Ce,{pluginName:n}):null,(0,u.createElement)(Ue,{pluginName:n,optionName:"edd_integration",pluginInactive:i}),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Basic Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Use SKU instead of ID","gtm-kit"),label:(0,t.__)("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:s,useSettings:a,useUpdateStateSettings:o}),(0,u.createElement)(ke,{title:(0,t.__)("Exclude tax","gtm-kit"),label:(0,t.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:s,useSettings:a,useUpdateStateSettings:o}),(0,u.createElement)(ke,{title:(0,t.__)("Include customer data","gtm-kit"),label:(0,t.__)('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:s,useSettings:a,useUpdateStateSettings:o}))),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Google Ads Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(De,{title:(0,t.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ae,help:(0,t.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:s}),(0,u.createElement)(he,{title:(0,t.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,t.__)("Enter prefix","gtm-kit"),help:(0,t.__)("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:s,useSettings:a,useUpdateStateSettings:o}))),(0,u.createElement)(be,{disabled:i},(0,u.createElement)(be.Header,{title:(0,t.__)("Advanced settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,t.__)("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:s,useSettings:a,useUpdateStateSettings:o}))))},Pe=window.gtmkitSettings.templates||{},Ge=(Object.keys(Pe).map((function(e){const n=Pe[e][0];return{title:n.title,to:n.path,pill:!1,text:[n.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+n.path,text:(0,t.__)("Get template","gtm-kit")}}})),()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Getting Started","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("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,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,u.createElement)("p",null,(0,t.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,u.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,t.__)("Read the guide","gtm-kit"))))),(0,u.createElement)(ue,{title:(0,t.__)("Templates","gtm-kit"),data:de("templates")}))),Fe=({title:e,description:n,link:i,templates:a})=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:e}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},n),i&&i.url&&i.link_text?(0,u.createElement)("div",null,(0,u.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,a&&a.length>0?(0,u.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,u.createElement)("div",null,(0,u.createElement)("h4",{className:"gtmkit-font-bold"},(0,t.__)("GTM container import files:","gtm-kit")),(0,u.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},a.map((function(t){return(0,u.createElement)("li",null,(0,u.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,u.createElement)("div",null,(0,u.createElement)("h4",{className:"gtmkit-font-bold"},(0,t.__)("Necessary modifications:","gtm-kit")),(0,u.createElement)("ul",{className:"gtmkit-text-sm"},a.map((function(t){return(0,u.createElement)("li",null,t.help_text)}))))):null))),He=({sectionData:t})=>{const e=t.collections;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},t.title),Object.keys(e).map((function(t){return(0,u.createElement)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates})})))},Be=()=>{const e=at(),n=window.gtmkitSettings.tutorials;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Help","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Need help?","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("We are here to help if you have any questions.","gtm-kit"),(0,u.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{e("/support",{replace:!0})}},(0,t.__)("See support options","gtm-kit"))))),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Tutorials","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("ul",null,n.map(((t,e)=>(0,u.createElement)("li",{key:e,className:"gtmkit-mb-4"},(0,u.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,e)=>(0,u.createElement)("div",{key:e,className:"gtmkit-text-sm"},t))))))))))},We=()=>{const{useIsSending:n,useSiteData:a,useUpdateSupportTicket:o,useSupportTicket:s,useSendSystemData:r,useIsSystemDataSent:l,useSystemDataMessage:g,isPremium:u}=(0,e.useContext)(c);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Get support","gtm-kit")}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Support options","gtm-kit")}),(0,m.jsx)(be.Content,{children:(0,m.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[u&&(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,t.__)("WooCommerce Premium Support","gtm-kit")})}),(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,t.__)("WordPress.org Support Forum","gtm-kit")})}),(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,t.__)("GITHub repository","gtm-kit")})}),(0,m.jsxs)("li",{children:[(0,m.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,t.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,m.jsx)(be.Content,{children:l?(0,m.jsx)("p",{className:"gtmkit-mb-2",children:g}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-2",children:(0,t.__)("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,m.jsx)(i.TextControl,{label:(0,m.jsxs)("span",{className:"gtmkit-text-red-600",children:[g," "]}),placeholder:(0,t.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:s,onChange:t=>o(t)}),(0,m.jsxs)(i.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:()=>{r()},disabled:!s.toUpperCase().startsWith("FS"),children:[(0,m.jsx)("span",{children:(0,t.__)("Send system data","gtm-kit")}),n?(0,m.jsx)(i.Spinner,{}):""]})]})})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,m.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,t.__)("Version:","gtm-kit")," ",a.gtmkit_version,")"]})}),(0,m.jsx)(be.Content,{children:(0,m.jsxs)("p",{children:[(0,t.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,m.jsx)("br",{}),(0,m.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,t.__)("The changelog","gtm-kit")}),(0,m.jsx)("br",{}),(0,m.jsx)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,t.__)("The GitHub repository","gtm-kit")})]})})]})]})};const Ke=t=>{const{Fill:e,Slot:n}=(0,i.createSlotFill)(t),a=({children:t})=>(0,u.createElement)(e,null,t);return a.Slot=({fillProps:t})=>(0,u.createElement)(n,{fillProps:t},(t=>t.length?t:null)),a},ze=Ke("GravityForms"),Ye=(Ke("WooWebhooks"),Ke("WooCustomSelectors"),({integrationID:t,pluginName:n})=>{const{useSettings:i,useUpdateStateSettings:a}=(0,e.useContext)(c),o=!window.gtmkitSettings.plugins[t],s=o||!i.integrations[t+"_integration"];return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},n),o?(0,u.createElement)(Ce,{pluginName:n}):null,(0,u.createElement)(Ue,{pluginName:n,optionName:t+"_integration",pluginInactive:o}),"gf"===t?(0,u.createElement)(ze.Slot,{fillProps:{settingsInactive:s,useSettings:i,useUpdateStateSettings:a}}):null)}),$e=window.wp.plugins,Je=(0,e.forwardRef)((function({icon:t,size:n=24,...i},a){return(0,e.cloneElement)(t,{width:n,height:n,...i,ref:a})})),qe=window.wp.primitives,Ve=(0,m.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(qe.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Xe=(0,m.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(qe.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Ze=n(838),Qe=n.n(Ze);const tn=({title:n,type:a,hideEmpty:o=!0})=>{const{useNotifications:s,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,e.useContext)(c),g=s[a],u=Object.entries(g.active),d=Object.entries(g.dismissed);if(0===g.total&&o)return null;const[p,h]=(0,e.useState)(!1),k=(Object.entries(g.active),Object.entries(g.dismissed),(e,n,a)=>(0,m.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":a},{"gtmkit-border-2":!a}),children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:n.header}),(0,m.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Qe().sanitize(n.message)}})]}),(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(n.id,a?"restore":"dismiss"),children:[(0,m.jsx)("span",{className:"gtmkit-text-sm",children:(0,t.__)(a?"Restore":"Dismiss","gtm-kit")}),l?(0,m.jsx)(i.Spinner,{}):null]})]},e));return(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:n,children:(0,m.jsx)(Ft,{count:g.active.length,important:"problem"===a})}),(0,m.jsxs)(be.Content,{className:"gtmkit-space-y-4",children:[u.map((([t,e])=>k(t,e,!1))),d.length>0&&(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,m.jsx)("span",{children:(0,t.sprintf)(
     19(0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:e,disabled:i,useSettings:s,useUpdateStateSettings:o})))},Ie=[{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"}],Oe={variant:{default:"gtmkit-feature-upsell--default",card:"gtmkit-feature-upsell--card"}},Re=({children:t,shouldUpsell:e=!0,className:i="",variant:a="card",cardLink:o="",cardText:r=(0,n.__)("Unlock with premium","gtm-kit"),...l})=>{if(!e)return t;const m=o||ue("upgrades","upgrades");return(0,g.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Oe.variant[a],i),children:[(0,g.jsx)("div",{className:"gtmkit-space-y-8 gtmkit-opacity-30",children:t}),(0,g.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,g.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,g.jsx)(s.Button,{as:"a",className:"gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-lg fgtmkit-font-bold gtmkit-py-6 gtmkit-px-8 is-primary",variant:"upsell",onClick:()=>{window.location.href=m},target:"_blank",rel:"noopener",...l,children:r})})]})},Le=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:i}=(0,a.useContext)(d),s="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,r=o||!t.integrations.woocommerce_integration,l=r||!i||!t.general.sgtm_domain,m=l||!t.premium.woocommerce_webhooks;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("WooCommerce","gtm-kit")}),o?(0,g.jsx)(De,{pluginName:s}):null,(0,g.jsx)(Ae,{pluginName:s,optionName:"woocommerce_integration",pluginInactive:o}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Basic settings","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(Ue,{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:r}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsx)(Se.Content,{children:(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e})}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("User-Provided Data","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("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",children:(0,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,g.jsx)(Re,{shouldUpsell:!i,children:(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Webhooks for server-side tracking","gtm-kit"),children:i?(0,g.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,g.jsxs)(Se.Content,{children:[l?(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,g.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("general","container?focus=sgtm"),children:(0,n.__)("Go to sGTM settings","gtm-kit")})]}):(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,g.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("templates","server-side-tagging"),children:(0,n.__)("Go to GTM Templates","gtm-kit")})]}),(0,g.jsx)(fe,{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:l,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:m,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:m,useSettings:t,useUpdateStateSettings:e})]})]})}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Event customization","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(_e,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(_e,{title:"view_item (variable product)",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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(_e,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(_e,{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:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(Ue,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ie,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,g.jsx)(ke,{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:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsx)(Re,{shouldUpsell:!i,children:(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit"),children:i?(0,g.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e})]})]})}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Advanced Settings","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e})]})]})]})},Me=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(d),i="Contact Form 7",s=!window.gtmkitSettings.plugins.cf7,o=s||!t.integrations.cf7_integration;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Contact Form 7","gtm-kit")),s?(0,p.createElement)(De,{pluginName:i}):null,(0,p.createElement)(Ae,{pluginName:i,optionName:"cf7_integration",pluginInactive:s}),(0,p.createElement)(Se,{disabled:o},(0,p.createElement)(Se.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(_e,{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,useSettings:t,useUpdateStateSettings:e}))))},Pe=()=>{const t="Easy Digital Downloads",e=!window.gtmkitSettings.plugins.edd,{useSettings:i,useUpdateStateSettings:s}=(0,a.useContext)(d),o=e||!i.integrations.edd_integration;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Easy Digital Downloads","gtm-kit")),e?(0,p.createElement)(De,{pluginName:t}):null,(0,p.createElement)(Ae,{pluginName:t,optionName:"edd_integration",pluginInactive:e}),(0,p.createElement)(Se,{disabled:o},(0,p.createElement)(Se.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{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,useSettings:i,useUpdateStateSettings:s}),(0,p.createElement)(fe,{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,useSettings:i,useUpdateStateSettings:s}),(0,p.createElement)(fe,{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,useSettings:i,useUpdateStateSettings:s}))),(0,p.createElement)(Se,{disabled:o},(0,p.createElement)(Se.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(Ue,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ie,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,p.createElement)(ke,{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,useSettings:i,useUpdateStateSettings:s}))),(0,p.createElement)(Se,{disabled:e},(0,p.createElement)(Se.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{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,useSettings:i,useUpdateStateSettings:s}))))},Ge=()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Getting Started","gtm-kit")}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(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,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")}),(0,g.jsxs)("p",{children:[(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,g.jsx)("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",children:(0,n.__)("Read the guide","gtm-kit")})]})]})]}),(0,g.jsx)(de,{title:(0,n.__)("Templates","gtm-kit"),data:pe("templates")})]}),Fe=({title:t,description:e,link:i,templates:a})=>(0,p.createElement)(p.Fragment,null,(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:t}),(0,p.createElement)(Se.Content,null,(0,p.createElement)("p",{className:"gtmkit-mb-4"},e),i&&i.url&&i.link_text?(0,p.createElement)("div",null,(0,p.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,a&&a.length>0?(0,p.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,p.createElement)("div",null,(0,p.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,p.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},a.map((function(t){return(0,p.createElement)("li",null,(0,p.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,p.createElement)("div",null,(0,p.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,p.createElement)("ul",{className:"gtmkit-text-sm"},a.map((function(t){return(0,p.createElement)("li",null,t.help_text)}))))):null))),He=({sectionData:t})=>{const e=t.collections;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},t.title),Object.keys(e).map((function(t){return(0,p.createElement)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates})})))},Be=()=>{const t=ot(),e=window.gtmkitSettings.tutorials;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Help","gtm-kit")),(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,p.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,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)("ul",null,e.map(((t,e)=>(0,p.createElement)("li",{key:e,className:"gtmkit-mb-4"},(0,p.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,e)=>(0,p.createElement)("div",{key:e,className:"gtmkit-text-sm"},t))))))))))},We=()=>{const{useIsSending:t,useUpdateSupportTicket:e,useSupportTicket:i,useSendSystemData:o,useIsSystemDataSent:r,useSystemDataMessage:l,isPremium:m}=(0,a.useContext)(d);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Get support","gtm-kit")}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,g.jsx)(Se.Content,{children:(0,g.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[m&&(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,n.__)("WooCommerce Premium Support","gtm-kit")})}),(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,n.__)("WordPress.org Support Forum","gtm-kit")})}),(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("GITHub repository","gtm-kit")})}),(0,g.jsxs)("li",{children:[(0,g.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,n.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,g.jsx)(Se.Content,{children:r?(0,g.jsx)("p",{className:"gtmkit-mb-2",children:l}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{className:"gtmkit-mb-2",children:(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,g.jsx)(s.TextControl,{label:(0,g.jsxs)("span",{className:"gtmkit-text-red-600",children:[l," "]}),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:i,onChange:t=>e(t)}),(0,g.jsxs)(s.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:()=>{o()},disabled:!i.toUpperCase().startsWith("FS"),children:[(0,g.jsx)("span",{children:(0,n.__)("Send system data","gtm-kit")}),t?(0,g.jsx)(s.Spinner,{}):""]})]})})]})]})},Ke=t=>{const{Fill:e,Slot:i}=(0,s.createSlotFill)(t),n=({children:t})=>(0,p.createElement)(e,null,t);return n.Slot=({fillProps:t})=>(0,p.createElement)(i,{fillProps:t},(t=>t.length?t:null)),n},ze=Ke("GravityForms"),$e=(Ke("WooWebhooks"),Ke("WooCustomSelectors"),({integrationID:t,pluginName:e})=>{const{useSettings:i,useUpdateStateSettings:n}=(0,a.useContext)(d),s=!window.gtmkitSettings.plugins[t],o=s||!i.integrations[t+"_integration"];return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:e}),s?(0,g.jsx)(De,{pluginName:e}):null,(0,g.jsx)(Ae,{pluginName:e,optionName:t+"_integration",pluginInactive:s}),"gf"===t?(0,g.jsx)(ze.Slot,{fillProps:{settingsInactive:o,useSettings:i,useUpdateStateSettings:n}}):null]})}),Ye=window.wp.plugins,Je=(0,a.forwardRef)((function({icon:t,size:e=24,...i},n){return(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n})})),qe=window.wp.primitives,Ve=(0,g.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)(qe.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Xe=(0,g.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)(qe.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Ze=i(838),Qe=i.n(Ze);const ti=({title:t,type:e,hideEmpty:i=!0})=>{const{useNotifications:o,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,a.useContext)(d),m=o[e],c=Object.entries(m.active),u=Object.entries(m.dismissed);if(0===m.total&&i)return null;const[p,h]=(0,a.useState)(!1),k=(t,e,i)=>(0,g.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":i},{"gtmkit-border-2":!i}),children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:e.header}),(0,g.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Qe().sanitize(e.message)}})]}),(0,g.jsxs)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(e.id,i?"restore":"dismiss"),children:[(0,g.jsx)("span",{className:"gtmkit-text-sm",children:i?(0,n.__)("Restore","gtm-kit"):(0,n.__)("Dismiss","gtm-kit")}),l?(0,g.jsx)(s.Spinner,{}):null]})]},t);return(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:t,children:(0,g.jsx)(Ft,{count:m.active.length,important:"problem"===e})}),(0,g.jsxs)(Se.Content,{className:"gtmkit-space-y-4",children:[c.map((([t,e])=>k(t,e,!1))),u.length>0&&(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,g.jsx)("span",{children:(0,n.sprintf)(
    2020// translators: %d is number %s can be either 'problem' or 'notification'.
    2121// translators: %d is number %s can be either 'problem' or 'notification'.
    22 (0,t._n)("You have %d hidden %s:","You have %d hidden %ss:",d.length,"gtm-kit"),d.length,a)}),(0,m.jsx)(Je,{icon:p?Ve:Xe,size:48})]}),(0,m.jsx)("div",{className:Mt()("gtmkit-border","gtmkit-border-t-0","gtmkit-mb-4","gtmkit-bg-color-background-disabled",{"gtmkit-hidden":!p}),children:d.map((([t,e])=>k(t,e,!0)))})]}),0===g.total&&(0,m.jsx)("p",{children:(0,t.__)("No notifications at the moment.","gtm-kit")})]})]})},en=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Misc","gtm-kit")}),(0,m.jsx)(tn,{title:(0,t.__)("Problems","gtm-kit"),type:"problem"}),(0,m.jsx)(tn,{title:(0,t.__)("Notifications","gtm-kit"),type:"notice",hideEmpty:!1})]}),nn=({className:t=""})=>(0,m.jsx)(i.Icon,{icon:()=>(0,m.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",className:t,children:(0,m.jsx)("path",{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})}),an=()=>{const{useIsSendingLicenseKey:n}=(0,e.useContext)(c),a=window.gtmkitSettings.opportunities;let o=[];Object.entries(a).length&&(o=Object.entries(a.upgrades));const s=a.plugins||{},r=a.theme||{},l=Object.entries(s),g=!!Object.keys(r).length;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Upgrades","gtm-kit")}),o.map((([e,a])=>(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:a.name}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:a.header}),a.description&&(0,m.jsx)("p",{className:"gtmkit-mb-4",children:a.description}),a.usp.length>0&&(0,m.jsx)("ul",{className:"gtmkit-text-sm gtmkit-mb-8",children:a.usp.map((t=>(0,m.jsxs)("li",{className:"gtmkit-flex gtmkit-items-center",children:[(0,m.jsx)(nn,{})," ",t]})))}),(l.length>0||g)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:(0,t.__)("Enhanced Compatibility","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-mb-6",children:(0,t.__)("Based on the currently active theme and plugins, you will gain the following features tailored specifically to your setup if you upgrade to the GTM Kit Woo Add-On:","gtm-kit")})]}),g&&(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,m.jsxs)("span",{className:"gtmkit-font-bold",children:[r.name,":"]})," ",(0,t.__)("Your theme is supported with enhanced compatibility.","gtm-kit")," ",r.description]}),l.length>0&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h3",{className:"gtmkit-font-bold gtmkit-text-sm gtmkit-mb-4",children:(0,t.__)("Enhanced Plugin Support:","gtm-kit")}),(0,m.jsx)("ul",{className:"gtmkit-text-sm",children:l.map((([t,e])=>(0,m.jsxs)("li",{className:"gtmkit-mb-4",children:[e.name," - ",e.description]},t)))})]}),a.url&&(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base gtmkit-mt-4",onClick:()=>{window.location.href=a.url},children:[(0,m.jsx)("span",{children:a.button_text||(0,t.__)("Learn More","gtm-kit")}),n?(0,m.jsx)(i.Spinner,{}):""]})]})]},e)))]})},on={integrations:(0,t.__)("Integrations","gtm-kit"),templates:(0,t.__)("Google Tag Manager Templates","gtm-kit"),help:(0,t.__)("Help","gtm-kit")},sn=()=>{const{useSettings:n}=(0,e.useContext)(c),a=window.gtmkitSettings,o=a.currentPage,s=function({page:e}){switch(e){case"general":return[{to:"general",title:(0,t.__)("Dashboard","gtm-kit")},{to:"container",title:(0,t.__)("Container","gtm-kit")},{to:"post-data",title:(0,t.__)("Post data","gtm-kit")},{to:"user-data",title:(0,t.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,t.__)("Google Consent Mode","gtm-kit")},{to:"notifications",title:(0,t.__)("Notifications","gtm-kit")},{to:"misc",title:(0,t.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,t.__)("Integrations","gtm-kit")},...de("integrations")];case"upgrades":return[{to:"upgrades",title:(0,t.__)("Upgrades","gtm-kit")}];case"templates":return[{to:"templates",title:(0,t.__)("Templates","gtm-kit")},...de("templates")];case"help":return[{to:"help",title:(0,t.__)("Help","gtm-kit")},{to:"support",title:(0,t.__)("Support","gtm-kit")}]}}({page:o}),r=a.templates,l=a.integrations,g=on[o]||(0,t.__)("Settings","gtm-kit");return Object.keys(n).length?(0,m.jsxs)(i.SlotFillProvider,{children:[(0,m.jsx)(Rt,{title:g}),(0,m.jsx)(Bt,{NavList:s}),(0,m.jsx)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base",children:(0,m.jsxs)(_t,{children:[(0,m.jsx)(kt,{exact:!0,path:"/general",element:(0,m.jsx)(pe,{})}),(0,m.jsx)(kt,{exact:!0,path:"/container",element:(0,m.jsx)(Se,{})}),(0,m.jsx)(kt,{exact:!0,path:"/post-data",element:(0,m.jsx)(ye,{})}),(0,m.jsx)(kt,{exact:!0,path:"/user-data",element:(0,m.jsx)(ve,{})}),(0,m.jsx)(kt,{exact:!0,path:"/google-consent-mode",element:(0,m.jsx)(Ee,{})}),(0,m.jsx)(kt,{exact:!0,path:"/notifications",element:(0,m.jsx)(en,{})}),(0,m.jsx)(kt,{exact:!0,path:"/misc",element:(0,m.jsx)(je,{})}),(0,m.jsx)(kt,{exact:!0,path:"/integrations",element:(0,m.jsx)(Te,{})}),(0,m.jsx)(kt,{exact:!0,path:"/woocommerce",element:(0,m.jsx)(Re,{})}),(0,m.jsx)(kt,{exact:!0,path:"/cf7",element:(0,m.jsx)(Le,{})}),(0,m.jsx)(kt,{exact:!0,path:"/edd",element:(0,m.jsx)(Me,{})}),l&&Object.keys(l).map((function(t){if("add-on"===l[t].type)return(0,m.jsx)(kt,{exact:!0,path:t,element:(0,m.jsx)(Ye,{integrationID:t,pluginName:l[t].title})},t)})),(0,m.jsx)(kt,{exact:!0,path:"/upgrades",element:(0,m.jsx)(an,{})}),(0,m.jsx)(kt,{exact:!0,path:"/templates",element:(0,m.jsx)(Ge,{})}),r&&Object.keys(r).map((function(t){return(0,m.jsx)(kt,{exact:!0,path:t,element:(0,m.jsx)(He,{sectionData:r[t][0]})},t)})),(0,m.jsx)(kt,{exact:!0,path:"/help",element:(0,m.jsx)(Be,{})}),(0,m.jsx)(kt,{exact:!0,path:"/support",element:(0,m.jsx)(We,{})}),(0,m.jsx)(kt,{path:"/",element:(0,m.jsx)(ht,{replace:!0,to:"/"+o})})]})}),(0,m.jsx)(le,{}),(0,m.jsx)($e.PluginArea,{})]}):(0,m.jsx)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,m.jsx)(i.Spinner,{})})},rn=()=>(0,m.jsx)(Tt,{basename:"/",children:(0,m.jsx)(g,{children:(0,m.jsx)(sn,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.render)((0,m.jsx)(rn,{}),t)}))})()})();
     22(0,n._n)("You have %d hidden %s:","You have %d hidden %ss:",u.length,"gtm-kit"),u.length,e)}),(0,g.jsx)(Je,{icon:p?Ve:Xe,size:48})]}),(0,g.jsx)("div",{className:Mt()("gtmkit-border","gtmkit-border-t-0","gtmkit-mb-4","gtmkit-bg-color-background-disabled",{"gtmkit-hidden":!p}),children:u.map((([t,e])=>k(t,e,!0)))})]}),0===m.total&&(0,g.jsx)("p",{children:(0,n.__)("No notifications at the moment.","gtm-kit")})]})]})},ei=()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Misc","gtm-kit")}),(0,g.jsx)(ti,{title:(0,n.__)("Problems","gtm-kit"),type:"problem"}),(0,g.jsx)(ti,{title:(0,n.__)("Notifications","gtm-kit"),type:"notice",hideEmpty:!1})]}),ii=({className:t=""})=>(0,g.jsx)(s.Icon,{icon:()=>(0,g.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",className:t,children:(0,g.jsx)("path",{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})}),ni=()=>{const{useIsSendingLicenseKey:t}=(0,a.useContext)(d),e=window.gtmkitSettings.opportunities;let i=[];Object.entries(e).length&&(i=Object.entries(e.upgrades));const o=e.plugins||{},r=e.theme||{},l=Object.entries(o),m=!!Object.keys(r).length;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Upgrades","gtm-kit")}),i.map((([e,i])=>(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:i.name}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:i.header}),i.description&&(0,g.jsx)("p",{className:"gtmkit-mb-4",children:i.description}),i.usp.length>0&&(0,g.jsx)("ul",{className:"gtmkit-text-sm gtmkit-mb-8",children:i.usp.map((t=>(0,g.jsxs)("li",{className:"gtmkit-flex gtmkit-items-center",children:[(0,g.jsx)(ii,{})," ",t]})))}),(l.length>0||m)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:(0,n.__)("Enhanced Compatibility","gtm-kit")}),(0,g.jsx)("p",{className:"gtmkit-mb-6",children:(0,n.__)("Based on the currently active theme and plugins, you will gain the following features tailored specifically to your setup if you upgrade to the GTM Kit Woo Add-On:","gtm-kit")})]}),m&&(0,g.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,g.jsxs)("span",{className:"gtmkit-font-bold",children:[r.name,":"]})," ",(0,n.__)("Your theme is supported with enhanced compatibility.","gtm-kit")," ",r.description]}),l.length>0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h3",{className:"gtmkit-font-bold gtmkit-text-sm gtmkit-mb-4",children:(0,n.__)("Enhanced Plugin Support:","gtm-kit")}),(0,g.jsx)("ul",{className:"gtmkit-text-sm",children:l.map((([t,e])=>(0,g.jsxs)("li",{className:"gtmkit-mb-4",children:[e.name," -"," ",e.description]},t)))})]}),i.url&&(0,g.jsxs)(s.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base gtmkit-mt-4",onClick:()=>{window.location.href=i.url},children:[(0,g.jsx)("span",{children:i.button_text||(0,n.__)("Learn More","gtm-kit")}),t?(0,g.jsx)(s.Spinner,{}):""]})]})]},e)))]})},ai={integrations:(0,n.__)("Integrations","gtm-kit"),templates:(0,n.__)("Google Tag Manager Templates","gtm-kit"),help:(0,n.__)("Help","gtm-kit")},si=()=>{const{useSettings:t}=(0,a.useContext)(d),e=window.gtmkitSettings,i=e.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:"notifications",title:(0,n.__)("Notifications","gtm-kit")},{to:"misc",title:(0,n.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,n.__)("Integrations","gtm-kit")},...pe("integrations")];case"upgrades":return[{to:"upgrades",title:(0,n.__)("Upgrades","gtm-kit")}];case"templates":return[{to:"templates",title:(0,n.__)("Templates","gtm-kit")},...pe("templates")];case"help":return[{to:"help",title:(0,n.__)("Help","gtm-kit")},{to:"support",title:(0,n.__)("Support","gtm-kit")}]}}({page:i}),r=e.templates,l=e.integrations,m=ai[i]||(0,n.__)("Settings","gtm-kit");return Object.keys(t).length?(0,g.jsxs)(s.SlotFillProvider,{children:[(0,g.jsx)(Rt,{title:m}),(0,g.jsx)(Bt,{NavList:o}),(0,g.jsx)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base",children:(0,g.jsxs)(bt,{children:[(0,g.jsx)(_t,{exact:!0,path:"/general",element:(0,g.jsx)(he,{})}),(0,g.jsx)(_t,{exact:!0,path:"/container",element:(0,g.jsx)(ye,{})}),(0,g.jsx)(_t,{exact:!0,path:"/post-data",element:(0,g.jsx)(ve,{})}),(0,g.jsx)(_t,{exact:!0,path:"/user-data",element:(0,g.jsx)(Ee,{})}),(0,g.jsx)(_t,{exact:!0,path:"/google-consent-mode",element:(0,g.jsx)(Ne,{})}),(0,g.jsx)(_t,{exact:!0,path:"/notifications",element:(0,g.jsx)(ei,{})}),(0,g.jsx)(_t,{exact:!0,path:"/misc",element:(0,g.jsx)(Te,{})}),(0,g.jsx)(_t,{exact:!0,path:"/integrations",element:(0,g.jsx)(Ce,{})}),(0,g.jsx)(_t,{exact:!0,path:"/woocommerce",element:(0,g.jsx)(Le,{})}),(0,g.jsx)(_t,{exact:!0,path:"/cf7",element:(0,g.jsx)(Me,{})}),(0,g.jsx)(_t,{exact:!0,path:"/edd",element:(0,g.jsx)(Pe,{})}),l&&Object.keys(l).map((function(t){if("add-on"===l[t].type)return(0,g.jsx)(_t,{exact:!0,path:t,element:(0,g.jsx)($e,{integrationID:t,pluginName:l[t].title})},t)})),(0,g.jsx)(_t,{exact:!0,path:"/upgrades",element:(0,g.jsx)(ni,{})}),(0,g.jsx)(_t,{exact:!0,path:"/templates",element:(0,g.jsx)(Ge,{})}),r&&Object.keys(r).map((function(t){return(0,g.jsx)(_t,{exact:!0,path:t,element:(0,g.jsx)(He,{sectionData:r[t][0]})},t)})),(0,g.jsx)(_t,{exact:!0,path:"/help",element:(0,g.jsx)(Be,{})}),(0,g.jsx)(_t,{exact:!0,path:"/support",element:(0,g.jsx)(We,{})}),(0,g.jsx)(_t,{path:"/",element:(0,g.jsx)(ft,{replace:!0,to:"/"+i})})]})}),(0,g.jsx)(le,{}),(0,g.jsx)(Ye.PluginArea,{})]}):(0,g.jsx)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,g.jsx)(s.Spinner,{})})},oi=()=>(0,g.jsx)(Tt,{basename:"/",children:(0,g.jsx)(u,{children:(0,g.jsx)(si,{})})});document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById(window.gtmkitSettings.rootId);null!=e&&(0,t.createRoot)(e).render((0,g.jsx)(oi,{}))}))})()})();
  • gtm-kit/tags/2.0.1/assets/admin/wizard.asset.php

    r3149785 r3156080  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '392b7bf946ae0bc997db');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '9c064e7aad56a83072a3');
  • gtm-kit/tags/2.0.1/assets/admin/wizard.js

    r3149785 r3156080  
    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 s=t.n(r);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const o=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},l=window.wp.i18n,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.notifications=e.payload.notifications,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,l.__)("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,l.__)("An error occurred.","gtm-kit"):(0,l.__)("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;break;case"SEND_NOTIFICATION_STATUS_BEFORE":a.isUpdatingNotifications=e.payload.isUpdatingNotifications||a.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":a.isUpdatingNotifications=!1,a.isNotificationStatusSent=e.payload.isNotificationStatusSent||a.isNotificationStatusSent,a.notifications=e.payload.notifications||a.Notifications}return a},m=window.ReactJSXRuntime,g=(0,a.createContext)(),u=t=>{const[e,n]=(0,a.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},i="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:a,installData:i}})},s=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{r()}),[]);const l={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(a=e.stateSettings,o("gtmkit/v1/set-options","POST",a));var a;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:s,useUpdateStateSettings:async(t,a,n)=>{const r=JSON.parse(JSON.stringify(e.stateSettings));let o;r[t][a]=n,o=!(0,i.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:o})},useImportSettings:async(t,a)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let r;const o={};o.general={...n.general,...a.general},"integrations"in a&&(o.integrations={...n.integrations,...a.integrations}),r=!(0,i.isEqual)(o,e.fetchedSettings),s({stateSettings:o,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(a=e.supportTicket,o("gtmkit/v1/send-support-data","POST",a,!0));var a;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{n({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(a=e.licenseKey,o("gtmkit/v1/send-license-key","POST",a,!0));var a;n({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{n({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:!0}});const a={"notification-id":t,action:e},i=await(t=>o("gtmkit/v1/set-notification-status","POST",t,!0))(a);n({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,isNotificationStatusSent:i.success,notifications:i.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(g.Provider,{value:l,children: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 k(t,e){if(!1===t||null==t)throw new Error(e)}function y(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function S(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,a,n){return void 0===a&&(a=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?x(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 x(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function M(t,e,a){return void 0===a&&(a="/"),function(t,e,a,n){let i=z(("string"==typeof e?x(e):e).pathname||"/",a);if(null==i)return null;let r=v(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let s=null;for(let t=0;null==s&&t<r.length;++t){let e=A(i);s=O(r[t],e,n)}return s}(t,e,a,!1)}function v(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(k(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let o=G([n,s.relativePath]),l=a.concat(s);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),v(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:C(o,t.index),routesMeta:l})};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 s=w(n.join("/")),o=[];return o.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...s),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const _=/^:[\w-]+$/,T=3,b=2,L=1,j=10,D=-2,I=t=>"*"===t;function C(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=D),e&&(n+=b),a.filter((t=>!I(t))).reduce(((t,e)=>t+(_.test(e)?T:""===e?L:j)),n)}function O(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",s=[];for(let t=0;t<n.length;++t){let o=n[t],l=t===n.length-1,c="/"===r?e:e.slice(r.length)||"/",m=U({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),g=o.route;if(!m&&l&&a&&!n[n.length-1].route.index&&(m=U({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!m)return null;Object.assign(i,m.params),s.push({params:i,pathname:G([r,m.pathname]),pathnameBase:K(G([r,m.pathnameBase])),route:g}),"/"!==m.pathnameBase&&(r=G([r,m.pathnameBase]))}return s}function U(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),y("*"===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],s=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]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[a];return t[n]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,pattern:t}}function A(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return y(!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 z(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function P(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function R(t,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(((t,e)=>e===a.length-1?t.pathname:t.pathnameBase)):a.map((t=>t.pathnameBase))}function B(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=x(t):(i=d({},t),k(!i.pathname||!i.pathname.includes("?"),P("?","pathname","search",i)),k(!i.pathname||!i.pathname.includes("#"),P("#","pathname","hash",i)),k(!i.search||!i.search.includes("#"),P("#","search","hash",i)));let r,s=""===t||""===i.pathname,o=s?"/":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 l=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?x(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:Y(n),hash:F(i)}}(i,r),c=o&&"/"!==o&&o.endsWith("/"),m=(s||"."===o)&&a.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const G=t=>t.join("/").replace(/\/\/+/g,"/"),K=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",F=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const W=["post","put","patch","delete"],Q=(new Set(W),["get",...W]);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),V=e.createContext(null),X=e.createContext({outlet:null,matches:[],isDataRoute:!1}),q=e.createContext(null);function tt(){return null!=e.useContext(V)}function et(){return tt()||k(!1),e.useContext(V).location}function at(t){e.useContext(Z).static||e.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=e.useContext(X);return t?function(){let{router:t}=function(){let t=e.useContext(H);return t||k(!1),t}(ct.UseNavigateStable),a=gt(mt.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,J({fromRouteId:a},i)))}),[t,a])}():function(){tt()||k(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(X),{pathname:s}=et(),o=JSON.stringify(R(r,n.v7_relativeSplatPath)),l=e.useRef(!1);return at((()=>{l.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!l.current)return;if("number"==typeof e)return void i.go(e);let r=B(e,JSON.parse(o),s,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:G([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,s,t])}()}function it(t,a,n,i){tt()||k(!1);let{navigator:r}=e.useContext(Z),{matches:s}=e.useContext(X),o=s[s.length-1],l=o?o.params:{},c=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let m,g=et();if(a){var u;let t="string"==typeof a?x(a):a;"/"===c||(null==(u=t.pathname)?void 0:u.startsWith(c))||k(!1),m=t}else m=g;let d=m.pathname||"/",h=d;if("/"!==c){let t=c.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:h}),S=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 s;if(!n)return null;if(n.errors)t=n.matches;else{if(!(null!=(s=i)&&s.v7_partialHydration&&0===a.length&&!n.initialized&&n.matches.length>0))return null;t=n.matches}}let o=t,l=null==(r=n)?void 0:r.errors;if(null!=l){let t=o.findIndex((t=>t.route.id&&void 0!==(null==l?void 0:l[t.route.id])));t>=0||k(!1),o=o.slice(0,Math.min(o.length,t+1))}let c=!1,m=-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)&&(m=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){c=!0,o=m>=0?o.slice(0,m+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let s,g=!1,u=null,d=null;var p;n&&(s=l&&i.route.id?l[i.route.id]:void 0,u=i.route.errorElement||st,c&&(m<0&&0===r?(ut[p="route-fallback"]||(ut[p]=!0),g=!0,d=null):m===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=s?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(lt,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(ot,{location:n.location,revalidation:n.revalidation,component:u,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:G([c,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?c:G([c,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,n,i);return a&&S?e.createElement(V.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:p.Pop}},S):S}function rt(){let t=function(){var t;let a=e.useContext(q),n=function(){let t=e.useContext($);return t||k(!1),t}(mt.UseRouteError),i=gt(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 st=e.createElement(rt,null);class ot 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(X.Provider,{value:this.props.routeContext},e.createElement(q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lt(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(X.Provider,{value:a},i)}var ct=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ct||{}),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 gt(t){let a=function(){let t=e.useContext(X);return t||k(!1),t}(),n=a.matches[a.matches.length-1];return n.route.id||k(!1),n.route.id}const ut={};function dt(t){let{to:a,replace:n,state:i,relative:r}=t;tt()||k(!1);let{future:s,static:o}=e.useContext(Z),{matches:l}=e.useContext(X),{pathname:c}=et(),m=nt(),g=B(a,R(l,s.v7_relativeSplatPath),c,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>m(JSON.parse(u),{replace:n,state:i,relative:r})),[m,u,r,n,i]),null}function pt(t){k(!1)}function ht(t){let{basename:a="/",children:n=null,location:i,navigationType:r=p.Pop,navigator:s,static:o=!1,future:l}=t;tt()&&k(!1);let c=a.replace(/^\/*/,"/"),m=e.useMemo((()=>({basename:c,navigator:s,static:o,future:J({v7_relativeSplatPath:!1},l)})),[c,l,s,o]);"string"==typeof i&&(i=x(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:y="default"}=i,S=e.useMemo((()=>{let t=z(g,c);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:y},navigationType:r}}),[c,g,u,d,h,y,r]);return null==S?null:e.createElement(Z.Provider,{value:m},e.createElement(V.Provider,{children:n,value:S}))}function kt(t){let{children:e,location:a}=t;return it(yt(e),a)}function yt(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,yt(t.props.children,r));t.type!==pt&&k(!1),t.props.index&&t.props.children&&k(!1);let s={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&&(s.children=yt(t.props.children,r)),n.push(s)})),n}e.startTransition,new Promise((()=>{})),e.Component;const St=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,s=e.useRef();null==s.current&&(s.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,s=i.history,o=p.Pop,l=null,c=m();function m(){return(s.state||{idx:null}).idx}function g(){o=p.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:o,location:y.location,delta:e})}function u(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"),k(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==c&&(c=0,s.replaceState(d({},s.state,{idx:c}),""));let y={get action(){return o},get location(){return t(i,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),l=t,()=>{i.removeEventListener(h,g),l=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){o=p.Push;let n=f(y.location,t,e);a&&a(n,t),c=m()+1;let g=S(n,c),u=y.createHref(n);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&l&&l({action:o,location:y.location,delta:1})},replace:function(t,e){o=p.Replace;let n=f(y.location,t,e);a&&a(n,t),c=m();let i=S(n,c),g=y.createHref(n);s.replaceState(i,"",g),r&&l&&l({action:o,location:y.location,delta:0})},go:t=>s.go(t)};return y}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=x(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){y("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=s.current,[l,c]=e.useState({action:o.action,location:o.location}),{v7_startTransition:m}=i||{},g=e.useCallback((t=>{m&&ft?ft((()=>c(t))):c(t)}),[c,m]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(ht,{basename:a,children:n,location:l.location,navigationType:l.action,navigator:o,future:i})}var xt,Nt;St.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"}(xt||(xt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Nt||(Nt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s}=(0,a.useContext)(g),o=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(n.TextControl,{label:(0,l.__)("Container ID","gtm-kit"),placeholder:(0,l.__)("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:s||!t.general.gtm_id.includes("-")},(0,l.__)("Save and continue","gtm-kit"),s?(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,l.__)("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,l.__)("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,l.__)("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,l.__)("Go to the dashboard.","gtm-kit"))))},vt=()=>{const{useImportSettings:t,useIsPending:i,useInstallData:r}=(0,a.useContext)(g),[s,o]=(0,a.useState)(!0),c=Object.keys(r.import_data)[0],[m,u]=(0,a.useState)(c),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),s?(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,l.__)("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,l.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,l.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,l.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:m,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(m,r.import_data[m]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,l.__)("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,l.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},wt=()=>{const{useInstallData:t}=(0,a.useContext)(g),{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,l.__)("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,l.__)("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)(vt,null):(0,e.createElement)(Mt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useInstallData:o}=(0,a.useContext)(g),c=nt();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,l.__)("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,l.__)("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,l.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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,l.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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,l.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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,l.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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(),c("/share-anonymous-data",{replace:!0})},disabled:s},(0,l.__)("Save and continue","gtm-kit"),s?(0,e.createElement)(n.Spinner,null):"")))},Tt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useSiteData:o}=(0,a.useContext)(g),c=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,l.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,l.__)("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,l.__)("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,l.__)("Yes","gtm-kit"):(0,l.__)("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,l.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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(),c("/getting-started",{replace:!0})},disabled:s},(0,l.__)("Save and continue","gtm-kit"),s?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,l.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,l.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,m.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,l.__)("Getting Started","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("The next step is to configure your Google Tag Manager container. You will find templates for this in the GTM Templates section.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.templatesUrl,rel:"noreferrer",children:(0,l.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.helpUrl+"#/help",rel:"noreferrer",children:(0,l.__)("Go to Tutorials","gtm-kit")})]})]}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsx)(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},children:(0,l.__)("Go to the dashboard","gtm-kit")})})]}),Lt=[{step:1,path:"/welcome",element:"Welcome",title:(0,l.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,l.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,l.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,l.__)("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})},Dt=({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,It=({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)(Dt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{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:et().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},Lt.map((function(n){return(0,e.createElement)(It,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},Ot=()=>(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,l.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ut=()=>(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,l.__)("Go to the dashboard.","gtm-kit"))))),At=()=>{const{useSettings:t}=(0,a.useContext)(g);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,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)(kt,null,(0,e.createElement)(pt,{exact:!0,path:"/welcome",element:(0,e.createElement)(wt,null)}),(0,e.createElement)(pt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(pt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(Tt,null)}),(0,e.createElement)(pt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(pt,{path:"/",element:(0,e.createElement)(dt,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ut,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},zt=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(u,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)(zt,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.ReactDOM,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var s=t.n(r);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await s()({path:t,method:e,...a&&{data:a}})}catch(a){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:{}},l=window.wp.i18n,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.notifications=e.payload.notifications,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,l.__)("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,l.__)("An error occurred.","gtm-kit"):(0,l.__)("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;break;case"SEND_NOTIFICATION_STATUS_BEFORE":a.isUpdatingNotifications=e.payload.isUpdatingNotifications||a.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":a.isUpdatingNotifications=!1,a.isNotificationStatusSent=e.payload.isNotificationStatusSent||a.isNotificationStatusSent,a.notifications=e.payload.notifications||a.Notifications}return a},m=window.ReactJSXRuntime,g=(0,a.createContext)(),u=t=>{const[e,n]=(0,a.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},i="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:a,installData:i}})},s=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{r()}),[]);const l={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(a=e.stateSettings,o("gtmkit/v1/set-options","POST",a));var a;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:s,useUpdateStateSettings:async(t,a,n)=>{const r=JSON.parse(JSON.stringify(e.stateSettings));let o;r[t][a]=n,o=!(0,i.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:o})},useImportSettings:async(t,a)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let r;const o={};o.general={...n.general,...a.general},"integrations"in a&&(o.integrations={...n.integrations,...a.integrations}),r=!(0,i.isEqual)(o,e.fetchedSettings),s({stateSettings:o,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(a=e.supportTicket,o("gtmkit/v1/send-support-data","POST",a,!0));var a;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{n({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(a=e.licenseKey,o("gtmkit/v1/send-license-key","POST",a,!0));var a;n({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{n({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:!0}});const a={"notification-id":t,action:e},i=await(t=>o("gtmkit/v1/set-notification-status","POST",t,!0))(a);n({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,isNotificationStatusSent:i.success,notifications:i.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(g.Provider,{value:l,children:t.children})},d=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},p.apply(this,arguments)}var h;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const k="popstate";function y(t,e){if(!1===t||null==t)throw new Error(e)}function S(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 x(t,e,a,n){return void 0===a&&(a=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function N(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 E(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 M;function v(t,e,a){return void 0===a&&(a="/"),function(t,e,a,n){let i=P(("string"==typeof e?E(e):e).pathname||"/",a);if(null==i)return null;let r=j(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 s=null;for(let t=0;null==s&&t<r.length;++t){let e=z(i);s=U(r[t],e,n)}return s}(t,e,a,!1)}function j(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(y(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let o=K([n,s.relativePath]),l=a.concat(s);t.children&&t.children.length>0&&(y(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),j(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:O(o,t.index),routesMeta:l})};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 s=w(n.join("/")),o=[];return o.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...s),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(M||(M={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const _=/^:[\w-]+$/,T=3,b=2,L=1,D=10,I=-2,C=t=>"*"===t;function O(t,e){let a=t.split("/"),n=a.length;return a.some(C)&&(n+=I),e&&(n+=b),a.filter((t=>!C(t))).reduce(((t,e)=>t+(_.test(e)?T:""===e?L:D)),n)}function U(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",s=[];for(let t=0;t<n.length;++t){let o=n[t],l=t===n.length-1,c="/"===r?e:e.slice(r.length)||"/",m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),g=o.route;if(!m&&l&&a&&!n[n.length-1].route.index&&(m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!m)return null;Object.assign(i,m.params),s.push({params:i,pathname:K([r,m.pathname]),pathnameBase:Y(K([r,m.pathnameBase])),route:g}),"/"!==m.pathnameBase&&(r=K([r,m.pathnameBase]))}return s}function A(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),S("*"===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],s=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]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[a];return t[n]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,pattern:t}}function z(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return S(!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 P(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 R(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 B(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(((t,e)=>e===a.length-1?t.pathname:t.pathnameBase)):a.map((t=>t.pathnameBase))}function G(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=E(t):(i=p({},t),y(!i.pathname||!i.pathname.includes("?"),R("?","pathname","search",i)),y(!i.pathname||!i.pathname.includes("#"),R("#","pathname","hash",i)),y(!i.search||!i.search.includes("#"),R("#","search","hash",i)));let r,s=""===t||""===i.pathname,o=s?"/":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 l=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?E(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:F(n),hash:W(i)}}(i,r),c=o&&"/"!==o&&o.endsWith("/"),m=(s||"."===o)&&a.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),Y=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),F=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Q=["post","put","patch","delete"],$=(new Set(Q),["get",...Q]);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($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=d.createContext(null),Z=d.createContext(null),V=d.createContext(null),X=d.createContext(null),q=d.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=d.createContext(null);function et(){return null!=d.useContext(X)}function at(){return et()||y(!1),d.useContext(X).location}function nt(t){d.useContext(V).static||d.useLayoutEffect(t)}function it(){let{isDataRoute:t}=d.useContext(q);return t?function(){let{router:t}=function(){let t=d.useContext(H);return t||y(!1),t}(mt.UseNavigateStable),e=ut(gt.UseNavigateStable),a=d.useRef(!1);return nt((()=>{a.current=!0})),d.useCallback((function(n,i){void 0===i&&(i={}),a.current&&("number"==typeof n?t.navigate(n):t.navigate(n,J({fromRouteId:e},i)))}),[t,e])}():function(){et()||y(!1);let t=d.useContext(H),{basename:e,future:a,navigator:n}=d.useContext(V),{matches:i}=d.useContext(q),{pathname:r}=at(),s=JSON.stringify(B(i,a.v7_relativeSplatPath)),o=d.useRef(!1);return nt((()=>{o.current=!0})),d.useCallback((function(a,i){if(void 0===i&&(i={}),!o.current)return;if("number"==typeof a)return void n.go(a);let l=G(a,JSON.parse(s),r,"path"===i.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:K([e,l.pathname])),(i.replace?n.replace:n.push)(l,i.state,i)}),[e,n,s,r,t])}()}function rt(t,e,a,n){et()||y(!1);let{navigator:i}=d.useContext(V),{matches:r}=d.useContext(q),s=r[r.length-1],o=s?s.params:{},l=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let c,m=at();if(e){var g;let t="string"==typeof e?E(e):e;"/"===l||(null==(g=t.pathname)?void 0:g.startsWith(l))||y(!1),c=t}else c=m;let u=c.pathname||"/",p=u;if("/"!==l){let t=l.replace(/^\//,"").split("/");p="/"+u.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=v(t,{pathname:p}),S=function(t,e,a,n){var i;if(void 0===e&&(e=[]),void 0===a&&(a=null),void 0===n&&(n=null),null==t){var r;if(!a)return null;if(a.errors)t=a.matches;else{if(!(null!=(r=n)&&r.v7_partialHydration&&0===e.length&&!a.initialized&&a.matches.length>0))return null;t=a.matches}}let s=t,o=null==(i=a)?void 0:i.errors;if(null!=o){let t=s.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||y(!1),s=s.slice(0,Math.min(s.length,t+1))}let l=!1,c=-1;if(a&&n&&n.v7_partialHydration)for(let t=0;t<s.length;t++){let e=s[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:n}=a,i=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||i){l=!0,s=c>=0?s.slice(0,c+1):[s[0]];break}}}return s.reduceRight(((t,n,i)=>{let r,m=!1,g=null,u=null;var p;a&&(r=o&&n.route.id?o[n.route.id]:void 0,g=n.route.errorElement||ot,l&&(c<0&&0===i?(dt[p="route-fallback"]||(dt[p]=!0),m=!0,u=null):c===i&&(m=!0,u=n.route.hydrateFallbackElement||null)));let h=e.concat(s.slice(0,i+1)),k=()=>{let e;return e=r?g:m?u:n.route.Component?d.createElement(n.route.Component,null):n.route.element?n.route.element:t,d.createElement(ct,{match:n,routeContext:{outlet:t,matches:h,isDataRoute:null!=a},children:e})};return a&&(n.route.ErrorBoundary||n.route.errorElement||0===i)?d.createElement(lt,{location:a.location,revalidation:a.revalidation,component:g,error:r,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:K([l,i.encodeLocation?i.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:K([l,i.encodeLocation?i.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,a,n);return e&&S?d.createElement(X.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:h.Pop}},S):S}function st(){let t=function(){var t;let e=d.useContext(tt),a=function(){let t=d.useContext(Z);return t||y(!1),t}(gt.UseRouteError),n=ut(gt.UseRouteError);return void 0!==e?e:null==(t=a.errors)?void 0:t[n]}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),a?d.createElement("pre",{style:n},a):null,null)}const ot=d.createElement(st,null);class lt extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error: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?d.createElement(q.Provider,{value:this.props.routeContext},d.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:a,children:n}=t,i=d.useContext(H);return i&&i.static&&i.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=a.route.id),d.createElement(q.Provider,{value:e},n)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),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 e=function(){let t=d.useContext(q);return t||y(!1),t}(),a=e.matches[e.matches.length-1];return a.route.id||y(!1),a.route.id}const dt={};function pt(t){let{to:e,replace:a,state:n,relative:i}=t;et()||y(!1);let{future:r,static:s}=d.useContext(V),{matches:o}=d.useContext(q),{pathname:l}=at(),c=it(),m=G(e,B(o,r.v7_relativeSplatPath),l,"path"===i),g=JSON.stringify(m);return d.useEffect((()=>c(JSON.parse(g),{replace:a,state:n,relative:i})),[c,g,i,a,n]),null}function ht(t){y(!1)}function kt(t){let{basename:e="/",children:a=null,location:n,navigationType:i=h.Pop,navigator:r,static:s=!1,future:o}=t;et()&&y(!1);let l=e.replace(/^\/*/,"/"),c=d.useMemo((()=>({basename:l,navigator:r,static:s,future:J({v7_relativeSplatPath:!1},o)})),[l,o,r,s]);"string"==typeof n&&(n=E(n));let{pathname:m="/",search:g="",hash:u="",state:p=null,key:k="default"}=n,S=d.useMemo((()=>{let t=P(m,l);return null==t?null:{location:{pathname:t,search:g,hash:u,state:p,key:k},navigationType:i}}),[l,m,g,u,p,k,i]);return null==S?null:d.createElement(V.Provider,{value:c},d.createElement(X.Provider,{children:a,value:S}))}function yt(t){let{children:e,location:a}=t;return rt(St(e),a)}function St(t,e){void 0===e&&(e=[]);let a=[];return d.Children.forEach(t,((t,n)=>{if(!d.isValidElement(t))return;let i=[...e,n];if(t.type===d.Fragment)return void a.push.apply(a,St(t.props.children,i));t.type!==ht&&y(!1),t.props.index&&t.props.children&&y(!1);let r={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(r.children=St(t.props.children,i)),a.push(r)})),a}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const ft=d.startTransition;function xt(t){let{basename:e,children:a,future:n,window:i}=t,r=d.useRef();var s;null==r.current&&(r.current=(void 0===(s={window:i,v5Compat:!0})&&(s={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,s=i.history,o=h.Pop,l=null,c=m();function m(){return(s.state||{idx:null}).idx}function g(){o=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:o,location:d.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:N(t);return a=a.replace(/ $/,"%20"),y(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==c&&(c=0,s.replaceState(p({},s.state,{idx:c}),""));let d={get action(){return o},get location(){return t(i,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(k,g),l=t,()=>{i.removeEventListener(k,g),l=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){o=h.Push;let n=x(d.location,t,e);a&&a(n,t),c=m()+1;let g=f(n,c),u=d.createHref(n);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&l&&l({action:o,location:d.location,delta:1})},replace:function(t,e){o=h.Replace;let n=x(d.location,t,e);a&&a(n,t),c=m();let i=f(n,c),g=d.createHref(n);s.replaceState(i,"",g),r&&l&&l({action:o,location:d.location,delta:0})},go:t=>s.go(t)};return d}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=E(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),x("",{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:N(e))}),(function(t,e){S("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),s)));let o=r.current,[l,c]=d.useState({action:o.action,location:o.location}),{v7_startTransition:m}=n||{},g=d.useCallback((t=>{m&&ft?ft((()=>c(t))):c(t)}),[c,m]);return d.useLayoutEffect((()=>o.listen(g)),[o,g]),d.createElement(kt,{basename:e,children:a,location:l.location,navigationType:l.action,navigator:o,future:n})}var Nt,Et;e.flushSync,d.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"}(Nt||(Nt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Et||(Et={}));const Mt=(t="general",e="")=>{const a=window.gtmkitSettings.adminPageUrl;return e?`${a}${t}#/${e}`:`${a}${t}`},vt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:i,useIsPending:r}=(0,a.useContext)(g),s=it();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20",children:[(0,m.jsxs)("div",{className:"",children:[(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 ",children:(0,m.jsx)(n.TextControl,{label:(0,l.__)("Container ID","gtm-kit"),placeholder:(0,l.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>e("general","gtm_id",t)})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(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:()=>{i(),s("/essential-settings",{replace:!0})},disabled:r||!t.general.gtm_id.includes("-"),children:[(0,l.__)("Save and continue","gtm-kit"),r?(0,m.jsx)(n.Spinner,{}):""]})})]}),(0,m.jsxs)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center",children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4",children:"Need help?"}),(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,l.__)("Find your GTM container ID on","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer",children:"Google Tag Manager"})]}),(0,m.jsxs)("p",{children:[(0,l.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"]})]})]}),(0,m.jsxs)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base",children:[(0,m.jsx)("span",{className:"gtmkit-block",children:(0,l.__)("No thanks. I know what I'm doing.","gtm-kit")}),(0,m.jsx)("a",{className:"gtmkit-underline gtmkit-ml-4",href:Mt(),children:(0,l.__)("Go to the dashboard.","gtm-kit")})]})]})},jt=()=>{const{useImportSettings:t,useIsPending:e,useInstallData:i}=(0,a.useContext)(g),[r,s]=(0,a.useState)(!0),o=Object.keys(i.import_data)[0],[c,m]=(0,a.useState)(o),u=[];return Object.keys(i.import_data).forEach((t=>{u.push({value:t,label:i.import_data[t].name})})),r?(0,d.createElement)(d.Fragment,null,(0,d.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8"},(0,d.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,l.__)("Would you like to import plugin settings?","gtm-kit")),(0,d.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,l.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,l.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,d.createElement)(n.RadioControl,{help:(0,l.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:c,options:u,onChange:t=>m(t)}),(0,d.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,d.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(c,i.import_data[c]),s(!1)}},(0,d.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,l.__)("Yes","gtm-kit")),e?(0,d.createElement)(n.Spinner,null):""),(0,d.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{s(!1)}},(0,d.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,l.__)("No","gtm-kit")),e?(0,d.createElement)(n.Spinner,null):"")))):(0,d.createElement)(vt,null)},wt=()=>{const{useInstallData:t}=(0,a.useContext)(g),{firstInstall:e}=t,{importAvailable:n}=t;return(0,d.createElement)("div",{className:"gtmkit-text-center"},(0,d.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,l.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,d.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,l.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),e&&n?(0,d.createElement)(jt,null):(0,d.createElement)(vt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:i,useIsPending:r,useInstallData:s}=(0,a.useContext)(g),o=it();return(0,d.createElement)("div",{className:"gtmkit-text-center"},(0,d.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,l.__)("Essential Settings","gtm-kit")),(0,d.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,l.__)("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,d.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Page type","gtm-kit"),id:"page-type"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("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:()=>{e("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),s.woocommerce_integration?(0,d.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{e("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,s.cf7_integration?(0,d.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{e("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,s.edd_integration?(0,d.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{e("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,d.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,d.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:()=>{i(),o("/share-anonymous-data",{replace:!0})},disabled:r},(0,l.__)("Save and continue","gtm-kit"),r?(0,d.createElement)(n.Spinner,null):"")))},Tt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:i,useIsPending:r,useSiteData:s}=(0,a.useContext)(g),o=it();return(0,d.createElement)(d.Fragment,null,(0,d.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,l.__)("Help improve GTM Kit","gtm-kit")),(0,d.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,l.__)("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,d.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,l.__)("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,d.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,d.createElement)("tbody",null,(0,d.createElement)("tr",{className:""},(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Server type:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.web_server))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"PHP version number:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.php_version))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"WordPress version number:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.wordpress_version))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"WordPress multisite:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.multisite?(0,l.__)("Yes","gtm-kit"):(0,l.__)("No","gtm-kit")))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Current theme:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.current_theme))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Current site language:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.locale))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Active plugins:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("em",null,"Plugin names of all active plugins"))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,d.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{e("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,d.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,d.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:()=>{i(),o("/getting-started",{replace:!0})},disabled:r},(0,l.__)("Save and continue","gtm-kit"),r?(0,d.createElement)(n.Spinner,null):"")))},bt=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,l.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,l.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,m.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,l.__)("Getting Started","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("The next step is to configure your Google Tag Manager container. You will find templates for this in the GTM Templates section.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Mt("templates"),rel:"noreferrer",children:(0,l.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Mt("help","help"),rel:"noreferrer",children:(0,l.__)("Go to Tutorials","gtm-kit")})]})]}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsx)(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=Mt("general")},children:(0,l.__)("Go to the dashboard","gtm-kit")})})]}),Lt=[{step:1,path:"/welcome",element:"Welcome",title:(0,l.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,l.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,l.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,l.__)("Getting Started","gtm-kit")}],Dt=({step:t,currentStep:e,totalSteps:a})=>{if(t===a)return;let n="gtmkit-h-0.5 gtmkit-w-full";return n+=t<e?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,d.createElement)("div",{className:n})},It=({step:t,currentStep:e})=>t<e?(0,d.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,d.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===e?(0,d.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Ct=({step:t,currentStep:e,totalSteps:a})=>{if(0===t)return;let n="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 n+=t<e?" gtmkit-bg-color-primary":" gtmkit-bg-white",n+=t>e?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,d.createElement)(d.Fragment,null,(0,d.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,d.createElement)("span",{className:n},(0,d.createElement)(It,{step:t,currentStep:e,totalSteps:a}))),(0,d.createElement)(Dt,{step:t,currentStep:e,totalSteps:a}))},Ot=()=>{const t=Lt.length-1+Lt[0].step;let e=((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:at().pathname});return e=e.length?e[0].step:0,0===e?(0,d.createElement)("div",{className:"gtmkit-my-16"}):(0,d.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(a){return(0,d.createElement)(Ct,{key:a.step,step:a.step,currentStep:e,totalSteps:t})})))},Ut=()=>(0,d.createElement)(d.Fragment,null,(0,d.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,d.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,d.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,l.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,d.createElement)(Ot,null)),At=()=>(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey",children:(0,m.jsx)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max",children:(0,m.jsx)("a",{className:"gtmkit-underline",href:Mt(),children:(0,l.__)("Go to the dashboard.","gtm-kit")})})})}),zt=()=>{const{useSettings:t}=(0,a.useContext)(g);return Object.keys(t).length?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Ut,{}),(0,m.jsx)("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",children:(0,m.jsxs)(yt,{children:[(0,m.jsx)(ht,{exact:!0,path:"/welcome",element:(0,m.jsx)(wt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/essential-settings",element:(0,m.jsx)(_t,{})}),(0,m.jsx)(ht,{exact:!0,path:"/share-anonymous-data",element:(0,m.jsx)(Tt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/getting-started",element:(0,m.jsx)(bt,{})}),(0,m.jsx)(ht,{path:"/",element:(0,m.jsx)(pt,{replace:!0,to:"/welcome"})})]})}),(0,m.jsx)(At,{})]}):(0,m.jsx)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Pt=()=>(0,m.jsx)(xt,{basename:"/",children:(0,m.jsx)(u,{children:(0,m.jsx)(zt,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.createRoot)(t).render((0,m.jsx)(Pt,{}))}))})();
  • gtm-kit/tags/2.0.1/changelog.txt

    r3149785 r3156080  
    11*** GTM Kit ***
    22
    3 2024-09-DD - version 2.0
     32024-09-23 - version 2.0.1
     4* Fix: * Fix an edge case that could cause a fatal error in admin_body_class().
     5
     62024-09-11 - version 2.0.0
    47* Remove: Starting with GTM Kit version 2.0, the add_to_wishlist event is no longer supported in the free version of GTM Kit. To continue tracking the add_to_wishlist event, you must purchase the GTM Kit Add-On plugin.
    58* Add: A notifications handler has been added to communicate issues and notifications that require the user’s attention.
  • gtm-kit/tags/2.0.1/gtm-kit.php

    r3149785 r3156080  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     2.0.0
     6 * Version:     2.0.1
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    2828}
    2929
    30 const GTMKIT_VERSION = '2.0.0';
     30const GTMKIT_VERSION = '2.0.1';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/tags/2.0.1/inc/main.php

    r3149785 r3156080  
    178178    $notifications_handler = NotificationsHandler::get();
    179179
    180     PluginSuggestions::register( $notifications_handler, $plugin_availability );
     180    PluginSuggestions::register( $notifications_handler, $plugin_availability, $util );
    181181    Analytics::register( $options, $util );
    182182    MetaBox::register( $options );
  • gtm-kit/tags/2.0.1/languages/gtm-kit.pot

    r3149785 r3156080  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 2.0\n"
     5"Project-Id-Version: GTM Kit 2.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-09-03T15:14:34+00:00\n"
     12"POT-Creation-Date: 2024-09-22T11:44:20+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
     
    3131msgstr ""
    3232
    33 #: inc/main.php:89
     33#: inc/main.php:90
    3434msgid "Go to GTM Kit Settings page"
    3535msgstr ""
    3636
    37 #: inc/main.php:90
    38 #: assets/admin/settings.js:15
     37#: inc/main.php:91
     38#: assets/admin/settings.js:22
    3939msgid "Settings"
    4040msgstr ""
    4141
    4242#. translators: %s is GTM Kit Add-On.
    43 #: inc/main.php:108
     43#: inc/main.php:109
    4444msgid "Required by %s"
    4545msgstr ""
    4646
    47 #: src/Admin/AbstractOptionsPage.php:229
    48 #: src/Admin/SetupWizard.php:214
     47#: src/Admin/AbstractOptionsPage.php:230
     48#: src/Admin/SetupWizard.php:212
    4949msgid "Whoops, something's not working."
    5050msgstr ""
    5151
    52 #: src/Admin/AbstractOptionsPage.php:232
    53 #: src/Admin/SetupWizard.php:217
     52#: src/Admin/AbstractOptionsPage.php:233
     53#: src/Admin/SetupWizard.php:215
    5454msgid "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."
    5555msgstr ""
    5656
    57 #: src/Admin/AbstractOptionsPage.php:237
    58 #: src/Admin/SetupWizard.php:165
    59 #: src/Admin/SetupWizard.php:222
     57#: src/Admin/AbstractOptionsPage.php:238
     58#: src/Admin/SetupWizard.php:163
     59#: src/Admin/SetupWizard.php:220
    6060msgid "Go back to the Dashboard"
    6161msgstr ""
     
    8484msgstr ""
    8585
    86 #: src/Admin/HelpOptionsPage.php:44
    87 #: src/Admin/HelpOptionsPage.php:53
    88 #: assets/admin/settings.js:13
    89 #: assets/admin/settings.js:15
     86#: src/Admin/HelpOptionsPage.php:46
     87#: src/Admin/HelpOptionsPage.php:55
     88#: assets/admin/settings.js:19
     89#: assets/admin/settings.js:22
    9090msgid "Help"
    9191msgstr ""
     
    106106#: src/Admin/IntegrationsOptionsPage.php:55
    107107#: assets/admin/settings.js:1
    108 #: assets/admin/settings.js:15
     108#: assets/admin/settings.js:22
    109109msgid "Integrations"
    110110msgstr ""
     
    125125msgstr ""
    126126
    127 #: src/Admin/PluginSuggestions.php:121
     127#. translators: %1$s is the name of the plugin and %2$s is the name of the theme.
     128#: src/Admin/PluginSuggestions.php:228
     129msgid "It seems that you have installed the %1$s plugin and %1$s theme."
     130msgstr ""
     131
     132#. translators: %1$s is the name of the plugin.
     133#: src/Admin/PluginSuggestions.php:235
     134msgid "It seems that you have installed the %1$s plugin."
     135msgstr ""
     136
     137#. translators: %1$s is the name of the theme.
     138#: src/Admin/PluginSuggestions.php:242
     139msgid "It seems that you have installed the %1$s theme."
     140msgstr ""
     141
     142#. translators: %1$s is a link with the text 'GTM Kit Woo Add-On'.
     143#: src/Admin/PluginSuggestions.php:251
     144msgid "With the %1$s, you can track the add_to_wishlist event and leverage server-side tracking for enhanced accuracy and deeper insights into customer behavior."
     145msgstr ""
     146
     147#: src/Admin/PluginSuggestions.php:258
     148msgid "Upgrade:"
     149msgstr ""
     150
     151#: src/Admin/PluginSuggestions.php:271
    128152msgid "It appears that you are not currently using a supported SEO plugin. By installing either WordPress SEO or Rank Math, you can assign a primary category to each product. This primary category will then be used in the data layer if the product is associated with multiple categories."
    129153msgstr ""
    130154
    131 #: src/Admin/PluginSuggestions.php:126
     155#: src/Admin/PluginSuggestions.php:276
    132156msgid "Plugin suggestion:"
    133157msgstr ""
    134158
    135159#. translators: %s is the name of the plugin.
    136 #: src/Admin/PluginSuggestions.php:144
     160#: src/Admin/PluginSuggestions.php:294
    137161msgid "It seems that you have installed the Google Tag Manager plugin called %1$s. Running two different GTM plugins simultaneously can lead to unexpected results, significantly impact data accuracy, and slow down page speed. Please consider deactivating %2$s unless you have carefully considered and addressed the potential challenges."
    138162msgstr ""
    139163
    140 #: src/Admin/PluginSuggestions.php:152
     164#: src/Admin/PluginSuggestions.php:302
    141165msgid "Possible Conflict:"
     166msgstr ""
     167
     168#. translators: %1$s and %2$s are links with the text 'GTM Kit Woo Add-On' and 'Grandfathered Wishlist Functionality' respectively.
     169#: src/Admin/PluginSuggestions.php:323
     170msgid "Starting with GTM Kit version 2.0, the add_to_wishlist event is no longer supported in the free version of GTM Kit. To continue tracking the add_to_wishlist event, you must either purchase the %1$s or download the free %2$s plugin."
     171msgstr ""
     172
     173#: src/Admin/PluginSuggestions.php:331
     174msgid "Breaking change:"
    142175msgstr ""
    143176
     
    147180msgstr ""
    148181
     182#: src/Admin/UpgradesOptionsPage.php:44
     183#: src/Admin/UpgradesOptionsPage.php:53
     184#: assets/admin/settings.js:22
     185msgid "Upgrades"
     186msgstr ""
     187
     188#: src/Admin/UpgradesOptionsPage.php:118
     189msgid "The plugin is installed and activated"
     190msgstr ""
     191
    149192#: src/Common/Util.php:159
    150193msgid "Server type:"
     
    198241
    199242#: src/Integration/EasyDigitalDownloads.php:104
    200 #: src/Integration/WooCommerce.php:258
     243#: src/Integration/WooCommerce.php:257
    201244msgid "Payment method not found"
    202245msgstr ""
    203246
     247#: src/Integration/WooCommerce.php:248
     248msgid "Handpicked Products"
     249msgstr ""
     250
    204251#: src/Integration/WooCommerce.php:249
    205 msgid "Handpicked Products"
     252msgid "Best Sellers"
    206253msgstr ""
    207254
    208255#: src/Integration/WooCommerce.php:250
    209 msgid "Best Sellers"
     256#: src/Integration/WooCommerce.php:975
     257msgid "Product Category"
    210258msgstr ""
    211259
    212260#: src/Integration/WooCommerce.php:251
    213 #: src/Integration/WooCommerce.php:978
    214 msgid "Product Category"
     261msgid "New Products"
    215262msgstr ""
    216263
    217264#: src/Integration/WooCommerce.php:252
    218 msgid "New Products"
     265msgid "Products On Sale"
    219266msgstr ""
    220267
    221268#: src/Integration/WooCommerce.php:253
    222 msgid "Products On Sale"
     269msgid "Products By Attribute"
    223270msgstr ""
    224271
    225272#: src/Integration/WooCommerce.php:254
    226 msgid "Products By Attribute"
     273#: src/Integration/WooCommerce.php:977
     274msgid "Product Tag"
    227275msgstr ""
    228276
    229277#: src/Integration/WooCommerce.php:255
    230 #: src/Integration/WooCommerce.php:980
    231 msgid "Product Tag"
     278msgid "Top Rated Products"
    232279msgstr ""
    233280
    234281#: src/Integration/WooCommerce.php:256
    235 msgid "Top Rated Products"
    236 msgstr ""
    237 
    238 #: src/Integration/WooCommerce.php:257
    239282msgid "Shipping tier not found"
    240283msgstr ""
    241284
    242 #: src/Integration/WooCommerce.php:837
     285#: src/Integration/WooCommerce.php:834
    243286msgid "Grouped Product"
    244287msgstr ""
    245288
    246 #: src/Integration/WooCommerce.php:871
     289#: src/Integration/WooCommerce.php:868
    247290msgid "Search Results"
    248291msgstr ""
    249292
    250 #: src/Integration/WooCommerce.php:871
    251 #: src/Integration/WooCommerce.php:912
    252 #: src/Integration/WooCommerce.php:945
     293#: src/Integration/WooCommerce.php:868
     294#: src/Integration/WooCommerce.php:909
     295#: src/Integration/WooCommerce.php:942
    253296msgid "General Product List"
    254297msgstr ""
    255298
    256 #: src/Integration/WooCommerce.php:1128
     299#: src/Integration/WooCommerce.php:1107
    257300msgid "GTM Kit data."
    258301msgstr ""
     
    325368
    326369#: assets/admin/settings.js:1
    327 #: assets/admin/settings.js:15
     370#: assets/admin/settings.js:22
    328371msgid "Notifications"
    329372msgstr ""
     
    338381
    339382#: assets/admin/settings.js:1
    340 #: assets/admin/settings.js:15
     383#: assets/admin/settings.js:22
    341384msgid "No notifications at the moment."
    342385msgstr ""
     
    361404
    362405#: assets/admin/settings.js:1
    363 #: assets/admin/settings.js:13
     406#: assets/admin/settings.js:19
    364407msgid "Tutorials"
    365408msgstr ""
     
    455498
    456499#: assets/admin/settings.js:1
    457 #: assets/admin/settings.js:13
     500#: assets/admin/settings.js:19
    458501msgid "Learn more"
    459502msgstr ""
     
    672715
    673716#: assets/admin/settings.js:1
    674 #: assets/admin/settings.js:15
     717#: assets/admin/settings.js:22
    675718msgid "Post data"
    676719msgstr ""
     
    697740
    698741#: assets/admin/settings.js:1
    699 #: assets/admin/settings.js:13
     742#: assets/admin/settings.js:19
    700743msgid "User Data"
    701744msgstr ""
     
    738781
    739782#: assets/admin/settings.js:1
    740 #: assets/admin/settings.js:15
     783#: assets/admin/settings.js:22
    741784msgid "Google Consent Mode"
    742785msgstr ""
     
    869912
    870913#: assets/admin/settings.js:1
    871 #: assets/admin/settings.js:15
     914#: assets/admin/settings.js:22
    872915msgid "Misc"
    873916msgstr ""
     
    910953
    911954#. translators: %s is the name of the plugin.
    912 #: assets/admin/settings.js:3
     955#: assets/admin/settings.js:4
    913956msgid "%s is not active"
    914 msgstr ""
    915 
    916 #. translators: %s is the name of the plugin.
    917 #: assets/admin/settings.js:5
    918 msgid "If you haven't installed and activated %s you must do that."
    919957msgstr ""
    920958
    921959#. translators: %s is the name of the plugin.
    922960#: assets/admin/settings.js:7
     961msgid "If you haven't installed and activated %s you must do that."
     962msgstr ""
     963
     964#. translators: %s is the name of the plugin.
     965#: assets/admin/settings.js:10
    923966msgid "Install %s"
    924967msgstr ""
    925968
    926 #: assets/admin/settings.js:7
     969#: assets/admin/settings.js:10
    927970msgid "(not set)"
    928 msgstr ""
    929 
    930 #. translators: %s is the name of the plugin.
    931 #: assets/admin/settings.js:9
    932 msgid "%s Integration"
    933 msgstr ""
    934 
    935 #. translators: %s is the name of the plugin.
    936 #: assets/admin/settings.js:11
    937 msgid "Track %s"
    938971msgstr ""
    939972
    940973#. translators: %s is the name of the plugin.
    941974#: assets/admin/settings.js:13
     975msgid "%s Integration"
     976msgstr ""
     977
     978#. translators: %s is the name of the plugin.
     979#: assets/admin/settings.js:16
     980msgid "Track %s"
     981msgstr ""
     982
     983#. translators: %s is the name of the plugin.
     984#: assets/admin/settings.js:19
    942985msgid "Activate the %s integration"
    943986msgstr ""
    944987
    945 #: assets/admin/settings.js:13
     988#: assets/admin/settings.js:19
    946989msgid "Retail"
    947990msgstr ""
    948991
    949 #: assets/admin/settings.js:13
     992#: assets/admin/settings.js:19
    950993msgid "Education"
    951994msgstr ""
    952995
    953 #: assets/admin/settings.js:13
     996#: assets/admin/settings.js:19
    954997msgid "Flights"
    955998msgstr ""
    956999
    957 #: assets/admin/settings.js:13
     1000#: assets/admin/settings.js:19
    9581001msgid "Hotel rental"
    9591002msgstr ""
    9601003
    961 #: assets/admin/settings.js:13
     1004#: assets/admin/settings.js:19
    9621005msgid "Jobs"
    9631006msgstr ""
    9641007
    965 #: assets/admin/settings.js:13
     1008#: assets/admin/settings.js:19
    9661009msgid "Local deals"
    9671010msgstr ""
    9681011
    969 #: assets/admin/settings.js:13
     1012#: assets/admin/settings.js:19
    9701013msgid "Real estate"
    9711014msgstr ""
    9721015
    973 #: assets/admin/settings.js:13
     1016#: assets/admin/settings.js:19
    9741017msgid "Travel"
    9751018msgstr ""
    9761019
    977 #: assets/admin/settings.js:13
     1020#: assets/admin/settings.js:19
    9781021msgid "Custom"
    9791022msgstr ""
    9801023
    981 #: assets/admin/settings.js:13
     1024#: assets/admin/settings.js:19
     1025msgid "Unlock with premium"
     1026msgstr ""
     1027
     1028#: assets/admin/settings.js:19
    9821029msgid "WooCommerce"
    9831030msgstr ""
    9841031
    985 #: assets/admin/settings.js:13
     1032#: assets/admin/settings.js:19
    9861033msgid "Basic settings"
    9871034msgstr ""
    9881035
    989 #: assets/admin/settings.js:13
     1036#: assets/admin/settings.js:19
    9901037msgid "Brand"
    9911038msgstr ""
    9921039
    993 #: assets/admin/settings.js:13
     1040#: assets/admin/settings.js:19
    9941041msgid "Select the taxonomy that is used for product brands"
    9951042msgstr ""
    9961043
    997 #: assets/admin/settings.js:13
     1044#: assets/admin/settings.js:19
    9981045msgid "Use SKU instead of ID"
    9991046msgstr ""
    10001047
    1001 #: assets/admin/settings.js:13
     1048#: assets/admin/settings.js:19
    10021049msgid "Use SKU instead of the product ID with fallback to ID if no SKU is set."
    10031050msgstr ""
    10041051
    1005 #: assets/admin/settings.js:13
     1052#: assets/admin/settings.js:19
    10061053msgid "Exclude tax"
    10071054msgstr ""
    10081055
    1009 #: assets/admin/settings.js:13
     1056#: assets/admin/settings.js:19
    10101057msgid "Exclude tax from prices and revenue"
    10111058msgstr ""
    10121059
    1013 #: assets/admin/settings.js:13
     1060#: assets/admin/settings.js:19
    10141061msgid "Exclude shipping from revenue"
    10151062msgstr ""
    10161063
    1017 #: assets/admin/settings.js:13
     1064#: assets/admin/settings.js:19
    10181065msgid "Include customer data"
    10191066msgstr ""
    10201067
    1021 #: assets/admin/settings.js:13
     1068#: assets/admin/settings.js:19
    10221069msgid "Enable this option to include customer data in the data layer on the \"purchase\" event."
    10231070msgstr ""
    10241071
    1025 #: assets/admin/settings.js:13
     1072#: assets/admin/settings.js:19
    10261073msgid "User-Provided Data"
    10271074msgstr ""
    10281075
    1029 #: assets/admin/settings.js:13
     1076#: assets/admin/settings.js:19
    10301077msgid "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'."
    10311078msgstr ""
    10321079
    1033 #: assets/admin/settings.js:13
     1080#: assets/admin/settings.js:19
    10341081msgid "Webhooks for server-side tracking"
    10351082msgstr ""
    10361083
    1037 #: assets/admin/settings.js:13
     1084#: assets/admin/settings.js:19
    10381085msgid "In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain"
    10391086msgstr ""
    10401087
    1041 #: assets/admin/settings.js:13
     1088#: assets/admin/settings.js:19
    10421089msgid "Go to sGTM settings"
    10431090msgstr ""
    10441091
    1045 #: assets/admin/settings.js:13
     1092#: assets/admin/settings.js:19
    10461093msgid "In order to use webhooks you must configure you server-side container to handle the webhooks"
    10471094msgstr ""
    10481095
    1049 #: assets/admin/settings.js:13
     1096#: assets/admin/settings.js:19
    10501097#: assets/admin/wizard.js:1
    10511098msgid "Go to GTM Templates"
    10521099msgstr ""
    10531100
    1054 #: assets/admin/settings.js:13
     1101#: assets/admin/settings.js:19
    10551102msgid "Send webhooks to server GTM container"
    10561103msgstr ""
    10571104
    1058 #: assets/admin/settings.js:13
     1105#: assets/admin/settings.js:19
    10591106msgid "This option will allow webhooks to be sent to your server GTM container."
    10601107msgstr ""
    10611108
    1062 #: assets/admin/settings.js:13
     1109#: assets/admin/settings.js:19
    10631110msgid "Purchase webhook"
    10641111msgstr ""
    10651112
    1066 #: assets/admin/settings.js:13
     1113#: assets/admin/settings.js:19
    10671114msgid "Enable this option to include the permalink structure of the product base, category base, tag base and attribute base."
    10681115msgstr ""
    10691116
    1070 #: assets/admin/settings.js:13
     1117#: assets/admin/settings.js:19
    10711118msgid "Refund webhook"
    10721119msgstr ""
    10731120
    1074 #: assets/admin/settings.js:13
     1121#: assets/admin/settings.js:19
    10751122msgid "Enable this option to include the path of cart, checkout, order received and my account page."
    10761123msgstr ""
    10771124
    1078 #: assets/admin/settings.js:13
     1125#: assets/admin/settings.js:19
    10791126msgid "Event customization"
    10801127msgstr ""
    10811128
    1082 #: assets/admin/settings.js:13
     1129#: assets/admin/settings.js:19
    10831130msgid "Push view_item_list when the list is updated using a product filter."
    10841131msgstr ""
    10851132
    1086 #: assets/admin/settings.js:13
     1133#: assets/admin/settings.js:19
    10871134msgid "Only only push view_item_list once per per page for each list."
    10881135msgstr ""
    10891136
    1090 #: assets/admin/settings.js:13
     1137#: assets/admin/settings.js:19
    10911138msgid "Do you what to push the view_item_list event if the list is updated using a filter or just once per page view."
    10921139msgstr ""
    10931140
    1094 #: assets/admin/settings.js:13
     1141#: assets/admin/settings.js:19
    10951142msgid "Only push view_item on the master product"
    10961143msgstr ""
    10971144
    1098 #: assets/admin/settings.js:13
     1145#: assets/admin/settings.js:19
    10991146msgid "Push view_item on master and variation products (higher number of views)."
    11001147msgstr ""
    11011148
    1102 #: assets/admin/settings.js:13
     1149#: assets/admin/settings.js:19
    11031150msgid "Only push view_item on variation products."
    11041151msgstr ""
    11051152
    1106 #: assets/admin/settings.js:13
     1153#: assets/admin/settings.js:19
    11071154msgid "When do you want to fire the \"view_item\" event on variable products?"
    11081155msgstr ""
    11091156
    1110 #: assets/admin/settings.js:13
     1157#: assets/admin/settings.js:19
    11111158msgid "When the 'Place order' button is clicked"
    11121159msgstr ""
    11131160
    1114 #: assets/admin/settings.js:13
     1161#: assets/admin/settings.js:19
    11151162msgid "When a shipment method is selected with fallback to the 'Place order' button."
    11161163msgstr ""
    11171164
    1118 #: assets/admin/settings.js:13
     1165#: assets/admin/settings.js:19
    11191166msgid "Disable the 'add_shipment_info' event."
    11201167msgstr ""
    11211168
    1122 #: assets/admin/settings.js:13
     1169#: assets/admin/settings.js:19
    11231170msgid "When do you want to fire the \"add_shipment_info\" event?"
    11241171msgstr ""
    11251172
    1126 #: assets/admin/settings.js:13
     1173#: assets/admin/settings.js:19
    11271174msgid "When a payment method is selected with fallback to the 'Place order' button."
    11281175msgstr ""
    11291176
    1130 #: assets/admin/settings.js:13
     1177#: assets/admin/settings.js:19
    11311178msgid "Disable the 'add_payment_info' event."
    11321179msgstr ""
    11331180
    1134 #: assets/admin/settings.js:13
     1181#: assets/admin/settings.js:19
    11351182msgid "When do you want to fire the \"add_payment_info\" event?"
    11361183msgstr ""
    11371184
    1138 #: assets/admin/settings.js:13
     1185#: assets/admin/settings.js:19
    11391186msgid "Google Ads Settings"
    11401187msgstr ""
    11411188
    1142 #: assets/admin/settings.js:13
     1189#: assets/admin/settings.js:19
    11431190msgid "Google Business Vertical"
    11441191msgstr ""
    11451192
    1146 #: assets/admin/settings.js:13
     1193#: assets/admin/settings.js:19
    11471194msgid "In order to use Google Ads Remarketing you must select your business type (vertical)."
    11481195msgstr ""
    11491196
    1150 #: assets/admin/settings.js:13
     1197#: assets/admin/settings.js:19
    11511198msgid "Product ID prefix"
    11521199msgstr ""
    11531200
    1154 #: assets/admin/settings.js:13
     1201#: assets/admin/settings.js:19
    11551202msgid "Enter prefix"
    11561203msgstr ""
    11571204
    1158 #: assets/admin/settings.js:13
     1205#: assets/admin/settings.js:19
    11591206msgid "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."
    11601207msgstr ""
    11611208
    1162 #: assets/admin/settings.js:13
     1209#: assets/admin/settings.js:19
    11631210msgid "Custom CSS Selectors"
    11641211msgstr ""
    11651212
    1166 #: assets/admin/settings.js:13
     1213#: assets/admin/settings.js:19
    11671214msgid "If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors."
    11681215msgstr ""
    11691216
    1170 #: assets/admin/settings.js:13
     1217#: assets/admin/settings.js:19
    11711218msgid "Single Product (add_to_wishlist):"
    11721219msgstr ""
    11731220
    1174 #: assets/admin/settings.js:13
     1221#: assets/admin/settings.js:19
    11751222msgid "Enter CSS selector"
    11761223msgstr ""
    11771224
    1178 #: assets/admin/settings.js:13
     1225#: assets/admin/settings.js:19
    11791226msgid "Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event."
    11801227msgstr ""
    11811228
    1182 #: assets/admin/settings.js:13
     1229#: assets/admin/settings.js:19
    11831230msgid "Product List (select_item):"
    11841231msgstr ""
    11851232
    1186 #: assets/admin/settings.js:13
     1233#: assets/admin/settings.js:19
    11871234msgid "Enter the CSS selector that matches your product list item, which should be use to fire the select_item event."
    11881235msgstr ""
    11891236
    1190 #: assets/admin/settings.js:13
     1237#: assets/admin/settings.js:19
    11911238msgid "Product List (add_to_wishlist):"
    11921239msgstr ""
    11931240
    1194 #: assets/admin/settings.js:13
     1241#: assets/admin/settings.js:19
    11951242msgid "Advanced Settings"
    11961243msgstr ""
    11971244
    1198 #: assets/admin/settings.js:13
     1245#: assets/admin/settings.js:19
    11991246msgid "Dequeue the default JavaScript"
    12001247msgstr ""
    12011248
    1202 #: assets/admin/settings.js:13
     1249#: assets/admin/settings.js:19
    12031250msgid "Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript."
    12041251msgstr ""
    12051252
    1206 #: assets/admin/settings.js:13
     1253#: assets/admin/settings.js:19
    12071254msgid "Include permalink structure"
    12081255msgstr ""
    12091256
    1210 #: assets/admin/settings.js:13
     1257#: assets/admin/settings.js:19
    12111258msgid "Include path of pages"
    12121259msgstr ""
    12131260
    1214 #: assets/admin/settings.js:13
     1261#: assets/admin/settings.js:19
    12151262msgid "Contact Form 7"
    12161263msgstr ""
    12171264
    1218 #: assets/admin/settings.js:13
     1265#: assets/admin/settings.js:19
    12191266msgid "Basic Settings"
    12201267msgstr ""
    12211268
    1222 #: assets/admin/settings.js:13
     1269#: assets/admin/settings.js:19
    12231270msgid "Load JavaScript"
    12241271msgstr ""
    12251272
    1226 #: assets/admin/settings.js:13
     1273#: assets/admin/settings.js:19
    12271274msgid "Only on pages where the Contact Form 7 script is registered (recommended)."
    12281275msgstr ""
    12291276
    1230 #: assets/admin/settings.js:13
     1277#: assets/admin/settings.js:19
    12311278msgid "On all pages"
    12321279msgstr ""
    12331280
    1234 #: assets/admin/settings.js:13
     1281#: assets/admin/settings.js:19
    12351282msgid "Where do you want load the JavaScript?"
    12361283msgstr ""
    12371284
    1238 #: assets/admin/settings.js:13
     1285#: assets/admin/settings.js:19
    12391286msgid "Easy Digital Downloads"
    12401287msgstr ""
    12411288
    1242 #: assets/admin/settings.js:13
     1289#: assets/admin/settings.js:19
    12431290msgid "Advanced settings"
    12441291msgstr ""
    12451292
    1246 #: assets/admin/settings.js:13
     1293#: assets/admin/settings.js:19
    12471294msgid "Get template"
    12481295msgstr ""
    12491296
    1250 #: assets/admin/settings.js:13
     1297#: assets/admin/settings.js:19
    12511298#: assets/admin/wizard.js:1
    12521299msgid "Getting Started"
    12531300msgstr ""
    12541301
    1255 #: assets/admin/settings.js:13
     1302#: assets/admin/settings.js:19
    12561303msgid "Configure your Google Tag Manager container"
    12571304msgstr ""
    12581305
    1259 #: assets/admin/settings.js:13
     1306#: assets/admin/settings.js:19
    12601307msgid "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."
    12611308msgstr ""
    12621309
    1263 #: assets/admin/settings.js:13
     1310#: assets/admin/settings.js:19
    12641311msgid "Below you will find GTM container template files, with all the necessary tags, trigger, and variables."
    12651312msgstr ""
    12661313
    1267 #: assets/admin/settings.js:13
     1314#: assets/admin/settings.js:19
    12681315msgid "Please read the guide on how to use the import files and configure GTM."
    12691316msgstr ""
    12701317
    1271 #: assets/admin/settings.js:13
     1318#: assets/admin/settings.js:19
    12721319msgid "Read the guide"
    12731320msgstr ""
    12741321
    1275 #: assets/admin/settings.js:13
    1276 #: assets/admin/settings.js:15
     1322#: assets/admin/settings.js:19
     1323#: assets/admin/settings.js:22
    12771324msgid "Templates"
    12781325msgstr ""
    12791326
    1280 #: assets/admin/settings.js:13
     1327#: assets/admin/settings.js:19
    12811328msgid "GTM container import files:"
    12821329msgstr ""
    12831330
    1284 #: assets/admin/settings.js:13
     1331#: assets/admin/settings.js:19
    12851332msgid "Necessary modifications:"
    12861333msgstr ""
    12871334
    1288 #: assets/admin/settings.js:13
     1335#: assets/admin/settings.js:19
    12891336msgid "Need help?"
    12901337msgstr ""
    12911338
    1292 #: assets/admin/settings.js:13
     1339#: assets/admin/settings.js:19
    12931340msgid "We are here to help if you have any questions."
    12941341msgstr ""
    12951342
    1296 #: assets/admin/settings.js:13
     1343#: assets/admin/settings.js:19
    12971344msgid "See support options"
    12981345msgstr ""
    12991346
    1300 #: assets/admin/settings.js:13
     1347#: assets/admin/settings.js:19
    13011348msgid "Get support"
    13021349msgstr ""
    13031350
    1304 #: assets/admin/settings.js:13
     1351#: assets/admin/settings.js:19
    13051352msgid "Support options"
    13061353msgstr ""
    13071354
    1308 #: assets/admin/settings.js:13
     1355#: assets/admin/settings.js:19
     1356msgid "WooCommerce Premium Support"
     1357msgstr ""
     1358
     1359#: assets/admin/settings.js:19
    13091360msgid "WordPress.org Support Forum"
    13101361msgstr ""
    13111362
    1312 #: assets/admin/settings.js:13
     1363#: assets/admin/settings.js:19
    13131364msgid "GITHub repository"
    13141365msgstr ""
    13151366
    1316 #: assets/admin/settings.js:13
     1367#: assets/admin/settings.js:19
    13171368msgid "Plugin Homepage"
    13181369msgstr ""
    13191370
    1320 #: assets/admin/settings.js:13
     1371#: assets/admin/settings.js:19
    13211372msgid "Share system data with the GTM Kit support team"
    13221373msgstr ""
    13231374
    1324 #: assets/admin/settings.js:13
     1375#: assets/admin/settings.js:19
    13251376msgid "If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:"
    13261377msgstr ""
    13271378
    1328 #: assets/admin/settings.js:13
     1379#: assets/admin/settings.js:19
    13291380msgid "Enter support ticket"
    13301381msgstr ""
    13311382
    1332 #: assets/admin/settings.js:13
     1383#: assets/admin/settings.js:19
    13331384msgid "Send system data"
    13341385msgstr ""
    13351386
    1336 #: assets/admin/settings.js:13
     1387#: assets/admin/settings.js:19
    13371388msgid "About GTM Kit"
    13381389msgstr ""
    13391390
    1340 #: assets/admin/settings.js:13
     1391#: assets/admin/settings.js:19
    13411392msgid "Version:"
    13421393msgstr ""
    13431394
    1344 #: assets/admin/settings.js:13
     1395#: assets/admin/settings.js:19
    13451396msgid "Learn about changes and follow the development of GTM Kit:"
    13461397msgstr ""
    13471398
    1348 #: assets/admin/settings.js:13
     1399#: assets/admin/settings.js:19
    13491400msgid "The changelog"
    13501401msgstr ""
    13511402
    1352 #: assets/admin/settings.js:13
     1403#: assets/admin/settings.js:19
    13531404msgid "The GitHub repository"
    13541405msgstr ""
    13551406
    13561407#. translators: %d is number %s can be either 'problem' or 'notification'.
    1357 #: assets/admin/settings.js:15
     1408#: assets/admin/settings.js:22
    13581409msgid "You have %d hidden %s:"
    13591410msgid_plural "You have %d hidden %ss:"
     
    13611412msgstr[1] ""
    13621413
    1363 #: assets/admin/settings.js:15
     1414#: assets/admin/settings.js:22
    13641415msgid "Problems"
    13651416msgstr ""
    13661417
    1367 #: assets/admin/settings.js:15
     1418#: assets/admin/settings.js:22
     1419msgid "Enhanced Compatibility"
     1420msgstr ""
     1421
     1422#: assets/admin/settings.js:22
     1423msgid "Based on the currently active theme and plugins, you will gain the following features tailored specifically to your setup if you upgrade to the GTM Kit Woo Add-On:"
     1424msgstr ""
     1425
     1426#: assets/admin/settings.js:22
     1427msgid "Your theme is supported with enhanced compatibility."
     1428msgstr ""
     1429
     1430#: assets/admin/settings.js:22
     1431msgid "Enhanced Plugin Support:"
     1432msgstr ""
     1433
     1434#: assets/admin/settings.js:22
     1435msgid "Learn More"
     1436msgstr ""
     1437
     1438#: assets/admin/settings.js:22
    13681439msgid "Google Tag Manager Templates"
    13691440msgstr ""
    13701441
    1371 #: assets/admin/settings.js:15
     1442#: assets/admin/settings.js:22
    13721443msgid "Dashboard"
    13731444msgstr ""
    13741445
    1375 #: assets/admin/settings.js:15
     1446#: assets/admin/settings.js:22
    13761447msgid "Container"
    13771448msgstr ""
    13781449
    1379 #: assets/admin/settings.js:15
     1450#: assets/admin/settings.js:22
    13801451msgid "User data"
    13811452msgstr ""
    13821453
    1383 #: assets/admin/settings.js:15
     1454#: assets/admin/settings.js:22
    13841455msgid "Support"
    13851456msgstr ""
  • gtm-kit/tags/2.0.1/readme.txt

    r3149785 r3156080  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.6
    6 Stable tag: 2.0.0
     6Stable tag: 2.0.1
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    9292== Changelog ==
    9393
    94 = 2.0 =
     94= 2.0.1 =
     95
     96Release date: 2024-09-23
     97
     98#### Bugfixes:
     99* Fix an edge case that could cause a fatal error in admin_body_class().
     100
     101= 2.0.0 =
    95102
    96103Release date: 2024-09-DD
  • gtm-kit/tags/2.0.1/src/Admin/AbstractOptionsPage.php

    r3149785 r3156080  
    166166     * Add body class.
    167167     *
    168      * @param string $classes The body classes.
    169      *
    170      * @return string
    171      */
    172     public function admin_body_class( string $classes ): string {
     168     * @param string|null $classes The body classes.
     169     *
     170     * @return string
     171     */
     172    public function admin_body_class( ?string $classes ): string {
     173        $classes = $classes ?? '';
    173174
    174175        $page_parent = get_admin_page_parent();
  • gtm-kit/tags/2.0.1/src/Admin/GeneralOptionsPage.php

    r3149785 r3156080  
    124124            'gtmkitSettings',
    125125            [
    126                 'rootId'          => 'gtmkit-settings',
    127                 'currentPage'     => $page_slug,
    128                 'root'            => \esc_url_raw( rest_url() ),
    129                 'nonce'           => \wp_create_nonce( 'wp_rest' ),
    130                 'tutorials'       => $this->get_tutorials(),
    131                 'integrations'    => Integrations::get_integrations(),
    132                 'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    133                 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    134                 'settings'        => $this->options->get_all_raw(),
    135                 'site_data'       => $this->util->get_site_data( $this->options->get_all_raw() ),
    136                 'user_roles'      => $this->get_user_roles(),
    137                 'notifications'   => $this->get_notifications(),
     126                'rootId'        => 'gtmkit-settings',
     127                'currentPage'   => $page_slug,
     128                'root'          => \esc_url_raw( rest_url() ),
     129                'nonce'         => \wp_create_nonce( 'wp_rest' ),
     130                'tutorials'     => $this->get_tutorials(),
     131                'integrations'  => Integrations::get_integrations(),
     132                'adminPageUrl'  => $this->util->get_admin_page_url(),
     133                'settings'      => $this->options->get_all_raw(),
     134                'site_data'     => $this->util->get_site_data( $this->options->get_all_raw() ),
     135                'user_roles'    => $this->get_user_roles(),
     136                'notifications' => $this->get_notifications(),
    138137            ]
    139138        );
  • gtm-kit/tags/2.0.1/src/Admin/HelpOptionsPage.php

    r3149785 r3156080  
    8888            'gtmkitSettings',
    8989            [
    90                 'rootId'          => 'gtmkit-settings',
    91                 'currentPage'     => $page_slug,
    92                 'root'            => \esc_url_raw( rest_url() ),
    93                 'nonce'           => \wp_create_nonce( 'wp_rest' ),
    94                 'tutorials'       => $this->get_tutorials(),
    95                 'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    96                 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    97                 'settings'        => $this->options->get_all_raw(),
    98                 'site_data'       => [ 'gtmkit_version' => GTMKIT_VERSION ],
    99                 'isPremium'       => ( new PremiumConditional() )->is_met(),
     90                'rootId'       => 'gtmkit-settings',
     91                'currentPage'  => $page_slug,
     92                'root'         => \esc_url_raw( rest_url() ),
     93                'nonce'        => \wp_create_nonce( 'wp_rest' ),
     94                'tutorials'    => $this->get_tutorials(),
     95                'adminPageUrl' => $this->util->get_admin_page_url(),
     96                'settings'     => $this->options->get_all_raw(),
     97                'site_data'    => [ 'gtmkit_version' => GTMKIT_VERSION ],
     98                'isPremium'    => ( new PremiumConditional() )->is_met(),
    10099            ]
    101100        );
  • gtm-kit/tags/2.0.1/src/Admin/IntegrationsOptionsPage.php

    r3149785 r3156080  
    115115                'isPremium'        => ( new PremiumConditional() )->is_met(),
    116116                'integrations'     => Integrations::get_integrations(),
    117                 'dashboardUrl'     => \menu_page_url( 'gtmkit_general', false ),
    118                 'integrationsUrl'  => \menu_page_url( 'gtmkit_integrations', false ),
    119                 'templatesUrl'     => \menu_page_url( 'gtmkit_templates', false ),
    120                 'pluginInstallUrl' => $admin_url . 'plugin-install.php?tab=search&type=term&s=',
     117                'adminPageUrl'     => $this->util->get_admin_page_url(),
     118                'pluginInstallUrl' => $this->util->get_plugin_install_url(),
    121119                'plugins'          => $this->get_plugins(),
    122120                'taxonomyOptions'  => $taxonomy_options,
  • gtm-kit/tags/2.0.1/src/Admin/PluginSuggestions.php

    r3149785 r3156080  
    1111use TLA_Media\GTM_Kit\Common\Conditionals\PremiumConditional;
    1212use TLA_Media\GTM_Kit\Common\Conditionals\WooCommerceConditional;
     13use TLA_Media\GTM_Kit\Common\Util;
    1314use TLA_Media\GTM_Kit\Options;
    1415
     
    3334
    3435    /**
     36     * An instance of Util.
     37     *
     38     * @var Util
     39     */
     40    private Util $util;
     41
     42    /**
    3543     * Constructor.
    3644     *
    3745     * @param NotificationsHandler $notifications_handler The notifications handler to add notifications to.
    3846     * @param PluginAvailability   $plugin_availability Plugin Availability.
    39      */
    40     public function __construct( NotificationsHandler $notifications_handler, PluginAvailability $plugin_availability ) {
     47     * @param Util                 $util Util.
     48     */
     49    public function __construct( NotificationsHandler $notifications_handler, PluginAvailability $plugin_availability, Util $util ) {
    4150        $this->notifications_handler = $notifications_handler;
    4251        $this->plugin_availability   = $plugin_availability;
     52        $this->util                  = $util;
    4353    }
    4454
     
    4858     * @param NotificationsHandler $notifications_handler The notifications handler to add notifications to.
    4959     * @param PluginAvailability   $plugin_availability Plugin Availability.
    50      *
    51      * @return void
    52      */
    53     public static function register( NotificationsHandler $notifications_handler, PluginAvailability $plugin_availability ): void {
    54         $page = new self( $notifications_handler, $plugin_availability );
     60     * @param Util                 $util Util.
     61     *
     62     * @return void
     63     */
     64    public static function register( NotificationsHandler $notifications_handler, PluginAvailability $plugin_availability, Util $util ): void {
     65        $page = new self( $notifications_handler, $plugin_availability, $util );
    5566
    5667        add_action( 'admin_init', [ $page->plugin_availability, 'register' ] );
     
    304315    protected function get_gf_wishlist_plugin_notification( string $notification_id ): Notification {
    305316
    306         $link_1 = '<a href="https://jump.gtmkit.com/link/2-30DDC" class="gtmkit-text-color-primary gtmkit hover:gtmkit-underline gtmkit-font-bold">GTM Kit Woo Add-On</a>';
    307         $link_2 = '<a href="https://jump.gtmkit.com/link/3-63585" class="gtmkit-text-color-primary gtmkit hover:gtmkit-underline gtmkit-font-bold">Grandfathered Wishlist Functionality</a>';
     317        $upgrades_url = $this->util->get_admin_page_url() . 'upgrades';
     318        $link_1       = '<a href="' . $upgrades_url . '" class="gtmkit-text-color-primary gtmkit hover:gtmkit-underline gtmkit-font-bold">GTM Kit Woo Add-On</a>';
     319        $link_2       = '<a href="https://jump.gtmkit.com/link/3-63585" class="gtmkit-text-color-primary gtmkit hover:gtmkit-underline gtmkit-font-bold">Grandfathered Wishlist Functionality</a>';
    308320
    309321        $message = sprintf(
  • gtm-kit/tags/2.0.1/src/Admin/SetupWizard.php

    r3149785 r3156080  
    147147                'root'         => esc_url_raw( rest_url() ),
    148148                'nonce'        => wp_create_nonce( 'wp_rest' ),
    149                 'dashboardUrl' => menu_page_url( 'gtmkit_general', false ),
    150                 'templatesUrl' => menu_page_url( 'gtmkit_templates', false ),
    151                 'helpUrl'      => menu_page_url( 'gtmkit_help', false ),
     149                'adminPageUrl' => $this->util->get_admin_page_url(),
    152150                'settings'     => $this->options->get_all_raw(),
    153151                'site_data'    => $this->util->get_site_data( $this->options->get_all_raw() ),
  • gtm-kit/tags/2.0.1/src/Admin/TemplatesOptionsPage.php

    r3149785 r3156080  
    8686            'gtmkitSettings',
    8787            [
    88                 'rootId'          => 'gtmkit-settings',
    89                 'currentPage'     => $page_slug,
    90                 'root'            => \esc_url_raw( rest_url() ),
    91                 'nonce'           => \wp_create_nonce( 'wp_rest' ),
    92                 'templates'       => $this->get_templates(),
    93                 'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    94                 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    95                 'templatesUrl'    => \menu_page_url( 'gtmkit_templates', false ),
    96                 'settings'        => $this->options->get_all_raw(),
     88                'rootId'       => 'gtmkit-settings',
     89                'currentPage'  => $page_slug,
     90                'root'         => \esc_url_raw( rest_url() ),
     91                'nonce'        => \wp_create_nonce( 'wp_rest' ),
     92                'templates'    => $this->get_templates(),
     93                'adminPageUrl' => $this->util->get_admin_page_url(),
     94                'settings'     => $this->options->get_all_raw(),
    9795            ]
    9896        );
  • gtm-kit/tags/2.0.1/src/Admin/UpgradesOptionsPage.php

    r3149785 r3156080  
    8888            'gtmkitSettings',
    8989            [
    90                 'rootId'          => 'gtmkit-settings',
    91                 'currentPage'     => $page_slug,
    92                 'root'            => \esc_url_raw( rest_url() ),
    93                 'nonce'           => \wp_create_nonce( 'wp_rest' ),
    94                 'opportunities'   => $this->get_upgrade_opportunities(),
    95                 'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    96                 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    97                 'settings'        => $this->options->get_all_raw(),
     90                'rootId'        => 'gtmkit-settings',
     91                'currentPage'   => $page_slug,
     92                'root'          => \esc_url_raw( rest_url() ),
     93                'nonce'         => \wp_create_nonce( 'wp_rest' ),
     94                'opportunities' => $this->get_upgrade_opportunities(),
     95                'adminPageUrl'  => $this->util->get_admin_page_url(),
     96                'settings'      => $this->options->get_all_raw(),
    9897            ]
    9998        );
  • gtm-kit/tags/2.0.1/src/Common/Util.php

    r3149785 r3156080  
    209209
    210210        if ( ! function_exists( 'get_plugins' ) ) {
     211            // @phpstan-ignore-next-line
    211212            require_once ABSPATH . 'wp-admin/includes/plugin.php';
    212213        }
     
    452453        return $this->normalize_and_hash( $hash_algorithm, $normalized_email, true );
    453454    }
     455
     456    /**
     457     * Get admin page base URL
     458     *
     459     * @return string
     460     */
     461    public function get_admin_page_url(): string {
     462        return $this->get_admin_url() . 'admin.php?page=gtmkit_';
     463    }
     464
     465    /**
     466     * Get the plugin install URL
     467     *
     468     * @return string
     469     */
     470    public function get_plugin_install_url(): string {
     471        return $this->get_admin_url() . 'plugin-install.php?tab=search&type=term&s=';
     472    }
     473
     474    /**
     475     * Get admin url
     476     *
     477     * @return string
     478     */
     479    private function get_admin_url(): string {
     480        return is_network_admin() ? network_admin_url() : admin_url();
     481    }
    454482}
  • gtm-kit/tags/2.0.1/src/Installation/PluginDataImport.php

    r3149785 r3156080  
    234234    private function is_plugin_active( string $plugin ): bool {
    235235        if ( ! function_exists( 'is_plugin_active' ) ) {
    236 
     236            // @phpstan-ignore-next-line
    237237            require_once ABSPATH . 'wp-admin/includes/plugin.php';
    238238
  • gtm-kit/tags/2.0.1/src/Installation/Upgrade.php

    r3149785 r3156080  
    163163
    164164        if ( ! function_exists( 'get_plugins' ) ) {
     165            // @phpstan-ignore-next-line
    165166            require_once ABSPATH . 'wp-admin/includes/plugin.php';
    166167        }
  • gtm-kit/tags/2.0.1/src/Integration/EasyDigitalDownloads.php

    r3149785 r3156080  
    485485     * @return float
    486486     */
    487     public function get_price_to_display( int $download_id, string $price_index = null ): float {
     487    public function get_price_to_display( int $download_id, ?string $price_index = null ): float {
    488488
    489489        if ( edd_has_variable_prices( $download_id ) ) {
  • gtm-kit/tags/2.0.1/src/Options.php

    r3149785 r3156080  
    149149
    150150        if ( ! function_exists( 'is_plugin_active' ) ) {
     151            // @phpstan-ignore-next-line
    151152            require_once ABSPATH . 'wp-admin/includes/plugin.php';
    152153        }
  • gtm-kit/tags/2.0.1/vendor/composer/installed.php

    r3149785 r3156080  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '8f779ad9f08f3aeba4a68076cd25114917840707',
     6        'reference' => 'b3228238bcfd8a33cbd843ee052f21ca9b557927',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '8f779ad9f08f3aeba4a68076cd25114917840707',
     16            'reference' => 'b3228238bcfd8a33cbd843ee052f21ca9b557927',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • gtm-kit/trunk/assets/admin/settings.asset.php

    r3149785 r3156080  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'e9e4e88a99fd728885a0');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'a518367e05cc33818189');
  • gtm-kit/trunk/assets/admin/settings.js

    r3149785 r3156080  
    1 (()=>{var t={838:function(t){t.exports=function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:o,seal:s,create:r}=Object,{apply:l,construct:m}="undefined"!=typeof Reflect&&Reflect;o||(o=function(t){return t}),s||(s=function(t){return t}),l||(l=function(t,e,n){return t.apply(e,n)}),m||(m=function(t,e){return new t(...e)});const c=v(Array.prototype.forEach),g=v(Array.prototype.pop),u=v(Array.prototype.push),d=v(String.prototype.toLowerCase),p=v(String.prototype.toString),h=v(String.prototype.match),k=v(String.prototype.replace),f=v(String.prototype.indexOf),_=v(String.prototype.trim),x=v(Object.prototype.hasOwnProperty),b=v(RegExp.prototype.test),S=(y=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return m(y,e)});var y;function v(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return l(t,e,i)}}function E(t,i){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;e&&e(t,null);let o=i.length;for(;o--;){let e=i[o];if("string"==typeof e){const t=a(e);t!==e&&(n(i)||(i[o]=t),e=t)}t[e]=!0}return t}function N(t){for(let e=0;e<t.length;e++)x(t,e)||(t[e]=null);return t}function w(e){const n=r(null);for(const[i,a]of t(e))x(e,i)&&(Array.isArray(a)?n[i]=N(a):a&&"object"==typeof a&&a.constructor===Object?n[i]=w(a):n[i]=a);return n}function j(t,e){for(;null!==t;){const n=a(t,e);if(n){if(n.get)return v(n.get);if("function"==typeof n.value)return v(n.value)}t=i(t)}return function(){return null}}const T=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),A=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=o(["#text"]),R=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),L=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),M=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=s(/<%[\w\W]*|[\w\W]*%>/gm),H=s(/\${[\w\W]*}/gm),B=s(/^data-[\-\w.\u00B7-\uFFFF]/),W=s(/^aria-[\-\w]+$/),K=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=s(/^(?:\w+script|data):/i),Y=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$=s(/^html$/i),J=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:G,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:B,ARIA_ATTR:W,IS_ALLOWED_URI:K,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:Y,DOCTYPE_NAME:$,CUSTOM_ELEMENT:J});const V=1,X=3,Z=7,Q=8,tt=9,et=function(){return"undefined"==typeof window?null:window};return function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const i=t=>e(t);if(i.version="3.1.6",i.removed=[],!n||!n.document||n.document.nodeType!==tt)return i.isSupported=!1,i;let{document:a}=n;const s=a,l=s.currentScript,{DocumentFragment:m,HTMLTemplateElement:y,Node:v,Element:N,NodeFilter:G,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:B,trustedTypes:W}=n,z=N.prototype,Y=j(z,"cloneNode"),J=j(z,"remove"),nt=j(z,"nextSibling"),it=j(z,"childNodes"),at=j(z,"parentNode");if("function"==typeof y){const t=a.createElement("template");t.content&&t.content.ownerDocument&&(a=t.content.ownerDocument)}let ot,st="";const{implementation:rt,createNodeIterator:lt,createDocumentFragment:mt,getElementsByTagName:ct}=a,{importNode:gt}=s;let ut={};i.isSupported="function"==typeof t&&"function"==typeof at&&rt&&void 0!==rt.createHTMLDocument;const{MUSTACHE_EXPR:dt,ERB_EXPR:pt,TMPLIT_EXPR:ht,DATA_ATTR:kt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:_t,ATTR_WHITESPACE:xt,CUSTOM_ELEMENT:bt}=q;let{IS_ALLOWED_URI:St}=q,yt=null;const vt=E({},[...T,...C,...D,...A,...O]);let Et=null;const Nt=E({},[...R,...L,...M,...P]);let wt=Object.seal(r(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),jt=null,Tt=null,Ct=!0,Dt=!0,Ut=!1,At=!0,It=!1,Ot=!0,Rt=!1,Lt=!1,Mt=!1,Pt=!1,Gt=!1,Ft=!1,Ht=!0,Bt=!1,Wt=!0,Kt=!1,zt={},Yt=null;const $t=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Jt=null;const qt=E({},["audio","video","img","source","image","track"]);let Vt=null;const Xt=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml";let ee=te,ne=!1,ie=null;const ae=E({},[Zt,Qt,te],p);let oe=null;const se=["application/xhtml+xml","text/html"];let re=null,le=null;const me=a.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},ge=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!le||le!==t){if(t&&"object"==typeof t||(t={}),t=w(t),oe=-1===se.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,re="application/xhtml+xml"===oe?p:d,yt=x(t,"ALLOWED_TAGS")?E({},t.ALLOWED_TAGS,re):vt,Et=x(t,"ALLOWED_ATTR")?E({},t.ALLOWED_ATTR,re):Nt,ie=x(t,"ALLOWED_NAMESPACES")?E({},t.ALLOWED_NAMESPACES,p):ae,Vt=x(t,"ADD_URI_SAFE_ATTR")?E(w(Xt),t.ADD_URI_SAFE_ATTR,re):Xt,Jt=x(t,"ADD_DATA_URI_TAGS")?E(w(qt),t.ADD_DATA_URI_TAGS,re):qt,Yt=x(t,"FORBID_CONTENTS")?E({},t.FORBID_CONTENTS,re):$t,jt=x(t,"FORBID_TAGS")?E({},t.FORBID_TAGS,re):{},Tt=x(t,"FORBID_ATTR")?E({},t.FORBID_ATTR,re):{},zt=!!x(t,"USE_PROFILES")&&t.USE_PROFILES,Ct=!1!==t.ALLOW_ARIA_ATTR,Dt=!1!==t.ALLOW_DATA_ATTR,Ut=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,Ot=!1!==t.SAFE_FOR_XML,Rt=t.WHOLE_DOCUMENT||!1,Pt=t.RETURN_DOM||!1,Gt=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Mt=t.FORCE_BODY||!1,Ht=!1!==t.SANITIZE_DOM,Bt=t.SANITIZE_NAMED_PROPS||!1,Wt=!1!==t.KEEP_CONTENT,Kt=t.IN_PLACE||!1,St=t.ALLOWED_URI_REGEXP||K,ee=t.NAMESPACE||te,wt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(wt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(wt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(wt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Dt=!1),Gt&&(Pt=!0),zt&&(yt=E({},O),Et=[],!0===zt.html&&(E(yt,T),E(Et,R)),!0===zt.svg&&(E(yt,C),E(Et,L),E(Et,P)),!0===zt.svgFilters&&(E(yt,D),E(Et,L),E(Et,P)),!0===zt.mathMl&&(E(yt,A),E(Et,M),E(Et,P))),t.ADD_TAGS&&(yt===vt&&(yt=w(yt)),E(yt,t.ADD_TAGS,re)),t.ADD_ATTR&&(Et===Nt&&(Et=w(Et)),E(Et,t.ADD_ATTR,re)),t.ADD_URI_SAFE_ATTR&&E(Vt,t.ADD_URI_SAFE_ATTR,re),t.FORBID_CONTENTS&&(Yt===$t&&(Yt=w(Yt)),E(Yt,t.FORBID_CONTENTS,re)),Wt&&(yt["#text"]=!0),Rt&&E(yt,["html","head","body"]),yt.table&&(E(yt,["tbody"]),delete jt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ot=t.TRUSTED_TYPES_POLICY,st=ot.createHTML("")}else void 0===ot&&(ot=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(W,l)),null!==ot&&"string"==typeof st&&(st=ot.createHTML(""));o&&o(t),le=t}},ue=E({},["mi","mo","mn","ms","mtext"]),de=E({},["foreignobject","annotation-xml"]),pe=E({},["title","style","font","a","script"]),he=E({},[...C,...D,...U]),ke=E({},[...A,...I]),fe=function(t){u(i.removed,{element:t});try{at(t).removeChild(t)}catch(e){J(t)}},_e=function(t,e){try{u(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){u(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Et[t])if(Pt||Gt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},xe=function(t){let e=null,n=null;if(Mt)t="<remove></remove>"+t;else{const e=h(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===oe&&ee===te&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=ot?ot.createHTML(t):t;if(ee===te)try{e=(new B).parseFromString(i,oe)}catch(t){}if(!e||!e.documentElement){e=rt.createDocument(ee,"template",null);try{e.documentElement.innerHTML=ne?st:i}catch(t){}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(a.createTextNode(n),o.childNodes[0]||null),ee===te?ct.call(e,Rt?"html":"body")[0]:Rt?e.documentElement:o},be=function(t){return lt.call(t.ownerDocument||t,t,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Se=function(t){return t instanceof H&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof F)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ye=function(t){return"function"==typeof v&&t instanceof v},ve=function(t,e,n){ut[t]&&c(ut[t],(t=>{t.call(i,e,n,le)}))},Ee=function(t){let e=null;if(ve("beforeSanitizeElements",t,null),Se(t))return fe(t),!0;const n=re(t.nodeName);if(ve("uponSanitizeElement",t,{tagName:n,allowedTags:yt}),t.hasChildNodes()&&!ye(t.firstElementChild)&&b(/<[/\w]/g,t.innerHTML)&&b(/<[/\w]/g,t.textContent))return fe(t),!0;if(t.nodeType===Z)return fe(t),!0;if(Ot&&t.nodeType===Q&&b(/<[/\w]/g,t.data))return fe(t),!0;if(!yt[n]||jt[n]){if(!jt[n]&&we(n)){if(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,n))return!1;if(wt.tagNameCheck instanceof Function&&wt.tagNameCheck(n))return!1}if(Wt&&!Yt[n]){const e=at(t)||t.parentNode,n=it(t)||t.childNodes;if(n&&e)for(let i=n.length-1;i>=0;--i){const a=Y(n[i],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,nt(t))}}return fe(t),!0}return t instanceof N&&!function(t){let e=at(t);e&&e.tagName||(e={namespaceURI:ee,tagName:"template"});const n=d(t.tagName),i=d(e.tagName);return!!ie[t.namespaceURI]&&(t.namespaceURI===Qt?e.namespaceURI===te?"svg"===n:e.namespaceURI===Zt?"svg"===n&&("annotation-xml"===i||ue[i]):Boolean(he[n]):t.namespaceURI===Zt?e.namespaceURI===te?"math"===n:e.namespaceURI===Qt?"math"===n&&de[i]:Boolean(ke[n]):t.namespaceURI===te?!(e.namespaceURI===Qt&&!de[i])&&!(e.namespaceURI===Zt&&!ue[i])&&!ke[n]&&(pe[n]||!he[n]):!("application/xhtml+xml"!==oe||!ie[t.namespaceURI]))}(t)?(fe(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&t.nodeType===X&&(e=t.textContent,c([dt,pt,ht],(t=>{e=k(e,t," ")})),t.textContent!==e&&(u(i.removed,{element:t.cloneNode()}),t.textContent=e)),ve("afterSanitizeElements",t,null),!1):(fe(t),!0)},Ne=function(t,e,n){if(Ht&&("id"===e||"name"===e)&&(n in a||n in me))return!1;if(Dt&&!Tt[e]&&b(kt,e));else if(Ct&&b(ft,e));else if(!Et[e]||Tt[e]){if(!(we(t)&&(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,t)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(t))&&(wt.attributeNameCheck instanceof RegExp&&b(wt.attributeNameCheck,e)||wt.attributeNameCheck instanceof Function&&wt.attributeNameCheck(e))||"is"===e&&wt.allowCustomizedBuiltInElements&&(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,n)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(n))))return!1}else if(Vt[e]);else if(b(St,k(n,xt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==f(n,"data:")||!Jt[t])if(Ut&&!b(_t,k(n,xt,"")));else if(n)return!1;return!0},we=function(t){return"annotation-xml"!==t&&h(t,bt)},je=function(t){ve("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Et};let a=e.length;for(;a--;){const o=e[a],{name:s,namespaceURI:r,value:l}=o,m=re(s);let u="value"===s?l:_(l);if(n.attrName=m,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,ve("uponSanitizeAttribute",t,n),u=n.attrValue,Ot&&b(/((--!?|])>)|<\/(style|title)/i,u)){_e(s,t);continue}if(n.forceKeepAttr)continue;if(_e(s,t),!n.keepAttr)continue;if(!At&&b(/\/>/i,u)){_e(s,t);continue}It&&c([dt,pt,ht],(t=>{u=k(u,t," ")}));const d=re(t.nodeName);if(Ne(d,m,u)){if(!Bt||"id"!==m&&"name"!==m||(_e(s,t),u="user-content-"+u),ot&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(r);else switch(W.getAttributeType(d,m)){case"TrustedHTML":u=ot.createHTML(u);break;case"TrustedScriptURL":u=ot.createScriptURL(u)}try{r?t.setAttributeNS(r,s,u):t.setAttribute(s,u),Se(t)?fe(t):g(i.removed)}catch(t){}}}ve("afterSanitizeAttributes",t,null)},Te=function t(e){let n=null;const i=be(e);for(ve("beforeSanitizeShadowDOM",e,null);n=i.nextNode();)ve("uponSanitizeShadowNode",n,null),Ee(n)||(n.content instanceof m&&t(n.content),je(n));ve("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,o=null,r=null;if(ne=!t,ne&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ye(t)){if("function"!=typeof t.toString)throw S("toString is not a function");if("string"!=typeof(t=t.toString()))throw S("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Lt||ge(e),i.removed=[],"string"==typeof t&&(Kt=!1),Kt){if(t.nodeName){const e=re(t.nodeName);if(!yt[e]||jt[e])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof v)n=xe("\x3c!----\x3e"),a=n.ownerDocument.importNode(t,!0),a.nodeType===V&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!Pt&&!It&&!Rt&&-1===t.indexOf("<"))return ot&&Ft?ot.createHTML(t):t;if(n=xe(t),!n)return Pt?null:Ft?st:""}n&&Mt&&fe(n.firstChild);const l=be(Kt?t:n);for(;o=l.nextNode();)Ee(o)||(o.content instanceof m&&Te(o.content),je(o));if(Kt)return t;if(Pt){if(Gt)for(r=mt.call(n.ownerDocument);n.firstChild;)r.appendChild(n.firstChild);else r=n;return(Et.shadowroot||Et.shadowrootmode)&&(r=gt.call(s,r,!0)),r}let g=Rt?n.outerHTML:n.innerHTML;return Rt&&yt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b($,n.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+g),It&&c([dt,pt,ht],(t=>{g=k(g,t," ")})),ot&&Ft?ot.createHTML(g):g},i.setConfig=function(){ge(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},i.clearConfig=function(){le=null,Lt=!1},i.isValidAttribute=function(t,e,n){le||ge({});const i=re(t),a=re(e);return Ne(i,a,n)},i.addHook=function(t,e){"function"==typeof e&&(ut[t]=ut[t]||[],u(ut[t],e))},i.removeHook=function(t){if(ut[t])return g(ut[t])},i.removeHooks=function(t){ut[t]&&(ut[t]=[])},i.removeAllHooks=function(){ut={}},i}()}()},942:(t,e)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=s(t,o(n)))}return t}function o(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)i.call(t,n)&&t[n]&&(e=s(e,n));return e}function s(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(n=function(){return a}.apply(e,[]))||(t.exports=n)}()}},e={};function n(i){var a=e[i];if(void 0!==a)return a.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.wp.i18n,e=window.wp.element,i=window.wp.components,a=window.lodash,o=window.wp.apiFetch;var s=n.n(o);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const r=async(t,e,n=null,i=!1)=>{let a={};try{a=await s()({path:t,method:e,...n&&{data:n}})}catch(n){return console.log(`${e} ${t} Errors:`,n),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===i?a:!0===a.success?a.data:options},l=(e,n)=>{const i={...e};switch(n.type){case"FETCH_SETTINGS":i.fetchedSettings={...n.payload.fetchedSettings,integrations:n.payload.fetchedSettings.integrations||{}},i.stateSettings=n.payload.stateSettings,i.siteData=n.payload.siteData,i.notifications=n.payload.notifications,i.installData=n.payload.installData,i.isPending=!1,i.canSave=!1,n.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,t.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=n.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=n.payload.fetchedSettings,i.stateSettings=n.payload.stateSettings,i.isPending=!1,i.canSave=!!n.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=n.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,t.__)("An error occurred.","gtm-kit"):(0,t.__)("Saved Successfully.","gtm-kit"),i.hasError=!!n.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=n.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=n.payload.stateSettings||i.stateSettings,i.isPending=n.payload.isPending||i.isPending,i.notice=n.payload.notice||i.notice,i.hasError=n.payload.hasError||i.hasError,i.canSave=n.payload.canSave||i.canSave,i.isSendingSystemData=n.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=n.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=n.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=n.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=n.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=n.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=n.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=n.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=n.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=n.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=n.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.isNotificationStatusSent=n.payload.isNotificationStatusSent||i.isNotificationStatusSent,i.notifications=n.payload.notifications||i.Notifications}return i},m=window.ReactJSXRuntime,c=(0,e.createContext)(),g=t=>{const[n,i]=(0,e.useReducer)(l,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),o=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:n,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{o()}),[]);const g={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,r("gtmkit/v1/set-options","POST",e));var e;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:o,useUpdateState:s,useUpdateStateSettings:async(t,e,i)=>{const o=JSON.parse(JSON.stringify(n.stateSettings));let r;o[t][e]=i,r=!(0,a.isEqual)(o,n.fetchedSettings),s({stateSettings:o,canSave:r})},useImportSettings:async(t,e)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let o;const r={};r.general={...i.general,...e.general},"integrations"in e&&(r.integrations={...i.integrations,...e.integrations}),o=!(0,a.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:o})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,r("gtmkit/v1/send-support-data","POST",e,!0));var e;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{i({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(e=n.licenseKey,r("gtmkit/v1/send-license-key","POST",e,!0));var e;i({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{i({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:!0}});const n={"notification-id":t,action:e},a=await(t=>r("gtmkit/v1/set-notification-status","POST",t,!0))(n);i({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,isNotificationStatusSent:a.success,notifications:a.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,useNotifications:n.notifications,useIsUpdatingNotifications:n.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(c.Provider,{value:g,children:t.children})},u=window.React;var d,p=n.n(u);function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},h.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(d||(d={}));const k="popstate";function f(t,e){if(!1===t||null==t)throw new Error(e)}function _(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function x(t,e){return{usr:t.state,key:t.key,idx:e}}function b(t,e,n,i){return void 0===n&&(n=null),h({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?y(e):e,{state:n,key:e&&e.key||i||Math.random().toString(36).substr(2,8)})}function S(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(e+="#"===i.charAt(0)?i:"#"+i),e}function y(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}var v;function E(t,e,n){return void 0===n&&(n="/"),function(t,e,n,i){let a=P(("string"==typeof e?y(e):e).pathname||"/",n);if(null==a)return null;let o=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,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(o);let s=null;for(let t=0;null==s&&t<o.length;++t){let e=M(a);s=R(o[t],e,i)}return s}(t,e,n,!1)}function N(t,e,n,i){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===i&&(i="");let a=(t,a,o)=>{let s={relativePath:void 0===o?t.path||"":o,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};s.relativePath.startsWith("/")&&(f(s.relativePath.startsWith(i),'Absolute route path "'+s.relativePath+'" nested under path "'+i+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(i.length));let r=B([i,s.relativePath]),l=n.concat(s);t.children&&t.children.length>0&&(f(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+r+'".'),N(t.children,e,l,r)),(null!=t.path||t.index)&&e.push({path:r,score:O(r,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of w(t.path))a(t,e,n);else a(t,e)})),e}function w(t){let e=t.split("/");if(0===e.length)return[];let[n,...i]=e,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===i.length)return a?[o,""]:[o];let s=w(i.join("/")),r=[];return r.push(...s.map((t=>""===t?o:[o,t].join("/")))),a&&r.push(...s),r.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(v||(v={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const j=/^:[\w-]+$/,T=3,C=2,D=1,U=10,A=-2,I=t=>"*"===t;function O(t,e){let n=t.split("/"),i=n.length;return n.some(I)&&(i+=A),e&&(i+=C),n.filter((t=>!I(t))).reduce(((t,e)=>t+(j.test(e)?T:""===e?D:U)),i)}function R(t,e,n){void 0===n&&(n=!1);let{routesMeta:i}=t,a={},o="/",s=[];for(let t=0;t<i.length;++t){let r=i[t],l=t===i.length-1,m="/"===o?e:e.slice(o.length)||"/",c=L({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},m),g=r.route;if(!c&&l&&n&&!i[i.length-1].route.index&&(c=L({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},m)),!c)return null;Object.assign(a,c.params),s.push({params:a,pathname:B([o,c.pathname]),pathnameBase:W(B([o,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(o=B([o,c.pathnameBase]))}return s}function L(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),_("*"===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 i=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,n)=>(i.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(i.push({paramName:"*"}),a+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==t&&"/"!==t&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),i]}(t.path,t.caseSensitive,t.end),a=e.match(n);if(!a)return null;let o=a[0],s=o.replace(/(.)\/+$/,"$1"),r=a.slice(1);return{params:i.reduce(((t,e,n)=>{let{paramName:i,isOptional:a}=e;if("*"===i){let t=r[n]||"";s=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}const l=r[n];return t[i]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:o,pathnameBase:s,pattern:t}}function M(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return _(!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 P(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&"/"!==i?null:t.slice(n)||"/"}function G(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(i)+"].  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 F(t,e){let n=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?n.map(((t,e)=>e===n.length-1?t.pathname:t.pathnameBase)):n.map((t=>t.pathnameBase))}function H(t,e,n,i){let a;void 0===i&&(i=!1),"string"==typeof t?a=y(t):(a=h({},t),f(!a.pathname||!a.pathname.includes("?"),G("?","pathname","search",a)),f(!a.pathname||!a.pathname.includes("#"),G("#","pathname","hash",a)),f(!a.search||!a.search.includes("#"),G("#","search","hash",a)));let o,s=""===t||""===a.pathname,r=s?"/":a.pathname;if(null==r)o=n;else{let t=e.length-1;if(!i&&r.startsWith("..")){let e=r.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}o=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:n,search:i="",hash:a=""}="string"==typeof t?y(t):t,o=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:o,search:K(i),hash:z(a)}}(a,o),m=r&&"/"!==r&&r.endsWith("/"),c=(s||"."===r)&&n.endsWith("/");return l.pathname.endsWith("/")||!m&&!c||(l.pathname+="/"),l}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",z=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Y=["post","put","patch","delete"],$=(new Set(Y),["get",...Y]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},J.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const q=u.createContext(null),V=u.createContext(null),X=u.createContext(null),Z=u.createContext(null),Q=u.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=u.createContext(null);function et(){return null!=u.useContext(Z)}function nt(){return et()||f(!1),u.useContext(Z).location}function it(t){u.useContext(X).static||u.useLayoutEffect(t)}function at(){let{isDataRoute:t}=u.useContext(Q);return t?function(){let{router:t}=function(){let t=u.useContext(q);return t||f(!1),t}(gt.UseNavigateStable),e=dt(ut.UseNavigateStable),n=u.useRef(!1);return it((()=>{n.current=!0})),u.useCallback((function(i,a){void 0===a&&(a={}),n.current&&("number"==typeof i?t.navigate(i):t.navigate(i,J({fromRouteId:e},a)))}),[t,e])}():function(){et()||f(!1);let t=u.useContext(q),{basename:e,future:n,navigator:i}=u.useContext(X),{matches:a}=u.useContext(Q),{pathname:o}=nt(),s=JSON.stringify(F(a,n.v7_relativeSplatPath)),r=u.useRef(!1);return it((()=>{r.current=!0})),u.useCallback((function(n,a){if(void 0===a&&(a={}),!r.current)return;if("number"==typeof n)return void i.go(n);let l=H(n,JSON.parse(s),o,"path"===a.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:B([e,l.pathname])),(a.replace?i.replace:i.push)(l,a.state,a)}),[e,i,s,o,t])}()}function ot(t,e){let{relative:n}=void 0===e?{}:e,{future:i}=u.useContext(X),{matches:a}=u.useContext(Q),{pathname:o}=nt(),s=JSON.stringify(F(a,i.v7_relativeSplatPath));return u.useMemo((()=>H(t,JSON.parse(s),o,"path"===n)),[t,s,o,n])}function st(t,e,n,i){et()||f(!1);let{navigator:a}=u.useContext(X),{matches:o}=u.useContext(Q),s=o[o.length-1],r=s?s.params:{},l=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let m,c=nt();if(e){var g;let t="string"==typeof e?y(e):e;"/"===l||(null==(g=t.pathname)?void 0:g.startsWith(l))||f(!1),m=t}else m=c;let p=m.pathname||"/",h=p;if("/"!==l){let t=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=E(t,{pathname:h}),_=function(t,e,n,i){var a;if(void 0===e&&(e=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var o;if(!n)return null;if(n.errors)t=n.matches;else{if(!(null!=(o=i)&&o.v7_partialHydration&&0===e.length&&!n.initialized&&n.matches.length>0))return null;t=n.matches}}let s=t,r=null==(a=n)?void 0:a.errors;if(null!=r){let t=s.findIndex((t=>t.route.id&&void 0!==(null==r?void 0:r[t.route.id])));t>=0||f(!1),s=s.slice(0,Math.min(s.length,t+1))}let l=!1,m=-1;if(n&&i&&i.v7_partialHydration)for(let t=0;t<s.length;t++){let e=s[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(m=t),e.route.id){let{loaderData:t,errors:i}=n,a=e.route.loader&&void 0===t[e.route.id]&&(!i||void 0===i[e.route.id]);if(e.route.lazy||a){l=!0,s=m>=0?s.slice(0,m+1):[s[0]];break}}}return s.reduceRight(((t,i,a)=>{let o,c=!1,g=null,d=null;var p;n&&(o=r&&i.route.id?r[i.route.id]:void 0,g=i.route.errorElement||lt,l&&(m<0&&0===a?(pt[p="route-fallback"]||(pt[p]=!0),c=!0,d=null):m===a&&(c=!0,d=i.route.hydrateFallbackElement||null)));let h=e.concat(s.slice(0,a+1)),k=()=>{let e;return e=o?g:c?d:i.route.Component?u.createElement(i.route.Component,null):i.route.element?i.route.element:t,u.createElement(ct,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:e})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===a)?u.createElement(mt,{location:n.location,revalidation:n.revalidation,component:g,error:o,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},r,t.params),pathname:B([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:B([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),o,n,i);return e&&_?u.createElement(Z.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:d.Pop}},_):_}function rt(){let t=function(){var t;let e=u.useContext(tt),n=function(){let t=u.useContext(V);return t||f(!1),t}(ut.UseRouteError),i=dt(ut.UseRouteError);return void 0!==e?e:null==(t=n.errors)?void 0:t[i]}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},e),n?u.createElement("pre",{style:i},n):null,null)}const lt=u.createElement(rt,null);class mt extends u.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?u.createElement(Q.Provider,{value:this.props.routeContext},u.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:n,children:i}=t,a=u.useContext(q);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),u.createElement(Q.Provider,{value:e},i)}var gt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(gt||{}),ut=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}(ut||{});function dt(t){let e=function(){let t=u.useContext(Q);return t||f(!1),t}(),n=e.matches[e.matches.length-1];return n.route.id||f(!1),n.route.id}const pt={};function ht(t){let{to:e,replace:n,state:i,relative:a}=t;et()||f(!1);let{future:o,static:s}=u.useContext(X),{matches:r}=u.useContext(Q),{pathname:l}=nt(),m=at(),c=H(e,F(r,o.v7_relativeSplatPath),l,"path"===a),g=JSON.stringify(c);return u.useEffect((()=>m(JSON.parse(g),{replace:n,state:i,relative:a})),[m,g,a,n,i]),null}function kt(t){f(!1)}function ft(t){let{basename:e="/",children:n=null,location:i,navigationType:a=d.Pop,navigator:o,static:s=!1,future:r}=t;et()&&f(!1);let l=e.replace(/^\/*/,"/"),m=u.useMemo((()=>({basename:l,navigator:o,static:s,future:J({v7_relativeSplatPath:!1},r)})),[l,r,o,s]);"string"==typeof i&&(i=y(i));let{pathname:c="/",search:g="",hash:p="",state:h=null,key:k="default"}=i,_=u.useMemo((()=>{let t=P(c,l);return null==t?null:{location:{pathname:t,search:g,hash:p,state:h,key:k},navigationType:a}}),[l,c,g,p,h,k,a]);return null==_?null:u.createElement(X.Provider,{value:m},u.createElement(Z.Provider,{children:n,value:_}))}function _t(t){let{children:e,location:n}=t;return st(xt(e),n)}function xt(t,e){void 0===e&&(e=[]);let n=[];return u.Children.forEach(t,((t,i)=>{if(!u.isValidElement(t))return;let a=[...e,i];if(t.type===u.Fragment)return void n.push.apply(n,xt(t.props.children,a));t.type!==kt&&f(!1),t.props.index&&t.props.children&&f(!1);let o={id:t.props.id||a.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=xt(t.props.children,a)),n.push(o)})),n}u.startTransition,new Promise((()=>{})),u.Component;const bt=window.ReactDOM;var St=n.n(bt);function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},yt.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,i,a={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(a[n]=t[n]);return a}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Et=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Nt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=u.createContext({isTransitioning:!1});new Map;const jt=u.startTransition;function Tt(t){let{basename:e,children:n,future:i,window:a}=t,o=u.useRef();null==o.current&&(o.current=function(t){return void 0===t&&(t={}),function(t,e,n,i){void 0===i&&(i={});let{window:a=document.defaultView,v5Compat:o=!1}=i,s=a.history,r=d.Pop,l=null,m=c();function c(){return(s.state||{idx:null}).idx}function g(){r=d.Pop;let t=c(),e=null==t?null:t-m;m=t,l&&l({action:r,location:p.location,delta:e})}function u(t){let e="null"!==a.location.origin?a.location.origin:a.location.href,n="string"==typeof t?t:S(t);return n=n.replace(/ $/,"%20"),f(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,s.replaceState(h({},s.state,{idx:m}),""));let p={get action(){return r},get location(){return t(a,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(k,g),l=t,()=>{a.removeEventListener(k,g),l=null}},createHref:t=>e(a,t),createURL:u,encodeLocation(t){let e=u(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){r=d.Push;let i=b(p.location,t,e);n&&n(i,t),m=c()+1;let g=x(i,m),u=p.createHref(i);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(u)}o&&l&&l({action:r,location:p.location,delta:1})},replace:function(t,e){r=d.Replace;let i=b(p.location,t,e);n&&n(i,t),m=c();let a=x(i,m),g=p.createHref(i);s.replaceState(a,"",g),o&&l&&l({action:r,location:p.location,delta:0})},go:t=>s.go(t)};return p}((function(t,e){let{pathname:n="/",search:i="",hash:a=""}=y(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),b("",{pathname:n,search:i,hash:a},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),i="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");i=-1===n?e:e.slice(0,n)}return i+"#"+("string"==typeof e?e:S(e))}),(function(t,e){_("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:a,v5Compat:!0}));let s=o.current,[r,l]=u.useState({action:s.action,location:s.location}),{v7_startTransition:m}=i||{},c=u.useCallback((t=>{m&&jt?jt((()=>l(t))):l(t)}),[l,m]);return u.useLayoutEffect((()=>s.listen(c)),[s,c]),u.createElement(ft,{basename:e,children:n,location:r.location,navigationType:r.action,navigator:s,future:i})}bt.flushSync,u.useId;const Ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=u.forwardRef((function(t,e){let n,{onClick:i,relative:a,reloadDocument:o,replace:s,state:r,target:l,to:m,preventScrollReset:c,unstable_viewTransition:g}=t,d=vt(t,Et),{basename:p}=u.useContext(X),h=!1;if("string"==typeof m&&Dt.test(m)&&(n=m,Ct))try{let t=new URL(window.location.href),e=m.startsWith("//")?new URL(t.protocol+m):new URL(m),n=P(e.pathname,p);e.origin===t.origin&&null!=n?m=n+e.search+e.hash:h=!0}catch(t){}let k=function(t,e){let{relative:n}=void 0===e?{}:e;et()||f(!1);let{basename:i,navigator:a}=u.useContext(X),{hash:o,pathname:s,search:r}=ot(t,{relative:n}),l=s;return"/"!==i&&(l="/"===s?i:B([i,s])),a.createHref({pathname:l,search:r,hash:o})}(m,{relative:a}),_=function(t,e){let{target:n,replace:i,state:a,preventScrollReset:o,relative:s,unstable_viewTransition:r}=void 0===e?{}:e,l=at(),m=nt(),c=ot(t,{relative:s});return u.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let n=void 0!==i?i:S(m)===S(c);l(t,{replace:n,state:a,preventScrollReset:o,relative:s,unstable_viewTransition:r})}}),[m,l,c,i,a,n,t,o,s,r])}(m,{replace:s,state:r,target:l,preventScrollReset:c,relative:a,unstable_viewTransition:g});return u.createElement("a",yt({},d,{href:n||k,onClick:h||o?i:function(t){i&&i(t),t.defaultPrevented||_(t)},ref:e,target:l}))})),At=u.forwardRef((function(t,e){let{"aria-current":n="page",caseSensitive:i=!1,className:a="",end:o=!1,style:s,to:r,unstable_viewTransition:l,children:m}=t,c=vt(t,Nt),g=ot(r,{relative:c.relative}),d=nt(),p=u.useContext(V),{navigator:h,basename:k}=u.useContext(X),_=null!=p&&function(t,e){void 0===e&&(e={});let n=u.useContext(wt);null==n&&f(!1);let{basename:i}=function(){let t=u.useContext(q);return t||f(!1),t}(It.useViewTransitionState),a=ot(t,{relative:e.relative});if(!n.isTransitioning)return!1;let o=P(n.currentLocation.pathname,i)||n.currentLocation.pathname,s=P(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=L(a.pathname,s)||null!=L(a.pathname,o)}(g)&&!0===l,x=h.encodeLocation?h.encodeLocation(g).pathname:g.pathname,b=d.pathname,S=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;i||(b=b.toLowerCase(),S=S?S.toLowerCase():null,x=x.toLowerCase()),S&&k&&(S=P(S,k)||S);const y="/"!==x&&x.endsWith("/")?x.length-1:x.length;let v,E=b===x||!o&&b.startsWith(x)&&"/"===b.charAt(y),N=null!=S&&(S===x||!o&&S.startsWith(x)&&"/"===S.charAt(x.length)),w={isActive:E,isPending:N,isTransitioning:_},j=E?n:void 0;v="function"==typeof a?a(w):[a,E?"active":null,N?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof s?s(w):s;return u.createElement(Ut,yt({},c,{"aria-current":j,className:v,ref:e,style:T,to:r,unstable_viewTransition:l}),"function"==typeof m?m(w):m)}));var It,Ot;(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"}(Ot||(Ot={}));const Rt=({title:t})=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,u.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,u.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,u.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,u.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,u.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,u.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,u.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))));var Lt=n(942),Mt=n.n(Lt);const Pt=({count:t,important:e,nav:n=!1})=>(0,m.jsx)(m.Fragment,{children:t>0&&(0,m.jsx)("span",{className:Mt()("gtmkit-ml-2 gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py-px gtmkit-leading-[1.125rem] gtmkit-uppercase",{"gtmkit-bg-color-error":e},{"gtmkit-bg-color-success":!e},{"gtmkit-px-1.5":n},{"gtmkit-px-2":!n}),children:t})}),Gt=({metrics:t})=>(0,m.jsx)(Pt,{count:t.total,important:t.problem>0,nav:!0}),Ft=Pt,Ht=({to:t,title:n})=>{const{useNotifications:i}=(0,e.useContext)(c);return i.metrics.total,(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(At,{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 ":""),children:[n,"notifications"===t&&(0,m.jsx)(Gt,{metrics:i.metrics})]})})},Bt=({NavList:t})=>(0,u.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,u.createElement)(Ht,{key:t.to,to:t.to,title:t.title})})));function Wt(){return Wt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Wt.apply(this,arguments)}function Kt(t,e){if(null==t)return{};var n,i,a={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(a[n]=t[n]);return a}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function Yt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zt(t,e)}function $t(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Jt=p().createContext(null);var qt=function(t){return t.scrollTop},Vt="unmounted",Xt="exited",Zt="entering",Qt="entered",te="exiting",ee=function(t){function e(e,n){var i;i=t.call(this,e,n)||this;var a,o=n&&!n.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?o?(a=Xt,i.appearStatus=Zt):a=Qt:a=e.unmountOnExit||e.mountOnEnter?Vt:Xt,i.state={status:a},i.nextCallback=null,i}Yt(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Vt?{status:Xt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==Zt&&n!==Qt&&(e=Zt):n!==Zt&&n!==Qt||(e=te)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,i=this.props.timeout;return t=e=n=i,null!=i&&"number"!=typeof i&&(t=i.exit,e=i.enter,n=void 0!==i.appear?i.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===Zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:St().findDOMNode(this);n&&qt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xt&&this.setState({status:Vt})},n.performEnter=function(t){var e=this,n=this.props.enter,i=this.context?this.context.isMounting:t,a=this.props.nodeRef?[i]:[St().findDOMNode(this),i],o=a[0],s=a[1],r=this.getTimeouts(),l=i?r.appear:r.enter;t||n?(this.props.onEnter(o,s),this.safeSetState({status:Zt},(function(){e.props.onEntering(o,s),e.onTransitionEnd(l,(function(){e.safeSetState({status:Qt},(function(){e.props.onEntered(o,s)}))}))}))):this.safeSetState({status:Qt},(function(){e.props.onEntered(o)}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:St().findDOMNode(this);e?(this.props.onExit(i),this.safeSetState({status:te},(function(){t.props.onExiting(i),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Xt},(function(){t.props.onExited(i)}))}))}))):this.safeSetState({status:Xt},(function(){t.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,e.nextCallback=null,t(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:St().findDOMNode(this),i=null==t&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],s=a[1];this.props.addEndListener(o,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Vt)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,Kt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return p().createElement(Jt.Provider,{value:null},"function"==typeof n?n(t,i):p().cloneElement(p().Children.only(n),i))},e}(p().Component);function ne(){}ee.contextType=Jt,ee.propTypes={},ee.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ne,onEntering:ne,onEntered:ne,onExit:ne,onExiting:ne,onExited:ne},ee.UNMOUNTED=Vt,ee.EXITED=Xt,ee.ENTERING=Zt,ee.ENTERED=Qt,ee.EXITING=te;const ie=ee;var ae=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return i=e,void((n=t).classList?n.classList.remove(i):"string"==typeof n.className?n.className=$t(n.className,i):n.setAttribute("class",$t(n.className&&n.className.baseVal||"",i)));var n,i}))},oe=function(t){function e(){for(var e,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var i=e.resolveArguments(t,n),a=i[0],o=i[1];e.removeClasses(a,"exit"),e.addClass(a,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var i=e.resolveArguments(t,n),a=i[0],o=i[1]?"appear":"enter";e.addClass(a,o,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var i=e.resolveArguments(t,n),a=i[0],o=i[1]?"appear":"enter";e.removeClasses(a,o),e.addClass(a,o,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,i="string"==typeof n,a=i?(i&&n?n+"-":"")+t:n[t];return{baseClassName:a,activeClassName:i?a+"-active":n[t+"Active"],doneClassName:i?a+"-done":n[t+"Done"]}},e}Yt(e,t);var n=e.prototype;return n.addClass=function(t,e,n){var i=this.getClassNames(e)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&a&&(i+=" "+a),"active"===n&&t&&qt(t),i&&(this.appliedClasses[e][n]=i,function(t,e){t&&e&&e.split(" ").forEach((function(e){return i=e,void((n=t).classList?n.classList.add(i):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,i)||("string"==typeof n.className?n.className=n.className+" "+i:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+i)));var n,i}))}(t,i))},n.removeClasses=function(t,e){var n=this.appliedClasses[e],i=n.base,a=n.active,o=n.done;this.appliedClasses[e]={},i&&ae(t,i),a&&ae(t,a),o&&ae(t,o)},n.render=function(){var t=this.props,e=(t.classNames,Kt(t,["classNames"]));return p().createElement(ie,Wt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(p().Component);oe.defaultProps={classNames:""},oe.propTypes={};const se=oe,re=({title:n=(0,t.__)("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:s,useCanSave:r}=(0,e.useContext)(c);return(0,u.createElement)(i.Button,{className:a,onClick:()=>o(),variant:"primary",disabled:s||!r},r?(0,t.__)(n,"gtm-kit"):(0,t.__)("Saved","gtm-kit"),s?(0,u.createElement)(i.Spinner,null):"")},le=()=>{const{useCanSave:t}=(0,e.useContext)(c);return(0,u.createElement)(se,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,u.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,u.createElement)(re,null)))},me=({subject:e})=>{const n=!0===e||"on"===e,i=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,u.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,t.__)("Active","gtm-kit"):(0,t.__)("Inactive","gtm-kit"))},ce=(0,e.forwardRef)((({children:t,className:e="",...n},i)=>(0,u.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 "+e,ref:i},t)));ce.Header=({as:t="h3",title:e="",children:n,className:i="",...a})=>(0,u.createElement)("div",{...a,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+i},(0,u.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},e),n),ce.Content=({as:t="div",children:e,className:n="gtmkit-flex-auto",...i})=>(0,u.createElement)(t,{...i,className:n},e),ce.Button=({url:t,destination:e,newTab:n=!1,text:a,group:o="",...s})=>{const r=at();return(0,u.createElement)("div",{...s,className:"gtmkit-mt-4 gtmkit-mb-0.5"},(0,u.createElement)(i.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{e&&t&&!1===n?window.gtmkitSettings.current_poage===o?r(e,{replace:!0}):window.location.href=t+"#"+e:t?n?window.open(t):window.location.href=t:r(e,{replace:!0})}},(0,u.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},a)))};const ge=ce,ue=({title:n,data:i,className:a=""})=>{const{useSettings:o}=(0,e.useContext)(c);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},n),(0,u.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+a},i.map(((e,n)=>!1===e.featured?null:(0,u.createElement)(ge,{key:n},(0,u.createElement)(ge.Header,{title:e.title},e.pill?(0,u.createElement)(me,{subject:o[e.group][e.option]}):null),(0,u.createElement)(ge.Content,null,e.text.map(((t,e)=>(0,u.createElement)("p",{key:e},t)))),(0,u.createElement)(ge.Button,{url:e.link.url,destination:e.link.destination,text:e.link.text?e.link.text:(0,t.__)("Read article","gtm-kit"),newTab:e.link.external,group:e.group}))))))},de=e=>((t,e,n)=>{const i=(t,n)=>({...n,title:t.title,to:t.path,group:t.group||n.group,option:t.option||n.option,text:[t.description],link:{...n.link,url:window.gtmkitSettings[e+"Url"],destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>i(t[e][0],n))):Object.keys(t).map((e=>i(t[e],n)))})(window.gtmkitSettings[e],e,function(e){switch(e){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,t.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,t.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,t.__)("Read More","gtm-kit")}}}}(e)),pe=()=>{const{useSettings:n,useNotifications:i}=(0,e.useContext)(c),[a,o]=(0,e.useState)(window.gtmkitSettings.tutorials),s=(Boolean(n.general.sgtm_domain&&n.general.sgtm_domain.trim()),i.metrics);return(0,e.useEffect)((()=>{o((e=>[...e,{title:(0,t.__)("See all tutorials","gtm-kit"),text:[(0,t.__)("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,t.__)("Read articles","gtm-kit")},featured:!0}]))}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("General","gtm-kit")}),(0,m.jsxs)("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]",children:[(0,m.jsxs)(ge,{children:[(0,m.jsx)(ge.Header,{title:"Google Tag Manager Container",children:(0,m.jsx)(me,{subject:n.general.gtm_id&&n.general.container_active})}),(0,m.jsx)(ge.Content,{children:n.general.gtm_id&&n.general.container_active?(0,m.jsxs)("p",{children:[(0,t.__)("Container ID:","gtm-kit")," ",n&&n.general.gtm_id]}):(0,m.jsx)("p",{children:(0,t.__)("The container is not active but the datalayer is generated.","gtm-kit")})}),(0,m.jsx)(ge.Button,{destination:"/container",text:(0,t.__)("Edit container","gtm-kit")})]}),(0,m.jsxs)(ge,{children:[(0,m.jsx)(ge.Header,{title:(0,t.__)("Notifications","gtm-kit"),className:"!gtmkit-justify-start",children:(0,m.jsx)(Ft,{count:s.total,important:s.problem>0})}),(0,m.jsx)(ge.Content,{children:s.total?(0,m.jsx)(m.Fragment,{children:s.problem?(0,m.jsx)("p",{children:(0,t.__)("There are some problems that require your attention.","gtm-kit")}):(0,m.jsx)("p",{children:(0,t.__)("There are some notifications that may require your attention.","gtm-kit")})}):(0,m.jsx)("p",{children:(0,t.__)("No notifications at the moment.","gtm-kit")})}),(0,m.jsx)(ge.Button,{destination:"/notifications",text:(0,t.__)("See all notifications","gtm-kit")})]}),(0,m.jsxs)(ge,{children:[(0,m.jsx)(ge.Header,{title:(0,t.__)("Help improve GTM Kit","gtm-kit"),children:(0,m.jsx)(me,{subject:n.general.analytics_active})}),(0,m.jsx)(ge.Content,{children:(0,m.jsx)("p",{children:(0,t.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit")})}),(0,m.jsx)(ge.Button,{destination:"/misc",text:(0,t.__)("Share anonymous data","gtm-kit")})]})]}),(0,m.jsx)(ue,{title:(0,t.__)("Tutorials","gtm-kit"),data:a}),(0,m.jsx)(ue,{title:(0,t.__)("Integrations","gtm-kit"),data:de("integrations")})]})},he=({title:t,placeholder:e,help:n,className:a="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:o="general",optionName:s,isDisabled:r,useSettings:l,useUpdateStateSettings:m})=>(0,u.createElement)(i.TextControl,{label:t,placeholder:e,help:n,className:a,value:l[o][s],onChange:t=>m(o,s,t),disabled:r}),ke=({title:t,label:e,optionGroup:n="general",optionName:a,disabled:o=!1,useSettings:s,useUpdateStateSettings:r})=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,u.createElement)(i.BaseControl,{label:t},(0,u.createElement)(i.ToggleControl,{label:e,checked:!o&&s[n][a],onChange:()=>{r(n,a,!(s&&s[n][a]))},disabled:o})))),fe=({title:t,options:e,help:n,className:a="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:s,disabled:r,useSettings:l,useUpdateStateSettings:m})=>(0,u.createElement)(i.RadioControl,{label:t,options:e,help:n,className:a,selected:parseInt(l[o][s]),onChange:t=>m(o,s,t),disabled:r}),_e=({title:t,help:n,items:a=[],optionGroup:o="general",optionName:s,disabled:r=!1,useSettings:l,useUpdateStateSettings:m})=>{const c=Array.isArray(l[o][s])?l[o][s]:[],[g,d]=(0,e.useState)(c);return(0,e.useEffect)((()=>{const t=Array.isArray(l[o][s])?l[o][s]:[];d(t)}),[l]),(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,u.createElement)(i.BaseControl,{label:t,help:n},a.map((t=>(0,u.createElement)(i.CheckboxControl,{key:t.role,label:t.name,disabled:r,checked:g.includes(t.role),onChange:e=>((t,e)=>{d((n=>{let i;return i=t?[...n,e]:n.filter((t=>t!==e)),m(o,s,i),i}))})(e,t.role)}))))))},xe=(0,e.forwardRef)((({children:t,className:e="",disabled:n=!1,...i},a)=>(0,m.jsx)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(n?"gtmkit-opacity-60":""),ref:a,children:t})));xe.Header=({as:t="h3",title:e="",children:n,className:i="",...a})=>(0,m.jsxs)(t,{...a,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+i,children:[e,n]}),xe.Content=({as:t="div",children:e,className:n="",...i})=>(0,m.jsx)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+n,children:e});const be=xe,Se=()=>{const{useSettings:n,useUpdateStateSettings:i,useUserRoles:a}=(0,e.useContext)(c),o=!(n.general.sgtm_domain&&n.general.sgtm_domain.trim()&&n.general.sgtm_container_identifier&&n.general.sgtm_container_identifier.trim()),s=nt();return(0,u.useEffect)((()=>{const t=new URLSearchParams(s.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[s]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Google Tag Manager container","gtm-kit")}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("General Container Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")}),(0,m.jsx)(he,{title:(0,t.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,t.__)("Enter GTM Container ID","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Inject Container Code","gtm-kit"),label:(0,t.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active",useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Just the container","gtm-kit"),label:(0,t.__)("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:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,t.__)("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:n,useUpdateStateSettings:i})]})]}),(0,m.jsx)("div",{id:"sgtm"}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(he,{title:(0,t.__)("sGTM Container Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,t.__)("Enter domain","gtm-kit"),help:(0,t.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,t.__)("Enter loader name","gtm-kit"),help:(0,t.__)("Only use if you are using a custom loader.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Cookie Keeper (for Stape users only)","gtm-kit"),label:(0,t.__)("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:o,useSettings:n,useUpdateStateSettings:i})]}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,m.jsx)("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",children:(0,t.__)("Learn more","gtm-kit")})]}),(0,m.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Hosting server-side GTM containers","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("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,t.__)("Additionally, it provides valuable add-ons for enhanced functionality.","gtm-kit")]}),(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,m.jsx)("a",{href:"https://jump.gtmkit.com/link/1-AC1E5",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,t.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Page Speed Optimization","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsx)(be.Content,{children:(0,m.jsx)(ke,{title:(0,t.__)("load_delayed_js event","gtm-kit"),label:(0,t.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:n,useUpdateStateSettings:i})}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Delay JavaScript execution","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("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,m.jsx)("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",children:(0,t.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Google Tag Manager Environment","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(he,{title:(0,t.__)("gtm_auth:","gtm-kit"),optionName:"gtm_auth",placeholder:(0,t.__)("Enter gtm_auth code","gtm-kit"),help:(0,t.__)("Enter the gtm_auth code for your GTM environment.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("gtm_preview:","gtm-kit"),optionName:"gtm_preview",placeholder:(0,t.__)("Enter gtm_preview code","gtm-kit"),help:(0,t.__)("Enter the gtm_preview code for your GTM environment.","gtm-kit"),useSettings:n,useUpdateStateSettings:i})]}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Environments","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In Google Tag Manager you can define different environments like Live, Dev and QA.","gtm-kit")," ",(0,t.__)('To use a specific environment in GTM Kit you must enter the "gtm_auth" and "gtm_preview" codes for that environment.',"gtm-kit")," ",(0,t.__)("If left empty the default environment will be used.","gtm-kit")]}),(0,m.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("Override settings in wp-config.php","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("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,m.jsx)("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",children:(0,t.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Exclude User Roles","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsx)(be.Content,{children:(0,m.jsx)(_e,{title:(0,t.__)("Exclude user roles","gtm-kit"),help:(0,t.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:a,optionName:"exclude_user_roles",useSettings:n,useUpdateStateSettings:i})}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,t.__)("Warning!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("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,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Container Code Implementation","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(fe,{title:(0,t.__)("Container code implementation:","gtm-kit"),options:[{label:(0,t.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,t.__)("Load container when the browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,t.__)("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:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:(0,t.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,t.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,t.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,t.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,t.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,t.__)('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:n,useUpdateStateSettings:i}),(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,m.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ye=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Post Data","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Post Data Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,u.createElement)(ke,{title:(0,t.__)("Post type","gtm-kit"),id:"post-type",label:(0,t.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Page type","gtm-kit"),id:"page-type",label:(0,t.__)('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:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Categories","gtm-kit"),id:"categories",label:(0,t.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Tags","gtm-kit"),id:"tags",label:(0,t.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post title","gtm-kit"),id:"post-title",label:(0,t.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post ID","gtm-kit"),id:"post-id",label:(0,t.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post data","gtm-kit"),id:"post-date",label:(0,t.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,t.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,t.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id",useSettings:n,useUpdateStateSettings:i}))))},ve=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("User Data","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,u.createElement)(be.Content,{className:"gtmkit-space-y-2"},(0,u.createElement)("p",null,(0,t.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,u.createElement)("p",null,(0,t.__)("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,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("User Data Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,t.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("User ID","gtm-kit"),id:"user-id",label:(0,t.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("User role","gtm-kit"),id:"user-role",label:(0,t.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role",useSettings:n,useUpdateStateSettings:i}))))},Ee=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c),a=!n.general.gcm_default_settings;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Google Consent Mode","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Google Consent Mode Activation","gtm-kit")},(0,u.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,t.__)("Warning!","gtm-kit"))),(0,u.createElement)(be.Content,{className:"gtmkit-space-y-2"},(0,u.createElement)("p",null,(0,t.__)("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,u.createElement)("p",null,(0,t.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,u.createElement)("p",{className:"!gtmkit-mt-4"},(0,t.__)("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,u.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,u.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,t.__)("See an example of how consent is updated","gtm-kit"))),(0,u.createElement)(ke,{title:(0,t.__)("Activate GCM settings","gtm-kit"),label:(0,t.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings",useSettings:n,useUpdateStateSettings:i}))),(0,u.createElement)(be,{disabled:a},(0,u.createElement)(be.Header,{title:(0,t.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Ad Personalization","gtm-kit"),label:(0,t.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Ad Storage","gtm-kit"),label:(0,t.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Ad User Data","gtm-kit"),label:(0,t.__)("Enables sending user data related to advertising to Google","gtm-kit"),optionName:"gcm_ad_user_data",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Analytics Storage","gtm-kit"),label:(0,t.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Functionality Storage","gtm-kit"),label:(0,t.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Personalization Storage","gtm-kit"),label:(0,t.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Security Storage","gtm-kit"),label:(0,t.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,t.__)("Advanced","gtm-kit")),(0,u.createElement)(ke,{title:(0,t.__)("Redact Ads Data","gtm-kit"),label:(0,t.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Pass through URL parameters","gtm-kit"),label:(0,t.__)("Pass through ad click, client ID, and session ID information in URLs","gtm-kit"),optionName:"gcm_url_passthrough",disabled:a,useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(he,{title:(0,t.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,t.__)("Enter time in milliseconds","gtm-kit"),useSettings:n,useUpdateStateSettings:i}))))},Ne=({label:t,value:e,tag:n})=>(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,u.createElement)("strong",null,t)),(0,u.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===n?(0,u.createElement)("code",{className:"gtmkit-text-sm"},e):(0,u.createElement)("em",null,e))),we=()=>{const{useSiteData:n}=(0,e.useContext)(c),i=Object.values(n.shared_data);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,t.__)("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,u.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,t.__)("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,u.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,u.createElement)("tbody",{className:"gtmkit-py-6"},i.map((function(t,e){return(0,u.createElement)(Ne,{key:e,label:t.label,value:t.value,tag:t.tag})})))))},je=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Misc","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Help improve GTM Kit","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(we,null),(0,u.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,t.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,u.createElement)(ke,{title:(0,t.__)("Share anonymous data","gtm-kit"),label:(0,t.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active",useSettings:n,useUpdateStateSettings:i}))),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Logging and debugging","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Event Inspector","gtm-kit"),label:(0,t.__)("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:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Console log","gtm-kit"),label:(0,t.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:n,useUpdateStateSettings:i}),(0,u.createElement)(ke,{title:(0,t.__)("Debug log","gtm-kit"),label:(0,t.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:n,useUpdateStateSettings:i}))))},Te=()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ue,{title:(0,t.__)("Integrations","gtm-kit"),data:de("integrations")})),Ce=({pluginName:e})=>(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.sprintf)(
     1(()=>{var t={838:function(t){t.exports=function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:i,getPrototypeOf:n,getOwnPropertyDescriptor:a}=Object;let{freeze:s,seal:o,create:r}=Object,{apply:l,construct:m}="undefined"!=typeof Reflect&&Reflect;s||(s=function(t){return t}),o||(o=function(t){return t}),l||(l=function(t,e,i){return t.apply(e,i)}),m||(m=function(t,e){return new t(...e)});const c=v(Array.prototype.forEach),g=v(Array.prototype.pop),d=v(Array.prototype.push),u=v(String.prototype.toLowerCase),p=v(String.prototype.toString),h=v(String.prototype.match),k=v(String.prototype.replace),f=v(String.prototype.indexOf),_=v(String.prototype.trim),x=v(Object.prototype.hasOwnProperty),b=v(RegExp.prototype.test),S=(y=TypeError,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return m(y,e)});var y;function v(t){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return l(t,e,n)}}function E(t,n){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;e&&e(t,null);let s=n.length;for(;s--;){let e=n[s];if("string"==typeof e){const t=a(e);t!==e&&(i(n)||(n[s]=t),e=t)}t[e]=!0}return t}function N(t){for(let e=0;e<t.length;e++)x(t,e)||(t[e]=null);return t}function w(e){const i=r(null);for(const[n,a]of t(e))x(e,n)&&(Array.isArray(a)?i[n]=N(a):a&&"object"==typeof a&&a.constructor===Object?i[n]=w(a):i[n]=a);return i}function j(t,e){for(;null!==t;){const i=a(t,e);if(i){if(i.get)return v(i.get);if("function"==typeof i.value)return v(i.value)}t=n(t)}return function(){return null}}const T=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),A=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=s(["#text"]),R=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),L=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),M=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=o(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=o(/<%[\w\W]*|[\w\W]*%>/gm),H=o(/\${[\w\W]*}/gm),B=o(/^data-[\-\w.\u00B7-\uFFFF]/),W=o(/^aria-[\-\w]+$/),K=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=o(/^(?:\w+script|data):/i),$=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=o(/^html$/i),J=o(/^[a-z][.\w]*(-[.\w]+)+$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:G,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:B,ARIA_ATTR:W,IS_ALLOWED_URI:K,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:$,DOCTYPE_NAME:Y,CUSTOM_ELEMENT:J});const V=1,X=3,Z=7,Q=8,tt=9,et=function(){return"undefined"==typeof window?null:window};return function e(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const n=t=>e(t);if(n.version="3.1.6",n.removed=[],!i||!i.document||i.document.nodeType!==tt)return n.isSupported=!1,n;let{document:a}=i;const o=a,l=o.currentScript,{DocumentFragment:m,HTMLTemplateElement:y,Node:v,Element:N,NodeFilter:G,NamedNodeMap:F=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:H,DOMParser:B,trustedTypes:W}=i,z=N.prototype,$=j(z,"cloneNode"),J=j(z,"remove"),it=j(z,"nextSibling"),nt=j(z,"childNodes"),at=j(z,"parentNode");if("function"==typeof y){const t=a.createElement("template");t.content&&t.content.ownerDocument&&(a=t.content.ownerDocument)}let st,ot="";const{implementation:rt,createNodeIterator:lt,createDocumentFragment:mt,getElementsByTagName:ct}=a,{importNode:gt}=o;let dt={};n.isSupported="function"==typeof t&&"function"==typeof at&&rt&&void 0!==rt.createHTMLDocument;const{MUSTACHE_EXPR:ut,ERB_EXPR:pt,TMPLIT_EXPR:ht,DATA_ATTR:kt,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:_t,ATTR_WHITESPACE:xt,CUSTOM_ELEMENT:bt}=q;let{IS_ALLOWED_URI:St}=q,yt=null;const vt=E({},[...T,...C,...D,...A,...O]);let Et=null;const Nt=E({},[...R,...L,...M,...P]);let wt=Object.seal(r(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),jt=null,Tt=null,Ct=!0,Dt=!0,Ut=!1,At=!0,It=!1,Ot=!0,Rt=!1,Lt=!1,Mt=!1,Pt=!1,Gt=!1,Ft=!1,Ht=!0,Bt=!1,Wt=!0,Kt=!1,zt={},$t=null;const Yt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Jt=null;const qt=E({},["audio","video","img","source","image","track"]);let Vt=null;const Xt=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml";let ee=te,ie=!1,ne=null;const ae=E({},[Zt,Qt,te],p);let se=null;const oe=["application/xhtml+xml","text/html"];let re=null,le=null;const me=a.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},ge=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!le||le!==t){if(t&&"object"==typeof t||(t={}),t=w(t),se=-1===oe.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,re="application/xhtml+xml"===se?p:u,yt=x(t,"ALLOWED_TAGS")?E({},t.ALLOWED_TAGS,re):vt,Et=x(t,"ALLOWED_ATTR")?E({},t.ALLOWED_ATTR,re):Nt,ne=x(t,"ALLOWED_NAMESPACES")?E({},t.ALLOWED_NAMESPACES,p):ae,Vt=x(t,"ADD_URI_SAFE_ATTR")?E(w(Xt),t.ADD_URI_SAFE_ATTR,re):Xt,Jt=x(t,"ADD_DATA_URI_TAGS")?E(w(qt),t.ADD_DATA_URI_TAGS,re):qt,$t=x(t,"FORBID_CONTENTS")?E({},t.FORBID_CONTENTS,re):Yt,jt=x(t,"FORBID_TAGS")?E({},t.FORBID_TAGS,re):{},Tt=x(t,"FORBID_ATTR")?E({},t.FORBID_ATTR,re):{},zt=!!x(t,"USE_PROFILES")&&t.USE_PROFILES,Ct=!1!==t.ALLOW_ARIA_ATTR,Dt=!1!==t.ALLOW_DATA_ATTR,Ut=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,Ot=!1!==t.SAFE_FOR_XML,Rt=t.WHOLE_DOCUMENT||!1,Pt=t.RETURN_DOM||!1,Gt=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Mt=t.FORCE_BODY||!1,Ht=!1!==t.SANITIZE_DOM,Bt=t.SANITIZE_NAMED_PROPS||!1,Wt=!1!==t.KEEP_CONTENT,Kt=t.IN_PLACE||!1,St=t.ALLOWED_URI_REGEXP||K,ee=t.NAMESPACE||te,wt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(wt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(wt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(wt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Dt=!1),Gt&&(Pt=!0),zt&&(yt=E({},O),Et=[],!0===zt.html&&(E(yt,T),E(Et,R)),!0===zt.svg&&(E(yt,C),E(Et,L),E(Et,P)),!0===zt.svgFilters&&(E(yt,D),E(Et,L),E(Et,P)),!0===zt.mathMl&&(E(yt,A),E(Et,M),E(Et,P))),t.ADD_TAGS&&(yt===vt&&(yt=w(yt)),E(yt,t.ADD_TAGS,re)),t.ADD_ATTR&&(Et===Nt&&(Et=w(Et)),E(Et,t.ADD_ATTR,re)),t.ADD_URI_SAFE_ATTR&&E(Vt,t.ADD_URI_SAFE_ATTR,re),t.FORBID_CONTENTS&&($t===Yt&&($t=w($t)),E($t,t.FORBID_CONTENTS,re)),Wt&&(yt["#text"]=!0),Rt&&E(yt,["html","head","body"]),yt.table&&(E(yt,["tbody"]),delete jt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');st=t.TRUSTED_TYPES_POLICY,ot=st.createHTML("")}else void 0===st&&(st=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(i=e.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(W,l)),null!==st&&"string"==typeof ot&&(ot=st.createHTML(""));s&&s(t),le=t}},de=E({},["mi","mo","mn","ms","mtext"]),ue=E({},["foreignobject","annotation-xml"]),pe=E({},["title","style","font","a","script"]),he=E({},[...C,...D,...U]),ke=E({},[...A,...I]),fe=function(t){d(n.removed,{element:t});try{at(t).removeChild(t)}catch(e){J(t)}},_e=function(t,e){try{d(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Et[t])if(Pt||Gt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},xe=function(t){let e=null,i=null;if(Mt)t="<remove></remove>"+t;else{const e=h(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===se&&ee===te&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const n=st?st.createHTML(t):t;if(ee===te)try{e=(new B).parseFromString(n,se)}catch(t){}if(!e||!e.documentElement){e=rt.createDocument(ee,"template",null);try{e.documentElement.innerHTML=ie?ot:n}catch(t){}}const s=e.body||e.documentElement;return t&&i&&s.insertBefore(a.createTextNode(i),s.childNodes[0]||null),ee===te?ct.call(e,Rt?"html":"body")[0]:Rt?e.documentElement:s},be=function(t){return lt.call(t.ownerDocument||t,t,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Se=function(t){return t instanceof H&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof F)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ye=function(t){return"function"==typeof v&&t instanceof v},ve=function(t,e,i){dt[t]&&c(dt[t],(t=>{t.call(n,e,i,le)}))},Ee=function(t){let e=null;if(ve("beforeSanitizeElements",t,null),Se(t))return fe(t),!0;const i=re(t.nodeName);if(ve("uponSanitizeElement",t,{tagName:i,allowedTags:yt}),t.hasChildNodes()&&!ye(t.firstElementChild)&&b(/<[/\w]/g,t.innerHTML)&&b(/<[/\w]/g,t.textContent))return fe(t),!0;if(t.nodeType===Z)return fe(t),!0;if(Ot&&t.nodeType===Q&&b(/<[/\w]/g,t.data))return fe(t),!0;if(!yt[i]||jt[i]){if(!jt[i]&&we(i)){if(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,i))return!1;if(wt.tagNameCheck instanceof Function&&wt.tagNameCheck(i))return!1}if(Wt&&!$t[i]){const e=at(t)||t.parentNode,i=nt(t)||t.childNodes;if(i&&e)for(let n=i.length-1;n>=0;--n){const a=$(i[n],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,it(t))}}return fe(t),!0}return t instanceof N&&!function(t){let e=at(t);e&&e.tagName||(e={namespaceURI:ee,tagName:"template"});const i=u(t.tagName),n=u(e.tagName);return!!ne[t.namespaceURI]&&(t.namespaceURI===Qt?e.namespaceURI===te?"svg"===i:e.namespaceURI===Zt?"svg"===i&&("annotation-xml"===n||de[n]):Boolean(he[i]):t.namespaceURI===Zt?e.namespaceURI===te?"math"===i:e.namespaceURI===Qt?"math"===i&&ue[n]:Boolean(ke[i]):t.namespaceURI===te?!(e.namespaceURI===Qt&&!ue[n])&&!(e.namespaceURI===Zt&&!de[n])&&!ke[i]&&(pe[i]||!he[i]):!("application/xhtml+xml"!==se||!ne[t.namespaceURI]))}(t)?(fe(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!b(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&t.nodeType===X&&(e=t.textContent,c([ut,pt,ht],(t=>{e=k(e,t," ")})),t.textContent!==e&&(d(n.removed,{element:t.cloneNode()}),t.textContent=e)),ve("afterSanitizeElements",t,null),!1):(fe(t),!0)},Ne=function(t,e,i){if(Ht&&("id"===e||"name"===e)&&(i in a||i in me))return!1;if(Dt&&!Tt[e]&&b(kt,e));else if(Ct&&b(ft,e));else if(!Et[e]||Tt[e]){if(!(we(t)&&(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,t)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(t))&&(wt.attributeNameCheck instanceof RegExp&&b(wt.attributeNameCheck,e)||wt.attributeNameCheck instanceof Function&&wt.attributeNameCheck(e))||"is"===e&&wt.allowCustomizedBuiltInElements&&(wt.tagNameCheck instanceof RegExp&&b(wt.tagNameCheck,i)||wt.tagNameCheck instanceof Function&&wt.tagNameCheck(i))))return!1}else if(Vt[e]);else if(b(St,k(i,xt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==f(i,"data:")||!Jt[t])if(Ut&&!b(_t,k(i,xt,"")));else if(i)return!1;return!0},we=function(t){return"annotation-xml"!==t&&h(t,bt)},je=function(t){ve("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Et};let a=e.length;for(;a--;){const s=e[a],{name:o,namespaceURI:r,value:l}=s,m=re(o);let d="value"===o?l:_(l);if(i.attrName=m,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,ve("uponSanitizeAttribute",t,i),d=i.attrValue,Ot&&b(/((--!?|])>)|<\/(style|title)/i,d)){_e(o,t);continue}if(i.forceKeepAttr)continue;if(_e(o,t),!i.keepAttr)continue;if(!At&&b(/\/>/i,d)){_e(o,t);continue}It&&c([ut,pt,ht],(t=>{d=k(d,t," ")}));const u=re(t.nodeName);if(Ne(u,m,d)){if(!Bt||"id"!==m&&"name"!==m||(_e(o,t),d="user-content-"+d),st&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(r);else switch(W.getAttributeType(u,m)){case"TrustedHTML":d=st.createHTML(d);break;case"TrustedScriptURL":d=st.createScriptURL(d)}try{r?t.setAttributeNS(r,o,d):t.setAttribute(o,d),Se(t)?fe(t):g(n.removed)}catch(t){}}}ve("afterSanitizeAttributes",t,null)},Te=function t(e){let i=null;const n=be(e);for(ve("beforeSanitizeShadowDOM",e,null);i=n.nextNode();)ve("uponSanitizeShadowNode",i,null),Ee(i)||(i.content instanceof m&&t(i.content),je(i));ve("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,a=null,s=null,r=null;if(ie=!t,ie&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ye(t)){if("function"!=typeof t.toString)throw S("toString is not a function");if("string"!=typeof(t=t.toString()))throw S("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Lt||ge(e),n.removed=[],"string"==typeof t&&(Kt=!1),Kt){if(t.nodeName){const e=re(t.nodeName);if(!yt[e]||jt[e])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof v)i=xe("\x3c!----\x3e"),a=i.ownerDocument.importNode(t,!0),a.nodeType===V&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!Pt&&!It&&!Rt&&-1===t.indexOf("<"))return st&&Ft?st.createHTML(t):t;if(i=xe(t),!i)return Pt?null:Ft?ot:""}i&&Mt&&fe(i.firstChild);const l=be(Kt?t:i);for(;s=l.nextNode();)Ee(s)||(s.content instanceof m&&Te(s.content),je(s));if(Kt)return t;if(Pt){if(Gt)for(r=mt.call(i.ownerDocument);i.firstChild;)r.appendChild(i.firstChild);else r=i;return(Et.shadowroot||Et.shadowrootmode)&&(r=gt.call(o,r,!0)),r}let g=Rt?i.outerHTML:i.innerHTML;return Rt&&yt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&b(Y,i.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+g),It&&c([ut,pt,ht],(t=>{g=k(g,t," ")})),st&&Ft?st.createHTML(g):g},n.setConfig=function(){ge(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Lt=!0},n.clearConfig=function(){le=null,Lt=!1},n.isValidAttribute=function(t,e,i){le||ge({});const n=re(t),a=re(e);return Ne(n,a,i)},n.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],d(dt[t],e))},n.removeHook=function(t){if(dt[t])return g(dt[t])},n.removeHooks=function(t){dt[t]&&(dt[t]=[])},n.removeAllHooks=function(){dt={}},n}()}()},942:(t,e)=>{var i;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=o(t,s(i)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var i in t)n.call(t,i)&&t[i]&&(e=o(e,i));return e}function o(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(i=function(){return a}.apply(e,[]))||(t.exports=i)}()}},e={};function i(n){var a=e[n];if(void 0!==a)return a.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.ReactDOM;var e=i.n(t);const n=window.wp.i18n,a=window.wp.element,s=window.wp.components,o=window.lodash,r=window.wp.apiFetch;var l=i.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const m=async(t,e,i=null,n=!1)=>{let a={};try{a=await l()({path:t,method:e,...i&&{data:i}})}catch(i){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?a:!0===a.success?a.data:{}},c=(t,e)=>{const i={...t};switch(e.type){case"FETCH_SETTINGS":i.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},i.stateSettings=e.payload.stateSettings,i.siteData=e.payload.siteData,i.notifications=e.payload.notifications,i.installData=e.payload.installData,i.isPending=!1,i.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(i.notice=(0,n.__)("An error occurred.","gtm-kit"),i.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":i.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":i.fetchedSettings=e.payload.fetchedSettings,i.stateSettings=e.payload.stateSettings,i.isPending=!1,i.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,i.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,n.__)("An error occurred.","gtm-kit"):(0,n.__)("Saved Successfully.","gtm-kit"),i.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":i.fetchedSettings=e.payload.fetchedSettings||i.fetchedSettings,i.stateSettings=e.payload.stateSettings||i.stateSettings,i.isPending=e.payload.isPending||i.isPending,i.notice=e.payload.notice||i.notice,i.hasError=e.payload.hasError||i.hasError,i.canSave=e.payload.canSave||i.canSave,i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData,i.supportTicket=e.payload.supportTicket||i.supportTicket,i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey,i.licenseKey=e.payload.licenseKey||i.licenseKey;break;case"SEND_SUPPORT_DATA_BEFORE":i.isSendingSystemData=e.payload.isSendingSystemData||i.isSendingSystemData;break;case"SEND_SUPPORT_DATA":i.isSendingSystemData=!1,i.isSystemDataSent=e.payload.isSystemDataSent||i.isSystemDataSent,i.systemDataMessage=e.payload.systemDataMessage||i.systemDataMessage;break;case"SEND_LICENSE_KEY_BEFORE":i.isSendingLicenseKey=e.payload.isSendingLicenseKey||i.isSendingLicenseKey;break;case"SEND_LICENSE_KEY":i.isSendingLicenseKey=!1,i.isLicenseKeySent=e.payload.isLicenseKeySent||i.isLicenseKeySent,i.licenseKeyMessage=e.payload.licenseKeyMessage||i.licenseKeyMessage;break;case"SEND_NOTIFICATION_STATUS_BEFORE":i.isUpdatingNotifications=e.payload.isUpdatingNotifications||i.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":i.isUpdatingNotifications=!1,i.isNotificationStatusSent=e.payload.isNotificationStatusSent||i.isNotificationStatusSent,i.notifications=e.payload.notifications||i.Notifications}return i},g=window.ReactJSXRuntime,d=(0,a.createContext)(),u=t=>{const[e,i]=(0,a.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),n=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},n=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:n,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{n()}),[]);const r={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(n=e.stateSettings,m("gtmkit/v1/set-options","POST",n));var n;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:n,useUpdateState:s,useUpdateStateSettings:async(t,i,n)=>{const a=JSON.parse(JSON.stringify(e.stateSettings));let r;a[t][i]=n,r=!(0,o.isEqual)(a,e.fetchedSettings),s({stateSettings:a,canSave:r})},useImportSettings:async(t,i)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let a;const r={};r.general={...n.general,...i.general},"integrations"in i&&(r.integrations={...n.integrations,...i.integrations}),a=!(0,o.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:a})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(n=e.supportTicket,m("gtmkit/v1/send-support-data","POST",n,!0));var n;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{i({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(n=e.licenseKey,m("gtmkit/v1/send-license-key","POST",n,!0));var n;i({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{i({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:!0}});const n={"notification-id":t,action:e},a=await(t=>m("gtmkit/v1/set-notification-status","POST",t,!0))(n);i({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,isNotificationStatusSent:a.success,notifications:a.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,g.jsx)(d.Provider,{value:r,children:t.children})},p=window.React;var h,k=i.n(p);function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},f.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const _="popstate";function x(t,e){if(!1===t||null==t)throw new Error(e)}function b(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function S(t,e){return{usr:t.state,key:t.key,idx:e}}function y(t,e,i,n){return void 0===i&&(i=null),f({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:i,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function v(t){let{pathname:e="/",search:i="",hash:n=""}=t;return i&&"?"!==i&&(e+="?"===i.charAt(0)?i:"?"+i),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function E(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substr(i),t=t.substr(0,i));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function w(t,e,i){return void 0===i&&(i="/"),function(t,e,i,n){let a=F(("string"==typeof e?E(e):e).pathname||"/",i);if(null==a)return null;let s=j(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,i)=>t===e[i]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(s);let o=null;for(let t=0;null==o&&t<s.length;++t){let e=G(a);o=M(s[t],e,n)}return o}(t,e,i,!1)}function j(t,e,i,n){void 0===e&&(e=[]),void 0===i&&(i=[]),void 0===n&&(n="");let a=(t,a,s)=>{let o={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};o.relativePath.startsWith("/")&&(x(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 r=K([n,o.relativePath]),l=i.concat(o);t.children&&t.children.length>0&&(x(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+r+'".'),j(t.children,e,l,r)),(null!=t.path||t.index)&&e.push({path:r,score:L(r,t.index),routesMeta:l})};return t.forEach(((t,e)=>{var i;if(""!==t.path&&null!=(i=t.path)&&i.includes("?"))for(let i of T(t.path))a(t,e,i);else a(t,e)})),e}function T(t){let e=t.split("/");if(0===e.length)return[];let[i,...n]=e,a=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===n.length)return a?[s,""]:[s];let o=T(n.join("/")),r=[];return r.push(...o.map((t=>""===t?s:[s,t].join("/")))),a&&r.push(...o),r.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:[\w-]+$/,D=3,U=2,A=1,I=10,O=-2,R=t=>"*"===t;function L(t,e){let i=t.split("/"),n=i.length;return i.some(R)&&(n+=O),e&&(n+=U),i.filter((t=>!R(t))).reduce(((t,e)=>t+(C.test(e)?D:""===e?A:I)),n)}function M(t,e,i){void 0===i&&(i=!1);let{routesMeta:n}=t,a={},s="/",o=[];for(let t=0;t<n.length;++t){let r=n[t],l=t===n.length-1,m="/"===s?e:e.slice(s.length)||"/",c=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},m),g=r.route;if(!c&&l&&i&&!n[n.length-1].route.index&&(c=P({path:r.relativePath,caseSensitive:r.caseSensitive,end:!1},m)),!c)return null;Object.assign(a,c.params),o.push({params:a,pathname:K([s,c.pathname]),pathnameBase:z(K([s,c.pathnameBase])),route:g}),"/"!==c.pathnameBase&&(s=K([s,c.pathnameBase]))}return o}function P(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[i,n]=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0),b("*"===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=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((t,e,i)=>(n.push({paramName:e,isOptional:null!=i}),i?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),a+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?a+="\\/*$":""!==t&&"/"!==t&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),a=e.match(i);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),r=a.slice(1);return{params:n.reduce(((t,e,i)=>{let{paramName:n,isOptional:a}=e;if("*"===n){let t=r[i]||"";o=s.slice(0,s.length-t.length).replace(/(.)\/+$/,"$1")}const l=r[i];return t[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:s,pathnameBase:o,pattern:t}}function G(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return b(!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 F(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let i=e.endsWith("/")?e.length-1:e.length,n=t.charAt(i);return n&&"/"!==n?null:t.slice(i)||"/"}function H(t,e,i,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+i+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function B(t,e){let i=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?i.map(((t,e)=>e===i.length-1?t.pathname:t.pathnameBase)):i.map((t=>t.pathnameBase))}function W(t,e,i,n){let a;void 0===n&&(n=!1),"string"==typeof t?a=E(t):(a=f({},t),x(!a.pathname||!a.pathname.includes("?"),H("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),H("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),H("#","search","hash",a)));let s,o=""===t||""===a.pathname,r=o?"/":a.pathname;if(null==r)s=i;else{let t=e.length-1;if(!n&&r.startsWith("..")){let e=r.split("/");for(;".."===e[0];)e.shift(),t-=1;a.pathname=e.join("/")}s=t>=0?e[t]:"/"}let l=function(t,e){void 0===e&&(e="/");let{pathname:i,search:n="",hash:a=""}="string"==typeof t?E(t):t,s=i?i.startsWith("/")?i:function(t,e){let i=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?i.length>1&&i.pop():"."!==t&&i.push(t)})),i.length>1?i.join("/"):"/"}(i,e):e;return{pathname:s,search:$(n),hash:Y(a)}}(a,s),m=r&&"/"!==r&&r.endsWith("/"),c=(o||"."===r)&&i.endsWith("/");return l.pathname.endsWith("/")||!m&&!c||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),z=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const J=["post","put","patch","delete"],q=(new Set(J),["get",...J]);function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},V.apply(this,arguments)}new Set(q),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const X=p.createContext(null),Z=p.createContext(null),Q=p.createContext(null),tt=p.createContext(null),et=p.createContext({outlet:null,matches:[],isDataRoute:!1}),it=p.createContext(null);function nt(){return null!=p.useContext(tt)}function at(){return nt()||x(!1),p.useContext(tt).location}function st(t){p.useContext(Q).static||p.useLayoutEffect(t)}function ot(){let{isDataRoute:t}=p.useContext(et);return t?function(){let{router:t}=function(){let t=p.useContext(X);return t||x(!1),t}(ut.UseNavigateStable),e=ht(pt.UseNavigateStable),i=p.useRef(!1);return st((()=>{i.current=!0})),p.useCallback((function(n,a){void 0===a&&(a={}),i.current&&("number"==typeof n?t.navigate(n):t.navigate(n,V({fromRouteId:e},a)))}),[t,e])}():function(){nt()||x(!1);let t=p.useContext(X),{basename:e,future:i,navigator:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(B(a,i.v7_relativeSplatPath)),r=p.useRef(!1);return st((()=>{r.current=!0})),p.useCallback((function(i,a){if(void 0===a&&(a={}),!r.current)return;if("number"==typeof i)return void n.go(i);let l=W(i,JSON.parse(o),s,"path"===a.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:K([e,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[e,n,o,s,t])}()}function rt(t,e){let{relative:i}=void 0===e?{}:e,{future:n}=p.useContext(Q),{matches:a}=p.useContext(et),{pathname:s}=at(),o=JSON.stringify(B(a,n.v7_relativeSplatPath));return p.useMemo((()=>W(t,JSON.parse(o),s,"path"===i)),[t,o,s,i])}function lt(t,e,i,n){nt()||x(!1);let{navigator:a}=p.useContext(Q),{matches:s}=p.useContext(et),o=s[s.length-1],r=o?o.params:{},l=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let m,c=at();if(e){var g;let t="string"==typeof e?E(e):e;"/"===l||(null==(g=t.pathname)?void 0:g.startsWith(l))||x(!1),m=t}else m=c;let d=m.pathname||"/",u=d;if("/"!==l){let t=l.replace(/^\//,"").split("/");u="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=w(t,{pathname:u}),f=function(t,e,i,n){var a;if(void 0===e&&(e=[]),void 0===i&&(i=null),void 0===n&&(n=null),null==t){var s;if(!i)return null;if(i.errors)t=i.matches;else{if(!(null!=(s=n)&&s.v7_partialHydration&&0===e.length&&!i.initialized&&i.matches.length>0))return null;t=i.matches}}let o=t,r=null==(a=i)?void 0:a.errors;if(null!=r){let t=o.findIndex((t=>t.route.id&&void 0!==(null==r?void 0:r[t.route.id])));t>=0||x(!1),o=o.slice(0,Math.min(o.length,t+1))}let l=!1,m=-1;if(i&&n&&n.v7_partialHydration)for(let t=0;t<o.length;t++){let e=o[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(m=t),e.route.id){let{loaderData:t,errors:n}=i,a=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||a){l=!0,o=m>=0?o.slice(0,m+1):[o[0]];break}}}return o.reduceRight(((t,n,a)=>{let s,c=!1,g=null,d=null;var u;i&&(s=r&&n.route.id?r[n.route.id]:void 0,g=n.route.errorElement||ct,l&&(m<0&&0===a?(kt[u="route-fallback"]||(kt[u]=!0),c=!0,d=null):m===a&&(c=!0,d=n.route.hydrateFallbackElement||null)));let h=e.concat(o.slice(0,a+1)),k=()=>{let e;return e=s?g:c?d:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:t,p.createElement(dt,{match:n,routeContext:{outlet:t,matches:h,isDataRoute:null!=i},children:e})};return i&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?p.createElement(gt,{location:i.location,revalidation:i.revalidation,component:g,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},r,t.params),pathname:K([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:K([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,i,n);return e&&f?p.createElement(tt.Provider,{value:{location:V({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:h.Pop}},f):f}function mt(){let t=function(){var t;let e=p.useContext(it),i=function(){let t=p.useContext(Z);return t||x(!1),t}(pt.UseRouteError),n=ht(pt.UseRouteError);return void 0!==e?e:null==(t=i.errors)?void 0:t[n]}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),i?p.createElement("pre",{style:n},i):null,null)}const ct=p.createElement(mt,null);class gt extends p.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?p.createElement(et.Provider,{value:this.props.routeContext},p.createElement(it.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dt(t){let{routeContext:e,match:i,children:n}=t,a=p.useContext(X);return a&&a.static&&a.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=i.route.id),p.createElement(et.Provider,{value:e},n)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),pt=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}(pt||{});function ht(t){let e=function(){let t=p.useContext(et);return t||x(!1),t}(),i=e.matches[e.matches.length-1];return i.route.id||x(!1),i.route.id}const kt={};function ft(t){let{to:e,replace:i,state:n,relative:a}=t;nt()||x(!1);let{future:s,static:o}=p.useContext(Q),{matches:r}=p.useContext(et),{pathname:l}=at(),m=ot(),c=W(e,B(r,s.v7_relativeSplatPath),l,"path"===a),g=JSON.stringify(c);return p.useEffect((()=>m(JSON.parse(g),{replace:i,state:n,relative:a})),[m,g,a,i,n]),null}function _t(t){x(!1)}function xt(t){let{basename:e="/",children:i=null,location:n,navigationType:a=h.Pop,navigator:s,static:o=!1,future:r}=t;nt()&&x(!1);let l=e.replace(/^\/*/,"/"),m=p.useMemo((()=>({basename:l,navigator:s,static:o,future:V({v7_relativeSplatPath:!1},r)})),[l,r,s,o]);"string"==typeof n&&(n=E(n));let{pathname:c="/",search:g="",hash:d="",state:u=null,key:k="default"}=n,f=p.useMemo((()=>{let t=F(c,l);return null==t?null:{location:{pathname:t,search:g,hash:d,state:u,key:k},navigationType:a}}),[l,c,g,d,u,k,a]);return null==f?null:p.createElement(Q.Provider,{value:m},p.createElement(tt.Provider,{children:i,value:f}))}function bt(t){let{children:e,location:i}=t;return lt(St(e),i)}function St(t,e){void 0===e&&(e=[]);let i=[];return p.Children.forEach(t,((t,n)=>{if(!p.isValidElement(t))return;let a=[...e,n];if(t.type===p.Fragment)return void i.push.apply(i,St(t.props.children,a));t.type!==_t&&x(!1),t.props.index&&t.props.children&&x(!1);let s={id:t.props.id||a.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&&(s.children=St(t.props.children,a)),i.push(s)})),i}function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yt.apply(this,arguments)}function vt(t,e){if(null==t)return{};var i,n,a={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(a[i]=t[i]);return a}p.startTransition,new Promise((()=>{})),p.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Et=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Nt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(t){}const wt=p.createContext({isTransitioning:!1});new Map;const jt=p.startTransition;function Tt(t){let{basename:e,children:i,future:n,window:a}=t,s=p.useRef();var o;null==s.current&&(s.current=(void 0===(o={window:a,v5Compat:!0})&&(o={}),function(t,e,i,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,r=h.Pop,l=null,m=c();function c(){return(o.state||{idx:null}).idx}function g(){r=h.Pop;let t=c(),e=null==t?null:t-m;m=t,l&&l({action:r,location:u.location,delta:e})}function d(t){let e="null"!==a.location.origin?a.location.origin:a.location.href,i="string"==typeof t?t:v(t);return i=i.replace(/ $/,"%20"),x(e,"No window.location.(origin|href) available to create URL for href: "+i),new URL(i,e)}null==m&&(m=0,o.replaceState(f({},o.state,{idx:m}),""));let u={get action(){return r},get location(){return t(a,o)},listen(t){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(_,g),l=t,()=>{a.removeEventListener(_,g),l=null}},createHref:t=>e(a,t),createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){r=h.Push;let n=y(u.location,t,e);i&&i(n,t),m=c()+1;let g=S(n,m),d=u.createHref(n);try{o.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;a.location.assign(d)}s&&l&&l({action:r,location:u.location,delta:1})},replace:function(t,e){r=h.Replace;let n=y(u.location,t,e);i&&i(n,t),m=c();let a=S(n,m),g=u.createHref(n);o.replaceState(a,"",g),s&&l&&l({action:r,location:u.location,delta:0})},go:t=>o.go(t)};return u}((function(t,e){let{pathname:i="/",search:n="",hash:a=""}=E(t.location.hash.substr(1));return i.startsWith("/")||i.startsWith(".")||(i="/"+i),y("",{pathname:i,search:n,hash:a},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let i=t.document.querySelector("base"),n="";if(i&&i.getAttribute("href")){let e=t.location.href,i=e.indexOf("#");n=-1===i?e:e.slice(0,i)}return n+"#"+("string"==typeof e?e:v(e))}),(function(t,e){b("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let r=s.current,[l,m]=p.useState({action:r.action,location:r.location}),{v7_startTransition:c}=n||{},g=p.useCallback((t=>{c&&jt?jt((()=>m(t))):m(t)}),[m,c]);return p.useLayoutEffect((()=>r.listen(g)),[r,g]),p.createElement(xt,{basename:e,children:i,location:l.location,navigationType:l.action,navigator:r,future:n})}t.flushSync,p.useId;const Ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Dt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ut=p.forwardRef((function(t,e){let i,{onClick:n,relative:a,reloadDocument:s,replace:o,state:r,target:l,to:m,preventScrollReset:c,unstable_viewTransition:g}=t,d=vt(t,Et),{basename:u}=p.useContext(Q),h=!1;if("string"==typeof m&&Dt.test(m)&&(i=m,Ct))try{let t=new URL(window.location.href),e=m.startsWith("//")?new URL(t.protocol+m):new URL(m),i=F(e.pathname,u);e.origin===t.origin&&null!=i?m=i+e.search+e.hash:h=!0}catch(t){}let k=function(t,e){let{relative:i}=void 0===e?{}:e;nt()||x(!1);let{basename:n,navigator:a}=p.useContext(Q),{hash:s,pathname:o,search:r}=rt(t,{relative:i}),l=o;return"/"!==n&&(l="/"===o?n:K([n,o])),a.createHref({pathname:l,search:r,hash:s})}(m,{relative:a}),f=function(t,e){let{target:i,replace:n,state:a,preventScrollReset:s,relative:o,unstable_viewTransition:r}=void 0===e?{}:e,l=ot(),m=at(),c=rt(t,{relative:o});return p.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,i)){e.preventDefault();let i=void 0!==n?n:v(m)===v(c);l(t,{replace:i,state:a,preventScrollReset:s,relative:o,unstable_viewTransition:r})}}),[m,l,c,n,a,i,t,s,o,r])}(m,{replace:o,state:r,target:l,preventScrollReset:c,relative:a,unstable_viewTransition:g});return p.createElement("a",yt({},d,{href:i||k,onClick:h||s?n:function(t){n&&n(t),t.defaultPrevented||f(t)},ref:e,target:l}))})),At=p.forwardRef((function(t,e){let{"aria-current":i="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:r,unstable_viewTransition:l,children:m}=t,c=vt(t,Nt),g=rt(r,{relative:c.relative}),d=at(),u=p.useContext(Z),{navigator:h,basename:k}=p.useContext(Q),f=null!=u&&function(t,e){void 0===e&&(e={});let i=p.useContext(wt);null==i&&x(!1);let{basename:n}=function(){let t=p.useContext(X);return t||x(!1),t}(It.useViewTransitionState),a=rt(t,{relative:e.relative});if(!i.isTransitioning)return!1;let s=F(i.currentLocation.pathname,n)||i.currentLocation.pathname,o=F(i.nextLocation.pathname,n)||i.nextLocation.pathname;return null!=P(a.pathname,o)||null!=P(a.pathname,s)}(g)&&!0===l,_=h.encodeLocation?h.encodeLocation(g).pathname:g.pathname,b=d.pathname,S=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;n||(b=b.toLowerCase(),S=S?S.toLowerCase():null,_=_.toLowerCase()),S&&k&&(S=F(S,k)||S);const y="/"!==_&&_.endsWith("/")?_.length-1:_.length;let v,E=b===_||!s&&b.startsWith(_)&&"/"===b.charAt(y),N=null!=S&&(S===_||!s&&S.startsWith(_)&&"/"===S.charAt(_.length)),w={isActive:E,isPending:N,isTransitioning:f},j=E?i:void 0;v="function"==typeof a?a(w):[a,E?"active":null,N?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(w):o;return p.createElement(Ut,yt({},c,{"aria-current":j,className:v,ref:e,style:T,to:r,unstable_viewTransition:l}),"function"==typeof m?m(w):m)}));var It,Ot;(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"}(Ot||(Ot={}));const Rt=({title:t})=>(0,p.createElement)(p.Fragment,null,(0,p.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,p.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,p.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,p.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,p.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,p.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,p.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,p.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,p.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))));var Lt=i(942),Mt=i.n(Lt);const Pt=({count:t,important:e,nav:i=!1})=>(0,g.jsx)(g.Fragment,{children:t>0&&(0,g.jsx)("span",{className:Mt()("gtmkit-ml-2 gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py-px gtmkit-leading-[1.125rem] gtmkit-uppercase",{"gtmkit-bg-color-error":e},{"gtmkit-bg-color-success":!e},{"gtmkit-px-1.5":i},{"gtmkit-px-2":!i}),children:t})}),Gt=({metrics:t})=>(0,g.jsx)(Pt,{count:t.total,important:t.problem>0,nav:!0}),Ft=Pt,Ht=({to:t,title:e})=>{const{useNotifications:i}=(0,a.useContext)(d);return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(At,{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 ":""),children:[e,"notifications"===t&&(0,g.jsx)(Gt,{metrics:i.metrics})]})})},Bt=({NavList:t})=>(0,p.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,p.createElement)(Ht,{key:t.to,to:t.to,title:t.title})})));function Wt(){return Wt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Wt.apply(this,arguments)}function Kt(t,e){if(null==t)return{};var i,n,a={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(a[i]=t[i]);return a}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function $t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,zt(t,e)}function Yt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Jt=k().createContext(null);var qt=function(t){return t.scrollTop},Vt="unmounted",Xt="exited",Zt="entering",Qt="entered",te="exiting",ee=function(t){function i(e,i){var n;n=t.call(this,e,i)||this;var a,s=i&&!i.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?s?(a=Xt,n.appearStatus=Zt):a=Qt:a=e.unmountOnExit||e.mountOnEnter?Vt:Xt,n.state={status:a},n.nextCallback=null,n}$t(i,t),i.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Vt?{status:Xt}:null};var n=i.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==Zt&&i!==Qt&&(e=Zt):i!==Zt&&i!==Qt||(e=te)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,i,n=this.props.timeout;return t=e=i=n,null!=n&&"number"!=typeof n&&(t=n.exit,e=n.enter,i=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:i}},n.updateStatus=function(t,i){if(void 0===t&&(t=!1),null!==i)if(this.cancelNextCallback(),i===Zt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this);n&&qt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xt&&this.setState({status:Vt})},n.performEnter=function(t){var i=this,n=this.props.enter,a=this.context?this.context.isMounting:t,s=this.props.nodeRef?[a]:[e().findDOMNode(this),a],o=s[0],r=s[1],l=this.getTimeouts(),m=a?l.appear:l.enter;t||n?(this.props.onEnter(o,r),this.safeSetState({status:Zt},(function(){i.props.onEntering(o,r),i.onTransitionEnd(m,(function(){i.safeSetState({status:Qt},(function(){i.props.onEntered(o,r)}))}))}))):this.safeSetState({status:Qt},(function(){i.props.onEntered(o)}))},n.performExit=function(){var t=this,i=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:e().findDOMNode(this);i?(this.props.onExit(a),this.safeSetState({status:te},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Xt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Xt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,i=!0;return this.nextCallback=function(n){i&&(i=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(t,i){this.setNextCallback(i);var n=this.props.nodeRef?this.props.nodeRef.current:e().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=s[0],r=s[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Vt)return null;var e=this.props,i=e.children,n=(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,Kt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return k().createElement(Jt.Provider,{value:null},"function"==typeof i?i(t,n):k().cloneElement(k().Children.only(i),n))},i}(k().Component);function ie(){}ee.contextType=Jt,ee.propTypes={},ee.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ie,onEntering:ie,onEntered:ie,onExit:ie,onExiting:ie,onExited:ie},ee.UNMOUNTED=Vt,ee.EXITED=Xt,ee.ENTERING=Zt,ee.ENTERED=Qt,ee.EXITING=te;const ne=ee;var ae=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.remove(n):"string"==typeof i.className?i.className=Yt(i.className,n):i.setAttribute("class",Yt(i.className&&i.className.baseVal||"",n)));var i,n}))},se=function(t){function e(){for(var e,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1];e.removeClasses(a,"exit"),e.addClass(a,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,i)},e.onEntering=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.addClass(a,s,"active"),e.props.onEntering&&e.props.onEntering(t,i)},e.onEntered=function(t,i){var n=e.resolveArguments(t,i),a=n[0],s=n[1]?"appear":"enter";e.removeClasses(a,s),e.addClass(a,s,"done"),e.props.onEntered&&e.props.onEntered(t,i)},e.onExit=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"appear"),e.removeClasses(i,"enter"),e.addClass(i,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var i=e.resolveArguments(t)[0];e.addClass(i,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var i=e.resolveArguments(t)[0];e.removeClasses(i,"exit"),e.addClass(i,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,i){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,i]},e.getClassNames=function(t){var i=e.props.classNames,n="string"==typeof i,a=n?(n&&i?i+"-":"")+t:i[t];return{baseClassName:a,activeClassName:n?a+"-active":i[t+"Active"],doneClassName:n?a+"-done":i[t+"Done"]}},e}$t(e,t);var i=e.prototype;return i.addClass=function(t,e,i){var n=this.getClassNames(e)[i+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===i&&a&&(n+=" "+a),"active"===i&&t&&qt(t),n&&(this.appliedClasses[e][i]=n,function(t,e){t&&e&&e.split(" ").forEach((function(e){return n=e,void((i=t).classList?i.classList.add(n):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(i,n)||("string"==typeof i.className?i.className=i.className+" "+n:i.setAttribute("class",(i.className&&i.className.baseVal||"")+" "+n)));var i,n}))}(t,n))},i.removeClasses=function(t,e){var i=this.appliedClasses[e],n=i.base,a=i.active,s=i.done;this.appliedClasses[e]={},n&&ae(t,n),a&&ae(t,a),s&&ae(t,s)},i.render=function(){var t=this.props,e=(t.classNames,Kt(t,["classNames"]));return k().createElement(ne,Wt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(k().Component);se.defaultProps={classNames:""},se.propTypes={};const oe=se,re=({title:t=(0,n.__)("Save","gtm-kit"),className:e="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:i,useIsPending:o,useCanSave:r}=(0,a.useContext)(d);return(0,g.jsxs)(s.Button,{className:e,onClick:()=>i(),variant:"primary",disabled:o||!r,children:[r?t:(0,n.__)("Saved","gtm-kit"),o?(0,g.jsx)(s.Spinner,{}):""]})},le=()=>{const{useCanSave:t}=(0,a.useContext)(d);return(0,p.createElement)(oe,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,p.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,p.createElement)(re,null)))},me=({subject:t})=>{const e=!0===t||"on"===t,i=!0===e?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,p.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},e?(0,n.__)("Active","gtm-kit"):(0,n.__)("Inactive","gtm-kit"))},ce=(0,a.forwardRef)((({children:t,className:e="",...i},n)=>(0,g.jsx)("div",{...i,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 "+e,ref:n,children:t})));ce.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,g.jsxs)("div",{...a,className:"gtmkit-flex gtmkit-justify-between gtmkit-items-center gtmkit-mb-5 "+n,children:[(0,g.jsx)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading",children:e}),i]}),ce.Content=({as:t="div",children:e,className:i="gtmkit-flex-auto",...n})=>(0,g.jsx)(t,{...n,className:i,children:e}),ce.Button=({url:t,destination:e,newTab:i=!1,text:n,group:a="",...o})=>{const r=ot();return(0,g.jsx)("div",{...o,className:"gtmkit-mt-4 gtmkit-mb-0.5",children:(0,g.jsx)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full sm:gtmkit-w-auto gtmkit-min-w-[225px]",onClick:()=>{e&&t&&!1===i?window.gtmkitSettings.current_page===a?r(e,{replace:!0}):window.location.href=t+"#"+e:t?i?window.open(t):window.location.href=t:r(e,{replace:!0})},children:(0,g.jsx)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold",children:n})})})};const ge=ce,de=({title:t,data:e,className:i=""})=>{const{useSettings:s}=(0,a.useContext)(d);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,p.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] "+i},e.map(((t,e)=>!1===t.featured?null:(0,p.createElement)(ge,{key:e},(0,p.createElement)(ge.Header,{title:t.title},t.pill?(0,p.createElement)(me,{subject:s[t.group][t.option]}):null),(0,p.createElement)(ge.Content,null,t.text.map(((t,e)=>(0,p.createElement)("p",{key:e},t)))),(0,p.createElement)(ge.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}))))))},ue=(t="general",e="")=>{const i=window.gtmkitSettings.adminPageUrl;return e?`${i}${t}#/${e}`:`${i}${t}`},pe=t=>((t,e,i)=>{const n=(t,i)=>({...i,title:t.title,to:t.path,group:t.group||i.group,option:t.option||i.option,text:[t.description],link:{...i.link,url:ue(e,""),destination:"/"+t.path}});return"templates"===e?Object.keys(t).map((e=>n(t[e][0],i))):Object.keys(t).map((e=>n(t[e],i)))})(window.gtmkitSettings[t],t,function(t){switch(t){case"integrations":return{pill:!0,group:"integrations",option:null,link:{internal:!0,text:(0,n.__)("Setup Integration","gtm-kit")}};case"templates":return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Get Template","gtm-kit")}};default:return{pill:!1,group:null,option:null,link:{internal:!0,text:(0,n.__)("Read More","gtm-kit")}}}}(t)),he=()=>{const{useSettings:t,useNotifications:e}=(0,a.useContext)(d),[i,s]=(0,a.useState)(window.gtmkitSettings.tutorials),o=e.metrics;return(0,a.useEffect)((()=>{s((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,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("General","gtm-kit")}),(0,g.jsxs)("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]",children:[(0,g.jsxs)(ge,{children:[(0,g.jsx)(ge.Header,{title:"Google Tag Manager Container",children:(0,g.jsx)(me,{subject:t.general.gtm_id&&t.general.container_active})}),(0,g.jsx)(ge.Content,{children:t.general.gtm_id&&t.general.container_active?(0,g.jsxs)("p",{children:[(0,n.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id]}):(0,g.jsx)("p",{children:(0,n.__)("The container is not active but the datalayer is generated.","gtm-kit")})}),(0,g.jsx)(ge.Button,{destination:"/container",text:(0,n.__)("Edit container","gtm-kit")})]}),(0,g.jsxs)(ge,{children:[(0,g.jsx)(ge.Header,{title:(0,n.__)("Notifications","gtm-kit"),className:"!gtmkit-justify-start",children:(0,g.jsx)(Ft,{count:o.total,important:o.problem>0})}),(0,g.jsx)(ge.Content,{children:o.total?(0,g.jsx)(g.Fragment,{children:o.problem?(0,g.jsx)("p",{children:(0,n.__)("There are some problems that require your attention.","gtm-kit")}):(0,g.jsx)("p",{children:(0,n.__)("There are some notifications that may require your attention.","gtm-kit")})}):(0,g.jsx)("p",{children:(0,n.__)("No notifications at the moment.","gtm-kit")})}),(0,g.jsx)(ge.Button,{destination:"/notifications",text:(0,n.__)("See all notifications","gtm-kit")})]}),(0,g.jsxs)(ge,{children:[(0,g.jsx)(ge.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit"),children:(0,g.jsx)(me,{subject:t.general.analytics_active})}),(0,g.jsx)(ge.Content,{children:(0,g.jsx)("p",{children:(0,n.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit")})}),(0,g.jsx)(ge.Button,{destination:"/misc",text:(0,n.__)("Share anonymous data","gtm-kit")})]})]}),(0,g.jsx)(de,{title:(0,n.__)("Tutorials","gtm-kit"),data:i}),(0,g.jsx)(de,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})]})},ke=({title:t,placeholder:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:a="general",optionName:o,isDisabled:r,useSettings:l,useUpdateStateSettings:m})=>(0,p.createElement)(s.TextControl,{label:t,placeholder:e,help:i,className:n,value:l[a][o],onChange:t=>m(a,o,t),disabled:r}),fe=({title:t,label:e,optionGroup:i="general",optionName:n,disabled:o=!1,useSettings:r,useUpdateStateSettings:l})=>{const m=(0,a.useId)();return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:(0,g.jsx)(s.BaseControl,{label:t,id:m,children:(0,g.jsx)(s.ToggleControl,{label:e,checked:!o&&r[i][n],onChange:()=>{l(i,n,!(r&&r[i][n]))},disabled:o})})})})},_e=({title:t,options:e,help:i,className:n="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:a="general",optionName:o,disabled:r,useSettings:l,useUpdateStateSettings:m})=>(0,p.createElement)(s.RadioControl,{label:t,options:e,help:i,className:n,selected:parseInt(l[a][o]),onChange:t=>m(a,o,t),disabled:r}),xe=({title:t,help:e,items:i=[],optionGroup:n="general",optionName:o,disabled:r=!1,useSettings:l,useUpdateStateSettings:m})=>{const c=(0,a.useId)(),d=Array.isArray(l[n][o])?l[n][o]:[],[u,p]=(0,a.useState)(d);return(0,a.useEffect)((()=>{const t=Array.isArray(l[n][o])?l[n][o]:[];p(t)}),[l]),(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4",children:(0,g.jsx)(s.BaseControl,{label:t,help:e,id:c,children:i.map((t=>(0,g.jsx)(s.CheckboxControl,{label:t.name,disabled:r,checked:u.includes(t.role),onChange:e=>((t,e)=>{p((i=>{let a;return a=t?[...i,e]:i.filter((t=>t!==e)),m(n,o,a),a}))})(e,t.role)},t.role)))})})})},be=(0,a.forwardRef)((({children:t,className:e="",disabled:i=!1,...n},a)=>(0,g.jsx)("div",{...n,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-max-w-screen-lg gtmkit-border-color-grey gtmkit-rounded "+e+(i?"gtmkit-opacity-60":""),ref:a,children:t})));be.Header=({as:t="h3",title:e="",children:i,className:n="",...a})=>(0,g.jsxs)(t,{...a,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey gtmkit-flex gtmkit-items-center "+n,children:[e,i]}),be.Content=({as:t="div",children:e,className:i="",...n})=>(0,g.jsx)(t,{...n,className:"gtmkit-px-8 gtmkit-py-6 "+i,children:e});const Se=be,ye=()=>{const{useSettings:t,useUpdateStateSettings:e,useUserRoles:i}=(0,a.useContext)(d),s=!(t.general.sgtm_domain&&t.general.sgtm_domain.trim()&&t.general.sgtm_container_identifier&&t.general.sgtm_container_identifier.trim()),o=at();return(0,p.useEffect)((()=>{const t=new URLSearchParams(o.search).get("focus");if(t){const e=document.getElementById(t);e&&e.scrollIntoView()}}),[o]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Google Tag Manager container","gtm-kit")}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("General Container Settings","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(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,g.jsx)(ke,{title:(0,n.__)("GTM Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,n.__)("Enter GTM Container ID","gtm-kit"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsx)("div",{id:"sgtm"}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Server-side Tagging (sGTM)","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:s,useSettings:t,useUpdateStateSettings:e})]}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Google Tag Manager Server-side Tagging","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility.","gtm-kit")," ",(0,g.jsx)("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",children:(0,n.__)("Learn more","gtm-kit")})]}),(0,g.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Hosting server-side GTM containers","gtm-kit")}),(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution.","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,g.jsx)("a",{href:"https://jump.gtmkit.com/link/1-AC1E5",className:"gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",target:"_blank",rel:"noreferrer",children:(0,n.__)("Learn more about Stape.io","gtm-kit")})})]})})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Page Speed Optimization","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsx)(Se.Content,{children:(0,g.jsx)(fe,{title:(0,n.__)("load_delayed_js event","gtm-kit"),label:(0,n.__)("Setting this to On will push the event 'load_delayed_js' on page load.","gtm-kit"),optionName:"load_js_event",useSettings:t,useUpdateStateSettings:e})}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Delay JavaScript execution","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("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",children:(0,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Google Tag Manager Environment","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e})]}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Environments","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("h4",{className:"gtmkit-pt-4 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("Override settings in wp-config.php","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("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",children:(0,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Exclude User Roles","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsx)(Se.Content,{children:(0,g.jsx)(xe,{title:(0,n.__)("Exclude user roles","gtm-kit"),help:(0,n.__)("Select the roles that you want to exclude from tracking.","gtm-kit"),items:i,optionName:"exclude_user_roles",useSettings:t,useUpdateStateSettings:e})}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold gtmkit-text-red-600",children:(0,n.__)("Warning!","gtm-kit")}),(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("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,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Please ensure thorough and proper testing of this.","gtm-kit")})]})})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Container Code Implementation","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(_e,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(_e,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,g.jsx)("code",{children:"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"})})]})]})]})},ve=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(d);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Post Data","gtm-kit")),(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Post Data Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.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,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{title:(0,n.__)("Post data","gtm-kit"),id:"post-date",label:(0,n.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}))))},Ee=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(d);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("User Data","gtm-kit")),(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,p.createElement)(Se.Content,{className:"gtmkit-space-y-2"},(0,p.createElement)("p",null,(0,n.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,p.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,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("User Data Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}))))},Ne=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(d),i=!t.general.gcm_default_settings;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Google Consent Mode","gtm-kit")),(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Google Consent Mode Activation","gtm-kit")},(0,p.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,n.__)("Warning!","gtm-kit"))),(0,p.createElement)(Se.Content,{className:"gtmkit-space-y-2"},(0,p.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,p.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,p.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,p.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,p.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,p.createElement)(fe,{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",useSettings:t,useUpdateStateSettings:e}))),(0,p.createElement)(Se,{disabled:i},(0,p.createElement)(Se.Header,{title:(0,n.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{title:(0,n.__)("Ad Personalization","gtm-kit"),label:(0,n.__)("Enables personalized advertising","gtm-kit"),optionName:"gcm_ad_personalization",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)("h4",{className:"gtmkit-font-bold gtmkit-pt-8"},(0,n.__)("Advanced","gtm-kit")),(0,p.createElement)(fe,{title:(0,n.__)("Redact Ads Data","gtm-kit"),label:(0,n.__)("Redact advertising data","gtm-kit"),optionName:"gcm_ads_data_redaction",disabled:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(fe,{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:i,useSettings:t,useUpdateStateSettings:e}),(0,p.createElement)(ke,{title:(0,n.__)("Wait For Update","gtm-kit"),optionName:"gcm_wait_for_update",placeholder:(0,n.__)("Enter time in milliseconds","gtm-kit"),useSettings:t,useUpdateStateSettings:e}))))},we=({label:t,value:e,tag:i})=>(0,p.createElement)("tr",null,(0,p.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,p.createElement)("strong",null,t)),(0,p.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===i?(0,p.createElement)("code",{className:"gtmkit-text-sm"},e):(0,p.createElement)("em",null,e))),je=()=>{const{useSiteData:t}=(0,a.useContext)(d),e=Object.values(t.shared_data);return(0,p.createElement)(p.Fragment,null,(0,p.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,p.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,p.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,p.createElement)("tbody",{className:"gtmkit-py-6"},e.map((function(t,e){return(0,p.createElement)(we,{key:e,label:t.label,value:t.value,tag:t.tag})})))))},Te=()=>{const{useSettings:t,useUpdateStateSettings:e,useSiteData:i}=(0,a.useContext)(d);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Misc","gtm-kit")}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Help improve GTM Kit","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(je,{}),(0,g.jsx)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey",children:(0,n.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")}),(0,g.jsx)(fe,{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",useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Logging and debugging","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(fe,{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",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{title:(0,n.__)("Console log","gtm-kit"),label:(0,n.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log",useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{title:(0,n.__)("Debug log","gtm-kit"),label:(0,n.__)('Log the "purchase" event to the debug log.',"gtm-kit"),optionName:"debug_log",useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,g.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,n.__)("Version:","gtm-kit")," ",i.gtmkit_version,")"]})}),(0,g.jsx)(Se.Content,{children:(0,g.jsxs)("p",{children:[(0,n.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,g.jsx)("br",{}),(0,g.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,n.__)("The changelog","gtm-kit")}),(0,g.jsx)("br",{}),(0,g.jsx)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("The GitHub repository","gtm-kit")})]})})]})]})},Ce=()=>(0,p.createElement)(p.Fragment,null,(0,p.createElement)(de,{title:(0,n.__)("Integrations","gtm-kit"),data:pe("integrations")})),De=({pluginName:t})=>(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.sprintf)(
    22// translators: %s is the name of the plugin.
    33// translators: %s is the name of the plugin.
    4 (0,t.__)("%s is not active","gtm-kit"),e),className:"gtmkit-text-red-600"}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-6"},(0,t.sprintf)(
     4(0,n.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,p.createElement)(Se.Content,null,(0,p.createElement)("p",{className:"gtmkit-mb-6"},(0,n.sprintf)(
    55// translators: %s is the name of the plugin.
    66// translators: %s is the name of the plugin.
    7 (0,t.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),e)),(0,u.createElement)(i.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,t.sprintf)(
     7(0,n.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,p.createElement)(s.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)(
    88// translators: %s is the name of the plugin.
    99// translators: %s is the name of the plugin.
    10 (0,t.__)("Install %s","gtm-kit"),e)))),De=({title:n,options:a,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:s="general",optionName:r,disabled:l=!1,help:m="",notSet:g=!1})=>{const{useSettings:d,useUpdateStateSettings:p}=(0,e.useContext)(c),h=g?[{label:(0,t.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(i.SelectControl,{label:n,value:d&&d[s][r],options:h,className:o,onChange:t=>p(s,r,t),disabled:l,help:m}))},Ue=({pluginName:n,optionName:i,pluginInactive:a})=>{const{useSettings:o,useUpdateStateSettings:s}=(0,e.useContext)(c);return(0,u.createElement)(be,{disabled:a},(0,u.createElement)(be.Header,{title:(0,t.sprintf)(
     10(0,n.__)("Install %s","gtm-kit"),t)))),Ue=({title:t,options:e,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:r,disabled:l=!1,help:m="",notSet:c=!1})=>{const{useSettings:g,useUpdateStateSettings:u}=(0,a.useContext)(d),h=c?[{label:(0,n.__)("(not set)","gtm-kit"),value:""},...e]:e;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)(s.SelectControl,{label:t,value:g&&g[o][r],options:h,className:i,onChange:t=>u(o,r,t),disabled:l,help:m}))},Ae=({pluginName:t,optionName:e,pluginInactive:i})=>{const{useSettings:s,useUpdateStateSettings:o}=(0,a.useContext)(d);return(0,p.createElement)(Se,{disabled:i},(0,p.createElement)(Se.Header,{title:(0,n.sprintf)(
    1111// translators: %s is the name of the plugin.
    1212// translators: %s is the name of the plugin.
    13 (0,t.__)("%s Integration","gtm-kit"),n)}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.sprintf)(
     13(0,n.__)("%s Integration","gtm-kit"),t)}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{title:(0,n.sprintf)(
    1414// translators: %s is the name of the plugin.
    1515// translators: %s is the name of the plugin.
    16 (0,t.__)("Track %s","gtm-kit"),n),label:(0,t.sprintf)(
     16(0,n.__)("Track %s","gtm-kit"),t),label:(0,n.sprintf)(
    1717// translators: %s is the name of the plugin.
    1818// translators: %s is the name of the plugin.
    19 (0,t.__)("Activate the %s integration","gtm-kit"),n),optionGroup:"integrations",optionName:i,disabled:a,useSettings:o,useUpdateStateSettings:s})))},Ae=[{label:(0,t.__)("Retail","gtm-kit"),value:"retail"},{label:(0,t.__)("Education","gtm-kit"),value:"education"},{label:(0,t.__)("Flights","gtm-kit"),value:"flights"},{label:(0,t.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,t.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,t.__)("Local deals","gtm-kit"),value:"local"},{label:(0,t.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,t.__)("Travel","gtm-kit"),value:"travel"},{label:(0,t.__)("Custom","gtm-kit"),value:"custom"}],Ie={variant:{default:"gtmkit-feature-upsell--default",card:"gtmkit-feature-upsell--card"}},Oe=({children:e,shouldUpsell:n=!0,className:a="",variant:o="card",cardLink:s="",cardText:r=(0,t.__)("Unlock with premium","gtm-kit"),...l})=>n?(0,m.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Ie.variant[o],a),children:[(0,m.jsx)("div",{className:"gtmkit-space-y-8 gtmkit-opacity-30",children:e}),(0,m.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,m.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,m.jsx)(i.Button,{as:"a",className:"gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-lg fgtmkit-font-bold gtmkit-py-6 gtmkit-px-8 is-primary",variant:"upsell",href:s,target:"_blank",rel:"noopener",...l,children:r})})]}):e,Re=()=>{const{useSettings:n,useUpdateStateSettings:i,isPremium:a}=(0,e.useContext)(c),o="WooCommerce",s=!window.gtmkitSettings.plugins.woocommerce,r=s||!n.integrations.woocommerce_integration,l=r||!a||!n.general.sgtm_domain,g=l||!n.premium.woocommerce_webhooks;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("WooCommerce","gtm-kit")}),s?(0,m.jsx)(Ce,{pluginName:o}):null,(0,m.jsx)(Ue,{pluginName:o,optionName:"woocommerce_integration",pluginInactive:s}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Basic settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(De,{title:(0,t.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,t.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:r}),(0,m.jsx)(ke,{title:(0,t.__)("Use SKU instead of ID","gtm-kit"),label:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Exclude tax","gtm-kit"),label:(0,t.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Exclude shipping from revenue","gtm-kit"),label:(0,t.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("User Data","gtm-kit")}),(0,m.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,m.jsx)(be.Content,{children:(0,m.jsx)(ke,{title:(0,t.__)("Include customer data","gtm-kit"),label:(0,t.__)('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:r,useSettings:n,useUpdateStateSettings:i})}),(0,m.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,m.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,t.__)("User-Provided Data","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("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,m.jsx)("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",children:(0,t.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,m.jsx)(Oe,{shouldUpsell:!a,cardLink:"https://jump.gtmkit.com/link/2-30DDC",children:(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Webhooks for server-side tracking","gtm-kit"),children:a?(0,m.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,m.jsxs)(be.Content,{children:[l?(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.dashboardUrl+"#/container?focus=sgtm",children:(0,t.__)("Go to sGTM settings","gtm-kit")})]}):(0,m.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,t.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:window.gtmkitSettings.templatesUrl+"#/server-side-tagging",children:(0,t.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsx)(ke,{title:(0,t.__)("Send webhooks to server GTM container","gtm-kit"),label:(0,t.__)("This option will allow webhooks to be sent to your server GTM container.","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_webhooks",disabled:l,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Purchase webhook","gtm-kit"),label:(0,t.__)("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:g,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Refund webhook","gtm-kit"),label:(0,t.__)("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:g,useSettings:n,useUpdateStateSettings:i})]})]})}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Event customization","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(fe,{title:"view_item_list (with product filter)",options:[{label:(0,t.__)("Push view_item_list when the list is updated using a product filter.","gtm-kit"),value:0},{label:(0,t.__)("Only only push view_item_list once per per page for each list.","gtm-kit"),value:1}],help:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"view_item (variable product)",options:[{label:(0,t.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,t.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,t.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,t.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"add_shipping_info ",options:[{label:(0,t.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,t.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,t.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,t.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(fe,{title:"add_payment_info ",options:[{label:(0,t.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,t.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,t.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,t.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Google Ads Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(De,{title:(0,t.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ae,help:(0,t.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,m.jsx)(he,{title:(0,t.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,t.__)("Enter prefix","gtm-kit"),help:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i})]})]}),(0,m.jsx)(Oe,{shouldUpsell:!a,cardLink:"https://jump.gtmkit.com/link/2-30DDC",children:(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Custom CSS Selectors","gtm-kit"),children:a?(0,m.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-4",children:(0,t.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,m.jsx)(he,{title:(0,t.__)("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,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("Product List (select_item):","gtm-kit"),optionGroup:"premium",optionName:"woocommerce_product_list_item_selector",className:"gtmkit-settings-field-wrap gtmkit-py-4",placeholder:(0,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches your product list item, which should be use to fire the select_item event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(he,{title:(0,t.__)("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,t.__)("Enter CSS selector","gtm-kit"),help:(0,t.__)("Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event.","gtm-kit"),useSettings:n,useUpdateStateSettings:i})]})]})}),(0,m.jsxs)(be,{disabled:r,children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Advanced Settings","gtm-kit")}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)(ke,{title:(0,t.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Include permalink structure","gtm-kit"),label:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i}),(0,m.jsx)(ke,{title:(0,t.__)("Include path of pages","gtm-kit"),label:(0,t.__)("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:r,useSettings:n,useUpdateStateSettings:i})]})]})]})},Le=()=>{const{useSettings:n,useUpdateStateSettings:i}=(0,e.useContext)(c),a="Contact Form 7",o=!window.gtmkitSettings.plugins.cf7,s=o||!n.integrations.cf7_integration;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Contact Form 7","gtm-kit")),o?(0,u.createElement)(Ce,{pluginName:a}):null,(0,u.createElement)(Ue,{pluginName:a,optionName:"cf7_integration",pluginInactive:o}),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Basic Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(fe,{title:(0,t.__)("Load JavaScript","gtm-kit"),options:[{label:(0,t.__)("Only on pages where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,t.__)("On all pages","gtm-kit"),value:2}],help:(0,t.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:s,useSettings:n,useUpdateStateSettings:i}))))},Me=()=>{const n="Easy Digital Downloads",i=!window.gtmkitSettings.plugins.edd,{useSettings:a,useUpdateStateSettings:o}=(0,e.useContext)(c),s=i||!a.integrations.edd_integration;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Easy Digital Downloads","gtm-kit")),i?(0,u.createElement)(Ce,{pluginName:n}):null,(0,u.createElement)(Ue,{pluginName:n,optionName:"edd_integration",pluginInactive:i}),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Basic Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Use SKU instead of ID","gtm-kit"),label:(0,t.__)("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:s,useSettings:a,useUpdateStateSettings:o}),(0,u.createElement)(ke,{title:(0,t.__)("Exclude tax","gtm-kit"),label:(0,t.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:s,useSettings:a,useUpdateStateSettings:o}),(0,u.createElement)(ke,{title:(0,t.__)("Include customer data","gtm-kit"),label:(0,t.__)('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:s,useSettings:a,useUpdateStateSettings:o}))),(0,u.createElement)(be,{disabled:s},(0,u.createElement)(be.Header,{title:(0,t.__)("Google Ads Settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(De,{title:(0,t.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ae,help:(0,t.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:s}),(0,u.createElement)(he,{title:(0,t.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,t.__)("Enter prefix","gtm-kit"),help:(0,t.__)("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:s,useSettings:a,useUpdateStateSettings:o}))),(0,u.createElement)(be,{disabled:i},(0,u.createElement)(be.Header,{title:(0,t.__)("Advanced settings","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)(ke,{title:(0,t.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,t.__)("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:s,useSettings:a,useUpdateStateSettings:o}))))},Pe=window.gtmkitSettings.templates||{},Ge=(Object.keys(Pe).map((function(e){const n=Pe[e][0];return{title:n.title,to:n.path,pill:!1,text:[n.description],link:{internal:!0,url:window.gtmkitSettings.templatesUrl,destination:"/"+n.path,text:(0,t.__)("Get template","gtm-kit")}}})),()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Getting Started","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("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,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")),(0,u.createElement)("p",null,(0,t.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,u.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,t.__)("Read the guide","gtm-kit"))))),(0,u.createElement)(ue,{title:(0,t.__)("Templates","gtm-kit"),data:de("templates")}))),Fe=({title:e,description:n,link:i,templates:a})=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:e}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},n),i&&i.url&&i.link_text?(0,u.createElement)("div",null,(0,u.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,a&&a.length>0?(0,u.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,u.createElement)("div",null,(0,u.createElement)("h4",{className:"gtmkit-font-bold"},(0,t.__)("GTM container import files:","gtm-kit")),(0,u.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},a.map((function(t){return(0,u.createElement)("li",null,(0,u.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,u.createElement)("div",null,(0,u.createElement)("h4",{className:"gtmkit-font-bold"},(0,t.__)("Necessary modifications:","gtm-kit")),(0,u.createElement)("ul",{className:"gtmkit-text-sm"},a.map((function(t){return(0,u.createElement)("li",null,t.help_text)}))))):null))),He=({sectionData:t})=>{const e=t.collections;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},t.title),Object.keys(e).map((function(t){return(0,u.createElement)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates})})))},Be=()=>{const e=at(),n=window.gtmkitSettings.tutorials;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,t.__)("Help","gtm-kit")),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Need help?","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("p",{className:"gtmkit-mb-4"},(0,t.__)("We are here to help if you have any questions.","gtm-kit"),(0,u.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",onClick:()=>{e("/support",{replace:!0})}},(0,t.__)("See support options","gtm-kit"))))),(0,u.createElement)(be,null,(0,u.createElement)(be.Header,{title:(0,t.__)("Tutorials","gtm-kit")}),(0,u.createElement)(be.Content,null,(0,u.createElement)("ul",null,n.map(((t,e)=>(0,u.createElement)("li",{key:e,className:"gtmkit-mb-4"},(0,u.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,e)=>(0,u.createElement)("div",{key:e,className:"gtmkit-text-sm"},t))))))))))},We=()=>{const{useIsSending:n,useSiteData:a,useUpdateSupportTicket:o,useSupportTicket:s,useSendSystemData:r,useIsSystemDataSent:l,useSystemDataMessage:g,isPremium:u}=(0,e.useContext)(c);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Get support","gtm-kit")}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Support options","gtm-kit")}),(0,m.jsx)(be.Content,{children:(0,m.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[u&&(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,t.__)("WooCommerce Premium Support","gtm-kit")})}),(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,t.__)("WordPress.org Support Forum","gtm-kit")})}),(0,m.jsx)("li",{children:(0,m.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,t.__)("GITHub repository","gtm-kit")})}),(0,m.jsxs)("li",{children:[(0,m.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,t.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,m.jsx)(be.Content,{children:l?(0,m.jsx)("p",{className:"gtmkit-mb-2",children:g}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("p",{className:"gtmkit-mb-2",children:(0,t.__)("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,m.jsx)(i.TextControl,{label:(0,m.jsxs)("span",{className:"gtmkit-text-red-600",children:[g," "]}),placeholder:(0,t.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:s,onChange:t=>o(t)}),(0,m.jsxs)(i.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:()=>{r()},disabled:!s.toUpperCase().startsWith("FS"),children:[(0,m.jsx)("span",{children:(0,t.__)("Send system data","gtm-kit")}),n?(0,m.jsx)(i.Spinner,{}):""]})]})})]}),(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:(0,t.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center",children:(0,m.jsxs)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2",children:["(",(0,t.__)("Version:","gtm-kit")," ",a.gtmkit_version,")"]})}),(0,m.jsx)(be.Content,{children:(0,m.jsxs)("p",{children:[(0,t.__)("Learn about changes and follow the development of GTM Kit:","gtm-kit"),(0,m.jsx)("br",{}),(0,m.jsx)("a",{className:"gtmkit-text-color-primary hover:gtmkit-underline",href:"https://gtmkit.com/changelog/",target:"_blank",rel:"noreferrer",children:(0,t.__)("The changelog","gtm-kit")}),(0,m.jsx)("br",{}),(0,m.jsx)("a",{className:"gtmkit-text-color-primary  hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,t.__)("The GitHub repository","gtm-kit")})]})})]})]})};const Ke=t=>{const{Fill:e,Slot:n}=(0,i.createSlotFill)(t),a=({children:t})=>(0,u.createElement)(e,null,t);return a.Slot=({fillProps:t})=>(0,u.createElement)(n,{fillProps:t},(t=>t.length?t:null)),a},ze=Ke("GravityForms"),Ye=(Ke("WooWebhooks"),Ke("WooCustomSelectors"),({integrationID:t,pluginName:n})=>{const{useSettings:i,useUpdateStateSettings:a}=(0,e.useContext)(c),o=!window.gtmkitSettings.plugins[t],s=o||!i.integrations[t+"_integration"];return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},n),o?(0,u.createElement)(Ce,{pluginName:n}):null,(0,u.createElement)(Ue,{pluginName:n,optionName:t+"_integration",pluginInactive:o}),"gf"===t?(0,u.createElement)(ze.Slot,{fillProps:{settingsInactive:s,useSettings:i,useUpdateStateSettings:a}}):null)}),$e=window.wp.plugins,Je=(0,e.forwardRef)((function({icon:t,size:n=24,...i},a){return(0,e.cloneElement)(t,{width:n,height:n,...i,ref:a})})),qe=window.wp.primitives,Ve=(0,m.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(qe.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Xe=(0,m.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(qe.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Ze=n(838),Qe=n.n(Ze);const tn=({title:n,type:a,hideEmpty:o=!0})=>{const{useNotifications:s,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,e.useContext)(c),g=s[a],u=Object.entries(g.active),d=Object.entries(g.dismissed);if(0===g.total&&o)return null;const[p,h]=(0,e.useState)(!1),k=(Object.entries(g.active),Object.entries(g.dismissed),(e,n,a)=>(0,m.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":a},{"gtmkit-border-2":!a}),children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:n.header}),(0,m.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Qe().sanitize(n.message)}})]}),(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(n.id,a?"restore":"dismiss"),children:[(0,m.jsx)("span",{className:"gtmkit-text-sm",children:(0,t.__)(a?"Restore":"Dismiss","gtm-kit")}),l?(0,m.jsx)(i.Spinner,{}):null]})]},e));return(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:n,children:(0,m.jsx)(Ft,{count:g.active.length,important:"problem"===a})}),(0,m.jsxs)(be.Content,{className:"gtmkit-space-y-4",children:[u.map((([t,e])=>k(t,e,!1))),d.length>0&&(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,m.jsx)("span",{children:(0,t.sprintf)(
     19(0,n.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:e,disabled:i,useSettings:s,useUpdateStateSettings:o})))},Ie=[{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"}],Oe={variant:{default:"gtmkit-feature-upsell--default",card:"gtmkit-feature-upsell--card"}},Re=({children:t,shouldUpsell:e=!0,className:i="",variant:a="card",cardLink:o="",cardText:r=(0,n.__)("Unlock with premium","gtm-kit"),...l})=>{if(!e)return t;const m=o||ue("upgrades","upgrades");return(0,g.jsxs)("div",{className:Mt()("gtmkit-feature-upsell gtmkit-relative gtmkit-max-w-screen-lg",Oe.variant[a],i),children:[(0,g.jsx)("div",{className:"gtmkit-space-y-8 gtmkit-opacity-30",children:t}),(0,g.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-ring-1 gtmkit-ring-black gtmkit-ring-opacity-5 gtmkit-shadow-lg gtmkit-rounded-md"}),(0,g.jsx)("div",{className:"gtmkit-absolute gtmkit-inset-0 gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,g.jsx)(s.Button,{as:"a",className:"gtmkit-gap-2 gtmkit-shadow-lg gtmkit-rounded !gtmkit-text-lg fgtmkit-font-bold gtmkit-py-6 gtmkit-px-8 is-primary",variant:"upsell",onClick:()=>{window.location.href=m},target:"_blank",rel:"noopener",...l,children:r})})]})},Le=()=>{const{useSettings:t,useUpdateStateSettings:e,isPremium:i}=(0,a.useContext)(d),s="WooCommerce",o=!window.gtmkitSettings.plugins.woocommerce,r=o||!t.integrations.woocommerce_integration,l=r||!i||!t.general.sgtm_domain,m=l||!t.premium.woocommerce_webhooks;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("WooCommerce","gtm-kit")}),o?(0,g.jsx)(De,{pluginName:s}):null,(0,g.jsx)(Ae,{pluginName:s,optionName:"woocommerce_integration",pluginInactive:o}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Basic settings","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(Ue,{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:r}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("User Data","gtm-kit")}),(0,g.jsxs)("div",{className:"gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-4",children:[(0,g.jsx)(Se.Content,{children:(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e})}),(0,g.jsx)("div",{className:"gtmkit-px-8 gtmkit-py-6",children:(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-mt-3",children:[(0,g.jsx)("h4",{className:"gtmkit-pt-3 gtmkit-mb-4 gtmkit-text-lg gtmkit-font-bold",children:(0,n.__)("User-Provided Data","gtm-kit")}),(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(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,g.jsx)("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",children:(0,n.__)("Learn more","gtm-kit")})]})]})})]})]}),(0,g.jsx)(Re,{shouldUpsell:!i,children:(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Webhooks for server-side tracking","gtm-kit"),children:i?(0,g.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,g.jsxs)(Se.Content,{children:[l?(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain","gtm-kit"),(0,g.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("general","container?focus=sgtm"),children:(0,n.__)("Go to sGTM settings","gtm-kit")})]}):(0,g.jsxs)("p",{className:"gtmkit-mb-4",children:[(0,n.__)("In order to use webhooks you must configure you server-side container to handle the webhooks","gtm-kit"),(0,g.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:ue("templates","server-side-tagging"),children:(0,n.__)("Go to GTM Templates","gtm-kit")})]}),(0,g.jsx)(fe,{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:l,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:m,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:m,useSettings:t,useUpdateStateSettings:e})]})]})}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Event customization","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(_e,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(_e,{title:"view_item (variable product)",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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(_e,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(_e,{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:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(Ue,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Ie,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:r}),(0,g.jsx)(ke,{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:r,useSettings:t,useUpdateStateSettings:e})]})]}),(0,g.jsx)(Re,{shouldUpsell:!i,children:(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Custom CSS Selectors","gtm-kit"),children:i?(0,g.jsx)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-3 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase gtmkit-bg-color-success gtmkit-ml-6",children:"Premium"}):null}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors.","gtm-kit")}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(ke,{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"),useSettings:t,useUpdateStateSettings:e})]})]})}),(0,g.jsxs)(Se,{disabled:r,children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Advanced Settings","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e}),(0,g.jsx)(fe,{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:r,useSettings:t,useUpdateStateSettings:e})]})]})]})},Me=()=>{const{useSettings:t,useUpdateStateSettings:e}=(0,a.useContext)(d),i="Contact Form 7",s=!window.gtmkitSettings.plugins.cf7,o=s||!t.integrations.cf7_integration;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Contact Form 7","gtm-kit")),s?(0,p.createElement)(De,{pluginName:i}):null,(0,p.createElement)(Ae,{pluginName:i,optionName:"cf7_integration",pluginInactive:s}),(0,p.createElement)(Se,{disabled:o},(0,p.createElement)(Se.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(_e,{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,useSettings:t,useUpdateStateSettings:e}))))},Pe=()=>{const t="Easy Digital Downloads",e=!window.gtmkitSettings.plugins.edd,{useSettings:i,useUpdateStateSettings:s}=(0,a.useContext)(d),o=e||!i.integrations.edd_integration;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Easy Digital Downloads","gtm-kit")),e?(0,p.createElement)(De,{pluginName:t}):null,(0,p.createElement)(Ae,{pluginName:t,optionName:"edd_integration",pluginInactive:e}),(0,p.createElement)(Se,{disabled:o},(0,p.createElement)(Se.Header,{title:(0,n.__)("Basic Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{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,useSettings:i,useUpdateStateSettings:s}),(0,p.createElement)(fe,{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,useSettings:i,useUpdateStateSettings:s}),(0,p.createElement)(fe,{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,useSettings:i,useUpdateStateSettings:s}))),(0,p.createElement)(Se,{disabled:o},(0,p.createElement)(Se.Header,{title:(0,n.__)("Google Ads Settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(Ue,{title:(0,n.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Ie,help:(0,n.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:o}),(0,p.createElement)(ke,{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,useSettings:i,useUpdateStateSettings:s}))),(0,p.createElement)(Se,{disabled:e},(0,p.createElement)(Se.Header,{title:(0,n.__)("Advanced settings","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)(fe,{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,useSettings:i,useUpdateStateSettings:s}))))},Ge=()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Getting Started","gtm-kit")}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Configure your Google Tag Manager container","gtm-kit")}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)("p",{className:"gtmkit-mb-4",children:(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,g.jsx)("p",{className:"gtmkit-mb-4",children:(0,n.__)("Below you will find GTM container template files, with all the necessary tags, trigger, and variables.","gtm-kit")}),(0,g.jsxs)("p",{children:[(0,n.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,g.jsx)("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",children:(0,n.__)("Read the guide","gtm-kit")})]})]})]}),(0,g.jsx)(de,{title:(0,n.__)("Templates","gtm-kit"),data:pe("templates")})]}),Fe=({title:t,description:e,link:i,templates:a})=>(0,p.createElement)(p.Fragment,null,(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:t}),(0,p.createElement)(Se.Content,null,(0,p.createElement)("p",{className:"gtmkit-mb-4"},e),i&&i.url&&i.link_text?(0,p.createElement)("div",null,(0,p.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,a&&a.length>0?(0,p.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,p.createElement)("div",null,(0,p.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("GTM container import files:","gtm-kit")),(0,p.createElement)("ul",{className:"gtmkit-text-sm gtmkit-text-color-primary"},a.map((function(t){return(0,p.createElement)("li",null,(0,p.createElement)("a",{className:"hover:gtmkit-underline",href:t.link,target:"_blank",rel:"noreferrer"},t.title))})))),(0,p.createElement)("div",null,(0,p.createElement)("h4",{className:"gtmkit-font-bold"},(0,n.__)("Necessary modifications:","gtm-kit")),(0,p.createElement)("ul",{className:"gtmkit-text-sm"},a.map((function(t){return(0,p.createElement)("li",null,t.help_text)}))))):null))),He=({sectionData:t})=>{const e=t.collections;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},t.title),Object.keys(e).map((function(t){return(0,p.createElement)(Fe,{title:e[t].title,description:e[t].description,link:e[t].link,templates:e[t].templates})})))},Be=()=>{const t=ot(),e=window.gtmkitSettings.tutorials;return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,n.__)("Help","gtm-kit")),(0,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Need help?","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)("p",{className:"gtmkit-mb-4"},(0,n.__)("We are here to help if you have any questions.","gtm-kit"),(0,p.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,p.createElement)(Se,null,(0,p.createElement)(Se.Header,{title:(0,n.__)("Tutorials","gtm-kit")}),(0,p.createElement)(Se.Content,null,(0,p.createElement)("ul",null,e.map(((t,e)=>(0,p.createElement)("li",{key:e,className:"gtmkit-mb-4"},(0,p.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,e)=>(0,p.createElement)("div",{key:e,className:"gtmkit-text-sm"},t))))))))))},We=()=>{const{useIsSending:t,useUpdateSupportTicket:e,useSupportTicket:i,useSendSystemData:o,useIsSystemDataSent:r,useSystemDataMessage:l,isPremium:m}=(0,a.useContext)(d);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Get support","gtm-kit")}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Support options","gtm-kit")}),(0,g.jsx)(Se.Content,{children:(0,g.jsxs)("ul",{className:"gtmkit-text-color-primary",children:[m&&(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://jump.gtmkit.com/link/4-E35E4",target:"_blank",rel:"noreferrer",children:(0,n.__)("WooCommerce Premium Support","gtm-kit")})}),(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer",children:(0,n.__)("WordPress.org Support Forum","gtm-kit")})}),(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer",children:(0,n.__)("GITHub repository","gtm-kit")})}),(0,g.jsxs)("li",{children:[(0,g.jsx)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer",children:(0,n.__)("Plugin Homepage","gtm-kit")})," ","(gtmkit.com)"]})]})})]}),(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:(0,n.__)("Share system data with the GTM Kit support team","gtm-kit")}),(0,g.jsx)(Se.Content,{children:r?(0,g.jsx)("p",{className:"gtmkit-mb-2",children:l}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{className:"gtmkit-mb-2",children:(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,g.jsx)(s.TextControl,{label:(0,g.jsxs)("span",{className:"gtmkit-text-red-600",children:[l," "]}),placeholder:(0,n.__)("Enter support ticket","gtm-kit"),className:"gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",value:i,onChange:t=>e(t)}),(0,g.jsxs)(s.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:()=>{o()},disabled:!i.toUpperCase().startsWith("FS"),children:[(0,g.jsx)("span",{children:(0,n.__)("Send system data","gtm-kit")}),t?(0,g.jsx)(s.Spinner,{}):""]})]})})]})]})},Ke=t=>{const{Fill:e,Slot:i}=(0,s.createSlotFill)(t),n=({children:t})=>(0,p.createElement)(e,null,t);return n.Slot=({fillProps:t})=>(0,p.createElement)(i,{fillProps:t},(t=>t.length?t:null)),n},ze=Ke("GravityForms"),$e=(Ke("WooWebhooks"),Ke("WooCustomSelectors"),({integrationID:t,pluginName:e})=>{const{useSettings:i,useUpdateStateSettings:n}=(0,a.useContext)(d),s=!window.gtmkitSettings.plugins[t],o=s||!i.integrations[t+"_integration"];return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:e}),s?(0,g.jsx)(De,{pluginName:e}):null,(0,g.jsx)(Ae,{pluginName:e,optionName:t+"_integration",pluginInactive:s}),"gf"===t?(0,g.jsx)(ze.Slot,{fillProps:{settingsInactive:o,useSettings:i,useUpdateStateSettings:n}}):null]})}),Ye=window.wp.plugins,Je=(0,a.forwardRef)((function({icon:t,size:e=24,...i},n){return(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n})})),qe=window.wp.primitives,Ve=(0,g.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)(qe.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Xe=(0,g.jsx)(qe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)(qe.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var Ze=i(838),Qe=i.n(Ze);const ti=({title:t,type:e,hideEmpty:i=!0})=>{const{useNotifications:o,useSetNotificationStatus:r,useIsUpdatingNotifications:l}=(0,a.useContext)(d),m=o[e],c=Object.entries(m.active),u=Object.entries(m.dismissed);if(0===m.total&&i)return null;const[p,h]=(0,a.useState)(!1),k=(t,e,i)=>(0,g.jsxs)("div",{className:Mt()("gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-border gtmkit-px-4 gtmkit-py-3 gtmkit-gap-x-16",{"gtmkit-border gtmkit-border-t-0":i},{"gtmkit-border-2":!i}),children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("span",{className:"gtmkit-font-bold gtmkit-mr-2",children:e.header}),(0,g.jsx)("span",{className:"gtmkit-text-sm",dangerouslySetInnerHTML:{__html:Qe().sanitize(e.message)}})]}),(0,g.jsxs)(s.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-1 !gtmkit-px-3 gtmkit-h-min",onClick:()=>r(e.id,i?"restore":"dismiss"),children:[(0,g.jsx)("span",{className:"gtmkit-text-sm",children:i?(0,n.__)("Restore","gtm-kit"):(0,n.__)("Dismiss","gtm-kit")}),l?(0,g.jsx)(s.Spinner,{}):null]})]},t);return(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:t,children:(0,g.jsx)(Ft,{count:m.active.length,important:"problem"===e})}),(0,g.jsxs)(Se.Content,{className:"gtmkit-space-y-4",children:[c.map((([t,e])=>k(t,e,!1))),u.length>0&&(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"gtmkit-border-2 gtmkit-px-4 gtmkit-py gtmkit-font-bold gtmkit-flex gtmkit-items-center gtmkit-justify-between gtmkit-cursor-pointer",onClick:()=>h((t=>!t)),children:[(0,g.jsx)("span",{children:(0,n.sprintf)(
    2020// translators: %d is number %s can be either 'problem' or 'notification'.
    2121// translators: %d is number %s can be either 'problem' or 'notification'.
    22 (0,t._n)("You have %d hidden %s:","You have %d hidden %ss:",d.length,"gtm-kit"),d.length,a)}),(0,m.jsx)(Je,{icon:p?Ve:Xe,size:48})]}),(0,m.jsx)("div",{className:Mt()("gtmkit-border","gtmkit-border-t-0","gtmkit-mb-4","gtmkit-bg-color-background-disabled",{"gtmkit-hidden":!p}),children:d.map((([t,e])=>k(t,e,!0)))})]}),0===g.total&&(0,m.jsx)("p",{children:(0,t.__)("No notifications at the moment.","gtm-kit")})]})]})},en=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Misc","gtm-kit")}),(0,m.jsx)(tn,{title:(0,t.__)("Problems","gtm-kit"),type:"problem"}),(0,m.jsx)(tn,{title:(0,t.__)("Notifications","gtm-kit"),type:"notice",hideEmpty:!1})]}),nn=({className:t=""})=>(0,m.jsx)(i.Icon,{icon:()=>(0,m.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",className:t,children:(0,m.jsx)("path",{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})}),an=()=>{const{useIsSendingLicenseKey:n}=(0,e.useContext)(c),a=window.gtmkitSettings.opportunities;let o=[];Object.entries(a).length&&(o=Object.entries(a.upgrades));const s=a.plugins||{},r=a.theme||{},l=Object.entries(s),g=!!Object.keys(r).length;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,t.__)("Upgrades","gtm-kit")}),o.map((([e,a])=>(0,m.jsxs)(be,{children:[(0,m.jsx)(be.Header,{title:a.name}),(0,m.jsxs)(be.Content,{children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:a.header}),a.description&&(0,m.jsx)("p",{className:"gtmkit-mb-4",children:a.description}),a.usp.length>0&&(0,m.jsx)("ul",{className:"gtmkit-text-sm gtmkit-mb-8",children:a.usp.map((t=>(0,m.jsxs)("li",{className:"gtmkit-flex gtmkit-items-center",children:[(0,m.jsx)(nn,{})," ",t]})))}),(l.length>0||g)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:(0,t.__)("Enhanced Compatibility","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-mb-6",children:(0,t.__)("Based on the currently active theme and plugins, you will gain the following features tailored specifically to your setup if you upgrade to the GTM Kit Woo Add-On:","gtm-kit")})]}),g&&(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,m.jsxs)("span",{className:"gtmkit-font-bold",children:[r.name,":"]})," ",(0,t.__)("Your theme is supported with enhanced compatibility.","gtm-kit")," ",r.description]}),l.length>0&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h3",{className:"gtmkit-font-bold gtmkit-text-sm gtmkit-mb-4",children:(0,t.__)("Enhanced Plugin Support:","gtm-kit")}),(0,m.jsx)("ul",{className:"gtmkit-text-sm",children:l.map((([t,e])=>(0,m.jsxs)("li",{className:"gtmkit-mb-4",children:[e.name," - ",e.description]},t)))})]}),a.url&&(0,m.jsxs)(i.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base gtmkit-mt-4",onClick:()=>{window.location.href=a.url},children:[(0,m.jsx)("span",{children:a.button_text||(0,t.__)("Learn More","gtm-kit")}),n?(0,m.jsx)(i.Spinner,{}):""]})]})]},e)))]})},on={integrations:(0,t.__)("Integrations","gtm-kit"),templates:(0,t.__)("Google Tag Manager Templates","gtm-kit"),help:(0,t.__)("Help","gtm-kit")},sn=()=>{const{useSettings:n}=(0,e.useContext)(c),a=window.gtmkitSettings,o=a.currentPage,s=function({page:e}){switch(e){case"general":return[{to:"general",title:(0,t.__)("Dashboard","gtm-kit")},{to:"container",title:(0,t.__)("Container","gtm-kit")},{to:"post-data",title:(0,t.__)("Post data","gtm-kit")},{to:"user-data",title:(0,t.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,t.__)("Google Consent Mode","gtm-kit")},{to:"notifications",title:(0,t.__)("Notifications","gtm-kit")},{to:"misc",title:(0,t.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,t.__)("Integrations","gtm-kit")},...de("integrations")];case"upgrades":return[{to:"upgrades",title:(0,t.__)("Upgrades","gtm-kit")}];case"templates":return[{to:"templates",title:(0,t.__)("Templates","gtm-kit")},...de("templates")];case"help":return[{to:"help",title:(0,t.__)("Help","gtm-kit")},{to:"support",title:(0,t.__)("Support","gtm-kit")}]}}({page:o}),r=a.templates,l=a.integrations,g=on[o]||(0,t.__)("Settings","gtm-kit");return Object.keys(n).length?(0,m.jsxs)(i.SlotFillProvider,{children:[(0,m.jsx)(Rt,{title:g}),(0,m.jsx)(Bt,{NavList:s}),(0,m.jsx)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base",children:(0,m.jsxs)(_t,{children:[(0,m.jsx)(kt,{exact:!0,path:"/general",element:(0,m.jsx)(pe,{})}),(0,m.jsx)(kt,{exact:!0,path:"/container",element:(0,m.jsx)(Se,{})}),(0,m.jsx)(kt,{exact:!0,path:"/post-data",element:(0,m.jsx)(ye,{})}),(0,m.jsx)(kt,{exact:!0,path:"/user-data",element:(0,m.jsx)(ve,{})}),(0,m.jsx)(kt,{exact:!0,path:"/google-consent-mode",element:(0,m.jsx)(Ee,{})}),(0,m.jsx)(kt,{exact:!0,path:"/notifications",element:(0,m.jsx)(en,{})}),(0,m.jsx)(kt,{exact:!0,path:"/misc",element:(0,m.jsx)(je,{})}),(0,m.jsx)(kt,{exact:!0,path:"/integrations",element:(0,m.jsx)(Te,{})}),(0,m.jsx)(kt,{exact:!0,path:"/woocommerce",element:(0,m.jsx)(Re,{})}),(0,m.jsx)(kt,{exact:!0,path:"/cf7",element:(0,m.jsx)(Le,{})}),(0,m.jsx)(kt,{exact:!0,path:"/edd",element:(0,m.jsx)(Me,{})}),l&&Object.keys(l).map((function(t){if("add-on"===l[t].type)return(0,m.jsx)(kt,{exact:!0,path:t,element:(0,m.jsx)(Ye,{integrationID:t,pluginName:l[t].title})},t)})),(0,m.jsx)(kt,{exact:!0,path:"/upgrades",element:(0,m.jsx)(an,{})}),(0,m.jsx)(kt,{exact:!0,path:"/templates",element:(0,m.jsx)(Ge,{})}),r&&Object.keys(r).map((function(t){return(0,m.jsx)(kt,{exact:!0,path:t,element:(0,m.jsx)(He,{sectionData:r[t][0]})},t)})),(0,m.jsx)(kt,{exact:!0,path:"/help",element:(0,m.jsx)(Be,{})}),(0,m.jsx)(kt,{exact:!0,path:"/support",element:(0,m.jsx)(We,{})}),(0,m.jsx)(kt,{path:"/",element:(0,m.jsx)(ht,{replace:!0,to:"/"+o})})]})}),(0,m.jsx)(le,{}),(0,m.jsx)($e.PluginArea,{})]}):(0,m.jsx)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,m.jsx)(i.Spinner,{})})},rn=()=>(0,m.jsx)(Tt,{basename:"/",children:(0,m.jsx)(g,{children:(0,m.jsx)(sn,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.render)((0,m.jsx)(rn,{}),t)}))})()})();
     22(0,n._n)("You have %d hidden %s:","You have %d hidden %ss:",u.length,"gtm-kit"),u.length,e)}),(0,g.jsx)(Je,{icon:p?Ve:Xe,size:48})]}),(0,g.jsx)("div",{className:Mt()("gtmkit-border","gtmkit-border-t-0","gtmkit-mb-4","gtmkit-bg-color-background-disabled",{"gtmkit-hidden":!p}),children:u.map((([t,e])=>k(t,e,!0)))})]}),0===m.total&&(0,g.jsx)("p",{children:(0,n.__)("No notifications at the moment.","gtm-kit")})]})]})},ei=()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Misc","gtm-kit")}),(0,g.jsx)(ti,{title:(0,n.__)("Problems","gtm-kit"),type:"problem"}),(0,g.jsx)(ti,{title:(0,n.__)("Notifications","gtm-kit"),type:"notice",hideEmpty:!1})]}),ii=({className:t=""})=>(0,g.jsx)(s.Icon,{icon:()=>(0,g.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24",className:t,children:(0,g.jsx)("path",{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})}),ni=()=>{const{useIsSendingLicenseKey:t}=(0,a.useContext)(d),e=window.gtmkitSettings.opportunities;let i=[];Object.entries(e).length&&(i=Object.entries(e.upgrades));const o=e.plugins||{},r=e.theme||{},l=Object.entries(o),m=!!Object.keys(r).length;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8",children:(0,n.__)("Upgrades","gtm-kit")}),i.map((([e,i])=>(0,g.jsxs)(Se,{children:[(0,g.jsx)(Se.Header,{title:i.name}),(0,g.jsxs)(Se.Content,{children:[(0,g.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:i.header}),i.description&&(0,g.jsx)("p",{className:"gtmkit-mb-4",children:i.description}),i.usp.length>0&&(0,g.jsx)("ul",{className:"gtmkit-text-sm gtmkit-mb-8",children:i.usp.map((t=>(0,g.jsxs)("li",{className:"gtmkit-flex gtmkit-items-center",children:[(0,g.jsx)(ii,{})," ",t]})))}),(l.length>0||m)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h2",{className:"gtmkit-font-bold gtmkit-mb-4",children:(0,n.__)("Enhanced Compatibility","gtm-kit")}),(0,g.jsx)("p",{className:"gtmkit-mb-6",children:(0,n.__)("Based on the currently active theme and plugins, you will gain the following features tailored specifically to your setup if you upgrade to the GTM Kit Woo Add-On:","gtm-kit")})]}),m&&(0,g.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,g.jsxs)("span",{className:"gtmkit-font-bold",children:[r.name,":"]})," ",(0,n.__)("Your theme is supported with enhanced compatibility.","gtm-kit")," ",r.description]}),l.length>0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h3",{className:"gtmkit-font-bold gtmkit-text-sm gtmkit-mb-4",children:(0,n.__)("Enhanced Plugin Support:","gtm-kit")}),(0,g.jsx)("ul",{className:"gtmkit-text-sm",children:l.map((([t,e])=>(0,g.jsxs)("li",{className:"gtmkit-mb-4",children:[e.name," -"," ",e.description]},t)))})]}),i.url&&(0,g.jsxs)(s.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base gtmkit-mt-4",onClick:()=>{window.location.href=i.url},children:[(0,g.jsx)("span",{children:i.button_text||(0,n.__)("Learn More","gtm-kit")}),t?(0,g.jsx)(s.Spinner,{}):""]})]})]},e)))]})},ai={integrations:(0,n.__)("Integrations","gtm-kit"),templates:(0,n.__)("Google Tag Manager Templates","gtm-kit"),help:(0,n.__)("Help","gtm-kit")},si=()=>{const{useSettings:t}=(0,a.useContext)(d),e=window.gtmkitSettings,i=e.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:"notifications",title:(0,n.__)("Notifications","gtm-kit")},{to:"misc",title:(0,n.__)("Misc","gtm-kit")}];case"integrations":return[{to:"integrations",title:(0,n.__)("Integrations","gtm-kit")},...pe("integrations")];case"upgrades":return[{to:"upgrades",title:(0,n.__)("Upgrades","gtm-kit")}];case"templates":return[{to:"templates",title:(0,n.__)("Templates","gtm-kit")},...pe("templates")];case"help":return[{to:"help",title:(0,n.__)("Help","gtm-kit")},{to:"support",title:(0,n.__)("Support","gtm-kit")}]}}({page:i}),r=e.templates,l=e.integrations,m=ai[i]||(0,n.__)("Settings","gtm-kit");return Object.keys(t).length?(0,g.jsxs)(s.SlotFillProvider,{children:[(0,g.jsx)(Rt,{title:m}),(0,g.jsx)(Bt,{NavList:o}),(0,g.jsx)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base",children:(0,g.jsxs)(bt,{children:[(0,g.jsx)(_t,{exact:!0,path:"/general",element:(0,g.jsx)(he,{})}),(0,g.jsx)(_t,{exact:!0,path:"/container",element:(0,g.jsx)(ye,{})}),(0,g.jsx)(_t,{exact:!0,path:"/post-data",element:(0,g.jsx)(ve,{})}),(0,g.jsx)(_t,{exact:!0,path:"/user-data",element:(0,g.jsx)(Ee,{})}),(0,g.jsx)(_t,{exact:!0,path:"/google-consent-mode",element:(0,g.jsx)(Ne,{})}),(0,g.jsx)(_t,{exact:!0,path:"/notifications",element:(0,g.jsx)(ei,{})}),(0,g.jsx)(_t,{exact:!0,path:"/misc",element:(0,g.jsx)(Te,{})}),(0,g.jsx)(_t,{exact:!0,path:"/integrations",element:(0,g.jsx)(Ce,{})}),(0,g.jsx)(_t,{exact:!0,path:"/woocommerce",element:(0,g.jsx)(Le,{})}),(0,g.jsx)(_t,{exact:!0,path:"/cf7",element:(0,g.jsx)(Me,{})}),(0,g.jsx)(_t,{exact:!0,path:"/edd",element:(0,g.jsx)(Pe,{})}),l&&Object.keys(l).map((function(t){if("add-on"===l[t].type)return(0,g.jsx)(_t,{exact:!0,path:t,element:(0,g.jsx)($e,{integrationID:t,pluginName:l[t].title})},t)})),(0,g.jsx)(_t,{exact:!0,path:"/upgrades",element:(0,g.jsx)(ni,{})}),(0,g.jsx)(_t,{exact:!0,path:"/templates",element:(0,g.jsx)(Ge,{})}),r&&Object.keys(r).map((function(t){return(0,g.jsx)(_t,{exact:!0,path:t,element:(0,g.jsx)(He,{sectionData:r[t][0]})},t)})),(0,g.jsx)(_t,{exact:!0,path:"/help",element:(0,g.jsx)(Be,{})}),(0,g.jsx)(_t,{exact:!0,path:"/support",element:(0,g.jsx)(We,{})}),(0,g.jsx)(_t,{path:"/",element:(0,g.jsx)(ft,{replace:!0,to:"/"+i})})]})}),(0,g.jsx)(le,{}),(0,g.jsx)(Ye.PluginArea,{})]}):(0,g.jsx)("div",{className:"gtmkit-h-screen gtmkit-flex gtmkit-items-center gtmkit-justify-center",children:(0,g.jsx)(s.Spinner,{})})},oi=()=>(0,g.jsx)(Tt,{basename:"/",children:(0,g.jsx)(u,{children:(0,g.jsx)(si,{})})});document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById(window.gtmkitSettings.rootId);null!=e&&(0,t.createRoot)(e).render((0,g.jsx)(oi,{}))}))})()})();
  • gtm-kit/trunk/assets/admin/wizard.asset.php

    r3149785 r3156080  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '392b7bf946ae0bc997db');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '9c064e7aad56a83072a3');
  • gtm-kit/trunk/assets/admin/wizard.js

    r3149785 r3156080  
    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 s=t.n(r);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const o=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},l=window.wp.i18n,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.notifications=e.payload.notifications,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,l.__)("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,l.__)("An error occurred.","gtm-kit"):(0,l.__)("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;break;case"SEND_NOTIFICATION_STATUS_BEFORE":a.isUpdatingNotifications=e.payload.isUpdatingNotifications||a.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":a.isUpdatingNotifications=!1,a.isNotificationStatusSent=e.payload.isNotificationStatusSent||a.isNotificationStatusSent,a.notifications=e.payload.notifications||a.Notifications}return a},m=window.ReactJSXRuntime,g=(0,a.createContext)(),u=t=>{const[e,n]=(0,a.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},i="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:a,installData:i}})},s=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{r()}),[]);const l={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(a=e.stateSettings,o("gtmkit/v1/set-options","POST",a));var a;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:s,useUpdateStateSettings:async(t,a,n)=>{const r=JSON.parse(JSON.stringify(e.stateSettings));let o;r[t][a]=n,o=!(0,i.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:o})},useImportSettings:async(t,a)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let r;const o={};o.general={...n.general,...a.general},"integrations"in a&&(o.integrations={...n.integrations,...a.integrations}),r=!(0,i.isEqual)(o,e.fetchedSettings),s({stateSettings:o,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(a=e.supportTicket,o("gtmkit/v1/send-support-data","POST",a,!0));var a;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{n({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(a=e.licenseKey,o("gtmkit/v1/send-license-key","POST",a,!0));var a;n({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{n({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:!0}});const a={"notification-id":t,action:e},i=await(t=>o("gtmkit/v1/set-notification-status","POST",t,!0))(a);n({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,isNotificationStatusSent:i.success,notifications:i.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(g.Provider,{value:l,children: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 k(t,e){if(!1===t||null==t)throw new Error(e)}function y(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function S(t,e){return{usr:t.state,key:t.key,idx:e}}function f(t,e,a,n){return void 0===a&&(a=null),d({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?x(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 x(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function M(t,e,a){return void 0===a&&(a="/"),function(t,e,a,n){let i=z(("string"==typeof e?x(e):e).pathname||"/",a);if(null==i)return null;let r=v(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let s=null;for(let t=0;null==s&&t<r.length;++t){let e=A(i);s=O(r[t],e,n)}return s}(t,e,a,!1)}function v(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(k(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let o=G([n,s.relativePath]),l=a.concat(s);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),v(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:C(o,t.index),routesMeta:l})};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 s=w(n.join("/")),o=[];return o.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...s),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const _=/^:[\w-]+$/,T=3,b=2,L=1,j=10,D=-2,I=t=>"*"===t;function C(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=D),e&&(n+=b),a.filter((t=>!I(t))).reduce(((t,e)=>t+(_.test(e)?T:""===e?L:j)),n)}function O(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",s=[];for(let t=0;t<n.length;++t){let o=n[t],l=t===n.length-1,c="/"===r?e:e.slice(r.length)||"/",m=U({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),g=o.route;if(!m&&l&&a&&!n[n.length-1].route.index&&(m=U({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!m)return null;Object.assign(i,m.params),s.push({params:i,pathname:G([r,m.pathname]),pathnameBase:K(G([r,m.pathnameBase])),route:g}),"/"!==m.pathnameBase&&(r=G([r,m.pathnameBase]))}return s}function U(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),y("*"===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],s=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]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[a];return t[n]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,pattern:t}}function A(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return y(!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 z(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function P(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function R(t,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(((t,e)=>e===a.length-1?t.pathname:t.pathnameBase)):a.map((t=>t.pathnameBase))}function B(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=x(t):(i=d({},t),k(!i.pathname||!i.pathname.includes("?"),P("?","pathname","search",i)),k(!i.pathname||!i.pathname.includes("#"),P("#","pathname","hash",i)),k(!i.search||!i.search.includes("#"),P("#","search","hash",i)));let r,s=""===t||""===i.pathname,o=s?"/":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 l=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?x(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:Y(n),hash:F(i)}}(i,r),c=o&&"/"!==o&&o.endsWith("/"),m=(s||"."===o)&&a.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const G=t=>t.join("/").replace(/\/\/+/g,"/"),K=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",F=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const W=["post","put","patch","delete"],Q=(new Set(W),["get",...W]);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),V=e.createContext(null),X=e.createContext({outlet:null,matches:[],isDataRoute:!1}),q=e.createContext(null);function tt(){return null!=e.useContext(V)}function et(){return tt()||k(!1),e.useContext(V).location}function at(t){e.useContext(Z).static||e.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=e.useContext(X);return t?function(){let{router:t}=function(){let t=e.useContext(H);return t||k(!1),t}(ct.UseNavigateStable),a=gt(mt.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,J({fromRouteId:a},i)))}),[t,a])}():function(){tt()||k(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(X),{pathname:s}=et(),o=JSON.stringify(R(r,n.v7_relativeSplatPath)),l=e.useRef(!1);return at((()=>{l.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!l.current)return;if("number"==typeof e)return void i.go(e);let r=B(e,JSON.parse(o),s,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:G([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,s,t])}()}function it(t,a,n,i){tt()||k(!1);let{navigator:r}=e.useContext(Z),{matches:s}=e.useContext(X),o=s[s.length-1],l=o?o.params:{},c=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let m,g=et();if(a){var u;let t="string"==typeof a?x(a):a;"/"===c||(null==(u=t.pathname)?void 0:u.startsWith(c))||k(!1),m=t}else m=g;let d=m.pathname||"/",h=d;if("/"!==c){let t=c.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:h}),S=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 s;if(!n)return null;if(n.errors)t=n.matches;else{if(!(null!=(s=i)&&s.v7_partialHydration&&0===a.length&&!n.initialized&&n.matches.length>0))return null;t=n.matches}}let o=t,l=null==(r=n)?void 0:r.errors;if(null!=l){let t=o.findIndex((t=>t.route.id&&void 0!==(null==l?void 0:l[t.route.id])));t>=0||k(!1),o=o.slice(0,Math.min(o.length,t+1))}let c=!1,m=-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)&&(m=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){c=!0,o=m>=0?o.slice(0,m+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let s,g=!1,u=null,d=null;var p;n&&(s=l&&i.route.id?l[i.route.id]:void 0,u=i.route.errorElement||st,c&&(m<0&&0===r?(ut[p="route-fallback"]||(ut[p]=!0),g=!0,d=null):m===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=s?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(lt,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(ot,{location:n.location,revalidation:n.revalidation,component:u,error:s,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:G([c,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?c:G([c,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),s,n,i);return a&&S?e.createElement(V.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:p.Pop}},S):S}function rt(){let t=function(){var t;let a=e.useContext(q),n=function(){let t=e.useContext($);return t||k(!1),t}(mt.UseRouteError),i=gt(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 st=e.createElement(rt,null);class ot 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(X.Provider,{value:this.props.routeContext},e.createElement(q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lt(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(X.Provider,{value:a},i)}var ct=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ct||{}),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 gt(t){let a=function(){let t=e.useContext(X);return t||k(!1),t}(),n=a.matches[a.matches.length-1];return n.route.id||k(!1),n.route.id}const ut={};function dt(t){let{to:a,replace:n,state:i,relative:r}=t;tt()||k(!1);let{future:s,static:o}=e.useContext(Z),{matches:l}=e.useContext(X),{pathname:c}=et(),m=nt(),g=B(a,R(l,s.v7_relativeSplatPath),c,"path"===r),u=JSON.stringify(g);return e.useEffect((()=>m(JSON.parse(u),{replace:n,state:i,relative:r})),[m,u,r,n,i]),null}function pt(t){k(!1)}function ht(t){let{basename:a="/",children:n=null,location:i,navigationType:r=p.Pop,navigator:s,static:o=!1,future:l}=t;tt()&&k(!1);let c=a.replace(/^\/*/,"/"),m=e.useMemo((()=>({basename:c,navigator:s,static:o,future:J({v7_relativeSplatPath:!1},l)})),[c,l,s,o]);"string"==typeof i&&(i=x(i));let{pathname:g="/",search:u="",hash:d="",state:h=null,key:y="default"}=i,S=e.useMemo((()=>{let t=z(g,c);return null==t?null:{location:{pathname:t,search:u,hash:d,state:h,key:y},navigationType:r}}),[c,g,u,d,h,y,r]);return null==S?null:e.createElement(Z.Provider,{value:m},e.createElement(V.Provider,{children:n,value:S}))}function kt(t){let{children:e,location:a}=t;return it(yt(e),a)}function yt(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,yt(t.props.children,r));t.type!==pt&&k(!1),t.props.index&&t.props.children&&k(!1);let s={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&&(s.children=yt(t.props.children,r)),n.push(s)})),n}e.startTransition,new Promise((()=>{})),e.Component;const St=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,s=e.useRef();null==s.current&&(s.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,s=i.history,o=p.Pop,l=null,c=m();function m(){return(s.state||{idx:null}).idx}function g(){o=p.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:o,location:y.location,delta:e})}function u(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"),k(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==c&&(c=0,s.replaceState(d({},s.state,{idx:c}),""));let y={get action(){return o},get location(){return t(i,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(h,g),l=t,()=>{i.removeEventListener(h,g),l=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){o=p.Push;let n=f(y.location,t,e);a&&a(n,t),c=m()+1;let g=S(n,c),u=y.createHref(n);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&l&&l({action:o,location:y.location,delta:1})},replace:function(t,e){o=p.Replace;let n=f(y.location,t,e);a&&a(n,t),c=m();let i=S(n,c),g=y.createHref(n);s.replaceState(i,"",g),r&&l&&l({action:o,location:y.location,delta:0})},go:t=>s.go(t)};return y}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=x(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){y("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:r,v5Compat:!0}));let o=s.current,[l,c]=e.useState({action:o.action,location:o.location}),{v7_startTransition:m}=i||{},g=e.useCallback((t=>{m&&ft?ft((()=>c(t))):c(t)}),[c,m]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(ht,{basename:a,children:n,location:l.location,navigationType:l.action,navigator:o,future:i})}var xt,Nt;St.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"}(xt||(xt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Nt||(Nt={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s}=(0,a.useContext)(g),o=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(n.TextControl,{label:(0,l.__)("Container ID","gtm-kit"),placeholder:(0,l.__)("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:s||!t.general.gtm_id.includes("-")},(0,l.__)("Save and continue","gtm-kit"),s?(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,l.__)("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,l.__)("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,l.__)("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,l.__)("Go to the dashboard.","gtm-kit"))))},vt=()=>{const{useImportSettings:t,useIsPending:i,useInstallData:r}=(0,a.useContext)(g),[s,o]=(0,a.useState)(!0),c=Object.keys(r.import_data)[0],[m,u]=(0,a.useState)(c),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.import_data[t].name})})),s?(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,l.__)("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,l.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,l.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,l.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:m,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(m,r.import_data[m]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,l.__)("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,l.__)("No","gtm-kit")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},wt=()=>{const{useInstallData:t}=(0,a.useContext)(g),{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,l.__)("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,l.__)("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)(vt,null):(0,e.createElement)(Mt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useInstallData:o}=(0,a.useContext)(g),c=nt();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,l.__)("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,l.__)("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,l.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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,l.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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,l.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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,l.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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(),c("/share-anonymous-data",{replace:!0})},disabled:s},(0,l.__)("Save and continue","gtm-kit"),s?(0,e.createElement)(n.Spinner,null):"")))},Tt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,useIsPending:s,useSiteData:o}=(0,a.useContext)(g),c=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,l.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,l.__)("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,l.__)("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,l.__)("Yes","gtm-kit"):(0,l.__)("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,l.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,l.__)("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(),c("/getting-started",{replace:!0})},disabled:s},(0,l.__)("Save and continue","gtm-kit"),s?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,l.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,l.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,m.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,l.__)("Getting Started","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("The next step is to configure your Google Tag Manager container. You will find templates for this in the GTM Templates section.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.templatesUrl,rel:"noreferrer",children:(0,l.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:window.gtmkitSettings.helpUrl+"#/help",rel:"noreferrer",children:(0,l.__)("Go to Tutorials","gtm-kit")})]})]}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsx)(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},children:(0,l.__)("Go to the dashboard","gtm-kit")})})]}),Lt=[{step:1,path:"/welcome",element:"Welcome",title:(0,l.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,l.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,l.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,l.__)("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})},Dt=({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,It=({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)(Dt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{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:et().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},Lt.map((function(n){return(0,e.createElement)(It,{key:n.step,step:n.step,currentStep:a,totalSteps:t})})))},Ot=()=>(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,l.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ut=()=>(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,l.__)("Go to the dashboard.","gtm-kit"))))),At=()=>{const{useSettings:t}=(0,a.useContext)(g);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,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)(kt,null,(0,e.createElement)(pt,{exact:!0,path:"/welcome",element:(0,e.createElement)(wt,null)}),(0,e.createElement)(pt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(pt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(Tt,null)}),(0,e.createElement)(pt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(pt,{path:"/",element:(0,e.createElement)(dt,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ut,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},zt=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(u,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)(zt,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.ReactDOM,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var s=t.n(r);s().use(s().createNonceMiddleware(window.gtmkitSettings.nonce)),s().use(s().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=await s()({path:t,method:e,...a&&{data:a}})}catch(a){return{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?i:!0===i.success?i.data:{}},l=window.wp.i18n,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.notifications=e.payload.notifications,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,l.__)("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,l.__)("An error occurred.","gtm-kit"):(0,l.__)("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;break;case"SEND_NOTIFICATION_STATUS_BEFORE":a.isUpdatingNotifications=e.payload.isUpdatingNotifications||a.isUpdatingNotifications;break;case"SEND_NOTIFICATION_STATUS":a.isUpdatingNotifications=!1,a.isNotificationStatusSent=e.payload.isNotificationStatusSent||a.isNotificationStatusSent,a.notifications=e.payload.notifications||a.Notifications}return a},m=window.ReactJSXRuntime,g=(0,a.createContext)(),u=t=>{const[e,n]=(0,a.useReducer)(c,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:"",licenseKey:"",isLicensenKeySent:!1,licenseKeyMessage:"",notifications:{}}),r=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a=window.gtmkitSettings.notifications?window.gtmkitSettings.notifications:{metrics:{total:1}},i="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};n({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,notifications:a,installData:i}})},s=async t=>{n({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{r()}),[]);const l={useDispatch:t=>{n(t)},useUpdateSettings:async()=>{n({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(a=e.stateSettings,o("gtmkit/v1/set-options","POST",a));var a;n({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:r,useUpdateState:s,useUpdateStateSettings:async(t,a,n)=>{const r=JSON.parse(JSON.stringify(e.stateSettings));let o;r[t][a]=n,o=!(0,i.isEqual)(r,e.fetchedSettings),s({stateSettings:r,canSave:o})},useImportSettings:async(t,a)=>{const n=JSON.parse(JSON.stringify(e.stateSettings));let r;const o={};o.general={...n.general,...a.general},"integrations"in a&&(o.integrations={...n.integrations,...a.integrations}),r=!(0,i.isEqual)(o,e.fetchedSettings),s({stateSettings:o,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{n({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(a=e.supportTicket,o("gtmkit/v1/send-support-data","POST",a,!0));var a;n({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useUpdateLicenseKey:async t=>{s({licenseKey:t})},useSendLicenseKey:async()=>{n({type:"SEND_LICENSE_KEY_BEFORE",payload:{isSendingLicenseKey:!0}});const t=await(a=e.licenseKey,o("gtmkit/v1/send-license-key","POST",a,!0));var a;n({type:"SEND_LICENSE_KEY",payload:{isSendingLicenseKey:!1,isLicenseKeySent:t.success,licenseKeyMessage:t.data}})},useSetNotificationStatus:async(t,e)=>{n({type:"SEND_NOTIFICATION_STATUS_BEFORE",payload:{isUpdatingNotifications:!0}});const a={"notification-id":t,action:e},i=await(t=>o("gtmkit/v1/set-notification-status","POST",t,!0))(a);n({type:"SEND_NOTIFICATION_STATUS",payload:{isUpdatingNotifications:!1,isNotificationStatusSent:i.success,notifications:i.data}})},useSettings:e.stateSettings,useIsPending:e.isPending,useNotice:e.notice,useHasError:e.hasError,useCanSave:e.canSave,useSiteData:e.siteData,useInstallData:e.installData,useIsSending:e.isSendingSystemData,useSupportTicket:e.supportTicket,useIsSystemDataSent:e.isSystemDataSent,useSystemDataMessage:e.systemDataMessage,useIsSendingLicenseKey:e.isSendingLicenseKey,useLicenseKey:e.licenseKey,useIsLicenseKeySent:e.isLicenseKeySent,useLicenseKeyMessage:e.licenseKeyMessage,useNotifications:e.notifications,useIsUpdatingNotifications:e.isUpdatingNotifications,useUserRoles:window.gtmkitSettings.user_roles?window.gtmkitSettings.user_roles:[],isPremium:!!window.gtmkitSettings.isPremium&&window.gtmkitSettings.isPremium};return(0,m.jsx)(g.Provider,{value:l,children:t.children})},d=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},p.apply(this,arguments)}var h;!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(h||(h={}));const k="popstate";function y(t,e){if(!1===t||null==t)throw new Error(e)}function S(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 x(t,e,a,n){return void 0===a&&(a=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?E(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function N(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 E(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 M;function v(t,e,a){return void 0===a&&(a="/"),function(t,e,a,n){let i=P(("string"==typeof e?E(e):e).pathname||"/",a);if(null==i)return null;let r=j(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 s=null;for(let t=0;null==s&&t<r.length;++t){let e=z(i);s=U(r[t],e,n)}return s}(t,e,a,!1)}function j(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let i=(t,i,r)=>{let s={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};s.relativePath.startsWith("/")&&(y(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let o=K([n,s.relativePath]),l=a.concat(s);t.children&&t.children.length>0&&(y(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),j(t.children,e,l,o)),(null!=t.path||t.index)&&e.push({path:o,score:O(o,t.index),routesMeta:l})};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 s=w(n.join("/")),o=[];return o.push(...s.map((t=>""===t?r:[r,t].join("/")))),i&&o.push(...s),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(M||(M={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const _=/^:[\w-]+$/,T=3,b=2,L=1,D=10,I=-2,C=t=>"*"===t;function O(t,e){let a=t.split("/"),n=a.length;return a.some(C)&&(n+=I),e&&(n+=b),a.filter((t=>!C(t))).reduce(((t,e)=>t+(_.test(e)?T:""===e?L:D)),n)}function U(t,e,a){void 0===a&&(a=!1);let{routesMeta:n}=t,i={},r="/",s=[];for(let t=0;t<n.length;++t){let o=n[t],l=t===n.length-1,c="/"===r?e:e.slice(r.length)||"/",m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),g=o.route;if(!m&&l&&a&&!n[n.length-1].route.index&&(m=A({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!m)return null;Object.assign(i,m.params),s.push({params:i,pathname:K([r,m.pathname]),pathnameBase:Y(K([r,m.pathnameBase])),route:g}),"/"!==m.pathnameBase&&(r=K([r,m.pathnameBase]))}return s}function A(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),S("*"===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],s=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]||"";s=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const l=o[a];return t[n]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:s,pattern:t}}function z(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}catch(e){return S(!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 P(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 R(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 B(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(((t,e)=>e===a.length-1?t.pathname:t.pathnameBase)):a.map((t=>t.pathnameBase))}function G(t,e,a,n){let i;void 0===n&&(n=!1),"string"==typeof t?i=E(t):(i=p({},t),y(!i.pathname||!i.pathname.includes("?"),R("?","pathname","search",i)),y(!i.pathname||!i.pathname.includes("#"),R("#","pathname","hash",i)),y(!i.search||!i.search.includes("#"),R("#","search","hash",i)));let r,s=""===t||""===i.pathname,o=s?"/":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 l=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?E(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:F(n),hash:W(i)}}(i,r),c=o&&"/"!==o&&o.endsWith("/"),m=(s||"."===o)&&a.endsWith("/");return l.pathname.endsWith("/")||!c&&!m||(l.pathname+="/"),l}const K=t=>t.join("/").replace(/\/\/+/g,"/"),Y=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),F=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",W=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Q=["post","put","patch","delete"],$=(new Set(Q),["get",...Q]);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($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=d.createContext(null),Z=d.createContext(null),V=d.createContext(null),X=d.createContext(null),q=d.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=d.createContext(null);function et(){return null!=d.useContext(X)}function at(){return et()||y(!1),d.useContext(X).location}function nt(t){d.useContext(V).static||d.useLayoutEffect(t)}function it(){let{isDataRoute:t}=d.useContext(q);return t?function(){let{router:t}=function(){let t=d.useContext(H);return t||y(!1),t}(mt.UseNavigateStable),e=ut(gt.UseNavigateStable),a=d.useRef(!1);return nt((()=>{a.current=!0})),d.useCallback((function(n,i){void 0===i&&(i={}),a.current&&("number"==typeof n?t.navigate(n):t.navigate(n,J({fromRouteId:e},i)))}),[t,e])}():function(){et()||y(!1);let t=d.useContext(H),{basename:e,future:a,navigator:n}=d.useContext(V),{matches:i}=d.useContext(q),{pathname:r}=at(),s=JSON.stringify(B(i,a.v7_relativeSplatPath)),o=d.useRef(!1);return nt((()=>{o.current=!0})),d.useCallback((function(a,i){if(void 0===i&&(i={}),!o.current)return;if("number"==typeof a)return void n.go(a);let l=G(a,JSON.parse(s),r,"path"===i.relative);null==t&&"/"!==e&&(l.pathname="/"===l.pathname?e:K([e,l.pathname])),(i.replace?n.replace:n.push)(l,i.state,i)}),[e,n,s,r,t])}()}function rt(t,e,a,n){et()||y(!1);let{navigator:i}=d.useContext(V),{matches:r}=d.useContext(q),s=r[r.length-1],o=s?s.params:{},l=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let c,m=at();if(e){var g;let t="string"==typeof e?E(e):e;"/"===l||(null==(g=t.pathname)?void 0:g.startsWith(l))||y(!1),c=t}else c=m;let u=c.pathname||"/",p=u;if("/"!==l){let t=l.replace(/^\//,"").split("/");p="/"+u.replace(/^\//,"").split("/").slice(t.length).join("/")}let k=v(t,{pathname:p}),S=function(t,e,a,n){var i;if(void 0===e&&(e=[]),void 0===a&&(a=null),void 0===n&&(n=null),null==t){var r;if(!a)return null;if(a.errors)t=a.matches;else{if(!(null!=(r=n)&&r.v7_partialHydration&&0===e.length&&!a.initialized&&a.matches.length>0))return null;t=a.matches}}let s=t,o=null==(i=a)?void 0:i.errors;if(null!=o){let t=s.findIndex((t=>t.route.id&&void 0!==(null==o?void 0:o[t.route.id])));t>=0||y(!1),s=s.slice(0,Math.min(s.length,t+1))}let l=!1,c=-1;if(a&&n&&n.v7_partialHydration)for(let t=0;t<s.length;t++){let e=s[t];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=t),e.route.id){let{loaderData:t,errors:n}=a,i=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||i){l=!0,s=c>=0?s.slice(0,c+1):[s[0]];break}}}return s.reduceRight(((t,n,i)=>{let r,m=!1,g=null,u=null;var p;a&&(r=o&&n.route.id?o[n.route.id]:void 0,g=n.route.errorElement||ot,l&&(c<0&&0===i?(dt[p="route-fallback"]||(dt[p]=!0),m=!0,u=null):c===i&&(m=!0,u=n.route.hydrateFallbackElement||null)));let h=e.concat(s.slice(0,i+1)),k=()=>{let e;return e=r?g:m?u:n.route.Component?d.createElement(n.route.Component,null):n.route.element?n.route.element:t,d.createElement(ct,{match:n,routeContext:{outlet:t,matches:h,isDataRoute:null!=a},children:e})};return a&&(n.route.ErrorBoundary||n.route.errorElement||0===i)?d.createElement(lt,{location:a.location,revalidation:a.revalidation,component:g,error:r,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:K([l,i.encodeLocation?i.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:K([l,i.encodeLocation?i.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,a,n);return e&&S?d.createElement(X.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:h.Pop}},S):S}function st(){let t=function(){var t;let e=d.useContext(tt),a=function(){let t=d.useContext(Z);return t||y(!1),t}(gt.UseRouteError),n=ut(gt.UseRouteError);return void 0!==e?e:null==(t=a.errors)?void 0:t[n]}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),a?d.createElement("pre",{style:n},a):null,null)}const ot=d.createElement(st,null);class lt extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error: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?d.createElement(q.Provider,{value:this.props.routeContext},d.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:a,children:n}=t,i=d.useContext(H);return i&&i.static&&i.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=a.route.id),d.createElement(q.Provider,{value:e},n)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),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 e=function(){let t=d.useContext(q);return t||y(!1),t}(),a=e.matches[e.matches.length-1];return a.route.id||y(!1),a.route.id}const dt={};function pt(t){let{to:e,replace:a,state:n,relative:i}=t;et()||y(!1);let{future:r,static:s}=d.useContext(V),{matches:o}=d.useContext(q),{pathname:l}=at(),c=it(),m=G(e,B(o,r.v7_relativeSplatPath),l,"path"===i),g=JSON.stringify(m);return d.useEffect((()=>c(JSON.parse(g),{replace:a,state:n,relative:i})),[c,g,i,a,n]),null}function ht(t){y(!1)}function kt(t){let{basename:e="/",children:a=null,location:n,navigationType:i=h.Pop,navigator:r,static:s=!1,future:o}=t;et()&&y(!1);let l=e.replace(/^\/*/,"/"),c=d.useMemo((()=>({basename:l,navigator:r,static:s,future:J({v7_relativeSplatPath:!1},o)})),[l,o,r,s]);"string"==typeof n&&(n=E(n));let{pathname:m="/",search:g="",hash:u="",state:p=null,key:k="default"}=n,S=d.useMemo((()=>{let t=P(m,l);return null==t?null:{location:{pathname:t,search:g,hash:u,state:p,key:k},navigationType:i}}),[l,m,g,u,p,k,i]);return null==S?null:d.createElement(V.Provider,{value:c},d.createElement(X.Provider,{children:a,value:S}))}function yt(t){let{children:e,location:a}=t;return rt(St(e),a)}function St(t,e){void 0===e&&(e=[]);let a=[];return d.Children.forEach(t,((t,n)=>{if(!d.isValidElement(t))return;let i=[...e,n];if(t.type===d.Fragment)return void a.push.apply(a,St(t.props.children,i));t.type!==ht&&y(!1),t.props.index&&t.props.children&&y(!1);let r={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(r.children=St(t.props.children,i)),a.push(r)})),a}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const ft=d.startTransition;function xt(t){let{basename:e,children:a,future:n,window:i}=t,r=d.useRef();var s;null==r.current&&(r.current=(void 0===(s={window:i,v5Compat:!0})&&(s={}),function(t,e,a,n){void 0===n&&(n={});let{window:i=document.defaultView,v5Compat:r=!1}=n,s=i.history,o=h.Pop,l=null,c=m();function m(){return(s.state||{idx:null}).idx}function g(){o=h.Pop;let t=m(),e=null==t?null:t-c;c=t,l&&l({action:o,location:d.location,delta:e})}function u(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:N(t);return a=a.replace(/ $/,"%20"),y(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==c&&(c=0,s.replaceState(p({},s.state,{idx:c}),""));let d={get action(){return o},get location(){return t(i,s)},listen(t){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(k,g),l=t,()=>{i.removeEventListener(k,g),l=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){o=h.Push;let n=x(d.location,t,e);a&&a(n,t),c=m()+1;let g=f(n,c),u=d.createHref(n);try{s.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&l&&l({action:o,location:d.location,delta:1})},replace:function(t,e){o=h.Replace;let n=x(d.location,t,e);a&&a(n,t),c=m();let i=f(n,c),g=d.createHref(n);s.replaceState(i,"",g),r&&l&&l({action:o,location:d.location,delta:0})},go:t=>s.go(t)};return d}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=E(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),x("",{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:N(e))}),(function(t,e){S("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),s)));let o=r.current,[l,c]=d.useState({action:o.action,location:o.location}),{v7_startTransition:m}=n||{},g=d.useCallback((t=>{m&&ft?ft((()=>c(t))):c(t)}),[c,m]);return d.useLayoutEffect((()=>o.listen(g)),[o,g]),d.createElement(kt,{basename:e,children:a,location:l.location,navigationType:l.action,navigator:o,future:n})}var Nt,Et;e.flushSync,d.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"}(Nt||(Nt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Et||(Et={}));const Mt=(t="general",e="")=>{const a=window.gtmkitSettings.adminPageUrl;return e?`${a}${t}#/${e}`:`${a}${t}`},vt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:i,useIsPending:r}=(0,a.useContext)(g),s=it();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20",children:[(0,m.jsxs)("div",{className:"",children:[(0,m.jsx)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 ",children:(0,m.jsx)(n.TextControl,{label:(0,l.__)("Container ID","gtm-kit"),placeholder:(0,l.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>e("general","gtm_id",t)})}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsxs)(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:()=>{i(),s("/essential-settings",{replace:!0})},disabled:r||!t.general.gtm_id.includes("-"),children:[(0,l.__)("Save and continue","gtm-kit"),r?(0,m.jsx)(n.Spinner,{}):""]})})]}),(0,m.jsxs)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center",children:[(0,m.jsx)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4",children:"Need help?"}),(0,m.jsxs)("p",{className:"gtmkit-mb-6",children:[(0,l.__)("Find your GTM container ID on","gtm-kit"),(0,m.jsx)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer",children:"Google Tag Manager"})]}),(0,m.jsxs)("p",{children:[(0,l.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"]})]})]}),(0,m.jsxs)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base",children:[(0,m.jsx)("span",{className:"gtmkit-block",children:(0,l.__)("No thanks. I know what I'm doing.","gtm-kit")}),(0,m.jsx)("a",{className:"gtmkit-underline gtmkit-ml-4",href:Mt(),children:(0,l.__)("Go to the dashboard.","gtm-kit")})]})]})},jt=()=>{const{useImportSettings:t,useIsPending:e,useInstallData:i}=(0,a.useContext)(g),[r,s]=(0,a.useState)(!0),o=Object.keys(i.import_data)[0],[c,m]=(0,a.useState)(o),u=[];return Object.keys(i.import_data).forEach((t=>{u.push({value:t,label:i.import_data[t].name})})),r?(0,d.createElement)(d.Fragment,null,(0,d.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-p-8 gtmkit-my-8"},(0,d.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,l.__)("Would you like to import plugin settings?","gtm-kit")),(0,d.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,l.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,l.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,d.createElement)(n.RadioControl,{help:(0,l.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:c,options:u,onChange:t=>m(t)}),(0,d.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,d.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(c,i.import_data[c]),s(!1)}},(0,d.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,l.__)("Yes","gtm-kit")),e?(0,d.createElement)(n.Spinner,null):""),(0,d.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{s(!1)}},(0,d.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,l.__)("No","gtm-kit")),e?(0,d.createElement)(n.Spinner,null):"")))):(0,d.createElement)(vt,null)},wt=()=>{const{useInstallData:t}=(0,a.useContext)(g),{firstInstall:e}=t,{importAvailable:n}=t;return(0,d.createElement)("div",{className:"gtmkit-text-center"},(0,d.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,l.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,d.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,l.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),e&&n?(0,d.createElement)(jt,null):(0,d.createElement)(vt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:i,useIsPending:r,useInstallData:s}=(0,a.useContext)(g),o=it();return(0,d.createElement)("div",{className:"gtmkit-text-center"},(0,d.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,l.__)("Essential Settings","gtm-kit")),(0,d.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,l.__)("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,d.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Page type","gtm-kit"),id:"page-type"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("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:()=>{e("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),s.woocommerce_integration?(0,d.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{e("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,s.cf7_integration?(0,d.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{e("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,s.edd_integration?(0,d.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{e("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,d.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,d.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:()=>{i(),o("/share-anonymous-data",{replace:!0})},disabled:r},(0,l.__)("Save and continue","gtm-kit"),r?(0,d.createElement)(n.Spinner,null):"")))},Tt=()=>{const{useSettings:t,useUpdateStateSettings:e,useUpdateSettings:i,useIsPending:r,useSiteData:s}=(0,a.useContext)(g),o=it();return(0,d.createElement)(d.Fragment,null,(0,d.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,l.__)("Help improve GTM Kit","gtm-kit")),(0,d.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,l.__)("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,d.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,l.__)("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,d.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,d.createElement)("tbody",null,(0,d.createElement)("tr",{className:""},(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Server type:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.web_server))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"PHP version number:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.php_version))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"WordPress version number:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.wordpress_version))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"WordPress multisite:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.multisite?(0,l.__)("Yes","gtm-kit"):(0,l.__)("No","gtm-kit")))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Current theme:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.current_theme))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Current site language:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("code",{className:"gtmkit-text-sm"},s.locale))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Active plugins:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("em",null,"Plugin names of all active plugins"))),(0,d.createElement)("tr",null,(0,d.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,d.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,d.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,d.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,d.createElement)(n.BaseControl,{label:(0,l.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,d.createElement)(n.ToggleControl,{label:(0,l.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{e("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,d.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,d.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:()=>{i(),o("/getting-started",{replace:!0})},disabled:r},(0,l.__)("Save and continue","gtm-kit"),r?(0,d.createElement)(n.Spinner,null):"")))},bt=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center",children:(0,l.__)("You are ready to use GTM Kit!","gtm-kit")}),(0,m.jsx)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center",children:(0,l.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center",children:[(0,l.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "]}),(0,m.jsxs)("div",{className:"gtmkit-border-2 gtmkit-max-w-lg gtmkit-mx-auto gtmkit-mb-8",children:[(0,m.jsx)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2",children:(0,l.__)("Getting Started","gtm-kit")}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("The next step is to configure your Google Tag Manager container. You will find templates for this in the GTM Templates section.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Mt("templates"),rel:"noreferrer",children:(0,l.__)("Go to GTM Templates","gtm-kit")})]}),(0,m.jsxs)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4",children:[(0,l.__)("To get the most out of Google Tag Manager with GTM Kit, you should also review the tutorials.","gtm-kit")," ",(0,m.jsx)("a",{className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:Mt("help","help"),rel:"noreferrer",children:(0,l.__)("Go to Tutorials","gtm-kit")})]})]}),(0,m.jsx)("div",{className:"gtmkit-flex gtmkit-mt-12",children:(0,m.jsx)(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=Mt("general")},children:(0,l.__)("Go to the dashboard","gtm-kit")})})]}),Lt=[{step:1,path:"/welcome",element:"Welcome",title:(0,l.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,l.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,l.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,l.__)("Getting Started","gtm-kit")}],Dt=({step:t,currentStep:e,totalSteps:a})=>{if(t===a)return;let n="gtmkit-h-0.5 gtmkit-w-full";return n+=t<e?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,d.createElement)("div",{className:n})},It=({step:t,currentStep:e})=>t<e?(0,d.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,d.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===e?(0,d.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Ct=({step:t,currentStep:e,totalSteps:a})=>{if(0===t)return;let n="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 n+=t<e?" gtmkit-bg-color-primary":" gtmkit-bg-white",n+=t>e?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,d.createElement)(d.Fragment,null,(0,d.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,d.createElement)("span",{className:n},(0,d.createElement)(It,{step:t,currentStep:e,totalSteps:a}))),(0,d.createElement)(Dt,{step:t,currentStep:e,totalSteps:a}))},Ot=()=>{const t=Lt.length-1+Lt[0].step;let e=((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:at().pathname});return e=e.length?e[0].step:0,0===e?(0,d.createElement)("div",{className:"gtmkit-my-16"}):(0,d.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(a){return(0,d.createElement)(Ct,{key:a.step,step:a.step,currentStep:e,totalSteps:t})})))},Ut=()=>(0,d.createElement)(d.Fragment,null,(0,d.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,d.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,d.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,l.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,d.createElement)(Ot,null)),At=()=>(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey",children:(0,m.jsx)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max",children:(0,m.jsx)("a",{className:"gtmkit-underline",href:Mt(),children:(0,l.__)("Go to the dashboard.","gtm-kit")})})})}),zt=()=>{const{useSettings:t}=(0,a.useContext)(g);return Object.keys(t).length?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Ut,{}),(0,m.jsx)("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",children:(0,m.jsxs)(yt,{children:[(0,m.jsx)(ht,{exact:!0,path:"/welcome",element:(0,m.jsx)(wt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/essential-settings",element:(0,m.jsx)(_t,{})}),(0,m.jsx)(ht,{exact:!0,path:"/share-anonymous-data",element:(0,m.jsx)(Tt,{})}),(0,m.jsx)(ht,{exact:!0,path:"/getting-started",element:(0,m.jsx)(bt,{})}),(0,m.jsx)(ht,{path:"/",element:(0,m.jsx)(pt,{replace:!0,to:"/welcome"})})]})}),(0,m.jsx)(At,{})]}):(0,m.jsx)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Pt=()=>(0,m.jsx)(xt,{basename:"/",children:(0,m.jsx)(u,{children:(0,m.jsx)(zt,{})})});document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById(window.gtmkitSettings.rootId);null!=t&&(0,e.createRoot)(t).render((0,m.jsx)(Pt,{}))}))})();
  • gtm-kit/trunk/changelog.txt

    r3149785 r3156080  
    11*** GTM Kit ***
    22
    3 2024-09-DD - version 2.0
     32024-09-23 - version 2.0.1
     4* Fix: * Fix an edge case that could cause a fatal error in admin_body_class().
     5
     62024-09-11 - version 2.0.0
    47* Remove: Starting with GTM Kit version 2.0, the add_to_wishlist event is no longer supported in the free version of GTM Kit. To continue tracking the add_to_wishlist event, you must purchase the GTM Kit Add-On plugin.
    58* Add: A notifications handler has been added to communicate issues and notifications that require the user’s attention.
  • gtm-kit/trunk/gtm-kit.php

    r3149785 r3156080  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     2.0.0
     6 * Version:     2.0.1
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    2828}
    2929
    30 const GTMKIT_VERSION = '2.0.0';
     30const GTMKIT_VERSION = '2.0.1';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/trunk/inc/main.php

    r3149785 r3156080  
    178178    $notifications_handler = NotificationsHandler::get();
    179179
    180     PluginSuggestions::register( $notifications_handler, $plugin_availability );
     180    PluginSuggestions::register( $notifications_handler, $plugin_availability, $util );
    181181    Analytics::register( $options, $util );
    182182    MetaBox::register( $options );
  • gtm-kit/trunk/languages/gtm-kit.pot

    r3149785 r3156080  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 2.0\n"
     5"Project-Id-Version: GTM Kit 2.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-09-03T15:14:34+00:00\n"
     12"POT-Creation-Date: 2024-09-22T11:44:20+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
     
    3131msgstr ""
    3232
    33 #: inc/main.php:89
     33#: inc/main.php:90
    3434msgid "Go to GTM Kit Settings page"
    3535msgstr ""
    3636
    37 #: inc/main.php:90
    38 #: assets/admin/settings.js:15
     37#: inc/main.php:91
     38#: assets/admin/settings.js:22
    3939msgid "Settings"
    4040msgstr ""
    4141
    4242#. translators: %s is GTM Kit Add-On.
    43 #: inc/main.php:108
     43#: inc/main.php:109
    4444msgid "Required by %s"
    4545msgstr ""
    4646
    47 #: src/Admin/AbstractOptionsPage.php:229
    48 #: src/Admin/SetupWizard.php:214
     47#: src/Admin/AbstractOptionsPage.php:230
     48#: src/Admin/SetupWizard.php:212
    4949msgid "Whoops, something's not working."
    5050msgstr ""
    5151
    52 #: src/Admin/AbstractOptionsPage.php:232
    53 #: src/Admin/SetupWizard.php:217
     52#: src/Admin/AbstractOptionsPage.php:233
     53#: src/Admin/SetupWizard.php:215
    5454msgid "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."
    5555msgstr ""
    5656
    57 #: src/Admin/AbstractOptionsPage.php:237
    58 #: src/Admin/SetupWizard.php:165
    59 #: src/Admin/SetupWizard.php:222
     57#: src/Admin/AbstractOptionsPage.php:238
     58#: src/Admin/SetupWizard.php:163
     59#: src/Admin/SetupWizard.php:220
    6060msgid "Go back to the Dashboard"
    6161msgstr ""
     
    8484msgstr ""
    8585
    86 #: src/Admin/HelpOptionsPage.php:44
    87 #: src/Admin/HelpOptionsPage.php:53
    88 #: assets/admin/settings.js:13
    89 #: assets/admin/settings.js:15
     86#: src/Admin/HelpOptionsPage.php:46
     87#: src/Admin/HelpOptionsPage.php:55
     88#: assets/admin/settings.js:19
     89#: assets/admin/settings.js:22
    9090msgid "Help"
    9191msgstr ""
     
    106106#: src/Admin/IntegrationsOptionsPage.php:55
    107107#: assets/admin/settings.js:1
    108 #: assets/admin/settings.js:15
     108#: assets/admin/settings.js:22
    109109msgid "Integrations"
    110110msgstr ""
     
    125125msgstr ""
    126126
    127 #: src/Admin/PluginSuggestions.php:121
     127#. translators: %1$s is the name of the plugin and %2$s is the name of the theme.
     128#: src/Admin/PluginSuggestions.php:228
     129msgid "It seems that you have installed the %1$s plugin and %1$s theme."
     130msgstr ""
     131
     132#. translators: %1$s is the name of the plugin.
     133#: src/Admin/PluginSuggestions.php:235
     134msgid "It seems that you have installed the %1$s plugin."
     135msgstr ""
     136
     137#. translators: %1$s is the name of the theme.
     138#: src/Admin/PluginSuggestions.php:242
     139msgid "It seems that you have installed the %1$s theme."
     140msgstr ""
     141
     142#. translators: %1$s is a link with the text 'GTM Kit Woo Add-On'.
     143#: src/Admin/PluginSuggestions.php:251
     144msgid "With the %1$s, you can track the add_to_wishlist event and leverage server-side tracking for enhanced accuracy and deeper insights into customer behavior."
     145msgstr ""
     146
     147#: src/Admin/PluginSuggestions.php:258
     148msgid "Upgrade:"
     149msgstr ""
     150
     151#: src/Admin/PluginSuggestions.php:271
    128152msgid "It appears that you are not currently using a supported SEO plugin. By installing either WordPress SEO or Rank Math, you can assign a primary category to each product. This primary category will then be used in the data layer if the product is associated with multiple categories."
    129153msgstr ""
    130154
    131 #: src/Admin/PluginSuggestions.php:126
     155#: src/Admin/PluginSuggestions.php:276
    132156msgid "Plugin suggestion:"
    133157msgstr ""
    134158
    135159#. translators: %s is the name of the plugin.
    136 #: src/Admin/PluginSuggestions.php:144
     160#: src/Admin/PluginSuggestions.php:294
    137161msgid "It seems that you have installed the Google Tag Manager plugin called %1$s. Running two different GTM plugins simultaneously can lead to unexpected results, significantly impact data accuracy, and slow down page speed. Please consider deactivating %2$s unless you have carefully considered and addressed the potential challenges."
    138162msgstr ""
    139163
    140 #: src/Admin/PluginSuggestions.php:152
     164#: src/Admin/PluginSuggestions.php:302
    141165msgid "Possible Conflict:"
     166msgstr ""
     167
     168#. translators: %1$s and %2$s are links with the text 'GTM Kit Woo Add-On' and 'Grandfathered Wishlist Functionality' respectively.
     169#: src/Admin/PluginSuggestions.php:323
     170msgid "Starting with GTM Kit version 2.0, the add_to_wishlist event is no longer supported in the free version of GTM Kit. To continue tracking the add_to_wishlist event, you must either purchase the %1$s or download the free %2$s plugin."
     171msgstr ""
     172
     173#: src/Admin/PluginSuggestions.php:331
     174msgid "Breaking change:"
    142175msgstr ""
    143176
     
    147180msgstr ""
    148181
     182#: src/Admin/UpgradesOptionsPage.php:44
     183#: src/Admin/UpgradesOptionsPage.php:53
     184#: assets/admin/settings.js:22
     185msgid "Upgrades"
     186msgstr ""
     187
     188#: src/Admin/UpgradesOptionsPage.php:118
     189msgid "The plugin is installed and activated"
     190msgstr ""
     191
    149192#: src/Common/Util.php:159
    150193msgid "Server type:"
     
    198241
    199242#: src/Integration/EasyDigitalDownloads.php:104
    200 #: src/Integration/WooCommerce.php:258
     243#: src/Integration/WooCommerce.php:257
    201244msgid "Payment method not found"
    202245msgstr ""
    203246
     247#: src/Integration/WooCommerce.php:248
     248msgid "Handpicked Products"
     249msgstr ""
     250
    204251#: src/Integration/WooCommerce.php:249
    205 msgid "Handpicked Products"
     252msgid "Best Sellers"
    206253msgstr ""
    207254
    208255#: src/Integration/WooCommerce.php:250
    209 msgid "Best Sellers"
     256#: src/Integration/WooCommerce.php:975
     257msgid "Product Category"
    210258msgstr ""
    211259
    212260#: src/Integration/WooCommerce.php:251
    213 #: src/Integration/WooCommerce.php:978
    214 msgid "Product Category"
     261msgid "New Products"
    215262msgstr ""
    216263
    217264#: src/Integration/WooCommerce.php:252
    218 msgid "New Products"
     265msgid "Products On Sale"
    219266msgstr ""
    220267
    221268#: src/Integration/WooCommerce.php:253
    222 msgid "Products On Sale"
     269msgid "Products By Attribute"
    223270msgstr ""
    224271
    225272#: src/Integration/WooCommerce.php:254
    226 msgid "Products By Attribute"
     273#: src/Integration/WooCommerce.php:977
     274msgid "Product Tag"
    227275msgstr ""
    228276
    229277#: src/Integration/WooCommerce.php:255
    230 #: src/Integration/WooCommerce.php:980
    231 msgid "Product Tag"
     278msgid "Top Rated Products"
    232279msgstr ""
    233280
    234281#: src/Integration/WooCommerce.php:256
    235 msgid "Top Rated Products"
    236 msgstr ""
    237 
    238 #: src/Integration/WooCommerce.php:257
    239282msgid "Shipping tier not found"
    240283msgstr ""
    241284
    242 #: src/Integration/WooCommerce.php:837
     285#: src/Integration/WooCommerce.php:834
    243286msgid "Grouped Product"
    244287msgstr ""
    245288
    246 #: src/Integration/WooCommerce.php:871
     289#: src/Integration/WooCommerce.php:868
    247290msgid "Search Results"
    248291msgstr ""
    249292
    250 #: src/Integration/WooCommerce.php:871
    251 #: src/Integration/WooCommerce.php:912
    252 #: src/Integration/WooCommerce.php:945
     293#: src/Integration/WooCommerce.php:868
     294#: src/Integration/WooCommerce.php:909
     295#: src/Integration/WooCommerce.php:942
    253296msgid "General Product List"
    254297msgstr ""
    255298
    256 #: src/Integration/WooCommerce.php:1128
     299#: src/Integration/WooCommerce.php:1107
    257300msgid "GTM Kit data."
    258301msgstr ""
     
    325368
    326369#: assets/admin/settings.js:1
    327 #: assets/admin/settings.js:15
     370#: assets/admin/settings.js:22
    328371msgid "Notifications"
    329372msgstr ""
     
    338381
    339382#: assets/admin/settings.js:1
    340 #: assets/admin/settings.js:15
     383#: assets/admin/settings.js:22
    341384msgid "No notifications at the moment."
    342385msgstr ""
     
    361404
    362405#: assets/admin/settings.js:1
    363 #: assets/admin/settings.js:13
     406#: assets/admin/settings.js:19
    364407msgid "Tutorials"
    365408msgstr ""
     
    455498
    456499#: assets/admin/settings.js:1
    457 #: assets/admin/settings.js:13
     500#: assets/admin/settings.js:19
    458501msgid "Learn more"
    459502msgstr ""
     
    672715
    673716#: assets/admin/settings.js:1
    674 #: assets/admin/settings.js:15
     717#: assets/admin/settings.js:22
    675718msgid "Post data"
    676719msgstr ""
     
    697740
    698741#: assets/admin/settings.js:1
    699 #: assets/admin/settings.js:13
     742#: assets/admin/settings.js:19
    700743msgid "User Data"
    701744msgstr ""
     
    738781
    739782#: assets/admin/settings.js:1
    740 #: assets/admin/settings.js:15
     783#: assets/admin/settings.js:22
    741784msgid "Google Consent Mode"
    742785msgstr ""
     
    869912
    870913#: assets/admin/settings.js:1
    871 #: assets/admin/settings.js:15
     914#: assets/admin/settings.js:22
    872915msgid "Misc"
    873916msgstr ""
     
    910953
    911954#. translators: %s is the name of the plugin.
    912 #: assets/admin/settings.js:3
     955#: assets/admin/settings.js:4
    913956msgid "%s is not active"
    914 msgstr ""
    915 
    916 #. translators: %s is the name of the plugin.
    917 #: assets/admin/settings.js:5
    918 msgid "If you haven't installed and activated %s you must do that."
    919957msgstr ""
    920958
    921959#. translators: %s is the name of the plugin.
    922960#: assets/admin/settings.js:7
     961msgid "If you haven't installed and activated %s you must do that."
     962msgstr ""
     963
     964#. translators: %s is the name of the plugin.
     965#: assets/admin/settings.js:10
    923966msgid "Install %s"
    924967msgstr ""
    925968
    926 #: assets/admin/settings.js:7
     969#: assets/admin/settings.js:10
    927970msgid "(not set)"
    928 msgstr ""
    929 
    930 #. translators: %s is the name of the plugin.
    931 #: assets/admin/settings.js:9
    932 msgid "%s Integration"
    933 msgstr ""
    934 
    935 #. translators: %s is the name of the plugin.
    936 #: assets/admin/settings.js:11
    937 msgid "Track %s"
    938971msgstr ""
    939972
    940973#. translators: %s is the name of the plugin.
    941974#: assets/admin/settings.js:13
     975msgid "%s Integration"
     976msgstr ""
     977
     978#. translators: %s is the name of the plugin.
     979#: assets/admin/settings.js:16
     980msgid "Track %s"
     981msgstr ""
     982
     983#. translators: %s is the name of the plugin.
     984#: assets/admin/settings.js:19
    942985msgid "Activate the %s integration"
    943986msgstr ""
    944987
    945 #: assets/admin/settings.js:13
     988#: assets/admin/settings.js:19
    946989msgid "Retail"
    947990msgstr ""
    948991
    949 #: assets/admin/settings.js:13
     992#: assets/admin/settings.js:19
    950993msgid "Education"
    951994msgstr ""
    952995
    953 #: assets/admin/settings.js:13
     996#: assets/admin/settings.js:19
    954997msgid "Flights"
    955998msgstr ""
    956999
    957 #: assets/admin/settings.js:13
     1000#: assets/admin/settings.js:19
    9581001msgid "Hotel rental"
    9591002msgstr ""
    9601003
    961 #: assets/admin/settings.js:13
     1004#: assets/admin/settings.js:19
    9621005msgid "Jobs"
    9631006msgstr ""
    9641007
    965 #: assets/admin/settings.js:13
     1008#: assets/admin/settings.js:19
    9661009msgid "Local deals"
    9671010msgstr ""
    9681011
    969 #: assets/admin/settings.js:13
     1012#: assets/admin/settings.js:19
    9701013msgid "Real estate"
    9711014msgstr ""
    9721015
    973 #: assets/admin/settings.js:13
     1016#: assets/admin/settings.js:19
    9741017msgid "Travel"
    9751018msgstr ""
    9761019
    977 #: assets/admin/settings.js:13
     1020#: assets/admin/settings.js:19
    9781021msgid "Custom"
    9791022msgstr ""
    9801023
    981 #: assets/admin/settings.js:13
     1024#: assets/admin/settings.js:19
     1025msgid "Unlock with premium"
     1026msgstr ""
     1027
     1028#: assets/admin/settings.js:19
    9821029msgid "WooCommerce"
    9831030msgstr ""
    9841031
    985 #: assets/admin/settings.js:13
     1032#: assets/admin/settings.js:19
    9861033msgid "Basic settings"
    9871034msgstr ""
    9881035
    989 #: assets/admin/settings.js:13
     1036#: assets/admin/settings.js:19
    9901037msgid "Brand"
    9911038msgstr ""
    9921039
    993 #: assets/admin/settings.js:13
     1040#: assets/admin/settings.js:19
    9941041msgid "Select the taxonomy that is used for product brands"
    9951042msgstr ""
    9961043
    997 #: assets/admin/settings.js:13
     1044#: assets/admin/settings.js:19
    9981045msgid "Use SKU instead of ID"
    9991046msgstr ""
    10001047
    1001 #: assets/admin/settings.js:13
     1048#: assets/admin/settings.js:19
    10021049msgid "Use SKU instead of the product ID with fallback to ID if no SKU is set."
    10031050msgstr ""
    10041051
    1005 #: assets/admin/settings.js:13
     1052#: assets/admin/settings.js:19
    10061053msgid "Exclude tax"
    10071054msgstr ""
    10081055
    1009 #: assets/admin/settings.js:13
     1056#: assets/admin/settings.js:19
    10101057msgid "Exclude tax from prices and revenue"
    10111058msgstr ""
    10121059
    1013 #: assets/admin/settings.js:13
     1060#: assets/admin/settings.js:19
    10141061msgid "Exclude shipping from revenue"
    10151062msgstr ""
    10161063
    1017 #: assets/admin/settings.js:13
     1064#: assets/admin/settings.js:19
    10181065msgid "Include customer data"
    10191066msgstr ""
    10201067
    1021 #: assets/admin/settings.js:13
     1068#: assets/admin/settings.js:19
    10221069msgid "Enable this option to include customer data in the data layer on the \"purchase\" event."
    10231070msgstr ""
    10241071
    1025 #: assets/admin/settings.js:13
     1072#: assets/admin/settings.js:19
    10261073msgid "User-Provided Data"
    10271074msgstr ""
    10281075
    1029 #: assets/admin/settings.js:13
     1076#: assets/admin/settings.js:19
    10301077msgid "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'."
    10311078msgstr ""
    10321079
    1033 #: assets/admin/settings.js:13
     1080#: assets/admin/settings.js:19
    10341081msgid "Webhooks for server-side tracking"
    10351082msgstr ""
    10361083
    1037 #: assets/admin/settings.js:13
     1084#: assets/admin/settings.js:19
    10381085msgid "In order to use webhooks you must first enable Server-side Tagging by entering a sGTM Container Domain"
    10391086msgstr ""
    10401087
    1041 #: assets/admin/settings.js:13
     1088#: assets/admin/settings.js:19
    10421089msgid "Go to sGTM settings"
    10431090msgstr ""
    10441091
    1045 #: assets/admin/settings.js:13
     1092#: assets/admin/settings.js:19
    10461093msgid "In order to use webhooks you must configure you server-side container to handle the webhooks"
    10471094msgstr ""
    10481095
    1049 #: assets/admin/settings.js:13
     1096#: assets/admin/settings.js:19
    10501097#: assets/admin/wizard.js:1
    10511098msgid "Go to GTM Templates"
    10521099msgstr ""
    10531100
    1054 #: assets/admin/settings.js:13
     1101#: assets/admin/settings.js:19
    10551102msgid "Send webhooks to server GTM container"
    10561103msgstr ""
    10571104
    1058 #: assets/admin/settings.js:13
     1105#: assets/admin/settings.js:19
    10591106msgid "This option will allow webhooks to be sent to your server GTM container."
    10601107msgstr ""
    10611108
    1062 #: assets/admin/settings.js:13
     1109#: assets/admin/settings.js:19
    10631110msgid "Purchase webhook"
    10641111msgstr ""
    10651112
    1066 #: assets/admin/settings.js:13
     1113#: assets/admin/settings.js:19
    10671114msgid "Enable this option to include the permalink structure of the product base, category base, tag base and attribute base."
    10681115msgstr ""
    10691116
    1070 #: assets/admin/settings.js:13
     1117#: assets/admin/settings.js:19
    10711118msgid "Refund webhook"
    10721119msgstr ""
    10731120
    1074 #: assets/admin/settings.js:13
     1121#: assets/admin/settings.js:19
    10751122msgid "Enable this option to include the path of cart, checkout, order received and my account page."
    10761123msgstr ""
    10771124
    1078 #: assets/admin/settings.js:13
     1125#: assets/admin/settings.js:19
    10791126msgid "Event customization"
    10801127msgstr ""
    10811128
    1082 #: assets/admin/settings.js:13
     1129#: assets/admin/settings.js:19
    10831130msgid "Push view_item_list when the list is updated using a product filter."
    10841131msgstr ""
    10851132
    1086 #: assets/admin/settings.js:13
     1133#: assets/admin/settings.js:19
    10871134msgid "Only only push view_item_list once per per page for each list."
    10881135msgstr ""
    10891136
    1090 #: assets/admin/settings.js:13
     1137#: assets/admin/settings.js:19
    10911138msgid "Do you what to push the view_item_list event if the list is updated using a filter or just once per page view."
    10921139msgstr ""
    10931140
    1094 #: assets/admin/settings.js:13
     1141#: assets/admin/settings.js:19
    10951142msgid "Only push view_item on the master product"
    10961143msgstr ""
    10971144
    1098 #: assets/admin/settings.js:13
     1145#: assets/admin/settings.js:19
    10991146msgid "Push view_item on master and variation products (higher number of views)."
    11001147msgstr ""
    11011148
    1102 #: assets/admin/settings.js:13
     1149#: assets/admin/settings.js:19
    11031150msgid "Only push view_item on variation products."
    11041151msgstr ""
    11051152
    1106 #: assets/admin/settings.js:13
     1153#: assets/admin/settings.js:19
    11071154msgid "When do you want to fire the \"view_item\" event on variable products?"
    11081155msgstr ""
    11091156
    1110 #: assets/admin/settings.js:13
     1157#: assets/admin/settings.js:19
    11111158msgid "When the 'Place order' button is clicked"
    11121159msgstr ""
    11131160
    1114 #: assets/admin/settings.js:13
     1161#: assets/admin/settings.js:19
    11151162msgid "When a shipment method is selected with fallback to the 'Place order' button."
    11161163msgstr ""
    11171164
    1118 #: assets/admin/settings.js:13
     1165#: assets/admin/settings.js:19
    11191166msgid "Disable the 'add_shipment_info' event."
    11201167msgstr ""
    11211168
    1122 #: assets/admin/settings.js:13
     1169#: assets/admin/settings.js:19
    11231170msgid "When do you want to fire the \"add_shipment_info\" event?"
    11241171msgstr ""
    11251172
    1126 #: assets/admin/settings.js:13
     1173#: assets/admin/settings.js:19
    11271174msgid "When a payment method is selected with fallback to the 'Place order' button."
    11281175msgstr ""
    11291176
    1130 #: assets/admin/settings.js:13
     1177#: assets/admin/settings.js:19
    11311178msgid "Disable the 'add_payment_info' event."
    11321179msgstr ""
    11331180
    1134 #: assets/admin/settings.js:13
     1181#: assets/admin/settings.js:19
    11351182msgid "When do you want to fire the \"add_payment_info\" event?"
    11361183msgstr ""
    11371184
    1138 #: assets/admin/settings.js:13
     1185#: assets/admin/settings.js:19
    11391186msgid "Google Ads Settings"
    11401187msgstr ""
    11411188
    1142 #: assets/admin/settings.js:13
     1189#: assets/admin/settings.js:19
    11431190msgid "Google Business Vertical"
    11441191msgstr ""
    11451192
    1146 #: assets/admin/settings.js:13
     1193#: assets/admin/settings.js:19
    11471194msgid "In order to use Google Ads Remarketing you must select your business type (vertical)."
    11481195msgstr ""
    11491196
    1150 #: assets/admin/settings.js:13
     1197#: assets/admin/settings.js:19
    11511198msgid "Product ID prefix"
    11521199msgstr ""
    11531200
    1154 #: assets/admin/settings.js:13
     1201#: assets/admin/settings.js:19
    11551202msgid "Enter prefix"
    11561203msgstr ""
    11571204
    1158 #: assets/admin/settings.js:13
     1205#: assets/admin/settings.js:19
    11591206msgid "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."
    11601207msgstr ""
    11611208
    1162 #: assets/admin/settings.js:13
     1209#: assets/admin/settings.js:19
    11631210msgid "Custom CSS Selectors"
    11641211msgstr ""
    11651212
    1166 #: assets/admin/settings.js:13
     1213#: assets/admin/settings.js:19
    11671214msgid "If your shop is not compatible with the default CSS selectors you can specify your own CSS selectors."
    11681215msgstr ""
    11691216
    1170 #: assets/admin/settings.js:13
     1217#: assets/admin/settings.js:19
    11711218msgid "Single Product (add_to_wishlist):"
    11721219msgstr ""
    11731220
    1174 #: assets/admin/settings.js:13
     1221#: assets/admin/settings.js:19
    11751222msgid "Enter CSS selector"
    11761223msgstr ""
    11771224
    1178 #: assets/admin/settings.js:13
     1225#: assets/admin/settings.js:19
    11791226msgid "Enter the CSS selector that matches button, which should be use to fire the add_to_wishlist event."
    11801227msgstr ""
    11811228
    1182 #: assets/admin/settings.js:13
     1229#: assets/admin/settings.js:19
    11831230msgid "Product List (select_item):"
    11841231msgstr ""
    11851232
    1186 #: assets/admin/settings.js:13
     1233#: assets/admin/settings.js:19
    11871234msgid "Enter the CSS selector that matches your product list item, which should be use to fire the select_item event."
    11881235msgstr ""
    11891236
    1190 #: assets/admin/settings.js:13
     1237#: assets/admin/settings.js:19
    11911238msgid "Product List (add_to_wishlist):"
    11921239msgstr ""
    11931240
    1194 #: assets/admin/settings.js:13
     1241#: assets/admin/settings.js:19
    11951242msgid "Advanced Settings"
    11961243msgstr ""
    11971244
    1198 #: assets/admin/settings.js:13
     1245#: assets/admin/settings.js:19
    11991246msgid "Dequeue the default JavaScript"
    12001247msgstr ""
    12011248
    1202 #: assets/admin/settings.js:13
     1249#: assets/admin/settings.js:19
    12031250msgid "Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript."
    12041251msgstr ""
    12051252
    1206 #: assets/admin/settings.js:13
     1253#: assets/admin/settings.js:19
    12071254msgid "Include permalink structure"
    12081255msgstr ""
    12091256
    1210 #: assets/admin/settings.js:13
     1257#: assets/admin/settings.js:19
    12111258msgid "Include path of pages"
    12121259msgstr ""
    12131260
    1214 #: assets/admin/settings.js:13
     1261#: assets/admin/settings.js:19
    12151262msgid "Contact Form 7"
    12161263msgstr ""
    12171264
    1218 #: assets/admin/settings.js:13
     1265#: assets/admin/settings.js:19
    12191266msgid "Basic Settings"
    12201267msgstr ""
    12211268
    1222 #: assets/admin/settings.js:13
     1269#: assets/admin/settings.js:19
    12231270msgid "Load JavaScript"
    12241271msgstr ""
    12251272
    1226 #: assets/admin/settings.js:13
     1273#: assets/admin/settings.js:19
    12271274msgid "Only on pages where the Contact Form 7 script is registered (recommended)."
    12281275msgstr ""
    12291276
    1230 #: assets/admin/settings.js:13
     1277#: assets/admin/settings.js:19
    12311278msgid "On all pages"
    12321279msgstr ""
    12331280
    1234 #: assets/admin/settings.js:13
     1281#: assets/admin/settings.js:19
    12351282msgid "Where do you want load the JavaScript?"
    12361283msgstr ""
    12371284
    1238 #: assets/admin/settings.js:13
     1285#: assets/admin/settings.js:19
    12391286msgid "Easy Digital Downloads"
    12401287msgstr ""
    12411288
    1242 #: assets/admin/settings.js:13
     1289#: assets/admin/settings.js:19
    12431290msgid "Advanced settings"
    12441291msgstr ""
    12451292
    1246 #: assets/admin/settings.js:13
     1293#: assets/admin/settings.js:19
    12471294msgid "Get template"
    12481295msgstr ""
    12491296
    1250 #: assets/admin/settings.js:13
     1297#: assets/admin/settings.js:19
    12511298#: assets/admin/wizard.js:1
    12521299msgid "Getting Started"
    12531300msgstr ""
    12541301
    1255 #: assets/admin/settings.js:13
     1302#: assets/admin/settings.js:19
    12561303msgid "Configure your Google Tag Manager container"
    12571304msgstr ""
    12581305
    1259 #: assets/admin/settings.js:13
     1306#: assets/admin/settings.js:19
    12601307msgid "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."
    12611308msgstr ""
    12621309
    1263 #: assets/admin/settings.js:13
     1310#: assets/admin/settings.js:19
    12641311msgid "Below you will find GTM container template files, with all the necessary tags, trigger, and variables."
    12651312msgstr ""
    12661313
    1267 #: assets/admin/settings.js:13
     1314#: assets/admin/settings.js:19
    12681315msgid "Please read the guide on how to use the import files and configure GTM."
    12691316msgstr ""
    12701317
    1271 #: assets/admin/settings.js:13
     1318#: assets/admin/settings.js:19
    12721319msgid "Read the guide"
    12731320msgstr ""
    12741321
    1275 #: assets/admin/settings.js:13
    1276 #: assets/admin/settings.js:15
     1322#: assets/admin/settings.js:19
     1323#: assets/admin/settings.js:22
    12771324msgid "Templates"
    12781325msgstr ""
    12791326
    1280 #: assets/admin/settings.js:13
     1327#: assets/admin/settings.js:19
    12811328msgid "GTM container import files:"
    12821329msgstr ""
    12831330
    1284 #: assets/admin/settings.js:13
     1331#: assets/admin/settings.js:19
    12851332msgid "Necessary modifications:"
    12861333msgstr ""
    12871334
    1288 #: assets/admin/settings.js:13
     1335#: assets/admin/settings.js:19
    12891336msgid "Need help?"
    12901337msgstr ""
    12911338
    1292 #: assets/admin/settings.js:13
     1339#: assets/admin/settings.js:19
    12931340msgid "We are here to help if you have any questions."
    12941341msgstr ""
    12951342
    1296 #: assets/admin/settings.js:13
     1343#: assets/admin/settings.js:19
    12971344msgid "See support options"
    12981345msgstr ""
    12991346
    1300 #: assets/admin/settings.js:13
     1347#: assets/admin/settings.js:19
    13011348msgid "Get support"
    13021349msgstr ""
    13031350
    1304 #: assets/admin/settings.js:13
     1351#: assets/admin/settings.js:19
    13051352msgid "Support options"
    13061353msgstr ""
    13071354
    1308 #: assets/admin/settings.js:13
     1355#: assets/admin/settings.js:19
     1356msgid "WooCommerce Premium Support"
     1357msgstr ""
     1358
     1359#: assets/admin/settings.js:19
    13091360msgid "WordPress.org Support Forum"
    13101361msgstr ""
    13111362
    1312 #: assets/admin/settings.js:13
     1363#: assets/admin/settings.js:19
    13131364msgid "GITHub repository"
    13141365msgstr ""
    13151366
    1316 #: assets/admin/settings.js:13
     1367#: assets/admin/settings.js:19
    13171368msgid "Plugin Homepage"
    13181369msgstr ""
    13191370
    1320 #: assets/admin/settings.js:13
     1371#: assets/admin/settings.js:19
    13211372msgid "Share system data with the GTM Kit support team"
    13221373msgstr ""
    13231374
    1324 #: assets/admin/settings.js:13
     1375#: assets/admin/settings.js:19
    13251376msgid "If the GTM Kit support team has asked you to send your system data you can do so by entering the support ticket below:"
    13261377msgstr ""
    13271378
    1328 #: assets/admin/settings.js:13
     1379#: assets/admin/settings.js:19
    13291380msgid "Enter support ticket"
    13301381msgstr ""
    13311382
    1332 #: assets/admin/settings.js:13
     1383#: assets/admin/settings.js:19
    13331384msgid "Send system data"
    13341385msgstr ""
    13351386
    1336 #: assets/admin/settings.js:13
     1387#: assets/admin/settings.js:19
    13371388msgid "About GTM Kit"
    13381389msgstr ""
    13391390
    1340 #: assets/admin/settings.js:13
     1391#: assets/admin/settings.js:19
    13411392msgid "Version:"
    13421393msgstr ""
    13431394
    1344 #: assets/admin/settings.js:13
     1395#: assets/admin/settings.js:19
    13451396msgid "Learn about changes and follow the development of GTM Kit:"
    13461397msgstr ""
    13471398
    1348 #: assets/admin/settings.js:13
     1399#: assets/admin/settings.js:19
    13491400msgid "The changelog"
    13501401msgstr ""
    13511402
    1352 #: assets/admin/settings.js:13
     1403#: assets/admin/settings.js:19
    13531404msgid "The GitHub repository"
    13541405msgstr ""
    13551406
    13561407#. translators: %d is number %s can be either 'problem' or 'notification'.
    1357 #: assets/admin/settings.js:15
     1408#: assets/admin/settings.js:22
    13581409msgid "You have %d hidden %s:"
    13591410msgid_plural "You have %d hidden %ss:"
     
    13611412msgstr[1] ""
    13621413
    1363 #: assets/admin/settings.js:15
     1414#: assets/admin/settings.js:22
    13641415msgid "Problems"
    13651416msgstr ""
    13661417
    1367 #: assets/admin/settings.js:15
     1418#: assets/admin/settings.js:22
     1419msgid "Enhanced Compatibility"
     1420msgstr ""
     1421
     1422#: assets/admin/settings.js:22
     1423msgid "Based on the currently active theme and plugins, you will gain the following features tailored specifically to your setup if you upgrade to the GTM Kit Woo Add-On:"
     1424msgstr ""
     1425
     1426#: assets/admin/settings.js:22
     1427msgid "Your theme is supported with enhanced compatibility."
     1428msgstr ""
     1429
     1430#: assets/admin/settings.js:22
     1431msgid "Enhanced Plugin Support:"
     1432msgstr ""
     1433
     1434#: assets/admin/settings.js:22
     1435msgid "Learn More"
     1436msgstr ""
     1437
     1438#: assets/admin/settings.js:22
    13681439msgid "Google Tag Manager Templates"
    13691440msgstr ""
    13701441
    1371 #: assets/admin/settings.js:15
     1442#: assets/admin/settings.js:22
    13721443msgid "Dashboard"
    13731444msgstr ""
    13741445
    1375 #: assets/admin/settings.js:15
     1446#: assets/admin/settings.js:22
    13761447msgid "Container"
    13771448msgstr ""
    13781449
    1379 #: assets/admin/settings.js:15
     1450#: assets/admin/settings.js:22
    13801451msgid "User data"
    13811452msgstr ""
    13821453
    1383 #: assets/admin/settings.js:15
     1454#: assets/admin/settings.js:22
    13841455msgid "Support"
    13851456msgstr ""
  • gtm-kit/trunk/readme.txt

    r3149785 r3156080  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.6
    6 Stable tag: 2.0.0
     6Stable tag: 2.0.1
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    9292== Changelog ==
    9393
    94 = 2.0 =
     94= 2.0.1 =
     95
     96Release date: 2024-09-23
     97
     98#### Bugfixes:
     99* Fix an edge case that could cause a fatal error in admin_body_class().
     100
     101= 2.0.0 =
    95102
    96103Release date: 2024-09-DD
  • gtm-kit/trunk/src/Admin/AbstractOptionsPage.php

    r3149785 r3156080  
    166166     * Add body class.
    167167     *
    168      * @param string $classes The body classes.
    169      *
    170      * @return string
    171      */
    172     public function admin_body_class( string $classes ): string {
     168     * @param string|null $classes The body classes.
     169     *
     170     * @return string
     171     */
     172    public function admin_body_class( ?string $classes ): string {
     173        $classes = $classes ?? '';
    173174
    174175        $page_parent = get_admin_page_parent();
  • gtm-kit/trunk/src/Admin/GeneralOptionsPage.php

    r3149785 r3156080  
    124124            'gtmkitSettings',
    125125            [
    126                 'rootId'          => 'gtmkit-settings',
    127                 'currentPage'     => $page_slug,
    128                 'root'            => \esc_url_raw( rest_url() ),
    129                 'nonce'           => \wp_create_nonce( 'wp_rest' ),
    130                 'tutorials'       => $this->get_tutorials(),
    131                 'integrations'    => Integrations::get_integrations(),
    132                 'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    133                 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    134                 'settings'        => $this->options->get_all_raw(),
    135                 'site_data'       => $this->util->get_site_data( $this->options->get_all_raw() ),
    136                 'user_roles'      => $this->get_user_roles(),
    137                 'notifications'   => $this->get_notifications(),
     126                'rootId'        => 'gtmkit-settings',
     127                'currentPage'   => $page_slug,
     128                'root'          => \esc_url_raw( rest_url() ),
     129                'nonce'         => \wp_create_nonce( 'wp_rest' ),
     130                'tutorials'     => $this->get_tutorials(),
     131                'integrations'  => Integrations::get_integrations(),
     132                'adminPageUrl'  => $this->util->get_admin_page_url(),
     133                'settings'      => $this->options->get_all_raw(),
     134                'site_data'     => $this->util->get_site_data( $this->options->get_all_raw() ),
     135                'user_roles'    => $this->get_user_roles(),
     136                'notifications' => $this->get_notifications(),
    138137            ]
    139138        );
  • gtm-kit/trunk/src/Admin/HelpOptionsPage.php

    r3149785 r3156080  
    8888            'gtmkitSettings',
    8989            [
    90                 'rootId'          => 'gtmkit-settings',
    91                 'currentPage'     => $page_slug,
    92                 'root'            => \esc_url_raw( rest_url() ),
    93                 'nonce'           => \wp_create_nonce( 'wp_rest' ),
    94                 'tutorials'       => $this->get_tutorials(),
    95                 'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    96                 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    97                 'settings'        => $this->options->get_all_raw(),
    98                 'site_data'       => [ 'gtmkit_version' => GTMKIT_VERSION ],
    99                 'isPremium'       => ( new PremiumConditional() )->is_met(),
     90                'rootId'       => 'gtmkit-settings',
     91                'currentPage'  => $page_slug,
     92                'root'         => \esc_url_raw( rest_url() ),
     93                'nonce'        => \wp_create_nonce( 'wp_rest' ),
     94                'tutorials'    => $this->get_tutorials(),
     95                'adminPageUrl' => $this->util->get_admin_page_url(),
     96                'settings'     => $this->options->get_all_raw(),
     97                'site_data'    => [ 'gtmkit_version' => GTMKIT_VERSION ],
     98                'isPremium'    => ( new PremiumConditional() )->is_met(),
    10099            ]
    101100        );
  • gtm-kit/trunk/src/Admin/IntegrationsOptionsPage.php

    r3149785 r3156080  
    115115                'isPremium'        => ( new PremiumConditional() )->is_met(),
    116116                'integrations'     => Integrations::get_integrations(),
    117                 'dashboardUrl'     => \menu_page_url( 'gtmkit_general', false ),
    118                 'integrationsUrl'  => \menu_page_url( 'gtmkit_integrations', false ),
    119                 'templatesUrl'     => \menu_page_url( 'gtmkit_templates', false ),
    120                 'pluginInstallUrl' => $admin_url . 'plugin-install.php?tab=search&type=term&s=',
     117                'adminPageUrl'     => $this->util->get_admin_page_url(),
     118                'pluginInstallUrl' => $this->util->get_plugin_install_url(),
    121119                'plugins'          => $this->get_plugins(),
    122120                'taxonomyOptions'  => $taxonomy_options,
  • gtm-kit/trunk/src/Admin/PluginSuggestions.php

    r3149785 r3156080  
    1111use TLA_Media\GTM_Kit\Common\Conditionals\PremiumConditional;
    1212use TLA_Media\GTM_Kit\Common\Conditionals\WooCommerceConditional;
     13use TLA_Media\GTM_Kit\Common\Util;
    1314use TLA_Media\GTM_Kit\Options;
    1415
     
    3334
    3435    /**
     36     * An instance of Util.
     37     *
     38     * @var Util
     39     */
     40    private Util $util;
     41
     42    /**
    3543     * Constructor.
    3644     *
    3745     * @param NotificationsHandler $notifications_handler The notifications handler to add notifications to.
    3846     * @param PluginAvailability   $plugin_availability Plugin Availability.
    39      */
    40     public function __construct( NotificationsHandler $notifications_handler, PluginAvailability $plugin_availability ) {
     47     * @param Util                 $util Util.
     48     */
     49    public function __construct( NotificationsHandler $notifications_handler, PluginAvailability $plugin_availability, Util $util ) {
    4150        $this->notifications_handler = $notifications_handler;
    4251        $this->plugin_availability   = $plugin_availability;
     52        $this->util                  = $util;
    4353    }
    4454
     
    4858     * @param NotificationsHandler $notifications_handler The notifications handler to add notifications to.
    4959     * @param PluginAvailability   $plugin_availability Plugin Availability.
    50      *
    51      * @return void
    52      */
    53     public static function register( NotificationsHandler $notifications_handler, PluginAvailability $plugin_availability ): void {
    54         $page = new self( $notifications_handler, $plugin_availability );
     60     * @param Util                 $util Util.
     61     *
     62     * @return void
     63     */
     64    public static function register( NotificationsHandler $notifications_handler, PluginAvailability $plugin_availability, Util $util ): void {
     65        $page = new self( $notifications_handler, $plugin_availability, $util );
    5566
    5667        add_action( 'admin_init', [ $page->plugin_availability, 'register' ] );
     
    304315    protected function get_gf_wishlist_plugin_notification( string $notification_id ): Notification {
    305316
    306         $link_1 = '<a href="https://jump.gtmkit.com/link/2-30DDC" class="gtmkit-text-color-primary gtmkit hover:gtmkit-underline gtmkit-font-bold">GTM Kit Woo Add-On</a>';
    307         $link_2 = '<a href="https://jump.gtmkit.com/link/3-63585" class="gtmkit-text-color-primary gtmkit hover:gtmkit-underline gtmkit-font-bold">Grandfathered Wishlist Functionality</a>';
     317        $upgrades_url = $this->util->get_admin_page_url() . 'upgrades';
     318        $link_1       = '<a href="' . $upgrades_url . '" class="gtmkit-text-color-primary gtmkit hover:gtmkit-underline gtmkit-font-bold">GTM Kit Woo Add-On</a>';
     319        $link_2       = '<a href="https://jump.gtmkit.com/link/3-63585" class="gtmkit-text-color-primary gtmkit hover:gtmkit-underline gtmkit-font-bold">Grandfathered Wishlist Functionality</a>';
    308320
    309321        $message = sprintf(
  • gtm-kit/trunk/src/Admin/SetupWizard.php

    r3149785 r3156080  
    147147                'root'         => esc_url_raw( rest_url() ),
    148148                'nonce'        => wp_create_nonce( 'wp_rest' ),
    149                 'dashboardUrl' => menu_page_url( 'gtmkit_general', false ),
    150                 'templatesUrl' => menu_page_url( 'gtmkit_templates', false ),
    151                 'helpUrl'      => menu_page_url( 'gtmkit_help', false ),
     149                'adminPageUrl' => $this->util->get_admin_page_url(),
    152150                'settings'     => $this->options->get_all_raw(),
    153151                'site_data'    => $this->util->get_site_data( $this->options->get_all_raw() ),
  • gtm-kit/trunk/src/Admin/TemplatesOptionsPage.php

    r3149785 r3156080  
    8686            'gtmkitSettings',
    8787            [
    88                 'rootId'          => 'gtmkit-settings',
    89                 'currentPage'     => $page_slug,
    90                 'root'            => \esc_url_raw( rest_url() ),
    91                 'nonce'           => \wp_create_nonce( 'wp_rest' ),
    92                 'templates'       => $this->get_templates(),
    93                 'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    94                 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    95                 'templatesUrl'    => \menu_page_url( 'gtmkit_templates', false ),
    96                 'settings'        => $this->options->get_all_raw(),
     88                'rootId'       => 'gtmkit-settings',
     89                'currentPage'  => $page_slug,
     90                'root'         => \esc_url_raw( rest_url() ),
     91                'nonce'        => \wp_create_nonce( 'wp_rest' ),
     92                'templates'    => $this->get_templates(),
     93                'adminPageUrl' => $this->util->get_admin_page_url(),
     94                'settings'     => $this->options->get_all_raw(),
    9795            ]
    9896        );
  • gtm-kit/trunk/src/Admin/UpgradesOptionsPage.php

    r3149785 r3156080  
    8888            'gtmkitSettings',
    8989            [
    90                 'rootId'          => 'gtmkit-settings',
    91                 'currentPage'     => $page_slug,
    92                 'root'            => \esc_url_raw( rest_url() ),
    93                 'nonce'           => \wp_create_nonce( 'wp_rest' ),
    94                 'opportunities'   => $this->get_upgrade_opportunities(),
    95                 'dashboardUrl'    => \menu_page_url( 'gtmkit_general', false ),
    96                 'integrationsUrl' => \menu_page_url( 'gtmkit_integrations', false ),
    97                 'settings'        => $this->options->get_all_raw(),
     90                'rootId'        => 'gtmkit-settings',
     91                'currentPage'   => $page_slug,
     92                'root'          => \esc_url_raw( rest_url() ),
     93                'nonce'         => \wp_create_nonce( 'wp_rest' ),
     94                'opportunities' => $this->get_upgrade_opportunities(),
     95                'adminPageUrl'  => $this->util->get_admin_page_url(),
     96                'settings'      => $this->options->get_all_raw(),
    9897            ]
    9998        );
  • gtm-kit/trunk/src/Common/Util.php

    r3149785 r3156080  
    209209
    210210        if ( ! function_exists( 'get_plugins' ) ) {
     211            // @phpstan-ignore-next-line
    211212            require_once ABSPATH . 'wp-admin/includes/plugin.php';
    212213        }
     
    452453        return $this->normalize_and_hash( $hash_algorithm, $normalized_email, true );
    453454    }
     455
     456    /**
     457     * Get admin page base URL
     458     *
     459     * @return string
     460     */
     461    public function get_admin_page_url(): string {
     462        return $this->get_admin_url() . 'admin.php?page=gtmkit_';
     463    }
     464
     465    /**
     466     * Get the plugin install URL
     467     *
     468     * @return string
     469     */
     470    public function get_plugin_install_url(): string {
     471        return $this->get_admin_url() . 'plugin-install.php?tab=search&type=term&s=';
     472    }
     473
     474    /**
     475     * Get admin url
     476     *
     477     * @return string
     478     */
     479    private function get_admin_url(): string {
     480        return is_network_admin() ? network_admin_url() : admin_url();
     481    }
    454482}
  • gtm-kit/trunk/src/Installation/PluginDataImport.php

    r3149785 r3156080  
    234234    private function is_plugin_active( string $plugin ): bool {
    235235        if ( ! function_exists( 'is_plugin_active' ) ) {
    236 
     236            // @phpstan-ignore-next-line
    237237            require_once ABSPATH . 'wp-admin/includes/plugin.php';
    238238
  • gtm-kit/trunk/src/Installation/Upgrade.php

    r3149785 r3156080  
    163163
    164164        if ( ! function_exists( 'get_plugins' ) ) {
     165            // @phpstan-ignore-next-line
    165166            require_once ABSPATH . 'wp-admin/includes/plugin.php';
    166167        }
  • gtm-kit/trunk/src/Integration/EasyDigitalDownloads.php

    r3149785 r3156080  
    485485     * @return float
    486486     */
    487     public function get_price_to_display( int $download_id, string $price_index = null ): float {
     487    public function get_price_to_display( int $download_id, ?string $price_index = null ): float {
    488488
    489489        if ( edd_has_variable_prices( $download_id ) ) {
  • gtm-kit/trunk/src/Options.php

    r3149785 r3156080  
    149149
    150150        if ( ! function_exists( 'is_plugin_active' ) ) {
     151            // @phpstan-ignore-next-line
    151152            require_once ABSPATH . 'wp-admin/includes/plugin.php';
    152153        }
  • gtm-kit/trunk/vendor/composer/installed.php

    r3149785 r3156080  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '8f779ad9f08f3aeba4a68076cd25114917840707',
     6        'reference' => 'b3228238bcfd8a33cbd843ee052f21ca9b557927',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '8f779ad9f08f3aeba4a68076cd25114917840707',
     16            'reference' => 'b3228238bcfd8a33cbd843ee052f21ca9b557927',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.