PageSourceSearch

https://exiap.ca/_next/static/chunks/542.d40b81d3ac512b7d.js

js exiap.ca collected 2026-10-08 01:45:56 UTC 11,556 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[542],{6542:function(e,c,r){r.r(c),r.d(c,{default:function(){return E}});var s=r(5893),l=r(1163),n=r(136),a=r(7294),t=r(5252),o=e=>{let{rows:c=5}=e;return(0,s.jsx)("div",{className:"p-skeleton-container",children:[...Array(c)].map((e,c)=>(0,s.jsxs)("div",{className:"flex flex-wrap mb-12",children:[(0,s.jsxs)("div",{className:"w-full md:w-2/12 px-2.5 lg:px-5 mb-4 md:mb-0",children:[(0,s.jsx)("span",{className:"skeleton-box relative inline-block overflow-hidden bg-gray-300 w-full h-5 mb-2.5"}),(0,s.jsx)("span",{className:"skeleton-box relative inline-block overflow-hidden bg-gray-300 w-full h-20 mb-2.5"}),(0,s.jsx)("span",{className:"skeleton-box relative inline-block overflow-hidden bg-gray-300 w-full h-5"})]}),(0,s.jsxs)("div",{className:"w-full md:w-8/12 px-2.5 lg:px-5 mb-4 md:mt-3",children:[(0,s.jsx)("span",{className:"skeleton-box relative inline-block overflow-hidden bg-gray-300 w-full h-20 mb-2.5"}),(0,s.jsx)("span",{className:"skeleton-box relative inline-block overflow-hidden bg-gray-300 w-full h-10"})]}),(0,s.jsx)("div",{className:"w-7/12 md:w-2/12 px-2.5 mx-auto md:mt-6",children:(0,s.jsx)("span",{className:"skeleton-box relative inline-block overflow-hidden bg-gray-300 w-full h-12"})})]},"skeleton-row-".concat(c)))})},i=r(5675),m=r.n(i),d=r(2567),u=r(518),x={src:"/_next/static/media/exchange-desk.4ce6127b.svg",height:1080,width:1080,blurWidth:0,blurHeight:0},h=e=>{let{displayConfig:c,introText:r,providers:l}=e,{t:a}=(0,n.$G)("widgets");return(0,s.jsxs)(u.Z,{...c,backgroundColorTheme:"white",className:"c-cmp-currx",children:[r?(0,s.jsx)(t.Z,{className:"max-w-screen-lg mx-auto mb-12 text-center",children:r}):null,(0,s.jsx)("div",{className:"bg-lightblue border-l-2 border-r-2 border-blue-300 px-5 py-6",children:(0,s.jsxs)("ul",{children:[l.map(e=>{let{apiId:c,affiliateUrl:r,logo:l,name:n}=e,t=a("currencyExchange.shortDesc_".concat(n),{defaultValue:null});return t?(0,s.jsxs)("li",{className:"text-[1.125rem] leading-7 mb-5 pb-5 flex flex-col sm:flex-row gap-6 items-center border-b border-blue-100 last:border-b-0 last:mb-0 last:pb-0",children:[(0,s.jsxs)(d.Z,{href:r,className:"font-semibold text-base text-content w-40 inline-block text-center shrink-0",children:[(0,s.jsx)("span",{className:"block",children:n}),l&&(0,s.jsx)(m(),{unoptimized:!0,src:l.url,width:100,height:76/l.width*l.height,alt:n,className:"inline mt-2"})]}),(0,s.jsx)("span",{className:"max-sm:text-center",children:t})]},c):null}),(0,s.jsxs)("li",{className:"text-[1.125rem] leading-7 mb-5 pb-5 flex flex-col sm:flex-row gap-6 items-center border-b border-blue-100 last:border-b-0 last:mb-0 last:pb-0",children:[(0,s.jsxs)(d.Z,{href:"#",className:"font-semibold text-base text-content w-40 inline-block text-center shrink-0",children:[(0,s.jsx)("span",{className:"block",children:a("currencyExchange.banks")}),(0,s.jsx)(m(),{unoptimized:!0,src:x,height:50,width:50,alt:a("currencyExchange.providerName_Banks","Banks"),className:"inline mt-2"})]}),(0,s.jsx)("span",{className:"max-sm:text-center",children:a("currencyExchange.shortDesc_Banks",{defaultValue:null})})]},"banks")]})})]})},p=r(9755),b=r.n(p),g=r(5819),v=r(7286),j=e=>{let{amount:c,reversed:r=!1,source:a,target:t}=e,{t:o}=(0,n.$G)("widgets"),{locale:i="en-GB"}=(0,l.useRouter)(),{currencySymbolPosition:m="before"}=(0,g.Z)(),d=o("currencyExchange.providerName_Banks","Banks"),u=o("currencyExchange.finePrint_Banks",{defaultValue:null});return(0,s.jsxs)("div",{className:"c-cmp-currx__row",children:[(0,s.jsx)("div",{className:"c-cmp-currx__title",children:d}),(0,s.jsxs)("div",{className:"c-cmp-currx__provider",children:[(0,s.jsx)("div",{className:"c-cmp-currx__provider-name",children:d}),(0,s.jsx)("div",{className:"c-cmp-currx__provider-logo min-w-[130px]",children:(0,s.jsx)(b(),{unoptimized:!0,src:x,height:70,width:70})})]}),(0,s.jsxs)("div",{className:"c-cmp-currx__details",children:[(0,s.jsxs)("div",{className:"c-cmp-currx__rates",children:[(0,s.jsxs)("div",{className:"c-cmp-currx__amount",children:[(0,s.jsx)("span",{className:"c-cmp-currx__amount-label",children:o("currencyExchange.exRate")}),(0,s.jsx)("span",{className:"c-cmp-currx__amount-value",children:o("currencyExchange.bankRate")})]}),(0,s.jsxs)("div",{className:"c-cmp-currx__amount",children:[(0,s.jsx)("span",{className:"c-cmp-currx__amount-label",children:r?o("currencyExchange.costsYou",{amount:"".concat((0,v.zf)(t.symbol||"",(0,v.DW)(c,i),m)," ").concat(t.code)}):o("currencyExchange.getsYou",{amount:"".concat((0,v.zf)(a.symbol||"",(0,v.DW)(c,i),m)," ").concat(a.code)})}),(0,s.jsx)("span",{className:"c-cmp-currx__amount-value",children:o("currencyExchange.askInStore")})]})]}),!!u&&(0,s.jsx)("p",{className:"c-cmp-currx__fineprint",children:u})]}),(0,s.jsx)("div",{className:"c-cmp-currx__cta"})]})},_=r(3754),f=r(2526),N=r(7189),y=e=>{let{buttonLabel:c,initialAmount:r,loading:l,onSubmit:t,source:o,target:i}=e,{t:m}=(0,n.$G)("widgets"),[d,u]=(0,a.useState)(null==r?void 0:r.toString()),[x,h]=(0,a.useState)(!1);return(0,a.useEffect)(()=>u(r),[r]),(0,s.jsxs)("div",{className:"c-cmp-currx c-cmp-currx__form",children:[(0,s.jsxs)("div",{className:"c-cmp-currx__form-label",children:[m("travelMoney.amount"),":"]}),(0,s.jsx)("div",{className:"c-cmp-currx__form-input",children:(0,s.jsx)(N.Z,{helper:x?i.symbol||void 0:o.symbol,value:d,onChange:e=>u(e.target.value),inputClassName:"border-gray-300 text-accent text-xl font-bold py-3 px-4"})}),(0,s.jsx)("div",{children:(0,s.jsx)(_.Z,{size:"large",buttons:[{active:!x,label:o.code,onClick:()=>h(!1)},{active:x,label:i.code,onClick:()=>h(!0)}]})}),(0,s.jsx)("div",{className:"c-cmp-currx__form-button",children:(0,s.jsx)(f.Z,{label:c,size:"large",onClick:()=>t({amount:d,reversed:x}),disabled:l})})]})},w=r(3384),k=e=>{let{affiliateUrl:c,logo:r,name:l}=e;return(0,s.jsxs)("div",{className:"c-cmp-currx__provider",children:[(0,s.jsx)("div",{className:"c-cmp-currx__provider-name",children:l}),(0,s.jsx)("div",{className:"c-cmp-currx__provider-logo",children:(null==r?void 0:r.url)&&(0,s.jsx)(d.Z,{href:c||"#",target:"_blank",rel:"nofollow",locale:!1,className:"flex",children:(0,s.jsx)(b(),{unoptimized:!0,src:r.url,height:70,width:(r.width||0)/(r.height||r.width||1)*70})})})]})},C=e=>{var c;let{provider:r,reversed:a=!1,source:t,target:o}=e,{t:i}=(0,n.$G)("widgets"),{locale:m="en-GB"}=(0,l.useRouter)(),{currencySymbolPosition:d="before"}=(0,g.Z)(),u=(null===(c=r.quotes)||void 0===c?void 0:c.length)?r.quotes[0]:null;if(!u)return null;let x=i("currencyExchange.providerName_".concat(r.name),r.name),h=i("currencyExchange.finePrint_".concat(r.name),{defaultValue:null}),p={minimumFractionDigits:2,maximumFractionDigits:2};return(0,s.jsxs)("div",{className:"c-cmp-currx__row",children:[(0,s.jsx)("div",{className:"c-cmp-currx__title",children:x}),(0,s.jsx)(k,{name:x,logo:r.logo,affiliateUrl:r.affiliateUrl}),(0,s.jsxs)("div",{className:"c-cmp-currx__details",children:[(0,s.jsxs)("div",{className:"c-cmp-currx__rates",children:[(0,s.jsxs)("div",{className:"c-cmp-currx__amount",children:[(0,s.jsx)("span",{className:"c-cmp-currx__amount-label",children:i("currencyExchange.exRate")}),(0,s.jsx)("span",{className:"c-cmp-currx__amount-value",children:(0,v.DW)(u.rate,m,{minimumFractionDigits:4,maximumFractionDigits:4})})]}),(0,s.jsxs)("div",{className:"c-cmp-currx__amount",children:[(0,s.jsx)("span",{className:"c-cmp-currx__amount-label",children:a?i("currencyExchange.costsYou",{amount:"".concat((0,v.zf)(o.symbol||"",(0,v.DW)(u.targetAmount,m),d)," ").concat(o.code)}):i("currencyExchange.getsYou",{amount:"".concat((0,v.zf)(t.symbol||"",(0,v.DW)(u.sourceAmount,m),d)," ").concat(t.code)})}),(0,s.jsx)("span",{className:"c-cmp-currx__amount-value",children:a?(0,s.jsxs)(s.Fragment,{children:[(0,v.zf)(t.symbol||"",(0,v.DW)(u.sourceAmount,m,p),d)," ",(0,s.jsx)("small",{children:t.code})]}):(0,s.jsxs)(s.Fragment,{children:[(0,v.zf)(o.symbol||"",(0,v.DW)(u.targetAmount,m,p),d)," ",(0,s.jsx)("small",{children:o.code})]})})]})]}),!!h&&(0,s.jsx)("p",{className:"c-cmp-currx__fineprint",children:h})]}),(0,s.jsx)("div",{className:"c-cmp-currx__cta",children:(0,s.jsx)(w.Z,{href:r.affiliateUrl,label:i("feesTable.goToSite"),external:!0,color:"brand",target:"_blank",rel:"nofollow sponsored noopener",locale:!1,size:"none",className:"min-w-[130px] max-w-[170px] px-3 py-3 break-words friendly-external-link"})})]})},E=e=>{var c,r,i;let{amount:m,description:d,disclaimer:x,displayConfig:p,initialFeesData:b,listIntro:_,showList:f=!1,source:N,target:w,title:k}=e,{t:E}=(0,n.$G)("widgets"),{currentPath:S}=(0,g.Z)(),{locale:Z="en-GB"}
1=(0,l.useRouter)(),[R,z]=a.useState(!1),[D,B]=a.useState(!!b),[F,A]=a.useState(null!=b?b:null),[U,W]=a.useState({amount:(null!=m?m:1e3).toString(10),sourceCountry:(N.countryCode||"").toString(),sourceCurrency:(N.code||"").toString(),targetCountry:(w.countryCode||"").toString(),targetCurrency:(w.code||"").toString(),reversed:!1});if((0,a.useEffect)(()=>{b||G({amount:(null!=m?m:1e3).toString(),reversed:!1}).then(()=>{})},[m,N.code,w.code]),!(null==N?void 0:N.code)||!(null==w?void 0:w.code))return null;let G=async e=>{z(!0),A(null);let{amount:c,reversed:r}=e;W({...U,amount:c,reversed:r});try{var s,l,n,a;let e=["locale=".concat((0,v.Om)(Z)),"amount=".concat(encodeURIComponent(c)),"reversed=".concat(r?"1":"0"),"sourceCountry=".concat(encodeURIComponent(null!==(s=N.countryCode)&&void 0!==s?s:"")),"sourceCurrency=".concat(encodeURIComponent(null!==(l=N.code)&&void 0!==l?l:"")),"targetCountry=".concat(encodeURIComponent(null!==(n=w.countryCode)&&void 0!==n?n:"")),"targetCurrency=".concat(encodeURIComponent(null!==(a=w.code)&&void 0!==a?a:"")),"slug=".concat(encodeURIComponent(S||""))],t=await fetch("/api/currency-exchange?".concat(e.join("&")),{headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer"}),o=await t.json()||[];A(o),B(!0),z(!1)}catch(e){B(!0),z(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(u.Z,{...p,backgroundColorTheme:"white",className:"c-cmp-currx",children:[k?(0,s.jsx)(t.Z,{className:"mb-8",children:k}):null,d?(0,s.jsx)(t.Z,{className:"max-w-screen-lg mx-auto mb-12",children:d}):null,(0,s.jsx)(y,{buttonLabel:E("currencyExchange.formButton"),initialAmount:null!==(i=null==m?void 0:m.toString())&&void 0!==i?i:"1000",loading:R,onSubmit:G,source:N,target:w})]}),(0,s.jsx)(u.Z,{...p,containerWidth:"max-w-custom-container-wider",className:"c-cmp-currx",children:(0,s.jsxs)("div",{className:"c-cmp-currx__results",children:[(null==F?void 0:null===(c=F.providers)||void 0===c?void 0:c.length)||!D||R?null:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-black",children:E("compareRatesFees.noResults")}),(0,s.jsx)("p",{children:E("compareRatesFees.noResultsBody")})]}),F?(0,s.jsxs)(s.Fragment,{children:[(F&&Array.isArray(F.providers)?F.providers:[]).map((e,c)=>{var r;let l="fee-result-".concat(e.name,"-").concat(F.sourceAmount,"-").concat(F.sourceCurrency,"-").concat(F.targetCurrency);return(null===(r=e.quotes)||void 0===r?void 0:r.length)?(0,s.jsx)(C,{provider:e,source:N,target:w,reversed:U.reversed},l):null}),(0,s.jsx)(j,{amount:parseInt(U.amount,10),source:N,target:w}),!!x&&(0,s.jsx)("div",{className:"mt-8 ",children:(0,s.jsx)(t.Z,{className:"mb-0 text-base",overrides:{a:{props:{className:"underline"}},p:{props:{className:"mb-0 text-base"}}},children:x})})]}):(!D||R)&&(0,s.jsx)(o,{rows:3})]})}),f&&_&&(null==F?void 0:null===(r=F.providers)||void 0===r?void 0:r.length)&&D&&!R?(0,s.jsx)(h,{displayConfig:p,introText:_,providers:F.providers}):null]})}}}]);

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.