/*! 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,t;window.wccom=window.wccom||{},wccom.fireTracksEvent=function(c,t,r){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===t&&(t={}),wccom.fillReferer(t),t.current_url=window.location.href;const r=new FormData;r.append("action","woothemes_tracks_ajax"),r.append("event_name",c);for(const c of Object.keys(t))r.append("properties["+c+"]",t[c]);if(navigator.sendBeacon){const c=navigator.sendBeacon(wteVars.ajaxurl,r);if(wccom.isFiringFirstTrack=!1,c)return void(wccom.hasFiredFirstTrack=!0)}const e={action:"woothemes_tracks_ajax",event_name:c,properties:t};jQuery.post(wteVars.ajaxurl,e).done((function(){wccom.hasFiredFirstTrack=!0,wccom.isFiringFirstTrack=!1})).fail((function(){wccom.isFiringFirstTrack=!1}))};(r||wccom.canTrackUser("analytics"))&&wccom.canFireTrack()?(wccom.hasFiredFirstTrack||(wccom.isFiringFirstTrack=!0),a()):wccom.addTrackCallback(a)},wccom.waitUntilCanSendTracks=function(){return new Promise((c=>{setTimeout((function t(){wccom.canTrackUser("analytics")&&wccom.canFireTrack()?c():setTimeout(t,250)}),0)}))},wccom.addTrackCallback=(c=[],t=null,function(r){"function"==typeof r&&(c.push(r),t||(t=wccom.waitUntilCanSendTracks()).then((()=>(c.forEach((c=>c())),void(c=[])))))}),wccom.hasFiredFirstTrack=!1,wccom.isFiringFirstTrack=!1,wccom.isTrackIdSet=function(){return Boolean(function(){let c="";const t=("; "+document.cookie).split("; woo_tk_ai=");return 2===t.length&&(c=t.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 t={label:c.delegateTarget.text,href:c.delegateTarget.href,url:document.location.href};wccom.fireTracksEvent("bread_crumb_clicked",t)})),jQuery(document).on("click",".single_add_to_cart_button",(function(c){var t=c.currentTarget.dataset.tracksHas_payment_method,r=c.currentTarget.dataset.tracksPosition,e=c.currentTarget.dataset.tracksIs_paid,a=c.currentTarget.dataset.tracksIs_freemium,n=c.currentTarget.dataset.tracksFreemium_type,o=c.currentTarget.dataset.tracksIs_trending,i=c.currentTarget.dataset.tracksSource,s=c.currentTarget.dataset.tracksProductId,d={has_payment_method:t,position:r,is_paid:e,is_trending:o,is_freemium:a,is_business_service:c.currentTarget.dataset.tracksIsBusinessService,product_id:s,source:i};void 0!==n&&(d.freemium_type=n),wccom.fireTracksEvent("add_to_cart_button_clicked",d)})),jQuery('a[href*="add-cart-item="]').on("click",(function(c){var t=c.delegateTarget.href.split("add-cart-item=")[1].replace(/[^\d]/g,"");t&&wccom.fireTracksEvent("add_cart_item_button_clicked",{product_id:parseInt(t,10)})})),jQuery(document).on("click","[data-tracks]",(function(c){var t,r=c.currentTarget.dataset.tracks,e={};if(r){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!==(t=e.url)&&void 0!==t&&t.includes("/wp-admin/")&&(e.url=document.location.href),wccom.fireTracksEvent(r,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);return"/sso?next=".concat(encodeURIComponent(c))},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=>Math.ceil(t/12*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)})()})();; (()=>{"use strict";const e=wp.i18n;function t(e,t,o){let c="";if(o){const e=new Date;e.setTime(e.getTime()+864e5*o),c="expires=".concat(e.toUTCString(),"; ")}document.cookie="".concat(e,"=").concat(t,"; ").concat(c,"Path=/; SameSite=None; Secure")}document.addEventListener("DOMContentLoaded",(()=>{const e="no-input-checkout",o=document.querySelectorAll(".ship-to-different-address-checkbox"),c=document.querySelector(".col-2");0{e.addEventListener("change",(()=>{var t,n;c.style.display=e.checked?"block":"none",t=o,n=e.checked,t.forEach((e=>{e!==t[0]&&(e.checked=n)}))}))})),document.addEventListener("click",(o=>{const c=o.target.dataset.checkoutEdit?o.target:o.target.closest("[data-checkout-edit]");if(!c)return;const{checkoutEdit:n,checkoutEditElements:r,checkoutEditFocusElement:s,checkoutEditHideElements:i}=c.dataset,a=new URL(window.location.href),d=a.searchParams.get(e)||"",u=d?d.split(",").concat(n):[n];a.searchParams.set(e,u.join(",")),window.history.replaceState({},"",a);const l=(m=e,null===(y=document.cookie.split("; ").find((e=>e.startsWith(m+"="))))||void 0===y?void 0:y.split("=")[1]);var m,y;const p=l?l.split(","):[];var h;p.includes(n)||p.push(n),t(e,p.join(","),1),c.style.display="none",i.split(",").forEach((e=>{var t;null===(t=document.querySelector(e))||void 0===t||null===(t=t.style)||void 0===t||t.setProperty("display","none")})),r.split(",").forEach((e=>{var t;null===(t=document.querySelector(e))||void 0===t||null===(t=t.style)||void 0===t||t.removeProperty("display")})),s&&(null===(h=document.querySelector(s))||void 0===h||h.focus())})),window.addEventListener("beforeunload",(()=>{var t;t=e,document.cookie="".concat(t,"=; Path=/; Max-Age=-99999;")}));const n=new URL(window.location.href).searchParams.get(e);n&&t(e,n,1)})),function(){const t="customer_details",o="order_review",c="wccom-checkout-show-products",n="wccom-checkout-summary--is-showing";let r=document.getElementById(o),s=document.getElementById(t);function i(e){e?(r.classList.add(n),window.localStorage.setItem(c,"true")):(r.classList.remove(n),window.localStorage.removeItem(c));const t=r.getElementsByClassName("wccom-checkout-summary__collapse-row");for(const o of t)o.setAttribute("aria-expanded",e?"true":"false")}function a(e){"Enter"!==e.key&&" "!==e.key||(d(),e.preventDefault())}function d(){i(!r.classList.contains(n))}function u(){const e=document.getElementsByClassName("wccom-checkout-summary__collapse-row");for(const t of e)t.removeEventListener("click",d),t.addEventListener("click",d),t.removeEventListener("keydown",a),t.addEventListener("keydown",a)}function l(){const e=document.querySelectorAll("#".concat(o," > .wc-block-components-notice-banner"));for(const t of e)t.remove()}function m(){var e;null===(e=document.getElementById(o))||void 0===e||e.classList.toggle("wccom-form-coupon--is-visible"),l()}function y(){document.querySelectorAll(".woocommerce-remove-coupon").forEach((function(t){t.innerText=(0,e.__)("Remove Coupon","wccom")}));const t=document.querySelector(".woocommerce-form-coupon-toggle");t&&(t.removeEventListener("click",m),t.addEventListener("click",m))}function p(){document.querySelectorAll(".wccom-payment-type").forEach((e=>{const t=e.querySelector('input[type="radio"]');t&&e.classList.toggle("selected",t.checked)}))}function h(){document.body.addEventListener("wc-credit-card-form-init",w),r=document.getElementById(o),s=document.getElementById(t),r&&s&&(new MutationObserver((function(){const e=document.querySelector("#order_review .order-total .woocommerce-Price-amount"),t=document.querySelector(".checkout .button.alt strong");e&&t&&(t.innerText=e.innerText),u()})).observe(r,{childList:!0,subtree:!0}),u(),function(){const e=document.querySelector(".".concat("checkout_coupon"));e&&e.addEventListener("submit",l)}(),function(){if(r.classList.contains(n))return void i(!0);let e=window.localStorage.getItem(c);var t;e&&window.performance&&window.performance.getEntriesByType&&(e="reload"===(null===(t=window.performance.getEntriesByType("navigation")[0])||void 0===t?void 0:t.type)),i(e)}(),function(){const e=s.getElementsByClassName("with-address-toggle");for(const t of e){const e=t.nextSibling;null!=e&&e.classList.contains("address-toggle-wrapper")&&(t.classList.contains("is-initially-empty")?e.querySelector("button").addEventListener("click",(function(){t.classList.add("show"),e.remove(),setTimeout((()=>{t.querySelector("input").focus()}),0)})):e.remove())}}(),function(){const e=s.querySelector(".form-row.buyer_tax_number");e&&document.body.addEventListener("change",(function(t){t.target.closest(".buyer_tax_number_toggle-wrapper")&&(t.target.checked?e.classList.remove("is-vat-hidden"):(e.classList.add("is-vat-hidden"),e.querySelector("input").value&&(e.querySelector("input").value="",e.querySelector("input").dispatchEvent(new Event("blur")))))}))}(),p(),r.classList.add("wccom-checkout-summary--is-initialized"),s.classList.add("wccom-checkout-customer--is-initialized"),jQuery(document.body).on("wc_fragments_loaded wc_fragments_refreshed updated_checkout",(()=>{p(),y(),function(){const e=jQuery(".country_select:not(.select2-initialized)"),t=jQuery(".state_select:not(.select2-initialized)"),o=jQuery("#mailchimp-using-products:not(.select2-initialized)");e.length&&e.select2({width:"100%"}).addClass("select2-initialized"),t.length&&t.select2({width:"100%"}).addClass("select2-initialized"),o.length&&o.select2({width:"100%",minimumResultsForSearch:-1}).addClass("select2-initialized")}()})),y(),document.body.addEventListener("change",(e=>{e.target.matches('.wccom-payment-type input[type="radio"]')&&p()})),jQuery(document.body).on("update_checkout",(function(){jQuery("form.woocommerce-checkout button[type=submit]").prop("disabled",!0),jQuery(".ppc-button-wrapper").css("pointer-events","none"),jQuery("#wcpay-express-checkout-element").css("pointer-events","none"),jQuery("form.woocommerce-checkout .order-review-wrapper").addClass("processing")})),jQuery(document.body).on("updated_checkout",(function(){jQuery("form.woocommerce-checkout button[type=submit]").prop("disabled",!1),jQuery(".ppc-button-wrapper").css("pointer-events","auto"),jQuery("#wcpay-express-checkout-element").css("pointer-events","auto"),jQuery("form.woocommerce-checkout .order-review-wrapper").removeClass("processing")})),jQuery(document.body).on("cart_updated_with_checkout_addon",(function(e){const t=e.originalEvent.detail;"added"===t.type?jQuery(".wccom-checkout-addons__two-year-offer").hide():"removed"===t.type&&1===t.numberOfCartItems&&jQuery(".wccom-checkout-addons__two-year-offer").show()})),jQuery(document.body).on("updated_checkout",(function(){jQuery(".woocommerce-checkout .payment_method_stripe > img").appendTo(".woocommerce-checkout .payment_box fieldset#stripe-cc-form").css("display","inline-block");const t=jQuery(".woocommerce-checkout .payment_box .wc-saved-payment-methods label:first"),o=jQuery(".woocommerce-checkout .payment_box .wc-saved-payment-methods label:last");t.addClass("active");const c=jQuery(''.concat((0,e.__)("Press Tab to enter new card form","wccom"),""));o.on("click",(function(){jQuery(this).addClass("active"),o.find(".screen-reader-text").length||c.appendTo(o),t.removeClass("active")})),t.on("click",(function(){jQuery(this).addClass("active"),o.find(".screen-reader-text").remove(),o.removeClass("active")}));const n=jQuery(".woocommerce-checkout .payment_box .wc-saved-payment-methods .woocommerce-SavedPaymentMethods-tokenInput:first"),r=jQuery(".woocommerce-checkout .payment_box .wc-saved-payment-methods .woocommerce-SavedPaymentMethods-tokenInput:last"),s=["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"];n.on("keydown",(function(e){"Tab"!==e.key||e.shiftKey?"Enter"===e.key||" "===e.key?(jQuery(this).trigger("click"),t.trigger("click"),e.preventDefault()):s.includes(e.key)&&(o.trigger("click"),e.preventDefault()):(e.preventDefault(),r.trigger("focus"))})),r.on("keydown",(function(e){"Tab"===e.key&&e.shiftKey?(e.preventDefault(),n.trigger("focus")):"Enter"===e.key||" "===e.key?(jQuery(this).trigger("click"),o.trigger("click"),e.preventDefault()):s.includes(e.key)&&(t.trigger("click"),e.preventDefault())}))})),jQuery(".woocommerce-checkout .payment_box .wc-saved-payment-methods label:first").addClass("active"))}function w(){const e=document.querySelector("div.payment_method_woocommerce_payments");if(!e)return;const t=e.querySelectorAll("input.woocommerce-SavedPaymentMethods-tokenInput");1=["cc","express","paypal"].indexOf(t)||u(t):d()};function m(){var t;!function(){const t=0<(e("input#billing_company").val()||"").trim().length,c=0<(e("input#buyer_tax_number").val()||"").trim().length;return t||c}()?(t="express",a.includes(t)&&(e(".wccom-payment-type-".concat(t)).removeClass("wccom-payment-type-disabled"),e("input#wccom-payment-type-".concat(t)).prop("disabled",!1))):function(t){if(!a.includes(t))return;const c=e("input#wccom-payment-type-".concat(t));c.prop("checked")&&(c.prop("checked",!1),d()),c.prop("disabled",!0),e(".wccom-payment-type-".concat(t)).addClass("wccom-payment-type-disabled")}("express")}function d(){e("input#wccom-payment-type-cc").prop("checked",!0).trigger("change")}e(document.body).on("updated_checkout",i),i(),e(document.body).on("change",['input[name="woocommerce-mailchimp-subscribe"]','select[name="mailchimp-using-products"]',"#billing_email","#billing_email_confirm"].join(","),(function(){const t=e("form.checkout");if(0===t.length)return;const c={security:wccomCheckoutPaymentSectionParams.syncCheckoutDataNonce,post_data:new URLSearchParams(new FormData(t[0])).toString()},n={type:"POST",url:wccomCheckoutPaymentSectionParams.wcAjaxUrl.toString().replace("%%endpoint%%","sync_checkout_data"),data:new URLSearchParams(c).toString()};window.fetch(n.url,{method:n.type,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:n.data})})),function(){const t=document.querySelector("input#wccom-payment-type-express");t&&(null!=t&&t.disabled||(m(),e(document.body).on("change",["input#billing_company","input#buyer_tax_number"].join(","),m),e(document.body).on("updated_checkout",m)))}()}))}));; window.addEventListener("load",(function(){const e=document.getElementById("billing_email");if(!e)return;const i=e.parentElement,n=document.createElement("div");function a(){e.classList.remove("invalid"),n.classList.add("hidden")}let t;n.classList.add("email-validation-message","hidden"),i.appendChild(n),e.addEventListener("blur",(function(){var i;t&&t.abort();const d=e.value;d?(t=new AbortController,wp.apiFetch({path:"".concat("/wccom/checkout/email-validation","?email=").concat(d),signal:null===(i=t)||void 0===i?void 0:i.signal}).then((e=>{!0===e&&a()})).catch((i=>{"invalid_email"!==i.code&&"email_exists"!==i.code?a():function(i){e.classList.add("invalid"),n.classList.remove("hidden"),n.innerHTML=i.message,wp.a11y.speak(i.message)}(i)}))):a()}))}));;