"use strict";(self.webpackChunkwoo_commerce_com=self.webpackChunkwoo_commerce_com||[]).push([[3940],{9039:(e,t,n)=>{var o=n(1386),c=n(2470);const r=()=>((0,o.useEffect)((()=>{function e(){window.scrollTo(0,0)}return window.addEventListener("scrollToTop",e),()=>{window.removeEventListener("scrollToTop",e)}}),[]),null);function s(){return document.querySelectorAll(".wccom-comp-explat-experiment").length}const a=()=>{const e=window.location.hash;return e?e.replace("#",""):null};let i=!1;const l=()=>{!function(){if(i)return;i=!0;const e=document.referrer;if(!e)return;const t=new URL(e);t.hostname===window.location.hostname&&t.pathname!==window.location.pathname&&"/start/"!==t.pathname&&sessionStorage.setItem("nuxReferrer",e)}();const e=document.body.classList.contains("logged-in")?"/my-dashboard/":"/";let t=sessionStorage.getItem("nuxReferrer")||e;t.startsWith("http")||(t=window.location.origin+t);const n=new URL(t);return n.searchParams.set("nuxexit","1"),n.toString()},u="start",d="nux-step-show",m=e=>!!e&&Boolean(document.querySelector("#page-content > #".concat(e)));var h=n(1926),w=n(7677),p=n(6246);const f=(0,o.createElement)(p.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(p.wA,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),x=(0,o.createElement)(p.t4,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(p.wA,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));var g=n(8221),v=n.n(g),_=n(8207),E=n(4848);const b=e=>{let{stepId:t}=e;const n=t?(e=>{if(!e)return null;const t=document.querySelector('#page-content a[href="#'.concat(e,'"]'));if(!t)return null;const n=t.closest("#page-content > [id]");return(null==n?void 0:n.id)||null})(t):null,r=(0,o.useRef)(null),s=(0,o.useRef)(null),a=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{const e=e=>{"Enter"===e.key&&(a.current=!0,setTimeout((()=>{a.current=!1}),100))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[]),(0,o.useEffect)((()=>{a.current&&(n&&s.current?setTimeout((()=>{var e;null===(e=s.current)||void 0===e||e.focus()}),50):r.current&&setTimeout((()=>{var e;null===(e=r.current)||void 0===e||e.focus()}),50))}),[n]),(0,o.useEffect)((()=>{const e=v()((()=>{const e=document.getElementById("page-content"),t=document.querySelector(".nux-header");if(!e||!t)return;const n=t.getBoundingClientRect();e.getBoundingClientRect().top<=n.bottom?t.classList.add("nux-header--shadow"):t.classList.remove("nux-header--shadow")}),62.5);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}),[]),(0,E.jsxs)("nav",{className:"nux-header",children:[(0,E.jsxs)("div",{className:"nux-header__left",children:[(0,E.jsx)("a",{className:"nux-header__logo",href:"/?nuxexit=1",children:(0,E.jsx)(_.A,{})}),n&&(0,E.jsx)("div",{className:"nux-header__back-button-container",children:(0,E.jsxs)("a",{ref:s,href:"#".concat(n),className:"nux-header__back-button","aria-label":(0,c.sprintf)((0,c.__)("Current step: %s. Go back to the previous step","wccom"),t),children:[(0,E.jsx)("span",{className:"nux-header__back-button__icon",children:(0,E.jsx)(w.A,{icon:f,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})}),(0,c.__)("Back","wccom")]})})]}),(0,E.jsx)("div",{className:"nux-header__right",children:(0,E.jsx)("a",{ref:r,href:l(),className:"nux-header__close","aria-label":(0,c.sprintf)((0,c.__)("Current step: %s. Return to the homepage","wccom"),t),children:(0,E.jsx)(w.A,{icon:x,size:24})})})]})},L=()=>{const e=0{const[,e]=(0,o.useState)();return(0,o.useCallback)((t=>{e((()=>{throw t}))}),[e])})(),p=(0,o.useCallback)((()=>{const e=a()||u;let t=null;m(e)?t=e:m(u)&&(t=u),t?(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n="#".concat(e);window.location.hash=n,t&&window.history.replaceState(null,"","".concat(window.location.origin).concat(window.location.pathname).concat(n))}(t,!0),l(t)):w(new Error("No step with id #".concat(t||""," found.")))}),[]),f=(0,o.useCallback)((()=>{var e;!function(){const e="".concat(window.location.origin).concat(window.location.pathname);document.querySelectorAll("#page-content form").forEach((t=>{if(e.endsWith(t.action)){const e=t.closest("#page-content > [id]");e&&(t.action+="#"+e.id)}}))}(),p(),null===(e=document.getElementById("page-content"))||void 0===e||e.classList.add("initialized")}),[]);return(0,o.useEffect)((()=>{t&&new Promise((e=>{const t=document.getElementById("page-content");if(!t)return void e();const n=()=>document.querySelectorAll(".wp-block-wccom-explat-content").length;if(n()===s())return void e();const o=new MutationObserver((()=>{n()===s()&&(o.disconnect(),e())}));o.observe(t,{childList:!0,subtree:!0})})).then((()=>{n(!1),f()}))}),[t,f]),(0,o.useEffect)((()=>{e||f()}),[f]),(0,o.useEffect)((()=>{window.addEventListener("hashchange",(()=>{const e=a()||u;m(e)?l(e):p()}))}),[]),(0,o.useEffect)((()=>{if(!i)return;const e=document.getElementById(i);if(e){const t=document.querySelector(".".concat(d));t&&t!==e&&t.classList.remove(d),e.classList.add(d)}const t=new Event("scrollToTop");window.dispatchEvent(t)}),[i]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{}),t?(0,E.jsxs)("div",{className:"wccom-nux-loading",children:[(0,E.jsx)("p",{className:"wccom-nux-loading__text",children:(0,c.__)("Loading","wccom")}),(0,E.jsx)(h.A,{})]}):(0,E.jsx)(b,{stepId:i})]})};class k extends o.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?null:this.props.children}}const y=k;var j=n(1119);function A(){return window.location.hash.replace("#","")}window.addEventListener("popstate",(function(){(0,j.A)("page_viewed",{step:A(),page:window.location.pathname})}),{passive:!0});const S=new URLSearchParams(window.location.search).get("nuxentrysource");function C(e){const t=e.target;if(t.closest(".nux-header__close"))return void(0,j.A)("nux_closed",{page:window.location.pathname,step:A()});if(t.closest("a.nux-header__logo"))return void(0,j.A)("nux_logo_clicked",{page:window.location.pathname,step:A()});const n=t.closest(".nux-header__back-button");if(n)return void(0,j.A)("nux_back_clicked",{next_url:n.href,step:A()});if(t.closest("#start")){const e=t.innerText.replace(//,"").trim();(0,j.A)("nux_user_profile",{business_choice:e})}if(t.closest(".hosting-card")){var o;const e=t.innerText.replace("Visit ","").trim();(0,j.A)("nux_hosting",{host_name:e,host:null!==(o=t.getAttribute("href"))&&void 0!==o?o:""})}const c=t.closest(".wp-block-wccom-nux-step");c&&(0,j.A)("nux_item_clicked",{url:c.href,step:A()})}S&&(0,j.A)("nux_entry",{step:A(),page:window.location.pathname,location:S}),(0,j.A)("nux_entered",{step:A(),page:window.location.pathname,source:S}),function(){function e(){const e=document.querySelector(".page-template-template-nux");e&&e.addEventListener("click",C,{passive:!0,capture:!0})}"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}(),function(){function e(){const e=document.getElementById("wc-start");e?(0,o.createRoot)(e).render((0,E.jsx)(y,{children:(0,E.jsx)(L,{})})):window.location.href="/"}"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}()}},e=>{e.O(0,[2397],(()=>e(e.s=9039))),e.O()}]);; /*! js-cookie v3.0.5 | MIT */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,function(){"use strict";function e(e){for(var t=1;t{var c,r;window.wccom=window.wccom||{},wccom.fireTracksEvent=function(c,r,t){var e;c.match(/^[a-z_][a-z0-9_]*$/),null!==(e=window)&&void 0!==e&&null!==(e=e.localStorage)&&void 0!==e&&e.getItem("wccom-tracks-debug");const a=()=>{void 0===r&&(r={}),wccom.fillReferer(r),r.current_url=window.location.href;const t=new FormData;t.append("action","woothemes_tracks_ajax"),t.append("event_name",c);for(const c of Object.keys(r))t.append("properties["+c+"]",r[c]);if(navigator.sendBeacon){const c=navigator.sendBeacon(wteVars.ajaxurl,t);if(wccom.isFiringFirstTrack=!1,c)return void(wccom.hasFiredFirstTrack=!0)}const e={action:"woothemes_tracks_ajax",event_name:c,properties:r};jQuery.post(wteVars.ajaxurl,e).done((function(){wccom.hasFiredFirstTrack=!0,wccom.isFiringFirstTrack=!1})).fail((function(){wccom.isFiringFirstTrack=!1}))};(t||wccom.canTrackUser("analytics"))&&wccom.canFireTrack()?(wccom.hasFiredFirstTrack||(wccom.isFiringFirstTrack=!0),a()):wccom.addTrackCallback(a)},wccom.waitUntilCanSendTracks=function(){return new Promise((c=>{setTimeout((function r(){wccom.canTrackUser("analytics")&&wccom.canFireTrack()?c():setTimeout(r,250)}),0)}))},wccom.addTrackCallback=(c=[],r=null,function(t){"function"==typeof t&&(c.push(t),r||(r=wccom.waitUntilCanSendTracks()).then((()=>(c.forEach((c=>c())),void(c=[])))))}),wccom.hasFiredFirstTrack=!1,wccom.isFiringFirstTrack=!1,wccom.isTrackIdSet=function(){return Boolean(function(){let c="";const r=("; "+document.cookie).split("; woo_tk_ai=");return 2===r.length&&(c=r.pop().split(";").shift()),c}())},wccom.canFireTrack=function(){const c="1"===wteVars.authenticated;return wccom.isTrackIdSet()||c||!wccom.hasFiredFirstTrack&&!wccom.isFiringFirstTrack},wccom.fillReferer=function(c){void 0!==c._via_ref&&""!==c._via_ref||(c._via_ref=""!==document.referrer?document.referrer:window.location.href)},jQuery((function(){jQuery("#subscription-download").on("click",(function(){var c=jQuery(this).data("product-name");wccom.fireTracksEvent("subscription_download",{product_name:c})})),jQuery("#normal-download").on("click",(function(){var c=jQuery(this).data("product-name");wccom.fireTracksEvent("normal_download",{product_name:c})})),jQuery("#wc-install-button").on("click",(function(){wccom.fireTracksEvent("woocommerce_install")})),jQuery("#theme_demo_link").on("click",(function(){var c;c=jQuery(this).data("theme-name"),wccom.fireTracksEvent("demo_link_clicked",{product_name:c})})),jQuery("#theme_buynow_link").on("click",(function(){var c;c=jQuery(this).data("theme-name"),wccom.fireTracksEvent("buy_now_link_clicked",{product_name:c})})),jQuery(document).on("wtTracksRecord",(function(c){wccom.fireTracksEvent(c.detail.name,c.detail.props)})),jQuery(".wccom-breadcrumb a").on("click",(function(c){var r={label:c.delegateTarget.text,href:c.delegateTarget.href,url:document.location.href};wccom.fireTracksEvent("bread_crumb_clicked",r)})),jQuery(document).on("click",".single_add_to_cart_button",(function(c){var r=c.currentTarget.dataset.tracksPosition,t=c.currentTarget.dataset.tracksIs_paid,e=c.currentTarget.dataset.tracksIs_freemium,a=c.currentTarget.dataset.tracksFreemium_type,n=c.currentTarget.dataset.tracksIs_trending,o=c.currentTarget.dataset.tracksSource,i=c.currentTarget.dataset.tracksProductId,s=c.currentTarget.dataset.tracksIsBusinessService,u=c.currentTarget.dataset.tracksSubscription_plan,d=c.currentTarget.dataset.tracksPage_type,m={position:r,is_paid:t,is_trending:n,is_freemium:e,is_business_service:s,product_id:i,source:o};void 0!==a&&(m.freemium_type=a),void 0!==u&&(m.subscription_plan=u),void 0!==d&&(m.page_type=d);var l=new URLSearchParams(window.location.search).get("utm_source");l&&(m.utm_source=l),wccom.fireTracksEvent("add_to_cart_button_clicked",m)})),jQuery('a[href*="add-cart-item="]').on("click",(function(c){var r=c.delegateTarget.href.split("add-cart-item=")[1].replace(/[^\d]/g,"");r&&wccom.fireTracksEvent("add_cart_item_button_clicked",{product_id:parseInt(r,10)})})),jQuery(document).on("click","[data-tracks]",(function(c){var r,t=c.currentTarget.dataset.tracks,e={};if(t){for(var a in c.currentTarget.dataset)c.currentTarget.dataset.hasOwnProperty(a)&&"tracks"===a.substring(0,6)&&"tracks"!==a&&(e[a.substring(6).toLowerCase()]=c.currentTarget.dataset[a]);null!==(r=e.url)&&void 0!==r&&r.includes("/wp-admin/")&&(e.url=document.location.href),wccom.fireTracksEvent(t,e)}})),jQuery("body").on("click",".wc-block-cart__submit-button",(function(){wccom.fireTracksEvent("cart_continue_button_clicked")}))}))})();; (()=>{var t={1445:()=>{jQuery(document).ready((function(t){var e={action:"maybe_set_gtm_cookie",is_admin:wccom_plugins_params.is_admin};jQuery.post(wccom_plugins_params.ajax_url,e,(function(t){dataLayer.push({user_type:t})})),t(".single_add_to_cart_button, .single-product form.cart button.is-primary").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("form.cart > button.single_docs_button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("a.wccom-bundle-button","a.wccom-mock-bundle-button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("#theme_buynow_link").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("#theme_demo_link").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view demo",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t(".all-themes-pricing .button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t(".woocommerce-cart .graphflow-recommendations a").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view recommendation",eventAction:"cart",eventLabel:t(this).attr("title"),eventValue:""})})),t(".single-product .graphflow-recommendations a").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view recommendation",eventAction:"product",eventLabel:t(this).attr("title"),eventValue:""})})),t("div.product-type-external .cart a.button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view external product",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName})})),t("#wc_introduction .wc_learn_more").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"Overview",eventAction:"WooCommerce",eventLabel:"Overview Video",eventValue:""})})),t(".main-search .title").on("click","a",(function(){var e=t(this).parents(".results-group"),o=t(this).parents(".results-item").index();(10{!function(){let t;function e(){const e=document.querySelector(".wcpv-shortcode-registration-success");e&&(e.innerText="Developer registration complete! Redirecting you...",document.querySelector(".wccom-shortcodes__page-container h2").setAttribute("hidden",""),/partner-signup/.test(window.location.href)?(e.remove(),document.querySelector(".wpcom-site__logo").style.display="block",window.location.href="https://wordpress.com/marketplace/submission-success"):window.location.href="/wp-admin/?new-vendor=yes",t.disconnect())}document.addEventListener("DOMContentLoaded",(function(){const o=document.querySelector(".wccom-shortcodes__page-container");o&&(t=new MutationObserver(e),t.observe(o,{childList:!0,subtree:!0}))}))}()},6112:()=>{!function(){function t(t){const e=[].slice.call(t.currentTarget.classList),o={properties:{}};e.forEach((function(t){const e=t.split("__");if(t.includes("wccom-tracks-name"))o.name=e[1];else{const t=e[1],c=e[2];t&&c&&(o.properties[t]=c)}})),o.name&&((wccom||{}).fireTracksEvent||function(){})(o.name,o.properties)}function e(t){const e={properties:{}},o=t.currentTarget.dataset,c="wccomTracks";for(const t in o)if(c===t)e.name=o[t];else if(t.includes(c)){const c=t.slice(11).toLowerCase().replace(/([A-Z])/g,(function(t){return"_".concat(t.toLowerCase())}));e.properties[c]=o[t]}e.name&&((wccom||{}).fireTracksEvent||function(){})(e.name,e.properties)}document.addEventListener("DOMContentLoaded",(function(){[].slice.call(document.getElementsByClassName("wccom-tracks")).forEach((function(e){e.addEventListener("click",t)})),[].slice.call(document.querySelectorAll("[data-wccom-tracks]")).forEach((function(t){t.addEventListener("click",e)}))}))}()},6310:()=>{!function(){function t(t){t.preventDefault();const e=document.getElementById("wccomSlackSignupError");e.setAttribute("hidden","");const o=document.getElementById("wccomSlackSignupForm");o.setAttribute("hidden","");const c=document.getElementById("wccomSlackSignupFormLoading");c.removeAttribute("hidden");const n=document.getElementById("wccomSlackSignupFormEmail");var r=new Headers,a=document.getElementById("wp_rest").value;r.append("X-WP-Nonce",a);var i,d=JSON.stringify({email:n.value,utm:(i=[],1{!function(){function t(t){const e=[].slice.call(t.classList);let o;[].slice.call(document.body.classList).forEach((function(t){t.includes("user-geo-location-")&&(o=t.slice(-2))})),o&&e.forEach((function(e){e.includes("wccom-geo-whitelist__")?function(t,e,o){-1===t.indexOf(o)&&e.setAttribute("hidden","")}(e.split("__")[1].split("-"),t,o):e.includes("wccom-geo-blacklist__")&&function(t,e,o){-1!==t.indexOf(o)&&e.setAttribute("hidden","")}(e.split("__")[1].split("-"),t,o)}))}document.addEventListener("DOMContentLoaded",(function(){[].slice.call(document.getElementsByClassName("wccom-geo")).forEach(t)}))}()}},e={};function o(c){var n=e[c];if(void 0!==n)return n.exports;var r=e[c]={exports:{}};return t[c](r,r.exports,o),r.exports}(()=>{"use strict";o(9052),o(6112);const t={isValidUrl(t){try{const e=["http:","https:"],o=new URL(t);return!!e.includes(o.protocol)&&(!(!t.startsWith(o.protocol+"//")||t.startsWith(o.protocol+"///"))&&/^([a-z0-9]+(-+[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(o.hostname))}catch(t){return!1}},parseUrl(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=t.split("?");return e&&(o[0]=o[0].split("#")[0]),o[1]?{url:o[0],params:this.queryStringToObject(o[1])}:{url:o[0],params:{}}},queryStringToObject:t=>(t||window.location.search).replace(/(^\?)/,"").split("&").map(function(t){return this[(t=t.split("="))[0]]=t[1],this}.bind({}))[0],objectToQueryString:t=>Object.keys(t).map((e=>t[e]?e+"="+t[e]:e)).join("&"),getLoginUrl(){const{pathname:t,search:e,hash:o}=window.location,c="".concat(t).concat(e).concat(o);let n="/sso?next=".concat(encodeURIComponent(c));try{const t=window.sessionStorage.getItem("wccom_landing_referrer");t&&(n+="&original_referrer=".concat(encodeURIComponent(t)))}catch(t){}return n},maybeResizeImage(e,o){const c=t.parseUrl(e).params,n=parseInt(c.w);return c&&"number"==typeof o&&Number.isInteger(n)?t.fixedImageSize(e,n,parseInt(n*o),"resize"):e},fixedImageSize(e,o,c){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fit";if(!["fit","resize"].includes(n))return e;const r=t.parseUrl(e),a=r.params;return"object"!=typeof a?e:(["w","h","resize","crop","fit"].forEach((t=>delete a[t])),a[n]=o+","+c,r.url+"?"+this.objectToQueryString(a))},setViewportHeightCSSProperty(){const t=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(t,"px"))},uuidv4:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),randomId:()=>Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10),countWords:t=>t.split(/\s+/).filter((t=>""!==t)).length,elementInView(t){const e=document.querySelector(t);if(!e||null===e.offsetParent)return!1;const o=e.getBoundingClientRect();return 0<=o.top&&0<=o.left&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&o.right<=(window.innerWidth||document.documentElement.clientWidth)},checkTrapContainerVisibility(t){const e=t.map((t=>new Promise((e=>{const o=window.setInterval((()=>{"hidden"!==window.getComputedStyle(t).visibility&&(e(),window.clearInterval(o))}),25)}))));return Promise.all(e)},roundedMonthlyPrice(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;return Math.ceil(t/e*100)/100},getUserLocation(){const t=(new Date).getTime();return fetch("https://public-api.wordpress.com/geo/?v="+t).then((t=>t.ok?t.json():t.body().then((t=>{throw new Error(t)})))).catch((()=>null))}},e=t;function c(t){var e;return null===(e=document.cookie.split("; ").find((e=>e.startsWith(t+"="))))||void 0===e?void 0:e.split("=")[1]}function n(t,e,o){let c="";if(o){const t=new Date;t.setTime(t.getTime()+864e5*o),c="expires=".concat(t.toUTCString(),"; ")}document.cookie="".concat(t,"=").concat(e,"; ").concat(c,"Path=/; SameSite=None; Secure")}function r(t){document.cookie="".concat(t,"=; Path=/; Max-Age=-99999;")}jQuery((function(){window.dataLayer=window.dataLayer||[];const t="WCCOM_Data_Layer_Geo_v2",o=c(t),r=t=>{"undefined"!=typeof wccomGTMEE&&t&&(wccomGTMEE.geolocation={countryShort:t.country_short,countryLong:t.country_long,region:t.region,city:t.city},dataLayer.push({event:"geolocation",geolocation:wccomGTMEE.geolocation}))};"undefined"!=typeof wccomGTMEE&&wccomGTMEE.productView&&dataLayer.push({event:"visitor interaction",interaction_name:"view product page",ecommerce:{detail:{products:[{category:wccomGTMEE.product.category,brand:wccomGTMEE.product.brand,name:wccomGTMEE.product.name,id:wccomGTMEE.product.sku,variant:wccomGTMEE.product.revenueType}]}}}),"undefined"!=typeof wccomGTMEE&&wccomGTMEE.orderReceivedView&&dataLayer.push({event:"visitor interaction",interaction_name:"transaction confirmation",net_revenue:wccomGTMEE.order.netRevenue,ecommerce:{currencyCode:wccomGTMEE.currencyCode,purchase:{actionField:{id:wccomGTMEE.order.number,affiliation:wccomGTMEE.order.methodOfPayment,revenue:wccomGTMEE.order.total,tax:wccomGTMEE.order.tax,shipping:wccomGTMEE.order.shippingTotal,coupon:wccomGTMEE.order.coupon},products:wccomGTMEE.order.products}}}),o?r(JSON.parse(decodeURIComponent(o))):e.getUserLocation().then((e=>{e&&(n(t,encodeURIComponent(JSON.stringify(e)),1),r(e))})).catch((()=>{dataLayer.push({event:"geolocation",geolocation:{}})})),jQuery(".wccom-product-box a.single_add_to_cart_button").not(".wccom-product-single--in-app .wccom-product-box a.single_add_to_cart_button").not(".wccom-product-box--is-free a.single_add_to_cart_button").not(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"buy now"})})),jQuery(".wccom-product-sticky-bottom-bar a.single_add_to_cart_button").not(".wccom-product-single--in-app .wccom-product-sticky-bottom-bar a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-free a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"buy now sticky mobile"})})),jQuery(".wccom-product-box--is-free a.single_add_to_cart_button").not(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"free download"})})),jQuery(".wccom-product-sticky-bottom-bar--is-free a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"free download sticky mobile"})})),jQuery(".wccom-product-sticky-top-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external sticky"})})),jQuery(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external"})})),jQuery(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external sticky mobile"})})),jQuery(".wccom-product-single--in-app .wccom-product-sticky-top-bar a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app sticky"})})),jQuery(".wccom-product-single--in-app .wccom-product-box a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app"})})),jQuery(".wccom-product-single--in-app .wccom-product-sticky-bottom-bar a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app sticky mobile"})})),jQuery(".sf-downloads a.download").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"get woocommerce storefront bottom"})})),jQuery(".storefront-heading a.download").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"get woocommerce storefront top"})})),jQuery(document).on("click",".woocommerce-cart-form a.remove",(function(t){if("undefined"!=typeof wccomGTMEE&&wccomGTMEE.cart){t.preventDefault();var e=jQuery(this).attr("data-product_id");dataLayer.push({event:"visitor interaction",interaction_name:"remove from cart",remove_btn:"remove product",ecommerce:{remove:{products:[{category:wccomGTMEE.cart[e].category,brand:wccomGTMEE.cart[e].brand,name:wccomGTMEE.cart[e].name,id:wccomGTMEE.cart[e].id,variant:wccomGTMEE.cart[e].variant,price:wccomGTMEE.cart[e].price,quantity:wccomGTMEE.cart[e].quantity}]}}}),delete wccomGTMEE.cart[e]}})),jQuery(document).on("click",'.woocommerce-cart-form :input[name="update_cart"]',(function(){if("undefined"!=typeof wccomGTMEE&&wccomGTMEE.cartKeys){var t=wccomGTMEE.cartKeys,e=jQuery(".woocommerce-cart-form"),o=jQuery.fn.formToJSON(e);jQuery.each(t,(function(t,e){var c=e;o["cart["+t+"][qty]"]&&(o["cart["+t+"][qty]"]>e.quantity?(c.quantity=o["cart["+t+"][qty]"]-c.quantity,dataLayer.push({event:"visitor interaction",interaction_name:"add to cart",add_to_cart_btn:"update cart",ecommerce:{add:{products:[{product:c}]}}})):0===parseInt(o["cart["+t+"][qty]"])?dataLayer.push({event:"visitor interaction",interaction_name:"remove from cart",remove_btn:"update cart",ecommerce:{remove:{products:[{product:c}]}}}):o["cart["+t+"][qty]"]0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"!=typeof wccomGTMEE){var e={event:"visitor interaction",interaction_name:"add to cart",add_to_cart_btn:"add to cart sidebar",ecommerce:{add:{products:[{category:wccomGTMEE.product.category,brand:wccomGTMEE.product.brand,name:wccomGTMEE.product.name,id:wccomGTMEE.product.sku,variant:wccomGTMEE.product.revenueType,price:wccomGTMEE.product.price1,quantity:1}]}}};dataLayer.push(jQuery.extend(e,t))}},jQuery.fn.commenceCheckoutDLPush=function(){if("undefined"!=typeof wccomGTMEE){var t=[];jQuery.each(wccomGTMEE.cart,(function(e,o){t.push(o)})),t.push({category:wccomGTMEE.product.category,brand:wccomGTMEE.product.brand,name:wccomGTMEE.product.name,id:wccomGTMEE.product.sku,variant:wccomGTMEE.product.revenueType,price:wccomGTMEE.product.price1,quantity:1}),dataLayer.push({event:"visitor interaction",page_type:"application process",interaction_name:"commence checkout",ecommerce:{currencyCode:wccomGTMEE.currencyCode,checkout:{actionField:{step:1},products:t}}})}},jQuery.fn.formToJSON=function(t){var e=t.serializeArray(),o={};return jQuery.map(e,(function(t){o[t.name]=t.value})),o};const a=wp.hooks;"undefined"!=typeof vendorGoogleAnalyticsTagId&&(0,a.addAction)("wccom_buy_now_button_clicked","wccom",(()=>{"undefined"!=typeof gtag&>ag("event","wccom_buy_now_button_click",{send_to:vendorGoogleAnalyticsTagId})})),o(6310),window.addEventListener("DOMContentLoaded",(function(){const t="irclickid",e=new URLSearchParams(window.location.search).get(t),o="".concat(t,"-expiration");if(e&&wccom.canTrackUser("analytics")&&e!==c(t)){const c=(new Date).getTime()+2592e6;n(t,e,30),n(o,c,30),r("wccom-refer-affiliate-id")}})),window.addEventListener("DOMContentLoaded",(function(){(0,a.addFilter)("wccom_nux_installation_url","wccom-refer/impact-radius",(t=>{const e=c("irclickid");if(e){const o=new URL(t);return o.searchParams.set("irclickid",e),o.toString()}return t}))})),function(t){/(\?|&)ref=\d+/.test(window.location.search)&&(window.location.search=window.location.search.replace(/(\?|&)ref=/i,"$1aff="));const e=wccom&&wccom.fireTracksEvent||function(){};jQuery((function(){if(window.URLSearchParams){var t=new window.URLSearchParams(window.location.search);if(t.get("aff")&&null===t.get("utm_source")&&null===t.get("utm_medium")&&null===t.get("utm_campaign")){var o={affiliate_id:t.get("aff"),campaign_id:t.get("cid"),sub_id:t.get("sid")};e("refer_visit",o)}}})),t(document).on("referral_tracked",(function(t,o){var c,n,a,i=o.responseJSON||{};if(o.success)c=o.data.affiliate_id,n=o.data.campaign_id,a=o.data.sub_id,i=o.data;else{if(!o.affiliate_id)return i.refer_message=o.message,void e("refer_visit_response_fail",i);i.affiliate_id=c}e("refer_visit_response",i);var d=new window.URLSearchParams(window.location.search);if(null!==d.get("utm_source")||null!==d.get("utm_medium")||null!==d.get("utm_campaign"))return c&&(i.affiliate_id=c),void e("refer_visit_illegal_utm_params_usage",i);var u="wccom-refer-affiliate-id="+c+";",s=new Date;s.setTime(s.getTime()+2592e6);var m=" expires="+s.toGMTString()+";",l=" path=/;";document.cookie=u+m+l,r("irclickid");var p={};n&&String(n).match(/^\d+$/)&&(p.campaignId=n),a&&(p.subId=String(a).substring(0,255));var _="wccom-refer-affiliate-meta="+JSON.stringify(p)+";";document.cookie=_+m+l})),t(document).on("referral_tracked_error",(function(t,o){var c=o.responseJSON||{};c.status=o.status||"",e("refer_visit_response_error",c)}))}(jQuery),o(2564),o(1445)})()})();;