1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2213],{42213:(e,t,n)=>{n.d(t,{A:()=>es});var a=n(59827),i=n(4452),o=n(85651),r=n(40029),l=n(70351),d=n(17600),s=n(29081);let c=({flow:e})=>{let t=e===s.T.PTM;return(0,a.Y)(r.B3,{children:(0,a.FD)(r.gY,{children:["Eleg\xed la ",(0,a.Y)("strong",{children:"app de tu banco"})," o ",(0,a.Y)("strong",{children:"app MODO"}),` para ${t?"pagar":"hacer la transferencia"}`]})})};var p=n(72223),m=n(38269),u=n(19671);let g=m.default.div.withConfig({componentId:"sc-95aceee4-0"})(["align-items:center;background:",";border-radius:0 0 20px 20px;display:flex;font-weight:600;gap:5px;height:90px;justify-content:center;text-align:center;"],u.w4.color.slimGray),h=m.default.div.withConfig({componentId:"sc-95aceee4-1"})(["height:100vh;background:",";"],u.w4.color.white),f=m.default.div.withConfig({componentId:"sc-95aceee4-2"})(["display:flex;flex-direction:column;justify-content:center;gap:5px;align-items:center;width:100%;"]),x=m.default.div.withConfig({componentId:"sc-95aceee4-3"})(["margin:3em 3em 2em;"]),b=m.default.div.withConfig({componentId:"sc-95aceee4-4"})(["font-size:16px;line-height:24px;text-align:center;font-family:var(--font-red-hat-display,'Red Hat Display'),Poppins;"]),w=m.default.div.withConfig({componentId:"sc-95aceee4-5"})(["background:",";margin:2em;padding:0.8em 0;width:90%;display:flex;justify-content:center;align-items:center;border-radius:18px;"],e=>e.theme.color.brand.primary),y=m.default.p.withConfig({componentId:"sc-95aceee4-6"})(["font-size:16px;"]),I=m.default.p.withConfig({componentId:"sc-95aceee4-7"})(["color:",";font-family:var(--font-red-hat-display,'Red Hat Display'),Poppins;font-weight:bold;font-size:18px;"],u.w4.color.white),v=m.default.p.withConfig({componentId:"sc-95aceee4-8"})(["background:",";padding:8px 22px;border-radius:30px;border:2px solid ",";margin-top:5px;text-align:center;font-size:16px;"],u.w4.color.white,u.w4.color.endedPromotions),_=m.default.p.withConfig({componentId:"sc-95aceee4-9"})(["margin:16px;background:",";border-radius:18px;padding:8px 20px;text-align:center;font-size:16px;"],u.w4.color.tertiaryGray08);var E=n(27804);let T="BLOCKED",Y="VOIDED",k="ACCEPTED",C="REJECTED",S="CANCELLED",N="ERROR",P=async({url:e,paymentIntentionId:t})=>{if(!t)return null;try{let{data:n}=await E.A.get(`${e}/merchants/ecommerce/payment-intention/${t}`);return n}catch(e){return console.error("Failed to fetch payment intention:",e),null}},A="Volver a la tienda",D="/static/images/paymentStatusError.svg";var R=n(68462),F=n.n(R),L=n(72277);let M=({status:e,storeName:t})=>{let n=(0,i.useRouter)(),[o,r]=(0,p.useState)(!1),{theme:l}=(0,L.dU)(),[d,s]=(0,p.useState)({title:"",desc:"",imgUrl:"",buttonText:""});return(0,p.useEffect)(()=>{(({status:e,setStatusWording:t,setIsPaymentSuccess:n})=>{switch(e){case Y:t({title:"Pago expirado",desc:"Volv\xe9 a la tienda y realiz\xe1 nuevamente el pago.",imgUrl:"/static/images/paymentStatusWarning.svg",buttonText:"Volver a intentar"});break;case T:t({title:"Por el momento no podes pagar\n con MODO en esta tienda",desc:"Intent\xe1 m\xe1s tarde para finalizar tu compra",imgUrl:"/static/images/qrError.svg",buttonText:A});break;case C:t({title:"Pago denegado",desc:"Por favor, volv\xe9 a la tienda y reintent\xe1 el pago.",imgUrl:D,buttonText:A});break;case S:case N:t({title:"Error en el pago",desc:"Por favor, volv\xe9 a la tienda y reintent\xe1 el pago.",imgUrl:D,buttonText:A});break;case k:n(!0),t({title:"Tu pago fue exitoso",desc:"",imgUrl:"/static/images/paymentStatusSuccess.svg",buttonText:""});break;default:t({title:"",desc:"",imgUrl:""})}})({status:e,setStatusWording:s,setIsPaymentSuccess:r})},[e]),(0,a.FD)(a.FK,{children:[(0,a.Y)(g,{children:d.title}),(0,a.Y)(h,{children:(0,a.FD)(f,{children:[(0,a.Y)(x,{children:d.imgUrl&&(0,a.Y)(F(),{src:d.imgUrl,alt:d.title,width:104,height:104})}),(0,a.Y)(b,{children:d.desc}),o&&t?(0,a.FD)(a.FK,{children:[(0,a.Y)(y,{children:"Pagaste a"}),(0,a.Y)(v,{children:t}),(0,a.Y)(_,{children:"Recibir\xe1s un mail confirmando tu compra.\n Ante cualquier duda consult\xe1 con la tienda."})]}):(0,a.Y)(w,{theme:l,onClick:()=>{let{callback:e}=n.query,t=decodeURIComponent(e);n.push(t)},children:(0,a.Y)(I,{children:d.buttonText})})]})})]})};var U=n(93858),O=n(49736),z=n(14284),$=n(11945);let q=({app:e,link:t,androidLink:n,packageName:o,flow:l,paymentInfo:c})=>{let p=(0,i.useRouter)(),m=l===s.T.PTM,u=e.name;return e?(0,a.FD)(r.Ct,{className:"mb-5",onClick:()=>{e&&((0,O.w)({eventName:"Landing App Selected",properties:{paymentFlow:"online",paymentSource:"online deeplink",bank:u,mobileFlowAvailable:!0,isLastUsedApp:!0,merchantName:c?.storeName,storeId:c?.storeId,status:c?.status,paymentIntentionId:c?.paymentIntentionId}}),p.push((0,d.Jv)({isAndroid:U.m0,packageName:o,name:u,link:t,androidLink:n})))},children:[(0,a.FD)(r.Rr,{children:[(0,a.Y)("img",{src:e.image_url,className:"mr-1 app-button-image",alt:"app-icon"}),(0,a.FD)(r.en,{children:[(0,a.Y)("p",{children:m?"Volv\xe9 a pagar con":"Volv\xe9 a transferir con"}),(0,a.Y)(r.td,{children:e.name})]})]}),(0,a.Y)(r.cL,{children:(0,a.Y)(z.g,{icon:$.XkK,size:"sm"})})]}):null},B=({src:e,className:t,alt:n})=>{let[i,o]=(0,p.useState)(!1);return i||!e?null:(0,a.Y)("img",{src:e,className:t,alt:n,onError:()=>o(!0)})},V=({app:e,link:t,androidLink:n,packageName:o,name:l,iconUrl:s,onClick:c,flow:p,paymentInfo:m})=>{let u=(0,i.useRouter)(),g=(0,d.Jv)({isAndroid:U.m0,packageName:o,name:l,link:t,androidLink:n}),h=n||t?n||t:"",f="Nueva App Macro"===l;return(0,a.Y)(r.Bd,{onClick:()=>{c?.({name:l,mobileFlowAvailable:!!h&&""!==h,paymentInfo:m}),""!=h&&((0,d.BJ)({app:e,flow:p}),u.push(g))},"data-testid":"button",children:(0,a.FD)(r.bP,{children:[(0,a.FD)(r.hh,{children:[f&&(0,a.Y)(r.Q7,{children:"Nueva"}),(0,a.Y)(B,{src:s,className:"mr-1 app-button-image",alt:"app-icon"})]}),(0,a.Y)(r.sS,{children:l})]})})},j=(0,m.keyframes)(["from{transform:translateY(100%);}to{transform:translateY(0);}"]),W=m.default.div.withConfig({componentId:"sc-71bbb794-0"})(["-moz-box-shadow:0px 0px 42px -9px rgba(0,0,0,0.38);-webkit-box-shadow:0px 0px 42px -9px rgba(0,0,0,0.38);align-items:center;background:",";border-radius:18px 18px 0 0;bottom:0;box-shadow:0px 0px 42px -9px rgba(0,0,0,0.38);display:flex;height:130px;justify-content:center;left:0;padding:22px 16px;position:fixed;width:100%;z-index:100;flex-direction:column;animation:"," 0.2s ease-in-out;"],u.w4.color.white,j),K=m.default.div.withConfig({componentId:"sc-71bbb794-1"})(["align-items:center;display:flex;flex-direction:column;justify-content:center;border:1px solid ",";background:",";border-radius:18px;
1"],u.w4.color.tertiaryGray08,u.w4.color.slimGray),X=m.default.div.withConfig({componentId:"sc-71bbb794-2"})(["align-items:center;background:",";border-radius:18px;border:1px solid ",";display:flex;gap:1em;justify-content:center;width:100%;padding:10px;margin:-1px;width:calc(100% + 1px);"],u.w4.color.white,u.w4.color.endedPromotions),G=m.default.p.withConfig({componentId:"sc-71bbb794-3"})(["text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-weight:600;padding:8px 15px;"]),H=m.default.p.withConfig({componentId:"sc-71bbb794-4"})(["text-align:end;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-weight:500;"]),J=m.default.div.withConfig({componentId:"sc-71bbb794-5"})(["font-size:22px;font-weight:500;display:flex;align-items:center;"]),Q=m.default.p.withConfig({componentId:"sc-71bbb794-6"})(["font-size:26px;font-weight:600;"]),Z=m.default.p.withConfig({componentId:"sc-71bbb794-7"})(["background:",";border-radius:6px;font-size:11px;font-weight:700;margin-top:-11px;margin-bottom:-4px;padding:0.3em 1em;text-align:center;"],u.w4.onlineStoresColors.store_with_promo_background),ee=m.default.p.withConfig({componentId:"sc-71bbb794-8"})(["font-size:16px;margin-top:1px;margin-right:2px;font-weight:600;"]),et=m.default.p.withConfig({componentId:"sc-71bbb794-9"})(["font-size:16px;margin-top:8px;font-weight:600;"]),en=({paymentInfo:e})=>{let[t,n]=(0,p.useState)({amountWithoutDecimals:"",amountDecimals:""}),[i,o]=(0,p.useState)(null);return((0,p.useEffect)(()=>{e&&(n((e=>{let t=Number.parseFloat(e);if(Number.isNaN(t))return{amountWithoutDecimals:"",amountDecimals:""};let n=t.toLocaleString("es-AR",{currency:"ARS",minimumFractionDigits:2,maximumFractionDigits:2});return{amountWithoutDecimals:n.split(",")[0]+",",amountDecimals:n.split(",")[1]}})(e?.amount)),o((e=>{if(e){let{hasInterest:t}=e;return`PAG\xc1 EN CUOTAS ${t?"FIJAS":"SIN INTER\xc9S"}`}return null})(e?.maxInstallment)))},[e?.amount]),e)?(0,a.Y)(W,{children:(0,a.FD)(K,{children:[(0,a.FD)(X,{children:[(0,a.Y)(H,{children:e.storeName}),(0,a.FD)(J,{children:[(0,a.Y)(ee,{children:"$"}),(0,a.Y)(Q,{children:t.amountWithoutDecimals}),(0,a.Y)(et,{children:t.amountDecimals})]})]}),i&&(0,a.Y)(Z,{children:i}),(0,a.Y)(G,{children:"Las promos aplican en la app al pagar"})]})}):null};var ea=n(19444);let ei=async({url:e,paymentRequestId:t})=>{if(!t)return null;try{let{data:n}=await E.A.get(`${e}/${t}`);return n}catch(e){return console.error("Failed to fetch payment request:",e),null}};var eo=n(50839);let er=!1,el=new Set([T,Y,C,N,S,k]);var ed=n(64069);let es=({apps:e,disabledApps:t,linkProperty:n,onClick:m,paymentEcommerceParams:u,flow:g})=>{let h=(0,i.useRouter)(),f=(0,d.Vx)({flow:g,router:h}),x=u?.callback,b=u?.callbackSuccess,w={qr:u?.qr,callback:x,callbackSuccess:b},{isLoading:y,showApps:I,paymentIntentionStatus:v,paymentInfo:_}=(({flow:e,router:t})=>{let[n,a]=(0,p.useState)(!1),[i,o]=(0,p.useState)(void 0),[r,l]=(0,p.useState)(!0),[d,c]=(0,p.useState)("CREATED");return(0,p.useEffect)(()=>{let i=(e,t)=>{if(!n&&!er){let n=e?.additionalInfo?.storeName||e?.additional_info?.store_name;(0,O.w)({eventName:"Landing App List Showed",properties:{paymentIntentionId:e?.payment_request_id||e.paymentIntentionId,paymentFlow:t,version:e?.payment_request_id?"v2":"v1",paymentSource:"online deeplink",merchantName:n,storeId:e?.storeId||!1,status:e?.
1status}}),er=!0}},r=async e=>{a(!0);let t=(0,ea.lh)("ONLINE_PAYMENT_REQUEST_API_URL",eo.env.ONLINE_PAYMENT_REQUEST_API_URL),n=await ei({url:t,paymentRequestId:e});n&&(c(n.status),l(!el.has(n.status))),n?.additional_info&&o({paymentIntentionId:n.payment_request_id,amount:n.additional_info.amount,storeName:n.additional_info.store_name,storeId:!1,status:n?.status}),a(!1),i(n,"online")},d=async e=>{a(!0);let t=(0,ea.lh)("API_BASE_MERCHANTS_URL",eo.env.API_BASE_MERCHANTS_URL),n=await P({url:t,paymentIntentionId:e});n&&(c(n.status),l(!el.has(n.status))),n?.additionalInfo&&o({paymentIntentionId:n.paymentIntentionId,...n.additionalInfo,storeId:n.storeId,status:n?.status}),a(!1),i(n,"online")},p=async()=>{if(e!==s.T.PTM)return;let{paymentIntentionId:n,paymentRequestId:a}=t.query;a?await r(a):n&&await d(n)};return p(),window.addEventListener("focus",p),()=>{window.removeEventListener("focus",p)}},[]),{isLoading:n,paymentInfo:i,paymentIntentionStatus:d,showApps:r}})({flow:g,router:h}),E=e=>"redirect-to-store"===e[n]?(0,l.w8)(e.app_info):e[n]&&null!==e[n]&&""!==e[n]&&n===o.f.PAYMENT_ECOMMERCE?((e,t)=>{let{qr:n,callback:a,callbackSuccess:i}=t,o=new URL(e),r=new URLSearchParams(o.search);return r.set("qr",n),r.set("callback",a),r.set("callbackSuccess",i),o.search=r.toString(),o.href})(e[n],w):e[n],T=e=>n===o.f.PAYMENT_ECOMMERCE?E(e):e.coupon_android_url;return(0,a.Y)(a.FK,{children:I?(0,a.FD)(a.FK,{children:[(0,a.Y)(c,{flow:g}),y?(0,a.Y)(ed.y,{}):(0,a.FD)(r.fj,{children:[(0,a.FD)(r.MP,{children:[f&&(0,a.Y)(q,{app:f,link:E(f),androidLink:T(f),packageName:d.EL.includes(f.name)?"":f.app_info?.android?.package_name,flow:g,paymentInfo:_}),(0,a.Y)(r.PE,{children:e.map(e=>(0,a.Y)(V,{app:e,iconUrl:e.image_url,name:e.name,packageName:d.EL.includes(e.name)?"":e.app_info?.android?.package_name,link:E(e),androidLink:T(e),onClick:m,flow:g,paymentInfo:_},e.name))})]}),(0,a.FD)(r.mW,{addPaddingBottom:_,children:[(0,a.FD)(r.NF,{children:[d.yx.SEPARATOR_TEXT," ",g==s.T.PTM?d.yx.SEPARATOR_TEXT_PTM:d.yx.SEPARATOR_TEXT_PTP]}),(0,a.Y)(r.vS,{children:t.map(e=>(0,a.Y)(r.k$,{children:(0,a.Y)(B,{src:e.image_url,className:"mr-1 disabled-app-button-image",alt:"disabled-app-icon"})},e.name))}),(0,a.Y)(r.NF,{dangerouslySetInnerHTML:{__html:g==s.T.PTM?d.yx.BOTTOM_TEXT_PTM:d.yx.BOTTOM_TEXT_PTP}}),(0,a.Y)(en,{paymentInfo:_})]})]})]}):(0,a.Y)(M,{status:v,storeName:_?.storeName})})}},70351:(e,t,n)=>{n.d(t,{$W:()=>i,V0:()=>o,w8:()=>r});var a=n(74448);let i=e=>`https://play.google.com/store/apps/details?id=${e.android.package_name}`,o=e=>`https://apps.apple.com/ar/app/${e.ios.app_name}/id${e.ios.app_id}`,r=e=>(0,a.Cu)()?o(e):i(e)}}]);
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.