/*! 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 _(){}function o(){}o.resetWarningCache=_,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:o,resetWarningCache:_};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 _=t[r];if(void 0!==_)return _.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.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?_=n[i]:"ref"==i?o=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 g(t,l,_,o,null)}function g(e,n,_,o,i){var l={type:e,props:n,key:_,ref:o,__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 y(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&&_.sort(l));x.__r=0}function S(e,t,n,r,_,o,i,l,s,u,a){var p,d,h,m,v,g=r&&r.__k||f,y=t.length;for(n.__d=s,P(n,t,g),s=n.__d,p=0;p0?g(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)?(_.__=e,_.__b=e.__b+1,l=T(_,n,i,a),_.__i=l,o=null,-1!==l&&(a--,(o=n[l])&&(o.__u|=131072)),null==o||null===o.__v?(-1==l&&c--,"function"!=typeof _.type&&(_.__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)&&_==s.key&&o===s.type)return i;i--}if(l=n.__.length&&n.__.push({}),n.__[e]}function _e(e){return Z=1,oe(he,e)}function oe(e,t,n){var r=re(F++,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=D,!D.u)){var _=function(e,t,n){if(!r.__c.__H)return!0;var _=r.__c.__H.__.filter((function(e){return!!e.__c}));if(_.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var i=!1;return _.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)&&(!o||o.call(this,e,t,n))};D.u=!0;var o=D.shouldComponentUpdate,i=D.componentWillUpdate;D.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,_(e,t,n),o=r}i&&i.call(this,e,t,n)},D.shouldComponentUpdate=_}return r.__N||r.__}function ie(e,t){var n=re(F++,3);!K.__s&&de(n.__H,t)&&(n.__=e,n.i=t,D.__H.__h.push(n))}function le(e,t){var n=re(F++,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){D=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),F=0;var t=(D=e.__c).__H;t&&(W===D?(t.__h=[],D.__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=[],F=0)),W=D},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=D=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=D,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),D=t}function pe(e){var t=D;e.__c=e.__(),D=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:_,isSelected:o,onInvoke:i,className:l,cta:s,ctaLink:u,logo:a,logoLink:c}=e,[f,p]=_e("");ie((()=>{p(o?`Remove ${t} from your subscription choices`:`Add ${t} to your subscription choices`)}),[o,t]);const d=s&&u,h=a&&c,m=d||h,g=l.includes("grid"),y=l.includes("has-featured-image");return v("div",{className:`newsletter-signup-item ${l} ${o?"newsletter-signup-item--selected":""}`},v("input",{type:"checkbox",id:`newsletter-${r}`,name:"newsletters[]",className:"visually-hidden newsletter-signup-item__control",value:_,checked:o,tabIndex:-1}),v("button",{className:"newsletter-signup-item__select",type:"button",onClick:()=>i(_)},g&&y&&v("div",{className:"newsletter-signup-item__cover"}),v("h5",{className:"newsletter-signup-item__title","aria-hidden":"true"},wp.htmlEntities.decodeEntities(t)),v("div",{className:"newsletter-signup-item__status-icon"}),v("p",{className:"newsletter-signup-item__description","aria-hidden":"true"},wp.htmlEntities.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:Y().string.isRequired,description:Y().string,slug:Y().string.isRequired,postId:Y().number.isRequired,isSelected:Y().bool,onInvoke:Y().func.isRequired,className:Y().string,logo:Y().string,logoLink:Y().string,cta:Y().string,ctaLink:Y().string},ve.defaultProps={description:"",isSelected:!1,className:"",logo:"",logoLink:"",cta:"Learn More",ctaLink:""};var ge=(e,t,n,r=()=>{},_=()=>{})=>{if(0===e.length)return;const o={action:t?"subscribe":"unsubscribe",subs:e};n&&(o.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 o.token=e,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:`newsletter_${o.action}`}),wp.apiFetch({path:"/tc/v1/newsletters/update-user-newsletters",method:"POST",parse:!1,data:o})})).then((e=>{if(!e.ok)throw new Error("Request failed");r(),_(!1)})).catch((e=>{console.warn("Signup error",e),_(!0)}))}))};function ye(e,t){for(var n in t)e[n]=t[n];return e}function be(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 we(e,t){this.props=e,this.context=t}(we.prototype=new b).isPureReactComponent=!0,we.prototype.shouldComponentUpdate=function(e,t){return be(this.props,e)||be(this.state,t)};var ke=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ke&&ke(e)};var Ne="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function xe(e){function t(t){var n=ye({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ne,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Se=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var _,o=t;o=o.__;)if((_=o.__c)&&_.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),_.__c(e,t);Se(e,t,n,r)};var Pe=t.unmount;function Ee(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=ye({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ee(e,t,n)}))),e}function Ce(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ce(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 Te(){this.__u=0,this.t=null,this.__b=null}function Oe(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function He(){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),Pe&&Pe(e)},(Te.prototype=new b).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var _=Oe(r.__v),o=!1,i=function(){o||(o=!0,n.__R=null,_?_(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ce(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)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ee(this.__b,n,r.__O=r.__P)}this.__b=null}var _=t.__a&&v(y,null,e.fallback);return _&&(_.__u&=-33),[v(y,null,t.__a?null:e.children),_]};var Ue=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:_,name:o,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:o,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||o,name:o,placeholder:s,value:n,onChange:r,onBlur:_,required:u,className:"form-input__input flex-grow-1 "+(c?"has-error":"")}),d&&v("div",{className:"d-flex gap-16"},v("div",{className:"btn flex-shrink-0"},v("button",{type:"submit",className:`btn__link ${h}`},"Subscribe")),m&&m)),c&&v("span",{className:"form-input__error status status--alert"},c))}));Ye.propTypes={value:Y().string,onChange:Y().func,onBlur:Y().func,name:Y().string,id:Y().string,type:Y().string,placeholder:Y().string,label:Y().string,required:Y().oneOfType([Y().string,Y().bool]),error:Y().oneOfType([Y().string,Y().bool]),submit:Y().string,privacyElement:Y().element};var Ze=Ye,Je=()=>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 Ke(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 Ge=e=>{const[t,n]=_e(e),[r,_]=_e({}),[o]=_e((()=>{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;_(n)}else t=!1,_({...r,[e.current.name]:Ke(e.current)});return t}),[r]),l=se((()=>{let e=!0;return Object.values(o).forEach((t=>{i(t)||(e=!1)})),e}),[o,i]);return{values:t,errors:r,formRefs:o,methods:{handleChange:e=>{const{name:r,value:_}=e.target;n({...t,[r]:_})},handleBlur:e=>{const{name:t}=e.target,n=o[t];n&&i(n)},handleSubmit:(e,t=null)=>{e.preventDefault();if(l()&&"function"===typeof t)t();else{const e=Object.keys(r)[0];e&&o[e].current&&o[e].current.focus()}}}}};const Qe=({newsletters:e,urls:t,currentUserEmail:n})=>{const[r]=_e(e?.[0]?.postId?[e[0].postId]:[]),[_,o]=_e("No newsletters selected"),[i,l]=_e(!1),{values:{email:s},errors:u,methods:{handleChange:a,handleBlur:c,handleSubmit:f},formRefs:p}=Ge({email:n});ie((()=>{r.length<=0?o("No newsletters"):1===r.length?o("1 newsletter"):o(`${r.length} newsletters`)}),[r]);const d=e=>{const t=document.getElementById("aria-live-region");t&&(t.textContent=e,t.setAttribute("aria-live","assertive"))},h=()=>{l(!0);try{ge(r,!0,s,(()=>{d(`You have subscribed to ${_}`),window.InfoPopup.create({title:"Thanks for subscribing!",description:"You should start seeing our newsletters in your mailbox real soon."}),l(!1)}),(e=>{e&&(d(`An error occurred while subscribing to ${_}`),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."}),l(!1))}))}catch(e){console.warn("error",e),l(!1)}},m=r.length>0&&!u.email&&""!==s;return v(y,null,v("h3",{className:"newsletter-signup-single__title has-h-5-font-size"},"Subscribe"),v("div",{className:"newsletter-signup-single__cover"},v("img",{alt:"TechCrunch Logo",role:"presentation",src:"/wp-content/themes/tc-24/assets/svg/tc-lockup-green.svg"})),v("h4",{className:"newsletter-signup-single__newsletter-title has-h-5-font-size"},(0,me.decodeEntities)(e[0]?.title)),v("p",{className:"newsletter-signup-single__newsletter-desc"},(0,me.decodeEntities)(e[0]?.description)),v("form",{"aria-busy":i,method:"POST",action:"/",className:"newsletter-signup-single__form validated-form",onSubmit:e=>{f(e,h)},onChange:a,onBlur:c,noValidate:!0},i&&v("div",{className:"screen-reader-text","aria-live":"assertive","aria-relevant":"additions"},i&&v("p",null,"Subscribing...")),v("div",null,v("fieldset",null,v(Ze,{className:"form-input--one-column",ref:p.email,type:"email",name:"email",required:!0,label:"Email address",value:s,placeholder:"Email address",error:u.email,submit:i?"Subscribing...":"Subscribe",submitClassName:!m||i?"is-disabled":"",isVisible:!0})),t.termsOfService&&t.privacyPolicy&&v("p",{className:"newsletter-signup-single__compliance"},"By submitting your email, you agree to our"," ",v("a",{href:t.termsOfService},"Terms")," and"," ",v("a",{href:t.privacyPolicy},"Privacy Notice"),"."))),v("div",{className:"d-flex justify-content-between align-items-start align-items-sm-center mb-24 flex-column flex-sm-row"},t.expandedSignup&&v("a",{className:"newsletter-signup-single__more d-flex align-items-center",href:t.expandedSignup},"Explore all newsletters ",v(Je,null))))};Qe.propTypes={newsletters:Y().arrayOf(Y().shape({title:Y().string,description:Y().string,slug:Y().string})),currentUserEmail:Y().string,urls:Y().shape({expandedSignup:Y().string,privacyPolicy:Y().string,termsOfService:Y().string})},Qe.defaultProps={newsletters:[],currentUserEmail:"",urls:{expandedSignup:null,privacyPolicy:null,termsOfService:null}};var Xe=Qe;const et=({newsletters:e,urls:t,currentUserEmail:n})=>v(Xe,{newsletters:e,urls:t,currentUserEmail:n});V()((()=>{const e=document.querySelectorAll(".wp-block-techcrunch-newsletter-signup-single"),t=document.getElementById("newsletter-single-initial-data");if(t&&e?.length){const n=JSON.parse(t.innerHTML);e.forEach((e=>{q(v(et,{newsletters:n.newsletters,urls:n.urls,currentUserEmail:n.currentUserEmail}),e)}))}}))}()}();;