PageSourceSearch

https://stellar.org/_next/static/chunks/87261.3145d35ced736f8c.js

js stellar.org collected 2026-10-01 08:46:22 UTC 5,280 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="fd1eba69-640f-4b73-8144-0b7f6a8fbd55",e._sentryDebugIdIdentifier="sentry-dbid-fd1eba69-640f-4b73-8144-0b7f6a8fbd55")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[87261],{15884:e=>{e.exports={container:"NewsletterSignUpSection_container__IqJ_W",contentWrapper:"NewsletterSignUpSection_contentWrapper__h4snf",introWrapper:"NewsletterSignUpSection_introWrapper__iHfkt",emailGroup:"NewsletterSignUpSection_emailGroup__xp4gC",emailRow:"NewsletterSignUpSection_emailRow__4VwdJ",emailInput:"NewsletterSignUpSection_emailInput__WXAs6",form:"NewsletterSignUpSection_form__6Ue1l",fieldError:"NewsletterSignUpSection_fieldError__TRt_P",subscriptionGroup:"NewsletterSignUpSection_subscriptionGroup__gaMg_",errorBanner:"NewsletterSignUpSection_errorBanner__NOiOs",successContent:"NewsletterSignUpSection_successContent__fejvG"}},87261:(e,s,t)=>{"use strict";t.r(s),t.d(s,{NewsletterSignUpSectionContainer:()=>w,default:()=>f});var i=t(6029),r=t(6772),n=t.n(r),a=t(55729),l=t(10022),d=t(11567),o=t(45497),c=t(5221),p=t(35617),u=t(50890),m=t(20453),b=t(977),g=t(15884),S=t.n(g);let h=e=>{let{id:s,testId:t,theme:r,intro:n,email:g,onEmailChange:h,emailErrorMessage:_,subscriptionItems:w,selectedIds:f,onSelectedIdsChange:y,subscriptionErrorMessage:N,legalText:x,status:j="idle",errorMessage:v,successContent:E,onSubmit:I}=e,U=(0,l.K)(),C=(0,a.useId)(),B=(0,a.useId)(),A=(0,a.useId)(),z="submitting"===j,P=(0,l.P)(U,"newsletterSignUpSection.emailLabel","Your email address"),k=(0,l.P)(U,"newsletterSignUpSection.emailPlaceholder","Enter your email address"),D=(0,l.P)(U,"newsletterSignUpSection.submitLabel","Submit"),W=(0,l.P)(U,"newsletterSignUpSection.subscriptionsLegend","Choose your newsletters");return(0,i.jsxs)(u.w,{className:S().section,id:s,testId:t,theme:r,type:"newsletterSignUpSection",children:[(0,i.jsx)(d.r,{}),(0,i.jsx)(c.m,{className:S().container,children:(0,i.jsxs)("div",{className:S().contentWrapper,children:[(0,i.jsxs)("div",{className:S().introWrapper,children:[n.subtitle&&(0,i.jsx)(m.E,{as:"span",size:"HeadingXS",isEyebrow:!0,children:n.subtitle}),(0,i.jsx)(m.E,{as:"h2",size:"HeadingL",textWrap:"balance",children:n.title}),n.body]}),"error"===j&&v&&(0,i.jsxs)("div",{className:S().errorBanner,role:"alert",children:[(0,i.jsx)(m.E,{as:"p",size:"BodyL",isBold:!0,children:v.title}),v.body]}),"success"===j&&E?(0,i.jsxs)("div",{className:S().successContent,children:[(0,i.jsx)(m.E,{as:"h3",size:"HeadingL",isBold:!0,children:E.title}),E.body,E.cta]}):(0,i.jsxs)("form",{className:S().form,onSubmit:I,noValidate:!0,children:[(0,i.jsxs)("div",{className:S().emailGroup,children:[(0,i.jsx)(m.E,{as:"label",htmlFor:C,size:"BodyM",isBold:!0,children:P}),(0,i.jsxs)("div",{className:S().emailRow,children:[(0,i.jsx)(b.k,{id:C,name:"email",className:S().emailInput,type:"email",value:g,onChange:h,placeholder:k,isDisabled:z,"aria-invalid":!!_||void 0,"aria-describedby":_?B:void 0,testId:"newsletter-email-input"}),(0,i.jsx)(p.K,{type:"submit",iconName:"arrowRight",variant:"primary",isDisabled:z,"aria-label":D,testId:"newsletter-submit-button"})]}),_&&(0,i.jsx)(m.E,{as:"div",id:B,size:"BodyS",className:S().fieldError,children:_})]}),(0,i.jsxs)("div",{className:S().subscriptionGroup,children:[(0,i.jsx)(o.$,{size:"large",items:w,selectedIds:f,onSelectedIdsChange:y,hasCollapsibleHeader:!1,legend:W,isDisabled:z,"aria-describedby":N?A:void 0}),N&&(0,i.jsx)(m.E,{as:"div",id:A,size:"BodyS",className:S().fieldError,children:N})]}),x]})]})})]})},_=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,w=e=>{let s=(0,l.K)(),t="6LdZS5snAAAAAPTpyxdR7lZc9Kr-M60B3ltApoXn",[r,d]=(0,a.useState)(t?"pending":"ready"),[o,c]=(0,a.useState)(""),[p,u]=(0,a.useState)(),[m,b]=(0,a.useState)([]),[g,S]=(0,a.useState)(),[w,f]=(0,a.useState)("idle"),y=(0,a.useCallback)(e=>{e.preventDefault();let i=new FormData(e.currentTarget).get("email"),n="string"==typeof i?i.trim():"";c(n);let a=n.length>0,d=a&&_.test(n),o=m.length>0;u(function(e,s,t){return s?t?void 0:(0,l.P)(e,"Email address is invali
1d","Email address is invalid"):(0,l.P)(e,"Email address is required","Email address is required")}(s,a,d)),S(o?void 0:(0,l.P)(s,"At least one subscription should be selected","At least one subscription should be selected")),d&&o&&"pending"!==r&&(f("submitting"),(async()=>{try{var e;let s=t?await (null==(e=window.grecaptcha)?void 0:e.enterprise.execute(t,{action:"SUBSCRIBE"})):void 0,i=await fetch("/api/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,subscriptionTypes:m,token:s})}),r=await i.json();f("ok"===r.message?"success":"error")}catch(e){f("error")}})())},[s,t,r,m]);return(0,i.jsxs)(i.Fragment,{children:[t?(0,i.jsx)(n(),{src:"https://www.google.com/recaptcha/enterprise.js?render=".concat(t),id:"recaptcha",strategy:"afterInteractive",onReady:()=>d("ready"),onError:()=>d("unavailable")}):null,(0,i.jsx)(h,{...e,email:o,onEmailChange:c,emailErrorMessage:p,selectedIds:m,onSelectedIdsChange:b,subscriptionErrorMessage:g,status:w,onSubmit:y})]})},f=w}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.