/*! This file is auto-generated */ (()=>{"use strict";var e={d:(t,d)=>{for(var o in d)e.o(d,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:d[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function d(e){"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}e.d(t,{default:()=>d}),(window.wp=window.wp||{}).domReady=t.default})();; /*! This file is auto-generated */ (()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};let n;function o(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===n&&(n=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),n.innerHTML=e;const t=n.textContent;return n.innerHTML="",t}e.r(t),e.d(t,{decodeEntities:()=>o}),(window.wp=window.wp||{}).htmlEntities=t})();; !function(){var e={6999:function(e,t,n){"use strict";var r=n(6848);function o(){}function _(){}_.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,_,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_,resetWarningCache:o};return n.PropTypes=n,n}},9067:function(e,t,n){e.exports=n(6999)()},6848:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var _=t[r]={exports:{}};return e[r](_,_.exports,n),_.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e,t,r,o,_,i,l,s,u,a,c={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function h(e,t){for(var n in t)e[n]=t[n];return e}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function v(t,n,r){var o,_,i,l={};for(i in n)"key"==i?o=n[i]:"ref"==i?_=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===l[i]&&(l[i]=t.defaultProps[i]);return y(t,l,o,_,null)}function y(e,n,o,_,i){var l={type:e,props:n,key:o,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++r:i,__i:-1,__u:0};return null==i&&null!=t.vnode&&t.vnode(l),l}function g(e){return e.children}function b(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__i+1):null;for(var n;tn&&o.sort(l));N.__r=0}function S(e,t,n,r,o,_,i,l,s,u,a){var p,d,h,m,v,y=r&&r.__k||f,g=t.length;for(n.__d=s,P(n,t,y),s=n.__d,p=0;p0?y(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,l=T(o,n,i,a),o.__i=l,_=null,-1!==l&&(a--,(_=n[l])&&(_.__u|=131072)),null==_||null===_.__v?(-1==l&&c--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l==i-1?c--:l==i+1?c++:l>i?a>s-i?c+=l-i:c--:l(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&_===s.type)return i;i--}if(l=n.__.length&&n.__.push({}),n.__[e]}function oe(e){return Z=1,_e(he,e)}function _e(e,t,n){var r=re(D++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):he(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=q,!q.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!_||_.call(this,e,t,n);var i=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&r.__c.props===e)&&(!_||_.call(this,e,t,n))};q.u=!0;var _=q.shouldComponentUpdate,i=q.componentWillUpdate;q.componentWillUpdate=function(e,t,n){if(this.__e){var r=_;_=void 0,o(e,t,n),_=r}i&&i.call(this,e,t,n)},q.shouldComponentUpdate=o}return r.__N||r.__}function ie(e,t){var n=re(D++,3);!K.__s&&de(n.__H,t)&&(n.__=e,n.i=t,q.__H.__h.push(n))}function le(e,t){var n=re(D++,7);return de(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function se(e,t){return Z=8,le((function(){return e}),t)}function ue(){for(var e;e=J.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fe),e.__H.__h.forEach(pe),e.__H.__h=[]}catch(t){e.__H.__h=[],K.__e(t,e.__v)}}K.__b=function(e){q=null,G&&G(e)},K.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ne&&ne(e,t)},K.__r=function(e){Q&&Q(e),D=0;var t=(q=e.__c).__H;t&&(W===q?(t.__h=[],q.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(fe),t.__h.forEach(pe),t.__h=[],D=0)),W=q},K.diffed=function(e){X&&X(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==J.push(t)&&B===K.requestAnimationFrame||((B=K.requestAnimationFrame)||ce)(ue)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),W=q=null},K.__c=function(e,t){t.some((function(e){try{e.__h.forEach(fe),e.__h=e.__h.filter((function(e){return!e.__||pe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],K.__e(n,e.__v)}})),ee&&ee(e,t)},K.unmount=function(e){te&&te(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{fe(e)}catch(e){t=e}})),n.__H=void 0,t&&K.__e(t,n.__v))};var ae="function"==typeof requestAnimationFrame;function ce(e){var t,n=function(){clearTimeout(r),ae&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ae&&(t=requestAnimationFrame(n))}function fe(e){var t=q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),q=t}function pe(e){var t=q;e.__c=e.__(),q=t}function de(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function he(e,t){return"function"==typeof t?t(e):t}var me=window.wp.htmlEntities;const ve=e=>{const{title:t,description:n,slug:r,postId:o,isSelected:_,onInvoke:i,className:l,cta:s,ctaLink:u,logo:a,logoLink:c}=e,[f,p]=oe("");ie((()=>{p(_?`Remove ${t} from your subscription choices`:`Add ${t} to your subscription choices`)}),[_,t]);const d=s&&u,h=a&&c,m=d||h,y=l.includes("grid"),g=l.includes("has-featured-image");return v("div",{className:`newsletter-signup-item ${l} ${_?"newsletter-signup-item--selected":""}`},v("input",{type:"checkbox",id:`newsletter-${r}`,name:"newsletters[]",className:"visually-hidden newsletter-signup-item__control",value:o,checked:_,tabIndex:-1}),v("button",{className:"newsletter-signup-item__select",type:"button",onClick:()=>i(o)},y&&g&&v("div",{className:"newsletter-signup-item__cover"}),v("h5",{className:"newsletter-signup-item__title","aria-hidden":"true"},(0,me.decodeEntities)(t)),v("div",{className:"newsletter-signup-item__status-icon"}),v("p",{className:"newsletter-signup-item__description","aria-hidden":"true"},(0,me.decodeEntities)(n)),m&&v("div",{className:"newsletter-signup-item__meta"},d&&v("div",{className:"btn is-style-link md:is-style-outline"},v("a",{target:"_blank",href:u,className:"btn__link force-small is-text-underlined md:is-text-not-underlined",rel:"noreferrer nofollow"},s)),h&&v("a",{target:"_blank",href:c,className:"newsletter-signup-item__meta-logo",rel:"nofollow noreferrer"},"Sponsored By:",v("img",{src:a,alt:t}))),v("label",{htmlFor:`newsletter-${r}`,className:"visually-hidden newsletter-signup-item__action-label"},f)))};ve.propTypes={title:z().string.isRequired,description:z().string,slug:z().string.isRequired,postId:z().number.isRequired,isSelected:z().bool,onInvoke:z().func.isRequired,className:z().string,logo:z().string,logoLink:z().string,cta:z().string,ctaLink:z().string},ve.defaultProps={description:"",isSelected:!1,className:"",logo:"",logoLink:"",cta:"Learn More",ctaLink:""};var ye=ve,ge=window.wp.apiFetch,be=n.n(ge);var we=(e,t,n,r=()=>{},o=()=>{})=>{if(0===e.length)return;const _={action:t?"subscribe":"unsubscribe",subs:e};n&&(_.email=n),grecaptcha.ready((()=>{grecaptcha.execute(reCAPTCHA.siteKey,{action:"submit"}).then((e=>{if(null===e)throw console.warn("Recaptcha token is null"),new Error("Recaptcha token is null");return _.token=e,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:`newsletter_${_.action}`}),be()({path:"/tc/v1/newsletters/update-user-newsletters",method:"POST",parse:!1,data:_})})).then((e=>{if(!e.ok)throw new Error("Request failed");r(),o(!1)})).catch((e=>{console.warn("Signup error",e),o(!0)}))}))};function ke(e,t){for(var n in t)e[n]=t[n];return e}function xe(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Ne(e,t){this.props=e,this.context=t}(Ne.prototype=new b).isPureReactComponent=!0,Ne.prototype.shouldComponentUpdate=function(e,t){return xe(this.props,e)||xe(this.state,t)};var Se=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Se&&Se(e)};var Pe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ee(e){function t(t){var n=ke({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Pe,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ce=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var o,_=t;_=_.__;)if((o=_.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Ce(e,t,n,r)};var Te=t.unmount;function Oe(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=ke({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)}))),e}function Ue(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ue(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function He(){this.__u=0,this.t=null,this.__b=null}function Le(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Re(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Te&&Te(e)},(He.prototype=new b).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Le(r.__v),_=!1,i=function(){_||(_=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ue(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},He.prototype.componentWillUnmount=function(){this.t=[]},He.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Oe(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&v(g,null,e.fallback);return o&&(o.__u&=-33),[v(g,null,t.__a?null:e.children),o]};var Ae=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]{const{value:n,onChange:r,onBlur:o,name:_,id:i,type:l="text",placeholder:s="",required:u=null,label:a="",error:c="",isVisible:f=!0,className:p="",submit:d="",submitClassName:h="is-style-primary-green",privacyElement:m=null}=e;return v("div",{className:`form-input d-flex gap-8 flex-column ${p}`},a&&v("label",{htmlFor:_,className:"form-input__label d-block "+(f?"":"visually-hidden")},a," ",u&&"(required)"),v("div",{className:"d-flex flex-column gap-8 form-input__wrapper"},v("input",{ref:t,type:l,id:i||_,name:_,placeholder:s,value:n,onChange:r,onBlur:o,required:u,className:"form-input__input flex-grow-1 "+(c?"has-error":"")}),d&&v("div",{className:"d-flex gap-16"},v("div",{className:"btn"},v("button",{type:"submit",className:`btn__link ${h}`},"Subscribe")),m&&m)),c&&v("span",{className:"form-input__error status status--alert"},c))}));Ke.propTypes={value:z().string,onChange:z().func,onBlur:z().func,name:z().string,id:z().string,type:z().string,placeholder:z().string,label:z().string,required:z().oneOfType([z().string,z().bool]),error:z().oneOfType([z().string,z().bool]),submit:z().string,privacyElement:z().element};var Ge=Ke,Qe=()=>v("svg",{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},v("path",{d:"M7.5 4.5V6h9.442L4.5 18.442 5.558 19.5 18 7.058V16.5h1.5v-12h-12Z",fill:"var(--c-svg, currentColor)"}));function Xe(e){const{validity:t}=e;return t.valueMissing?"This field is required.":t.typeMismatch&&"email"===e.type?"Please enter an email address.":t.tooLong?`Please enter a value less than or equal to ${e.maxLength}.`:t.tooShort?`Please enter a value greater than or equal to ${e.minLength}.`:"The value you entered for this field is invalid."}var et=e=>{const[t,n]=oe(e),[r,o]=oe({}),[_]=oe((()=>{const t={};return Object.keys(e).forEach((e=>{t[e]={current:null}})),t})),i=se((e=>{let t=!0;if(e.current)if(e.current.validity.valid){const{[e.current.name]:t,...n}=r;o(n)}else t=!1,o({...r,[e.current.name]:Xe(e.current)});return t}),[r]),l=se((()=>{let e=!0;return Object.values(_).forEach((t=>{i(t)||(e=!1)})),e}),[_,i]);return{values:t,errors:r,formRefs:_,methods:{handleChange:e=>{const{name:r,value:o}=e.target;n({...t,[r]:o})},handleBlur:e=>{const{name:t}=e.target,n=_[t];n&&i(n)},handleSubmit:(e,t=null)=>{e.preventDefault();if(l()&&"function"===typeof t)t();else{const e=Object.keys(r)[0];e&&_[e].current&&_[e].current.focus()}}}}};const tt=({title:e,description:t,newsletters:n,urls:r,currentUserEmail:o})=>{const[_,i]=oe([]),[l,s]=oe("No newsletters"),[u,a]=oe(!1),{values:{email:c},errors:f,methods:{handleChange:p,handleBlur:d,handleSubmit:h},formRefs:m}=et({email:o});ie((()=>{_.length<=0?s("No newsletters"):1===_.length?s("1 newsletter"):s(`${_.length} newsletters`)}),[_]);const y=e=>{const t=_.includes(e);i(t?_.filter((t=>t!==e)):[..._,e])},b=e=>{const t=document.getElementById("aria-live-region");t&&(t.textContent=e,t.setAttribute("aria-live","assertive"))},w=()=>{a(!0);try{we(_,!0,c,(()=>{b(`You have subscribed to ${l}`),window.InfoPopup.create({title:"Thanks for subscribing!",description:"You should start seeing our newsletters in your mailbox real soon.",continueTitle:"Whats next?",continueSecription:"Create a free account to manage your newsletter preferences.",ctaText:"Create Your free Acount",ctaLink:window.tcFrontendData.identityUrls.register,secondaryText:"Already have an account?",secondaryCtaText:"Sign in",secondaryCtaLink:window.tcFrontendData.identityUrls.login}),a(!1)}),(e=>{e&&(b(`An error occurred while subscribing to ${l}`),window.InfoPopup.create({title:"There has been an error trying to subscribe.",description:"You can try checking your inbox for an email to manage your subscription preferences."}),a(!1))}))}catch(e){console.warn("error",e),a(!1)}},k=_.length>0&&!f.email;return v(g,null,v("div",{className:"d-flex justify-content-between mb-24 gap-8 flex-column"},v("div",{className:"d-flex-inline align-items-center gap-16"},e&&v("h3",{className:"newsletter-signup-compact__title has-h-1-font-size"},e),r.expandedSignup&&v("div",{className:"btn is-style-outline"},v("a",{className:"btn__link force-small",href:r.expandedSignup},"See More ",v(Qe,null)))),t&&v("p",{className:"newsletter-signup-compact__description"},t)),v("div",{id:"aria-live-region","aria-live":"off",style:{position:"absolute",left:"-9999px"}}),v("form",{"aria-busy":u,method:"POST",action:"/",className:"newsletter-signup-compact__form validated-form",onSubmit:e=>{h(e,w)},onChange:p,onBlur:d,noValidate:!0},v("div",{className:"d-flex gap-30 g-col-8 flex-column flex-md-row"},v("div",{className:"d-grid gap-8 g-col-8"},n.map((e=>v(ye,{className:"g-col-12 g-col-sm-6 g-col-lg-3",key:e.slug,title:e.title,description:e.description,slug:e.slug,postId:e.postId,isSelected:_.includes(e.postId),onInvoke:y})))),v("div",{className:"g-col-4 d-flex flex-column gap-8 justify-content-center flex-basis-30 flex-shrink-0"},v("legend",{role:"status","aria-live":"polite",className:"newsletter-signup-compact__status"},l," selected."),v("fieldset",null,v(Ge,{ref:m.email,type:"email",name:"email",required:!0,value:c,placeholder:"Email address",error:f.email,submit:u?"Subscribing...":"Subscribe",submitClassName:!k||u?"is-disabled force-small":"force-small",isVisible:!0,privacyElement:v("p",{className:"newsletter-signup-compact__compliance"},"By submitting your email, you agree to our"," ",v("a",{href:r.termsOfService},"Terms")," and"," ",v("a",{href:r.privacyPolicy},"Privacy Notice"),".")})),u&&v("div",{className:"screen-reader-text","aria-live":"assertive","aria-relevant":"additions"},u&&v("p",null,"Subscribing..."))))))};tt.propTypes={title:z().string,newsletters:z().arrayOf(z().shape({title:z().string,description:z().string,slug:z().string})),currentUserEmail:z().string,urls:z().shape({expandedSignup:z().string,privacyPolicy:z().string,termsOfService:z().string})},tt.defaultProps={title:"",newsletters:[],currentUserEmail:"",urls:{expandedSignup:null,privacyPolicy:null,termsOfService:null}};var nt=tt;const rt=({newsletters:e,urls:t,title:n,description:r,currentUserEmail:o})=>v(nt,{newsletters:e,urls:t,title:n,description:r,currentUserEmail:o});V()((()=>{const e=document.querySelectorAll(".wp-block-techcrunch-newsletter-signup-compact"),t=document.getElementById("newsletter-compact-initial-data");if(t&&e?.length){const n=JSON.parse(t.innerHTML);e.forEach((e=>{F(v(rt,{newsletters:n.newsletters,urls:n.urls,title:n.title,description:n.description,currentUserEmail:n.currentUserEmail}),e)}))}}))}()}();;