1"use strict";(self.webpackChunkboletomovil=self.webpackChunkboletomovil||[]).push([[982],{982:(e,l,s)=>{s.r(l),s.d(l,{default:()=>A});var t=s(89379),a=s(49255),i=s(26348),n=s(47081),r=s(6460),o=s(90800),d=s(86964),c=s(9449),u=s(43737),x=s(94641),p=s(59841),v=s(31066),h=s(90900),m=s(76275),b=s(12565),g=s(98389),k=s(49693),f=s(72975),j=s(65983);const w=e=>{const l=e.replace(/\D/g,"").slice(0,18);return[l.slice(0,3),l.slice(3,6),l.slice(6,17),l.slice(17,18)].filter(Boolean).join(" ")},S=()=>(0,j.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:k.VD.GREEN,strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,j.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,j.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),y=()=>(0,j.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:k.VD.GREEN,strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,j.jsx)("rect",{x:"2",y:"6",width:"20",height:"12",rx:"2"}),(0,j.jsx)("line",{x1:"2",y1:"10",x2:"22",y2:"10"}),(0,j.jsx)("line",{x1:"6",y1:"14",x2:"8",y2:"14"})]}),N=()=>(0,j.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.42)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0,marginTop:1},children:[(0,j.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,j.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,j.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),z=e=>{var l;let{user:s}=e;const{t:n}=(0,o.Bd)(),d=(0,i.W6)(),{event:v,setSelectedSavedAccount:z}=(0,c.zM)(),W="tm"===(null===v||void 0===v?void 0:v.source),[A,B]=(0,a.useState)(""),[C,E]=(0,a.useState)(null),[_,L]=(0,a.useState)((null===s||void 0===s?void 0:s.name)||""),[M,F]=(0,a.useState)(!1),[D,H]=(0,a.useState)(null);(0,a.useEffect)(()=>{v||d.replace("/vender/nuevo/buscar")},[v,d]);const R=(0,a.useMemo)(()=>A.replace(/\D/g,""),[A]),I=18===A.length&&!!C&&_.trim().length>0,K=I&&!M,U=null===v||void 0===v||null===(l=v.artistName)||void 0===l?void 0:l.trim(),P=(U||(null===v||void 0===v?void 0:v.name)||"\xb7").charAt(0).toUpperCase(),T=[null===v||void 0===v?void 0:v.venue,null===v||void 0===v?void 0:v.city].filter(Boolean).join(", "),V=(0,f.p)(null===v||void 0===v?void 0:v.date,"bm"===(null===v||void 0===v?void 0:v.source));return(0,j.jsxs)(h.B,{active:"activas",user:s,children:[(0,j.jsxs)("div",{className:"max-w-[1400px] mx-auto px-8 pt-9 pb-11",children:[(0,j.jsxs)("div",{className:"flex items-end gap-[14px] mb-[18px] pb-[18px] border-b border-white/[0.07]",children:[(0,j.jsx)("button",{"aria-label":n("resaleSeller.sellWizard.desktop.back"),onClick:()=>d.goBack(),className:"w-[38px] h-[38px] rounded-full border-0 p-0 cursor-pointer flex-shrink-0 bg-white/[0.06] inline-flex items-center justify-center mb-[2px]",children:(0,j.jsx)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:(0,j.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{className:"text-[11px] text-white/[0.42] font-bold mb-2",style:{letterSpacing:"0.12em"},children:n("resaleSeller.sellWizard.desktop.step5")}),(0,j.jsx)("div",{className:"font-tiktok font-extrabold text-[40px] leading-none text-white",style:{letterSpacing:"-0.01em"},children:n("resaleSeller.sellWizard.desktop.registerNewAccount")})]})]}),(0,j.jsxs)("div",{className:"flex items-center justify-between gap-4 mb-[18px] flex-wrap",children:[v&&(0,j.jsxs)("div",{className:"inline-flex items-center gap-[9px] pl-[9px] pr-[13px] py-[7px] rounded-full bg-white/[0.04] border border-white/[0.07]",children:[(0,j.jsx)("span",{className:"w-[26px] h-[26px] rounded-full flex-shrink-0 inline-flex items-center justify-center font-anton text-[13px] text-white",style:{background:k.rw},children:P}),(0,j.jsxs)("span",{className:"text-[12.5px] text-white/80",children:[(0,j.jsx)("span",{className:"text-white/[0.42]",children:n("resaleSeller.sellWizard.desktop.sellingFor")})," ",(0,j.jsx)("strong",{className:"text-white font-bold",children:U||v.name}),U&&v.name&&v.name!==U?" \xb7 ".concat(v.name):"",T?" \xb7 ".concat(T):"",V?" \xb7 ".concat(V):""]})]}),(0,j.jsxs)("div",{className:"flex items-center gap-[10px] flex-shrink-0",children:[(0,j.jsx)("button",{onClick:()=>d.goBack(),className:"h-11 px-[22px] rounded-full cursor-pointer bg-transparent border border-white/[0.12] text-white/80 text-[14px] font-semibold",children:n("resaleSeller.sellWizard.desktop.cancel")}),(0,j.jsx)("button",{disabled:!K,onClick:async()=>
1{if(K&&v){F(!0);try{const o=await(0,p.ME)(),c=(0,t.A)((0,t.A)({},o),{},{Authorization:"Bearer ".concat(s.publicKey),"Bm-Language":r.Ay.language.slice(0,2)});if(W){var e,l,a;const s=await x.A.addExternalBankingInfo({bank_name:C,clabe:A,account_holder_name:_},c),t=(null===s||void 0===s||null===(e=s.data)||void 0===e||null===(l=e.account)||void 0===l?void 0:l.uuid)||(null===s||void 0===s||null===(a=s.data)||void 0===a?void 0:a.banking_info_uuid)||(null===s||void 0===s?void 0:s.banking_info_uuid);if(!t)throw new Error(n("resaleSeller.sellWizard.desktop.accountRegisterFailedShort"));z({source:"tm",bankingInfoUuid:t,bankName:C||void 0,accountHolderName:_,clabeMasked:"\u2022\u2022\u2022\u2022 ".concat(A.slice(-4))})}else{var i;const e=await x.A.createUserAccount({publicKey:s.publicKey,name:_,clabe:A,bank:C},c),l=(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.id);if(!l)throw new Error(n("resaleSeller.sellWizard.desktop.accountRegisterFailedShort"));z({source:"bm",accountId:l,bankName:C||void 0,accountHolderName:_,clabeMasked:"\u2022\u2022\u2022\u2022 ".concat(A.slice(-4))})}d.replace("/vender/nuevo/pago")}catch(m){var o,c,u,h;console.error("[StepPagoRegistrarDesktop] save failed",m),(0,p.Cv)(m),H({message:(null===m||void 0===m||null===(o=m.response)||void 0===o||null===(c=o.data)||void 0===c?void 0:c.error)||(null===m||void 0===m||null===(u=m.response)||void 0===u||null===(h=u.data)||void 0===h?void 0:h.message)||(null===m||void 0===m?void 0:m.message)||n("resaleSeller.sellWizard.desktop.saveAccountFailed"),type:"error"}),F(!1)}}},className:"h-11 px-[22px] rounded-full text-[14px] font-extrabold inline-flex items-center justify-center gap-2 transition-all ".concat(K?"bg-[#0CE988] text-[#0A0A0A] border-0 cursor-pointer":"bg-white/[0.06] text-white/55 border border-white/[0.12] cursor-not-allowed"),style:{boxShadow:K?k.Z$:"none"},children:n(M?"resaleSeller.sellWizard.desktop.saving":"resaleSeller.sellWizard.desktop.saveAccount")})]})]}),(0,j.jsx)("div",{children:(0,j.jsx)(m.To,{n:"1",title:n("resaleSeller.sellWizard.desktop.accountDataTitle"),subtitle:n("resaleSeller.sellWizard.desktop.accountDataSubtitle"),done:I,last:!0,children:(0,j.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,j.jsxs)("div",{children:[(0,j.jsx)(m.s$,{className:"mb-2",children:n("resaleSeller.sellWizard.desktop.accountHolder")}),(0,j.jsx)(b.A,{icon:(0,j.jsx)(S,{}),value:_,placeholder:n("resaleSeller.sellWizard.desktop.accountHolderPlaceholder"),onChange:L})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)(m.s$,{className:"mb-2",children:n("resaleSeller.sellWizard.desktop.clabeLabel")}),(0,j.jsx)(b.A,{icon:(0,j.jsx)(y,{}),value:w(A),placeholder:n("resaleSeller.sellWizard.desktop.clabePlaceholder"),onChange:e=>{const l=e.replace(/\D/g,"").slice(0,18);B(l);const s=(0,g.z)(l);s&&E(s)},inputMode:"numeric",right:{text:"".concat(R.length,"/18"),ok:18===R.length}})]}),C&&(0,j.jsxs)("div",{className:"text-[12.5px] text-white/65",children:[n("resaleSeller.sellWizard.desktop.bankDetected")," ",(0,j.jsx)("strong",{className:"text-white font-bold",children:C})]}),18===A.length&&!C&&(0,j.jsxs)("div",{className:"flex items-start gap-[6px] text-[12.5px] text-[#FF6B6B]",children:[(0,j.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#FF6B6B",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-[2px]",children:[(0,j.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,j.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,j.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),(0,j.jsx)("span",{children:n("resaleSeller.sellWizard.desktop.clabeUnrecognized")})]}),(0,j.jsxs)("div",{className:"flex items-start gap-3 px-4 py-[14px] rounded-[14px] bg-white/[0.04] border border-white/[0.07]",children:[(0,j.jsx)(N,{}),(0,j.jsxs)("span",{className:"flex-1 text-[13px] text-white/55 leading-relaxed",children:[n("resaleSeller.sellWizard.desktop.depositOnlyPrefix")," ",(0,j.jsx)("strong",{className:"text-white font-bold",children:n("resaleSeller.sellWizard.desktop.bankAccountMx")}),". ",n("resaleSeller.sellWizard.desktop.depositOnlySuffix")]})]})]})})})]}),D&&(0,j.jsx)(u.y8,{message:D.message,type:D.type,onClose:()=>H(null)})]})},W=e=>{let{user:l}=e;const s=(0,i.W6)(),{t:n}=(0,o.Bd)(),{event:v,setSelectedSavedAccount:h}=(0,c.zM)(),m="tm"===(null===v||void 0===v?void 0:v.source),[b,g]=(0,a.useState)(""),[k,f]=(0,a.useState)(""),[w,S]=(0,a.useState)((null===l||void 0===l?void 0:l.name)||""),[y,N]=(0,a.useState)(!1),[z,W]=(0,a.useState)(null);a.useEffect(()=>{v||s.replace("/vender/nuevo/buscar")},[v,s]);const A=18===b.length&&!!k&&!!w&&!y;return(0,j.jsxs)(d.ls,{children:[(0,j.jsxs)("div",{className:"relative z-[2] pt-[14px] pb-[120px]",children:[(0,j.jsx)(d.ad,{title:n("resaleSeller.sellWizard.steps.registrarTitle"),subtitle:n("resaleSeller.sellWizard.steps.registrarSubtitle"),onBack:()=>s.goBack()}),(0,j.jsx)(d.zm,{clabe:b,bankName:k,accountHolderName:w,onClabeChange:g,onBankNameChange:f,onAccountHolderNameChange:S})]}),(0,j.jsx)(d.Ew,{label:n(y?"resaleSeller.sellWizard.steps.saving":"resaleSeller.sellWizard.steps.saveAccount"),enabled:A,onClick:async()=>
1{if(A&&v){N(!0);try{const d=await(0,p.ME)(),c=(0,t.A)((0,t.A)({},d),{},{Authorization:"Bearer ".concat(l.publicKey),"Bm-Language":r.Ay.language.slice(0,2)});if(m){var e,a,i;const l=await x.A.addExternalBankingInfo({bank_name:k,clabe:b,account_holder_name:w},c),s=(null===l||void 0===l||null===(e=l.data)||void 0===e||null===(a=e.account)||void 0===a?void 0:a.uuid)||(null===l||void 0===l||null===(i=l.data)||void 0===i?void 0:i.banking_info_uuid)||(null===l||void 0===l?void 0:l.banking_info_uuid);if(!s)throw new Error(n("resaleSeller.sellWizard.steps.accountRegisterFailedShort"));h({source:"tm",bankingInfoUuid:s,bankName:k,accountHolderName:w,clabeMasked:"\u2022\u2022\u2022\u2022 ".concat(b.slice(-4))})}else{var o;const e=await x.A.createUserAccount({publicKey:l.publicKey,name:w,clabe:b,bank:k},c),s=(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.id);if(!s)throw new Error(n("resaleSeller.sellWizard.steps.accountRegisterFailedShort"));h({source:"bm",accountId:s,bankName:k,accountHolderName:w,clabeMasked:"\u2022\u2022\u2022\u2022 ".concat(b.slice(-4))})}s.replace("/vender/nuevo/pago")}catch(f){var d,c,u,g;console.error("[StepPagoRegistrar] save failed",f),(0,p.Cv)(f),W({message:(null===f||void 0===f||null===(d=f.response)||void 0===d||null===(c=d.data)||void 0===c?void 0:c.error)||(null===f||void 0===f||null===(u=f.response)||void 0===u||null===(g=u.data)||void 0===g?void 0:g.message)||(null===f||void 0===f?void 0:f.message)||n("resaleSeller.sellWizard.steps.accountSaveFailed"),type:"error"}),N(!1)}}}}),z&&(0,j.jsx)(u.y8,{message:z.message,type:z.type,onClose:()=>W(null)})]})},A=(0,n.Ng)(e=>({user:e.user}))(e=>(0,v.V1)(1024)?(0,j.jsx)(z,(0,t.A)({},e)):(0,j.jsx)(W,(0,t.A)({},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.