!function(n){n(".tml").on("submit",'form[data-ajax="1"]',function(a){var e=n(this),s=e.find(":input"),t=e.find(":submit"),r=n(a.delegateTarget).find(".tml-alerts");a.preventDefault(),r.empty(),s.prop("readonly",!0),t.prop("disabled",!0),n.ajax({data:e.serialize()+"&ajax=1",method:e.attr("method")||"get",url:e.attr("action")}).always(function(){s.prop("readonly",!1),t.prop("disabled",!1)}).done(function(a){a.success?a.data.refresh?location.reload(!0):a.data.redirect?location.href=a.data.redirect:a.data.notice&&r.hide().html(a.data.notice).fadeIn():r.hide().html(a.data.errors).fadeIn()}).fail(function(a,e,s){a.responseJSON.data.errors&&r.hide().html(a.responseJSON.data.errors).fadeIn()})})}(jQuery),function(s){s(function(){var a,e;if(!themeMyLogin.action)return;switch(a=s("#user_login"),themeMyLogin.action){case"activate":(e=s("#key")).length&&e.focus();break;case"lostpassword":case"retrievepassword":case"register":a.focus();break;case"resetpass":case"rp":s("#pass1").focus();break;case"login":-1!=themeMyLogin.errors.indexOf("invalid_username")&&a.val(""),a.val()?s("#user_pass").focus():a.focus()}})}(jQuery),function(s){function a(){var a=s("#pass1").val(),e=s("#pass-strength-result");if(e.removeClass("short bad good strong empty"),a&&""!==a.trim())switch(wp.passwordStrength.meter(a,wp.passwordStrength.userInputDisallowedList(),a)){case-1:e.addClass("bad").html(pwsL10n.unknown);break;case 2:e.addClass("bad").html(pwsL10n.bad);break;case 3:e.addClass("good").html(pwsL10n.good);break;case 4:e.addClass("strong").html(pwsL10n.strong);break;case 5:e.addClass("short").html(pwsL10n.mismatch);break;default:e.addClass("short").html(pwsL10n.short)}else e.addClass("empty").html(" ")}s(document).ready(function(){s("#pass1").val("").on("keyup paste",a)})}(jQuery);; document.addEventListener("focusin", function(event) { const elem = event && event.target && event.target.closest("input,select,textarea,button,meter,progress"); if ( elem ) { window[ gtm4wp_datalayer_name ].push({ 'event' : 'gtm4wp.formElementEnter', 'inputID' : elem.getAttribute("id") || "(no input ID)", 'inputName' : elem.getAttribute("name") || "(no input name)", 'inputClass': elem.getAttribute("class") || "(no input class)", 'formID' : (elem.form && elem.form.getAttribute("id")) || "(no form ID)", 'formName' : (elem.form && elem.form.getAttribute("name")) || "(no form name)", 'formClass': (elem.form && elem.form.getAttribute("class")) || "(no form class)" }); } }, false); document.addEventListener("focusout", function(event) { const elem = event && event.target && event.target.closest("input,select,textarea,button,meter,progress"); if ( elem ) { window[ gtm4wp_datalayer_name ].push({ 'event' : 'gtm4wp.formElementLeave', 'inputID' : elem.getAttribute("id") || "(no input ID)", 'inputName' : elem.getAttribute("name") || "(no input name)", 'inputClass': elem.getAttribute("class") || "(no input class)", 'formID' : (elem.form && elem.form.getAttribute("id")) || "(no form ID)", 'formName' : (elem.form && elem.form.getAttribute("name")) || "(no form name)", 'formClass': (elem.form && elem.form.getAttribute("class")) || "(no form class)" }); }; }, false); ; /** * File navigation.js. * * Handles toggling the navigation menu for small screens and enables TAB key * navigation support for dropdown menus. */ ( function() { var container, button, menu, links, i, len; container = document.getElementById( 'site-navigation' ); if ( ! container ) { return; } button = container.getElementsByTagName( 'i' )[0]; if ( 'undefined' === typeof button ) { return; } menu = container.getElementsByTagName( 'ul' )[0]; // Hide menu toggle button if menu is empty and return early. if ( 'undefined' === typeof menu ) { button.style.display = 'none'; return; } menu.setAttribute( 'aria-expanded', 'false' ); if ( -1 === menu.className.indexOf( 'nav-menu' ) ) { menu.className += ' nav-menu'; } button.onclick = function() { if ( -1 !== container.className.indexOf( 'toggled' ) ) { container.classList.remove('toggled'); document.body.classList.remove('scroll-lock'); button.classList.remove('icon-cancel'); button.classList.add('icon-menu'); button.setAttribute( 'aria-expanded', 'false' ); button.setAttribute( 'name', 'menu' ); menu.setAttribute( 'aria-expanded', 'false' ); } else { container.classList.add('toggled'); document.body.classList.add('scroll-lock'); button.classList.remove('icon-menu'); button.classList.add('icon-cancel'); button.setAttribute( 'aria-expanded', 'true' ); button.setAttribute( 'name', 'close' ); menu.setAttribute( 'aria-expanded', 'true' ); } }; // Get all the link elements within the menu. links = menu.getElementsByTagName( 'a' ); // Each time a menu link is focused or blurred, toggle focus. for ( i = 0, len = links.length; i < len; i++ ) { links[i].addEventListener( 'focus', toggleFocus, true ); links[i].addEventListener( 'blur', toggleFocus, true ); } /** * Sets or removes .focus class on an element. */ function toggleFocus() { var self = this; // Move up through the ancestors of the current link until we hit .nav-menu. while ( -1 === self.className.indexOf( 'nav-menu' ) ) { // On li elements toggle the class .focus. if ( 'li' === self.tagName.toLowerCase() ) { if ( -1 !== self.className.indexOf( 'focus' ) ) { self.className = self.className.replace( ' focus', '' ); } else { self.className += ' focus'; } } self = self.parentElement; } } /** * Toggles `focus` class to allow submenu access on tablets. */ ( function( container ) { var touchStartFn, i, parentLink = container.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' ); if ( 'ontouchstart' in window ) { touchStartFn = function( e ) { var menuItem = this.parentNode, i; if ( ! menuItem.classList.contains( 'focus' ) ) { e.preventDefault(); for ( i = 0; i < menuItem.parentNode.children.length; ++i ) { if ( menuItem === menuItem.parentNode.children[i] ) { continue; } menuItem.parentNode.children[i].classList.remove( 'focus' ); } menuItem.classList.add( 'focus' ); } else { menuItem.classList.remove( 'focus' ); } }; for ( i = 0; i < parentLink.length; ++i ) { parentLink[i].addEventListener( 'touchstart', touchStartFn, {passive: true} ); } } }( container ) ); } )(); ; /** * File skip-link-focus-fix.js. * * Helps with accessibility for keyboard only users. * * Learn more: https://git.io/vWdr2 */ ( function() { var isIe = /(trident|msie)/i.test( navigator.userAgent ); if ( isIe && document.getElementById && window.addEventListener ) { window.addEventListener( 'hashchange', function() { var id = location.hash.substring( 1 ), element; if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { return; } element = document.getElementById( id ); if ( element ) { if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { element.tabIndex = -1; } element.focus(); } }, false ); } } )(); ; /*! For license information please see main.js.LICENSE.txt */ (()=>{var e={929:()=>{jQuery(document).ready((function(e){e("[data-aawp-click-tracking] a, a[data-aawp-click-tracking]").on("click",(function(t){if(void 0===e(this).data("aawp-prevent-click-tracking")){var a=e(this).attr("data-aawp-click-tracking")?e(this):e(this).closest("[data-aawp-click-tracking]"),n=a.data("aawp-click-tracking");if(n){var o=void 0!==a.data("aawp-product-id")?a.data("aawp-product-id"):"",r=void 0!==a.data("aawp-product-title")?a.data("aawp-product-title"):"",i=!1;if("asin"===n&&o?i=o:"title"===n&&r&&(i=r),i){var c="amazon-link",p="click";"function"==typeof gtag?gtag("event",p,{event_category:c,event_label:i}):"undefined"!=typeof ga?ga("send","event",c,p,i):"undefined"!=typeof _gaq?_gaq.push(["_trackEvent",c,p,i]):"undefined"!=typeof __gaTracker?__gaTracker("send","event",c,p,i):"undefined"!=typeof _paq?_paq.push(["trackEvent",c,p,i]):"undefined"!=typeof dataLayer&&dataLayer.push({event:"amazon-affiliate-link-click",category:c,action:p,label:i})}}}}))}))},169:(e,t,a)=>{"use strict";a.r(t);var n=a(808),o=a.n(n);jQuery(document).ready((function(e){if("undefined"!=typeof aawp_geotargeting_settings&&"undefined"!=typeof aawp_geotargeting_localized_stores&&"undefined"!=typeof aawp_geotargeting_tracking_ids){var t=(w={},window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,(function(e,t,a){w[t]=void 0!==a?a:""})),w.aawp_debug_geotargeting_ip?w.aawp_debug_geotargeting_ip:""),a=function(){var e={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,(function(t,a,n){e[a]=void 0!==n?n:""})),!!e.aawp_debug_geotargeting}(),n="undefined"!=typeof aawp_geotargeting_api?aawp_geotargeting_api:"",r=aawp_geotargeting_settings,i=aawp_geotargeting_localized_stores,c=aawp_geotargeting_tracking_ids;if(!r.hasOwnProperty("store"))return;var p=r.hasOwnProperty("mode")?r.mode:"mode",d=r.store,u="",f="",s="",g=o(),l=g.get("aawp-geotargeting");void 0!==l&&!1===a?(f=l,y()):"geoip-db"===n?h():"ipinfo"===n?(v="https://ipinfo.io/json/",t&&(v="https://ipinfo.io/"+t+"/json/"),jQuery.ajax({url:v,jsonpCallback:"callback",dataType:"jsonp",success:function(e){void 0!==e.ip&&void 0!==e.country&&m(f=e.country),y()}})):"dbip"===n?function(){var e="https://api.db-ip.com/v2/free/self/";t&&(e="https://api.db-ip.com/v2/free/"+t+"/"),jQuery.ajax({url:e,dataType:"json",crossDomain:!0,success:function(e){void 0!==e.ipAddress&&void 0!==e.countryCode&&m(f=e.countryCode),y()}})}():h()}var v,w;function y(){f=f.toLowerCase(),i.hasOwnProperty(f)&&((u=i[f])===d&&!1===a||c.hasOwnProperty(u)&&(s=c[u],function(t,a,n){if(null===n)return;e("a[href*='/amazon'], a[href*='/www.amazon'], a[href*='/amzn'], a[href*='/www.amzn']").each((function(o){if(!e(this).data("aawp-geotargeting")&&!e(this).closest("*[data-aawp-product-id]").data("aawp-geotargeting"))return;var r=e(this).attr("href");"asin"===p||-1!=r.indexOf("prime")?r=function(e,t,a){var n=!1,o=!1;-1!=e.indexOf("amzn."+d)&&(n=!0);-1!=e.indexOf("amazon."+d)&&(o=!0);if(!n&&!o)return;if(-1==e.indexOf("tag="))return;e="com"==t&&n?e.replace("amzn."+t,"amazon."+a+"/dp"):"com"==a?e.replace("amazon."+t,"amzn."+a):e.replace("amazon."+t,"amazon."+a);return e}(r,t,a):"title"===p&&(r=function(t,a,n,o){var r=t.data("aawp-product-title");r||(r=t.parents().filter((function(){return e(this).data("aawp-product-title")})).eq(0).data("aawp-product-title"));r&&(i=5,r=r.split(/\s+/).slice(0,i).join(" "),a="https://www.amazon."+o+"/s/?field-keywords="+encodeURIComponent(r));var i;return a}(e(this),r,0,a)),void 0!==r&&(r=function(e,t,a){null==a&&(a="");var n=new RegExp("\\b("+t+"=).*?(&|$)");if(e.search(n)>=0)return e.replace(n,"$1"+a+"$2");return e+(e.indexOf("?")>0?"&":"?")+t+"="+a}(r,"tag",n),e(this).attr("href",r))}))}(d,u,s)))}function h(){var e="https://geolocation-db.com/jsonp/";t&&(e="https://geolocation-db.com/jsonp/"+t),jQuery.ajax({url:e,jsonpCallback:"callback",dataType:"jsonp",success:function(e){void 0!==e.IPv4&&void 0!==e.country_code&&m(f=e.country_code),y()}})}function m(e){a||e&&g.set("aawp-geotargeting",e,{sameSite:"strict"})}}))},808:(e,t,a)=>{var n,o;!function(r){if(void 0===(o="function"==typeof(n=r)?n.call(t,a,t,e):n)||(e.exports=o),!0,e.exports=r(),!!0){var i=window.Cookies,c=window.Cookies=r();c.noConflict=function(){return window.Cookies=i,c}}}((function(){function e(){for(var e=0,t={};e{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(929),a(169)})();;