(()=>{var e={27723:e=>{"use strict";e.exports=window.wp.i18n},39904:(e,t)=>{"use strict";var r=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.t=function(e){if(!e)return!1;if(e.length>254)return!1;if(!r.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some(function(e){return e.length>63})}},54790:(e,t,r)=>{"use strict";r.d(t,{j7:()=>i});var o=r(27723);const __=o.__,i="wp-block-jetpack-mailchimp";__("Enter your email","jetpack"),__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack"),__("Processing…","jetpack"),__("Success! You're on the list.","jetpack"),__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},79366:(e,t,r)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(r.p=window.Jetpack_Block_Assets_Base_Url)},86954:e=>{function t(e,t=100,r={}){if("function"!=typeof e)throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}="boolean"==typeof r?{immediate:r}:r;let i,n,s,a,c;function u(){const t=i,r=n;return i=void 0,n=void 0,c=e.apply(t,r),c}function l(){const e=Date.now()-a;e<t&&e>=0?s=setTimeout(l,t-e):(s=void 0,o||(c=u()))}const p=function(...e){if(i&&this!==i&&Object.getPrototypeOf(this)===Object.getPrototypeOf(i))throw new Error("Debounced method called with different contexts of the same prototype.");i=this,n=e,a=Date.now();const r=o&&!s;return s||(s=setTimeout(l,t)),r&&(c=u()),c};return Object.defineProperty(p,"isPending",{get:()=>void 0!==s}),p.clear=()=>{s&&(clearTimeout(s),s=void 0)},p.flush=()=>{s&&p.trigger()},p.trigger=()=>{c=u(),p.clear()},p}e.exports.debounce=t,e.exports=t},98490:e=>{"use strict";e.exports=window.wp.domReady}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var i=o.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=o[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e+"../"})(),(()=>{"use strict";r(79366)})(),(()=>{"use strict";var e=r(98490),t=r.n(e),o=r(86954),i=r.n(o),n=r(39904),s=r(54790);function a(e,t){const r=t.value,o="error";return t.classList.remove(o),!!(0,n.t)(r)||(t.classList.add(o),"function"==typeof document.createElement("input").reportValidity&&e.reportValidity(),!1)}function c(e,t){const r=e.querySelector("form"),o=e.querySelector("input[name=email]"),n=e.querySelector("."+s.j7+"_processing"),c=e.querySelector("."+s.j7+"_error"),u=e.querySelector("."+s.j7+"_success");o.addEventListener("input",((e,t)=>i()(()=>{a(e,t)},1e3))(r,o)),r.addEventListener("submit",i=>{if(i.preventDefault(),!a(r,o))return;const s=o.value,l=[].slice.call(r.querySelectorAll('input[type="hidden"].mc-submit-param')).reduce((e,t)=>({...e,[t.name]:t.value}),{});e.classList.add("is-processing"),n.classList.add("is-visible"),function(e,t,r){let o="https://public-api.wordpress.com/rest/v1.1/sites/"+encodeURIComponent(e)+"/email_follow/subscribe?email="+encodeURIComponent(t);for(const e in r)o+="&"+encodeURIComponent(e)+"="+encodeURIComponent(r[e]);return new Promise(function(e,t){const r=new XMLHttpRequest;r.open("GET",o),r.onload=function(){if(200===r.status){const t=JSON.parse(r.responseText);e(t)}else{const e=JSON.parse(r.responseText);t(e)}},r.send()})}(t,s,l).then(e=>{n.classList.remove("is-visible"),e.error&&"member_exists"!==e.error?c.classList.add("is-visible"):u.classList.add("is-visible")},()=>{n.classList.remove("is-visible"),c.classList.add("is-visible")})})}const u=()=>{Array.from(document.querySelectorAll("."+s.j7)).forEach(e=>{if("true"===e.getAttribute("data-jetpack-block-initialized"))return;const t=e.getAttribute("data-blog-id");try{c(e,t)}catch(e){0}e.setAttribute("data-jetpack-block-initialized","true")})};"undefined"!=typeof window&&t()(u)})()})();