PageSourceSearch

https://www.xe.com/_next/static/chunks/pages/[locale]/currencyemail-95ab1069586bce6f.js

js xe.com collected 2026-09-24 08:26:41 UTC 16,938 bytes, 38 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9428],{2136:(e,r,t)=>{"use strict";t.d(r,{A:()=>i});var n=t(14343);let i=({triggerOnChange:e,containerRef:r})=>{let t=(0,n.useRef)(!0),i=(0,n.useMemo)(()=>{if(!t.current)return r.current.getBoundingClientRect()},[e]);(0,n.useEffect)(()=>{if(!t.current){let e=r.current.getBoundingClientRect();0!=e.height-i.height&&(window.requestAnimationFrame(()=>{r.current.style.transition="height 0.3s",r.current.style.height=`${i.height}px`,r.current.style.opacity=0,window.requestAnimationFrame(()=>{r.current.style.height=`${e.height}px`})}),r.current.addEventListener("transitionend",()=>{r.current.style.height="auto",r.current.style.transition="opacity 0.3s",r.current.style.opacity=1},{once:!0}))}},[e]),(0,n.useEffect)(()=>{t.current=!1},[])}},2348:(e,r,t)=>{"use strict";t.d(r,{A:()=>u});var n=t(15383),i=t(14343),o=t(50084),a=t.n(o),s=t(71705),l=t(20263),c=t(6729);let d={sm:{fontSize:14,padding:6},big:{fontSize:14,padding:8},md:{fontSize:16,padding:10},lg:{fontSize:20,padding:14}},h=(0,s.Ay)("button").withConfig({shouldForwardProp:e=>!["colorScheme","hasIconOnly","isHollow","isStretched","isFullyStretchedOnExtraSmallDevices","size"].includes(e)}).withConfig({componentId:"sc-fb4b8422-0"})(["display:inline-flex;justify-content:center;align-items:center;min-width:",";width:",";","{width:auto;}cursor:pointer;margin:0;outline-offset:4px;font-weight:500;text-align:center;text-decoration:none;transition-property:background-color,border-color;transition-duration:0.3s;"," "," ",""],({isStretched:e})=>e?"220px":0,({isFullyStretchedOnExtraSmallDevices:e})=>e?"100%":"auto",l.Wi.minWidthXs,({disabled:e})=>e?`
2    opacity: 0.38;
3    pointer-events: none;
4  `:"",({size:e,hasIconOnly:r})=>{let{fontSize:t,padding:n}=d[e];return`
5      padding: ${n}px ${r?n:2*n}px;
6      font-size: ${t}px;
7      & .button-icon {
8        width: ${t}px;
9        height: ${t}px;
10        color: currentColor;
11        flex-shrink: 0;
12        ${!r?"margin-right: 8px;":""}
13      }
14    `},({theme:e,colorScheme:r,isHollow:t})=>{let n=e.button[r][t?"hollow":"solid"],i=t?n:"#fff";return`
15      color: ${i};
16      &:link,
17      &:active,
18      &:visited {
19        /* overrides the value of a:link, a:active, and a:visited in charts.css in xecom */
20        color: ${i};
21      }
22      background: ${t?"none":n};
23      border: 2px solid ${n};
24      border-radius: 8px;
25
26      &:hover,&:focus {
27        background: ${t?(0,c.K)(n,.15):(0,c.F)(n,15)};
28        ${!t?`border-color: ${(0,c.F)(n,15)};`:""}
29      }
30      &:active {
31        background: ${t?(0,c.K)(n,.2):(0,c.F)(n,-20)};
32        ${!t?`border-color: ${(0,c.F)(n,-20)};`:""}
33      }
34    `}),p=(0,i.forwardRef)(function({children:e,colorScheme:r="primary",isHollow:t=!1,disabled:i=!1,size:o="md",isStretched:a=!1,isFullyStretchedOnExtraSmallDevices:s=!1,Icon:l,...c},d){return(0,n.jsxs)(h,{ref:d,colorScheme:r,isHollow:t,disabled:i,size:o,isStretched:a,isFullyStretchedOnExtraSmallDevices:s,hasIconOnly:l&&!e,...c,children:[l&&(0,n.jsx)(l,{className:"button-icon"}),e]})});p.propTypes={children:a().node,colorScheme:a().oneOf(["primary","danger"]),isHollow:a().bool,disabled:a().bool,size:a().oneOf(["sm","md","lg","big"]),isStretched:a().bool,isFullyStretchedOnExtraSmallDevices:a().bool,Icon:a().elementType};let u=p},6729:(e,r,t)=>{"use strict";t.d(r,{F:()=>a,K:()=>o});let n=/^#[\da-f]{3}(?:[\da-f]{3})?$/i;function i(e){if(!n.test(e))throw RangeError(`Expected a 3-digit or 6-digit hex number prefixed with #. Got: ${e}`);let r=e.substring(1);return 3===r.length&&(r=r.split("").map(e=>e+e).join("")),[parseInt(r.substring(0,2),16),parseInt(r.substring(2,4),16),parseInt(r.substring(4,6),16)]}function o(e,r){if("number"!=typeof r||isNaN(r)||r<0||r>1)throw RangeError(`Expect opacity to be a number between 0 and 1 (inclusive). Received: ${r}`);let[t,n,o]=i(e);return`rgba(${t}, ${n}, ${o}, ${r})`}function a(e,r){if("number"!=typeof r||isNaN(r)||r<-100||r>100)throw RangeError(`Expected percentage to be a number between -100 and 100. Received: ${r}`);let t=Math.round(2.55*r);return i(e).map(e=>Math.max(Math.min(e+t,255),0)).reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"#")}},18772:(e,r,t)=>{"use strict";t.d(r,{A:()=>p});var n=t(15383),i=t(14343),o=t(50084),a=t.n(o),s=t(71705),l=t(78567),c=t(6729);let d=(0,s.Ay)("a").withConfig({shouldForwardProp:e=>!["situated"].includes(e)}).withConfig({componentId:"sc-dc1ded78-0"})(["display:",";"," color:",";&:active{color:",";}text-decoration:",";&:hover,&:active{text-decoration:",";}"],({situated:e})=>
34"onItsOwn"===e?"inline-flex":"inline",({situated:e})=>"onItsOwn"===e?"align-items: center;":"",({theme:e})=>e.link.mainColor,({theme:e})=>(0,c.F)(e.link.mainColor,-20),({situated:e})=>"inBlockOfText"===e?"underline":"none",({situated:e})=>"inBlockOfText"===e?"none":"underline"),h=(0,i.forwardRef)(function({situated:e="inBlockOfText",children:r,...t},i){return(0,n.jsxs)(d,{ref:i,situated:e,...t,children:[r,"onItsOwn"===e?(0,n.jsx)(l.A,{width:"0.4375em",height:"0.75em",style:{marginLeft:"0.3125em",color:"currentColor"}}):null]})});h.propTypes={situated:a().oneOf(["inBlockOfText","inGroupOfLinks","onItsOwn"]),children:a().node};let p=h},46651:(e,r,t)=>{"use strict";t.d(r,{A:()=>o});var n=t(15383),i=t(18534);let o=({className:e,children:r,...t})=>(0,n.jsx)("section",{className:(0,i.cn)("large-container relative mx-auto max-w-(--breakpoint-xl) px-4 py-10","md:px-6 md:py-20","[.large-container_&]:p-0",e),...t,children:r})},52368:(e,r,t)=>{"use strict";t.d(r,{_:()=>i,_B:()=>a,fV:()=>o,f_:()=>s});var n=t(71705);let i=n.Ay.h1.withConfig({componentId:"sc-74ead8ba-0"})(["color:",";margin:0 0 32px;",""],({theme:e})=>e.heading.color,({theme:e})=>e.heading.accentColor?`
35    span {
36      color: ${e.heading.accentColor};
37    }
38  `:""),o=(0,n.Ay)(i).attrs({as:"h2"}).withConfig({componentId:"sc-74ead8ba-1"})([""]),a=(0,n.Ay)(i).attrs({as:"h3"}).withConfig({componentId:"sc-74ead8ba-2"})([""]),s=(0,n.Ay)(i).attrs({as:"h4"}).withConfig({componentId:"sc-74ead8ba-3"})([""])},53883:(e,r,t)=>{"use strict";t.d(r,{$:()=>l});var n=t(15383),i=t(50084),o=t.n(i),a=t(71705),s=t(77016);let l=({label:e,name:r,required:t,onChange:i,checked:o,className:a,style:l,...h})=>{let p=r.replace(/[\W]/g,"");return(0,n.jsxs)(d,{className:a,style:l,children:[(0,n.jsx)(c,{id:p,name:r,checked:o,onChange:i,...h}),(0,n.jsx)(s.A,{htmlFor:p,$required:t,children:e})]})};l.propTypes={label:o().node.isRequired,name:o().string.isRequired,required:o().bool,onChange:o().func.isRequired,checked:o().bool,className:o().string,style:o().object};let c=a.Ay.input.attrs({type:"checkbox"}).withConfig({componentId:"sc-4bbc5894-0"})(["position:relative;width:18px;height:18px;appearance:none;border:2px solid ",";border-radius:2px;margin:0;padding:0;background-color:#fff;&::-ms-check{border:2px solid ",";border-radius:2px;background-color:#fff;}&:active{background-color:#edeeef;}&:checked{background-color:",";border-color:",';}&:checked::before{position:absolute;content:"";width:6px;height:10px;border-bottom:2px solid #fff;border-right:2px solid #fff;bottom:3px;right:4px;transform:rotate(45deg);}&:disabled{opacity:0.38;}'],({theme:e})=>e.button.primary.solid,({theme:e})=>e.button.primary.solid,({theme:e})=>e.button.primary.solid,({theme:e})=>e.button.primary.solid),d=a.Ay.div.withConfig({componentId:"sc-4bbc5894-1"})(["display:flex;align-items:center;& ","{flex-shrink:0;margin-right:12px;}"],c)},69896:(e,r,t)=>{"use strict";t.r(r),t.d(r,{__N_SSP:()=>H,default:()=>U});var n,i=t(15383),o=t(14343),a=t(64863),s=t.n(a),l=t(50084),c=t.n(l),d=t(64136),h=t(71705),p=t(8521),u=t.n(p),m=t(29552),f=t.n(m);function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(null,arguments)}var b=(0,o.forwardRef)(function(e,r){return o.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 22 22","aria-hidden":"true",ref:r},e),n||(n=o.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 .5C5.201.5.5 5.201.5 11S5.201 21.5 11 21.5 21.5 16.799 21.5 11A10.5 10.5 0 0 0 11 .5zM11 20a9 9 0 1 1 0-18 9 9 0 0 1 0 18zm-1.5-4.875-3.75-3.72 1.192-1.178L9.5 12.762l5.557-5.512 1.193 1.185-6.75 6.69z",clipRule:"evenodd"})))}),g=(0,o.memo)(b),y=t(2348),w=t(95358),v=t(82718),j=t(46651),A=t(52368),k=t(53883),C=t(77016),S=t(65284),O=t(18772),$=t(24556),I=t(20263),E=t(98755),R=t(60491),N=t(2136),_=t(47049),F=t(78090),L=t(63853);let T=({onSubscriptionComplete:e})=>{let r,t=(0,_.c)("currencyemail"),n=(0,o.useRef)(null),a=(0,o.useRef)(),[s,l]=(0,o.useState)(!1),[c,h]=(0,o.useState)("USD"),[p,m]=(0,o.useState)("EUR"),[x,b]=(0,o.useState)(!1),[g,v]=(0,o.useState)(!1),[j,I]=(0,o.useState)(),E=e=>f()(e)?[!1,t("form.errors.required")]:[!0,""],N=(0,S.br)({validator:E}),F=(0,S.br)({validator:E}),T=(0,S.br)({validator:e=>f()(e)?[!1,t("form.errors.required")]:[u()(e),t("form.errors.invalidEmail")]}),B=(0,S.br)({validator:(r=T.value,e=>[e===r,t("form.errors.emailMismatch")])}),{currencyData:q}=(0,R.n)(),V=Object.keys(q).filter(e=>q[e].isObsolete||q[e].isCrypto),M=T.isValid&&B.isValid&&F.isValid&&N.isValid&&s,D=async r=>{r.preventDefault();let i=new FormData(n.current);i.append("primaryCurrency",c),p&&i.append("secondaryCurrency",p);try{let r=await fetch("/api/currency-email-signup/",{body:new URLSearchParams(i),method:"POST"});switch(r.status){case 200:e();break;case 400:throw Error(await r.text());default:throw Error(t("form.errorGeneric"))}}catch(e){I(e.message)}finally{a.current?.reset(),l(!1),v(!0)}};return(0,i.jsxs)(P,{ref:n,onSubmit:D,children:[(0,i.jsx)(A.fV,{style:{textAlign:"center"},children:t("form.heading3")}),(0,i.jsx)(S.fh,{label:t("form.firstNameLabel"),type:"text",name:"firstName",...N}),(0,i.jsx)(S.fh,{label:t("form.lastNameLabel"),type:"text",name:"lastName",...F}),(0,i.jsx)(S.fh,{label:t("form.emailLabel"),type:"email",name:"email",...T}),(0,i.jsx)(S.fh,{label:t("form.confirmEmailLabel"),type:"email",name:"confirmEmail",...B}),(0,i.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,i.jsx)(C.A,{htmlFor:"primaryCurrency",style:{marginBottom:"4px"},children:t("form.primaryCurrencyLabel")}),(0,i.jsx)("br",{}),(0,i.jsx)(w.A,{id:"primaryCurrency",name:"primaryCurrency",currentValue:c,onSelect:h,style:{width:"100%"}
38,blacklist:V})]}),(0,i.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,i.jsx)(C.A,{htmlFor:"secondaryCurrency",style:{marginBottom:"4px"},children:t("form.secondaryCurrencyLabel")}),(0,i.jsx)("br",{}),(0,i.jsx)(w.A,{id:"secondaryCurrency",name:"secondaryCurrency",currentValue:p,onSelect:m,style:{width:"100%"},blacklist:V})]}),(0,i.jsx)(z,{children:(0,i.jsx)(k.$,{label:t("form.marketingOptInLabel"),name:"marketingOptIn",onChange:()=>b(!x),checked:x,value:"yes"})}),(0,i.jsx)(d.A,{sitekey:"6LfN-g8TAAAAAPVIUyvYt2pm1nS_0lH37aoqvs9a",ref:a,onChange:e=>l(e),style:{alignSelf:"center",marginBottom:"24px"}}),(0,i.jsx)($.A,{style:{fontSize:"14px"},children:t.rich("form.privacyPolicy",{link:e=>(0,i.jsx)(O.A,{href:"https://help.xe.com/hc/sections/360005694438-Terms-and-policies",target:"_blank",rel:"noopener noreferrer",children:e})})}),(0,i.jsx)(y.A,{type:"submit",disabled:!M,children:t("form.subscribeButton")}),(0,i.jsx)(L.lG,{open:g,onOpenChange:()=>v(!1),children:(0,i.jsx)(L.Cf,{children:j})})]})};T.propTypes={onSubscriptionComplete:c().func};let B=h.Ay.div.withConfig({componentId:"sc-ac2bfbc7-0"})(["margin:auto;padding:48px;max-width:","px;border:1px solid #ddd;border-radius:26px;box-shadow:0px 3px 15px rgba(0,17,51,0.05);background:#fff;"],I.SL.xs),P=h.Ay.form.withConfig({componentId:"sc-ac2bfbc7-1"})(["display:flex;flex-direction:column;"]),z=h.Ay.div.withConfig({componentId:"sc-ac2bfbc7-2"})(["margin-bottom:24px;padding:24px;border:1px solid #ddd;border-radius:16px;box-shadow:0px 3px 15px rgba(0,17,51,0.05);& label{font-size:14px;font-weight:normal;color:var(--color-gray-750);}"]),q=h.Ay.div.withConfig({componentId:"sc-ac2bfbc7-3"})(["display:flex;flex-wrap:wrap;justify-content:space-around;& > *{:first-child{margin-bottom:12px;}grow:1;}","{& > *{:first-child{margin-bottom:0;}flex-grow:0;}}padding:48px;max-width:","px;margin:24px auto;border:1px solid #ddd;border-radius:24px;box-shadow:0px 3px 15px 0px rgba(0,17,51,0.05);"],I.Wi.minWidthMd,I.SL.md),V=h.Ay.div.withConfig({componentId:"sc-ac2bfbc7-4"})(["display:flex;align-items:center;text-align:left;& > svg:first-child{height:24px;width:24px;color:",";margin-right:8px;flex-shrink:0;}&:not(:last-child){margin-bottom:12px;}"],({theme:e})=>e.button.primary.solid),M=(0,h.i7)(["from{transform:scale3d(1,1,1);}10%,20%{transform:scale3d(0.9,0.9,0.9) rotate3d(0,0,1,-3deg);}30%,50%,70%,90%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);}40%,60%,80%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);}to{transform:scale3d(1,1,1);}"]),D=h.Ay.span.withConfig({componentId:"sc-ac2bfbc7-5"})(["display:inline-block;line-height:1;padding:36px;margin-bottom:36px;box-shadow:0px 10px 40px rgba(0,17,51,0.1);border-radius:50%;font-size:32px;animation:"," 1s;animation-delay:0.3s;"],M),W=()=>{let e=(0,_.c)("currencyemail"),r=(0,o.useRef)();return(0,o.useEffect)(()=>{r.current.scrollIntoView({behavior:"smooth",block:"center"})},[]),(0,i.jsxs)("div",{ref:r,style:{textAlign:"center"},children:[(0,i.jsx)(D,{children:"\uD83C\uDF89"}),(0,i.jsx)(A._B,{children:e("celebration.heading3")}),(0,i.jsx)($.A,{children:e("celebration.paragraph")}),(0,i.jsx)(O.A,{className:"bg-xe-primary-500 hover:bg-xe-primary-600 rounded-lg px-4 py-2.5 text-white",prefetch:!1,href:"/blog/",children:e("celebration.blogLink")})]})},G={link:e=>(0,i.jsx)(O.A,{prefetch:!1,href:"/xecurrencydata/",children:e})};var H=!0;let U=()=>{let e=(0,F.ot)(),r=(0,_.c)("currencyemail"),[t,n]=(0,o.useState)(!1),a=(0,o.useRef)();return(0,N.A)({triggerOnChange:t,containerRef:a}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s(),{children:[(0,i.jsx)("title",{children:r("title")}),(0,i.jsx)("meta",{name:"description",content:"Sign-up for Xe's daily currency newsletter to get daily analyses on currency markets, exchange rates, and news, delivered to your email inbox every day."})]}),(0,i.jsx)(h.NP,{theme:E.light2,children:(0,i.jsx)(v.A,{isAdjacentToSiteHeader:!0,children:(0,i.jsxs)(j.A,{style:{textAlign:"center"},children:[(0,i.jsx)(A._,{children:r("heading1")}),(0,i.jsx)($.A,{style:{maxWidth:"440px",marginLeft:"auto",marginRight:"auto"},children:r("introParagraph")}),(0,i.jsx)(y.A,{as:"a",href:"#subscribe",children:r("subscribeButton")}),(0,i.jsxs)(q,{children:[(0,i.jsx)("div",{children:e.currencyemail.checkieLeft.map(e=>(0,i.jsxs)(V,{children:[(0,i.jsx)(g,{}),e]},e))}),(0,i.jsx)("div",{children:e.currencyemail.checkieRight.map(e=>(0,i.jsxs)(V,{children:[(0,i.jsx)(g,{}),e]},e))})]}),(0,i.jsx)($.A,{style:{margin:0},children:r.rich("apiParagraph",G)})]})})}),(0,i.jsx)(h.NP,{theme:E.light1,children:(0,i.jsx)(v.A,{children:(0,i.jsx)(j.A,{children:(0,i.jsx)(B,{id:"subscribe",ref:a,children:t?(0,i.jsx)(W,{}):(0,i.jsx)(T,{onSubscriptionComplete:()=>n(!0)})})})})})]})}},71980:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[locale]/currencyemail",function(){return t(69896)}])},82718:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var n=t(15383),i=t(14343),o=t(21494),a=t.n(o),s=t(71705);let l=a()(()=>t.e(2710).then(t.bind(t,32710)),{loadableGenerated:{webpack:()=>[32710]},ssr:!1}),c=s.Ay.div.withConfig({componentId:"sc-b22ee665-0"})(["background-color:",";position:relative;"],({theme:e,color:r})=>r??(e.fluidContainer?.backgroundColor||"none")),d=(0,i.forwardRef)(function({children:e,guilloches:r,dataTestid:t,...i},o){return(0,n.jsxs)(c,{"data-testid":t,ref:o,...i,children:[r&&(0,n.jsx)("div",{className:"absolute top-0 size-full overflow-hidden",children:(0,n.jsx)("div",{className:"absolute top-0 left-[calc(50%-496px)] h-full w-248",children:r.map((e,r)=>(0,n.jsx)(l,{...e},r))})}),e]})})},95358:(e,r,t)=>{"use strict";t.d(r,{A:()=>u});var n=t(15383),i=t(14343),o=t(50084),a=t.n(o),s=t(78090),l=t(47049),c=t(71130),d=t(60491),h=t(38804);let p=({whitelist:e,blacklist:r,...t})=>{let{currencyData:o}=(0,d.n)(),a=(0,s.ot)(),p=(0,l.c)(),u=(0,i.useMemo)(()=>{let t=[];for(let[e,{isObsolete:r}]of Object.entries(o)){let i=a.currencies[e].name,o=r?`${i} (${p("misc.obsoleteLabel")})`:i,s=a.currencies[e].relatedTerms;s=Array.isArray(s)?s:[];let l=r=>(0,n.jsx)(c.A,{currencyCode:e,...r});t.push({value:e,description:o,keywords:s,Icon:l})}return e&&(t=t.filter(r=>e.includes(r.value))),r&&(t=t.filter(e=>!r.includes(e.value))),t},[o,e,r,a,p]),m=(0,i.useCallback)((e,r)=>o[e.value]?.isObsolete&&!o[r.value]?.isObsolete?1:!o[e.value]?.isObsolete&&o[r.value]?.isObsolete?-1:0,[o]);return(0,n.jsx)(h.A,{searchPlaceholder:p("misc.searchPrompt"),options:u,finalSortFn:m,...t})};
38p.propTypes={whitelist:a().arrayOf(a().string),blacklist:a().arrayOf(a().string)};let u=p}},e=>{e.O(0,[4715,1505,4039,8804,636,6593,8792],()=>e(e.s=71980)),_N_E=e.O()}]);

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.