PageSourceSearch

https://mobig.mx/build/assets/Compatibility-C3VmNmDI.js

js mobig.mx collected 2026-10-02 22:35:02 UTC 4,858 bytes, 6 lines download raw bytes

1import{r as i,j as e}from"./app-C9nm_a_f.js";import{p as F}from"./api-ChEaS82v.js";import{B as I}from"./Button-D7lFmnIy.js";import{B as S}from"./BaseLayout-DzeKnvOq.js";import"./app-Bz1QbZCQ.js";import"./clientFlashStore-ooQFrdsc.js";import"./LoginController-B83tSgMb.js";import"./FloatingAlert-D3uk_N0H.js";import"./FlashAlert-B8YS-RUi.js";import"./Icons-e_poaYtE.js";import"./Footer-BPA7SEXD.js";import"./paypal-js-c7UYulfR.js";import"./Navbar-BdhTRaWC.js";import"./ClientProfileController-CqmbE1T5.js";import"./NavbarItems-BzRuGEQb.js";const C=({title:j="Validar compatibilidad"})=>{const[s,c]=i.useState(""),[d,x]=i.useState(""),[a,u]=i.useState(!1),[p,h]=i.useState(null),[l,f]=i.useState("input"),[n,b]=i.useState(null),r=i.useMemo(()=>s.length===15,[s]),o=()=>{f("input"),h(null),b(null)};i.useEffect(()=>{l==="result"&&s!==d&&o()},[s,l,d]);const g=async()=>{if(!(!r||a)){u(!0),h(null);try{const t=await F("/api/compatibility",{imei:s}),m=t?.data?.compatibility??"unknown",w=t?.data?.imei_status??"Sin mensaje disponible";b({compatibility:m,imei_status:w}),x(s),f("result")}catch{o()}finally{u(!1)}}},y=()=>{o(),x(""),c("")},v=t=>t===!0?"bg-green-100 text-green-700":t===!1?"bg-red-100 text-red-700":"bg-slate-100 text-slate-700",N=t=>t==!0?"Compatible":t==!1?"No compatible":"Sin determinar";return e.jsx("section",{id:"imei-compatibility",className:"py-8 sm:py-12",children:e.jsx("div",{className:"mx-auto px-4 sm:px-6",children:e.jsx("div",{className:"mx-auto flex justify-center",children:e.jsxs("div",{className:["relative overflow-hidden rounded-lg border border-slate-200/60 bg-white","shadow-[0_10px_30px_rgba(15,23,42,0.12)]","transition-all duration-300 ease-out","flex flex-col","w-130 max-w-130","h-auto max-h-none min-h-0","sm:max-h-110 sm:min-h-78","scale-[0.98]"].join(" "),children:[e.jsxs("div",{className:"relative shrink-0 bg-[#FFF5F8] px-4 py-4 sm:px-8",children:[e.jsx("h2",{className:"text-center text-lg font-extrabold text-[#505050] sm:text-xl",children:l==="result"&&s?`Resultado para ${s}`:j}),e.jsx("img",{src:"/img/icons/Icon_compatibility.svg",alt:"Compatibilidad",className:"absolute w-22 h-22 -ml-4 top-1 rounded-full"})]}),e.jsx("div",{className:"relative min-h-0 flex-1",children:l==="input"?e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsx("div",{className:"min-h-0 flex-1 px-4 sm:px-8",children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsxs("div",{className:"mt-8.5 w-full",children:[e.jsx("input",{id:"imei",name:"imei",inputMode:"numeric",maxLength:15,value:s,onChange:t=>{const m=t.target.value.replace(/\D/g,"");c(m)},placeholder:"Ingresa el IMEI de tu equipo (15 dígitos)",className:["w-full rounded-lg bg-[#F2F2F2] ring-0 outline-none","px-4 py-3 sm:py-4","text-base font-medium text-slate-700 sm:text-lg","placeholder:text-slate-400"].join(" ")}),p?e.jsx("div",{className:"mt-2 text-sm font-medium text-red-600",children:p}):null]}),e.jsx("p",{className:"mt-6 mb-5 max-w-md text-sm sm:text-base text-[#6B7280]",children:"Al continuar validarás la compatibilidad con nuestra red."})]})}),e.jsx("div",{className:"mt-auto shrink-0 bg-[#FFF5F8] px-4 py-5 sm:px-8 sm:py-6",children:e.jsx(I,{type:"button",onClick:g,disabled:!r||a,className:["h-12 w-full rounded-full font-extrabold transition","text-base","active:scale-[0.99]",!r||a?"cursor-not-allowed opacity-50":"active:scale-[0.99]","disabled:hover:opacity-50 disabled:active:scale-100"].join(" "),children:a?"Validando...":"Continuar"})})]}):e.jsx("div",{className:"h-full min-h-0 animate-[rechargePop_.25s_ease-out]",children:e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsx("div",{className:"min-h-0 flex-1 px-4 sm:px-8",children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsx("div",{className:["inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-extrabold",v(n?.compatibility??"unknown")].join(" "),children:N(n?.compatibility??"unknown")}),e.jsx("p",{className:"mt-4 max-w-md text-sm font-semibold text-[#505050] sm:text-base",children:n?.imei_status??"Sin mensaje"})]})}),e.jsx("div",{className:"mt-auto shrink-0 bg-[#FFF5F8] px-4 py-5 sm:px-8 sm:py-6",children:e.jsx("div",{className:"flex flex-col gap-3",children:e.jsx("button",{type:"button",onClick:y,className:["h-12 w-full rounded-full font-extrabold transition","text-base","border border-[#
1EA6682]/40 bg-white text-[#EA6682]","hover:bg-white/90 active:scale-[0.99]"].join(" "),children:"Validar otro IMEI"})})})]})})}),e.jsx("style",{children:`
2              @keyframes rechargePop {
3                from { transform: scale(.98); opacity: 0; }
4                to   { transform: scale(1); opacity: 1; }
5              }
6            `})]})})})})};function z(){return e.jsx(S,{children:e.jsx(C,{})})}export{z as default};

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.