PageSourceSearch

https://torneodelaamistad.com/_next/static/chunks/a5807a615f79f25f.js

js torneodelaamistad.com collected 2026-10-05 10:45:52 UTC 41,764 bytes, 17 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,895775,979394,e=>{"use strict";var t=e.i(843476),r=e.i(500932);let n={sm:"h-9 w-9",md:"h-10 w-10",lg:"h-11 w-11",xl:"h-14 w-14"},a={sm:"-right-0.5 -bottom-0.5 h-2.5 w-2.5",md:"-right-0.5 -bottom-0.5 h-3 w-3",lg:"-right-0.5 -bottom-0.5 h-3 w-3",xl:"right-0 bottom-0 h-3.5 w-3.5"};function o(e){let o,s,i,l,c,d,u,h=(0,r.c)(18),{photoUrl:m,name:x,size:f,isLive:p}=e,b=void 0===f?"md":f,g=void 0!==p&&p,y=n[b],v=a[b];h[0]!==x?(s=0===(o=x.trim().split(/\s+/).filter(Boolean)).length?"?":1===o.length?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase(),h[0]=x,h[1]=s):s=h[1];let w=s,j=`relative inline-block shrink-0 ${y}`,k=`relative inline-flex ${y} items-center justify-center overflow-hidden rounded-full bg-brand-light text-xs font-semibold text-brand-primary ring-2 ring-white shadow-sm`;return h[2]!==w?(i=(0,t.jsx)("span",{"aria-hidden":!0,children:w}),h[2]=w,h[3]=i):i=h[3],h[4]!==x||h[5]!==m?(l=(0,t.jsx)("img",{src:m,alt:x,className:"absolute inset-0 h-full w-full object-cover",loading:"lazy"}
1),h[4]=x,h[5]=m,h[6]=l):l=h[6],h[7]!==k||h[8]!==i||h[9]!==l?(c=(0,t.jsxs)("span",{className:k,children:[i,l]}),h[7]=k,h[8]=i,h[9]=l,h[10]=c):c=h[10],h[11]!==v||h[12]!==g?(d=g?(0,t.jsxs)("span",{className:`absolute ${v} flex items-center justify-center`,"aria-hidden":!0,children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex h-full w-full rounded-full bg-emerald-500 ring-2 ring-white"})]}):null,h[11]=v,h[12]=g,h[13]=d):d=h[13],h[14]!==j||h[15]!==c||h[16]!==d?(u=(0,t.jsxs)("span",{className:j,children:[c,d]}),h[14]=j,h[15]=c,h[16]=d,h[17]=u):u=h[17],u}function s(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}function i(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}function l(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}function c(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}function d(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{d:"M18 6L6 18M6 6l12 12"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}function u(e){let n,a,o,s=(0,r.c)(4),{className:i}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a2 2 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),a=(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"}),s[0]=n,s[1]=a):(n=s[0],a=s[1]),s[2]!==i?(o=(0,t.jsxs)("svg",{className:i,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":!0,
1children:[n,a]}),s[2]=i,s[3]=o):o=s[3],o}function h(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}function m(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{d:"M9 18l6-6-6-6"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}function x(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{d:"M15 18l-6-6 6-6"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}function f(e){let n,a,o,s=(0,r.c)(4),{className:i}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("circle",{cx:"11",cy:"11",r:"7"}),a=(0,t.jsx)("path",{d:"M21 21l-4.35-4.35"}),s[0]=n,s[1]=a):(n=s[0],a=s[1]),s[2]!==i?(o=(0,t.jsxs)("svg",{className:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[n,a]}),s[2]=i,s[3]=o):o=s[3],o}function p(e){let n,a,o,s,i=(0,r.c)(5),{className:l}=e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),a=(0,t.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),o=(0,t.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"}),i[0]=n,i[1]=a,i[2]=o):(n=i[0],a=i[1],o=i[2]),i[3]!==l?(s=(0,t.jsxs)("svg",{className:l,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[n,a,o]}),i[3]=l,i[4]=s):s=i[4],s}function b(e){let n,a,o=(0,r.c)(3),{className:s}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("path",{d:"M6 15l6-6 6 6"}),o[0]=n):n=o[0],o[1]!==s?(a=(0,t.jsx)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n}),o[1]=s,o[2]=a):a=o[2],a}e.s(["CounsellorAvatar",()=>o],895775),e.s(["ChatBubbleIcon",()=>h,"ChevronLeftIcon",()=>x,"ChevronRightIcon",()=>m,"ChevronUpIcon",()=>b,"ClipboardListIcon",()=>c,"CloseIcon",()=>d,"EmailIcon",()=>l,"HelpCircleIcon",()=>p,"MapPinIcon",()=>u,"PhoneIcon",()=>i,"SearchIcon",()=>f,"WHATSAPP_GREEN",0,"#25D366","WhatsAppIcon",()=>s],979394)},59350,680537,e=>{"use strict";e.i(247167);var t=e.i(843476),r=e.i(500932),n=e.i(271645),a=e.i(174080);let o="skolaris-chatbot-visitor",s=e=>`asistente-session:${e}`;function i(e){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,8)}`}function l(){try{return window.matchMedia?.("(max-width:480px)").matches?"mobile":"desktop"}catch{return"desktop"}}function c(e){try{let t=JSON.parse(localStorage.getItem(`asistente:${e}`)||"null");if(t?.sessionId&&Date.now()-t.ts<864e5)return t.sessionId}catch{}try{let t=sessionStorage.getItem(s(e))||"";return t||(t=`s_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,sessionStorage.setItem(s(e),t)),t}catch{return`s_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}}function d({token:e,type:t,surface:r,sessionId:n,metadata:a}){try{let s="https://odwncmdbypjvsygwryfs.supabase.co";if(!e||!s)return;fetch(`${s}/functions/v1/chatbot-events`,{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({embed_token:e,event_type:t,session_id:n??c(e),visitor_id:function(){try{let e=localStorage.getItem(o)||"";return e||(e=i("v_"),localStorage.setItem(o,e)),e}catch{return i("v_")}}(),device:l(),variant:r,page_url:(location.origin+location.pathname).slice(0,500),metadata:a??{}})}).catch(()=>{})}catch{}}function u(e){try{let t=`skc-once:${e.surface}:${e.onceKey}:${e.token}`;if(sessionStorage.getItem(t))return;sessionStorage.setItem(t,"1")}catch{}d(e)}e.s(["getChatSessionId",()=>c,"getDevice",()=>l,"trackChatbotEvent",()=>d,"trackChatbotEventOnce",()=>u],680537);var h=e.i(351432);let m=["¿Cómo es el proceso de admisión?","¿Cuánto cuesta la colegiatura?","¿Qué niveles educativos tienen?"],x=["Pregúntame lo que quieras…","¿Cuánto cuesta la inscripción?","¿Ofrecen becas o ayudas?","¿Cómo es el proceso de admisión?","¿Puedo agendar una visita?"],f=/^(localhost|127\.0\.0\.1|10\.\d+\.\d+\.\d+|192\.168\.\d+\.\d+|172\.(1[6-9]|2\d|3[01])\.\d+\.\d+)$/.test(window.location.hostname);function p(e){return e.split(/(\*\*[^*\n]+\*\*)/g).map((e,r)=>/^\*\*[^*\n]+\*\*$/.test(e)?(0,t.jsx)("strong",{className:"font-semibold",children:e.slice(2,-2)},r):e.replace(/\*\*/g,""))}function b(e,t){return t&&0!==Object.keys(t).length?{...e??{},cta:t}:e}function g(e){try{let t=new URL(window.location.href),r={};return["utm_source","utm_medium","utm_campaign","utm_content","utm_term"].forEach(e
1=>{let n=t.searchParams.get(e);n&&(r[e]=n.slice(0,120))}),{surface:e,page_url:(t.origin+t.pathname).slice(0,300),page_title:document.title.slice(0,200),referrer:document.referrer?document.referrer.slice(0,300):"",utm:Object.keys(r).length?r:void 0}}catch{return null}}function y({showSuggestions:e=!0,className:r="w-full",suggestionsClassName:a="sm:grid-cols-2 lg:grid-cols-3",observeRef:o,onStartedChange:s,initialPrompt:i,initialDraft:u,sourceExtra:y,headerTitle:w,autoFocus:N=!1,appearance:_="card",onBackdropClick:S,surface:C="admissions-hero"}){let L="bare"===_,M=(0,h.useSchoolConfig)().chatbotEmbedToken,z="https://odwncmdbypjvsygwryfs.supabase.co",[E,$]=(0,n.useState)([]),[I,A]=(0,n.useState)([]),[R,T]=(0,n.useState)(!1),[W,B]=(0,n.useState)(null),[O,q]=(0,n.useState)(!1),[D,P]=(0,n.useState)(""),[F,V]=(0,n.useState)(null),[H,J]=(0,n.useState)(m),[K,U]=(0,n.useState)("Asistente con IA. Las respuestas son automatizadas y pueden no ser siempre precisas o completas. Para información oficial, contacta directamente al colegio."),[Z,G]=(0,n.useState)("Asistente de admisiones"),[X,Q]=(0,n.useState)(""),[Y,ee]=(0,n.use
1State)(0),et=(0,n.useRef)(null),er=(0,n.useRef)(""),en=(0,n.useRef)(null),ea=(0,n.useRef)(null),eo=(0,n.useRef)(null),[es,ei]=(0,n.useState)(null),el=(0,n.useRef)(!1),ec=(0,n.useRef)(0),ed=(0,n.useRef)(55),eu=(0,n.useRef)(null),eh=(0,n.useRef)(null),em=E.length>0,ex=E.map(e=>e.role).lastIndexOf("user"),ef=R&&!O&&!es,ep=E.map(e=>e.role).lastIndexOf("bot"),eb=L?"brightness-[.55] saturate-50":"opacity-35",[eg,ey]=(0,n.useState)(!0);(0,n.useEffect)(()=>{s?.(em)},[em,s]),(0,n.useEffect)(()=>{if(M){er.current=c(M);try{let e=JSON.parse(localStorage.getItem(`asistente:${M}`)||"null");e&&Date.now()-e.ts<864e5&&(et.current=e.conversationId||null,er.current=e.sessionId||er.current,Array.isArray(e.messages)&&$(e.messages),Array.isArray(e.chips)&&A(e.chips),!0===e.showLeadForm&&T(!0),e.leadForm&&"object"==typeof e.leadForm&&B(e.leadForm))}catch{}}},[M]),(0,n.useEffect)(()=>{if(M&&0!==E.length)try{localStorage.setItem(`asistente:${M}`,JSON.stringify({ts:Date.now(),sessionId:er.current,conversationId:et.current,messages:E.slice(-40),chips:I,showLeadForm:R,leadForm:W}))}catch{}},[E,I,R,W,M]),(0,n.useEffect)(()=>{if(!M||!z)return;let e=!1;return fetch(`${z}/functions/v1/chatbot-public-context`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({embed_token:M})}).then(e=>e.ok?e.json():null).then(t=>{if(e||!t)return;let r=t?.chatbot?.widget?.suggested_questions;Array.isArray(r)&&r.length>=2&&J(r.slice(0,4));let n=t?.chatbot?.widget?.disclaimer;"string"==typeof n&&n.trim()&&U(n.trim());let a=t?.chatbot?.name;"string"==typeof a&&a.trim()&&G(a.trim());let o=t?.chatbot?.welcome_message;"string"==typeof o&&o.trim()&&Q(o.trim())}).catch(()=>{}),()=>{e=!0}},[M,z]),(0,n.useEffect)(()=>{if(!el.current)return;let e=E[E.length-1];!e||"bot"!==e.role||(el.current=!1,window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||(ec.current=performance.now(),ed.current=Math.max(55,e.text.length/4),ei({idx:E.length-1,shown:0,total:e.text.length})))},[E]),(0,n.useEffect)(()=>{if(!es)return;if(es.shown>=es.total)return void ei(null);let e=requestAnimationFrame(()=>{let e=Math.floor((performance.now()-ec.current)/1e3*ed.current);ei(t=>t?{...t,shown:Math.min(t.total,Math.max(t.shown+1,e))}:t)});return()=>cancelAnimationFrame(e)},[es]),(0,n.useEffect)(()=>{let e=ea.current;if(!e)return;let t=e.scrollHeight-e.clientHeight,r=E[E.length-1],n=eo.current;if(!r||"user"===r.role||O||!n){e.scrollTop=t;return}e.scrollTop=Math.min(Math.max(0,n.offsetTop-12),t)},[E,O,R,es,I]),(0,n.useEffect)(()=>{let e=eu.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,160)}px`)},[D]),(0,n.useEffect)(()=>{if(em)return;let e=window.setInterval(()=>ee(e=>(e+1)%x.length),2800);return()=>window.clearInterval(e)},[em]);let ev=(0,n.useRef)(!1),ew=(0,n.useRef)(0),ej=(0,n.useCallback)((e,t)=>d({token:M,type:e,surface:C,sessionId:er.current||null,metadata:t}),[M,C]),ek=(0,n.useCallback)(async(e,t="typed")=>{let r=e.trim();if(r&&!O&&M&&z){"admissions-hero"!==C||ev.current||(ev.current=!0,ej("open",{trigger:"typed"===t?"input":"chip"})),ew.current+=1,ej("message",{turn:ew.current,via:t}),P(""),A([]),$(e=>[...e,{role:"user",text:r}]),q(!0);try{let e=await fetch(`${z}/functions/v1/chatbot-query`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:r,session_id:er.current,embed_token:M,conversation_id:et.current,language:"es",preview:f,source_context:b(g(C),y),device:l(),variant:C})}),t=await e.json();t.conversation_id&&(et.current=t.conversation_id),t.response?(el.current=!0,$(e=>[...e,{role:"bot",text:t.response,cards:t.cards}])):$(e=>[...e,{role:"bot",text:"No pude procesar tu mensaje en este momento. ¿Lo intentas de nuevo?"}]),A(Array.isArray(t.quick_replies)?t.quick_replies:[]);let n=!!(t.show_lead_form||t.fallback_capture);n&&ej("lead_form_view",{cta:t.lead_form?.cta??null,personalized:!!t.lead_form?.headline}),T(n),B(t.lead_form&&"object"==typeof t.lead_form?t.lead_form:null)}catch{$(e=>[...e,{role:"bot",text:"No pude conectar con el servidor. Revisa tu conexión e intenta de nuevo."}])}finally{q(!1)}}},[O,M,z,y,C,ej]),eN=(0,n.useCallback)(async e=>{if(M&&z){T(!1),$(t=>[...t,{role:"bot",text:`Gracias, ${e.name}. El equipo de admisiones recibi\xf3 tus datos y se pondr\xe1 en contacto contigo pronto.`}]);try{let t=await fetch(`${z}/functions/v1/chatbot-query`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:`__lead_capture:${JSON.stringify(e)}`,embed_token:M,session_id:er.current,conversation_id:et.current,preview:f,source_context:b(g(C),y),device:l(),variant:C})}),r=await t.json();r.conversation_id&&(et.current=r.conversation_id),t.ok&&!r.error&&ej("lead",{channel:e.email?"email":"phone"})}catch{}}},[M,z,C,y,ej]);(0,n.useEffect)(()=>{let e=o?.current??eh.current;if(!e||"u"<typeof IntersectionObserver)return;let t=new IntersectionObserver(([e])=>ey(e.isIntersecting),{threshold:0});return t.observe(e),()=>t.disconnect()}
1,[o]);let e_=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(e_.current||!M)return;let e=i?.trim();e&&(e_.current=!0,ek(e))},[i,M]),(0,n.useEffect)(()=>{let e=u?.trim();e&&P(e)},[u]),(0,n.useEffect)(()=>{if(!N)return;let e=eu.current;e?.focus({preventScroll:!0}),window.setTimeout(()=>e?.setSelectionRange?.(e.value.length,e.value.length),0)},[N,u]);let eS=(0,n.useCallback)(()=>{let e=o?.current??eh.current;e?.scrollIntoView({behavior:"smooth",block:"start"}),window.setTimeout(()=>eu.current?.focus({preventScroll:!0}),520)},[o]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:eh,className:r,children:[(0,t.jsxs)("div",{className:L?"flex min-h-0 flex-1 flex-col":"overflow-hidden rounded-[var(--brand-radius-lg)] bg-white shadow-xl",children:[M&&!L&&(0,t.jsxs)("div",{className:"flex items-center gap-2.5 border-b border-neutral-100 px-4 py-3",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:`aah-orb${O?" is-thinking":""}`,children:(0,t.jsxs)("span",{className:"aah-orb-eq",children:[(0,t.jsx)("i",{}),(0,t.jsx)("i",{}),(0,t.jsx)("i",{}),(0,t.jsx)("i",{})]})}),(0,t.jsx)("span",{className:"min-w-0 truncate font-body text-[13px] font-semibold text-neutral-900",children:w||Z}),(0,t.jsxs)("span",{className:"flex flex-none items-center gap-1.5 whitespace-nowrap border-l border-neutral-200 pl-2.5 font-body text-xs text-neutral-500",children:[(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-500"}),"En línea",(0,t.jsx)("span",{className:"hidden sm:inline",children:" · responde al instante"})]})]}),(em||X)&&(0,t.jsxs)("div",{className:L?"relative flex min-h-0 flex-1 flex-col overflow-y-auto px-1 pb-3 pt-10 [mask-image:linear-gradient(to_bottom,transparent,#000_72px)] [scrollbar-width:none]":"relative flex max-h-[56dvh] flex-col gap-3 overflow-y-auto bg-white p-4 md:p-5","aria-live":"polite",ref:ea,onClick:L&&S?e=>{e.target===e.currentTarget&&S()}:void 0,children:[(0,t.jsxs)("div",{className:L?"mt-auto flex flex-col gap-3":"contents",children:[X&&(0,t.jsx)("div",{className:`flex flex-col items-start gap-2 transition-[opacity,filter] duration-300 ${ef?eb:""}`,children:(0,t.jsx)("div",{className:`max-w-[85%] whitespace-pre-wrap rounded-[var(--brand-radius)] rounded-bl-md px-4 py-2.5 font-body text-sm leading-relaxed ${L?"bg-white text-neutral-900 shadow-lg":"bg-neutral-100 text-neutral-800"}`,children:X})}),E.map((e,r)=>{let n,a,o=es?.idx===r,s=o?e.text.slice(0,es.shown):e.text;return(0,t.jsxs)("div",{ref:r===ex?eo:void 0,className:`flex flex-col gap-2 transition-[opacity,filter] duration-300 ${"user"===e.role?"items-end":"items-start"} ${ef&&r!==ep?eb:""}`,children:[(0,t.jsx)("div",{className:`max-w-[85%] whitespace-pre-wrap rounded-[var(--brand-radius)] px-4 py-2.5 font-body text-sm leading-relaxed ${"user"===e.role?`rounded-br-md bg-brand-primary text-white${L?" shadow-lg":""}`:L?"rounded-bl-md bg-white text-neutral-900 shadow-lg":"rounded-bl-md bg-neutral-100 text-neutral-800"}`,children:"bot"!==e.role?s:o?(n=Math.max(0,s.length-14),a=s.slice(n).replace(/\*/g,""),(0,t.jsxs)(t.Fragment,{children:[p(s.slice(0,n)),Array.from(a).map((e,r)=>(0,t.jsx)("span",{style:{opacity:1-(r+1)/(a.length+1)*.9},children:e},r))]})):p(s)}),!o&&e.cards&&e.cards.length>0&&(0,t.jsx)(j,{children:e.cards.map((r,n)=>"photo"===r.kind&&r.image_url?(0,t.jsxs)("figure",{className:"m-0 w-48 flex-none overflow-hidden rounded-[var(--brand-radius)] border border-neutral-200 bg-white",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{let t=(e.cards??[]).filter(e=>"photo"===e.kind&&e.image_url);V({items:t.map(e=>({url:e.image_url,title:e.title})),index:Math.max(0,t.indexOf(r))})},"aria-label":`Ampliar foto${r.title?": "+r.title:""}`,className:"group/photo relative block w-full cursor-zoom-in p-0",children:[(0,t.jsx)("img",{src:r.image_url,alt:r.title||"",loading:"lazy",className:"h-28 w-full object-cover"}),(0,t.jsx)("span",{className:"absolute right-1.5 top-1.5 flex size-6 items-center justify-center rounded-md bg-black/55 text-white opacity-0 transition-opacity group-hover/photo:opacity-100",children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:[(0,t.jsx)("path",{d:"M15 3h6v6"}),(0,t.jsx)("path",{d:"M9 21H3v-6"}),(0,t.jsx)("path",{d:"M21 3l-7 7"}),(0,t.jsx)("path",{d:"M3 21l7-7"})]})})]}),(0,t.jsxs)("figcaption",{className:"flex flex-col gap-0.5 px-3 py-2",children:[r.title&&(0,t.jsx)("strong",{className:"font-body text-xs",children:r.title}),r.caption&&(0,t.jsx)("span",{className:"font-body text-[11px] leading-snug text-neutral-500",children:r.caption})]})]},n):"map"===r.kind&&r.embed_url?(0,t.jsxs)("figure",{className:"m-0 w-72 max-w-full flex-none overflow-hidden rounded-[var(--brand-radius)] border border-neutral-200 bg-white",children:[(0,t.jsx)("iframe",{src:r.embed_url,title:r.title||"Ubicación del colegi
1o",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",allowFullScreen:!0,className:"block h-36 w-full border-0"}),(0,t.jsxs)("figcaption",{className:"flex flex-col gap-0.5 px-3 py-2.5",children:[r.title&&(0,t.jsx)("strong",{className:"font-body text-xs",children:r.title}),r.address&&(0,t.jsx)("span",{className:"font-body text-[11px] leading-snug text-neutral-500",children:r.address}),r.maps_link&&(0,t.jsx)("a",{href:r.maps_link,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 font-body text-xs font-semibold text-brand-primary",children:"Cómo llegar →"})]})]},n):"handoff"===r.kind&&r.wa_url?(0,t.jsxs)("div",{className:"flex w-56 flex-none flex-col gap-0.5 rounded-[var(--brand-radius)] border border-[#25D366]/30 bg-[#25D366]/5 p-3",children:[(0,t.jsx)("strong",{className:"font-body text-xs",children:r.title||"Hablar con una persona"}),r.caption&&(0,t.jsx)("span",{className:"font-body text-[11px] text-neutral-500",children:r.caption}),(0,t.jsxs)("a",{href:r.wa_url,onClick:()=>ej("whatsapp_click",{source:C,placement:"handoff_card"}),target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-flex items-center justify-center gap-2 rounded-[var(--brand-radius)] bg-[#25D366] px-3 py-2 font-body text-xs font-bold text-white",children:[(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"size-4","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M12.04 2C6.58 2 2.13 6.45 2.13 11.9c0 1.76.46 3.45 1.34 4.95L2 22l5.3-1.39c1.45.79 3.08 1.21 4.74 1.21 5.46 0 9.91-4.45 9.91-9.9C21.95 6.45 17.5 2 12.04 2Zm5.8 14.09c-.24.68-1.42 1.31-1.95 1.36-.5.05-1.13.07-1.83-.11-.42-.13-.96-.31-1.65-.61-2.9-1.25-4.79-4.17-4.94-4.36-.14-.19-1.18-1.57-1.18-3s.75-2.13 1.02-2.42c.27-.29.58-.36.78-.36.19 0 .39 0 .56.01.18.01.42-.07.66.5.24.58.82 2.01.89 2.16.07.14.12.31.02.5-.09.19-.14.31-.28.48-.14.17-.29.37-.42.5-.14.14-.28.28-.12.55.16.27.72 1.19 1.55 1.93 1.06.95 1.96 1.24 2.24 1.38.28.14.44.12.6-.07.16-.19.69-.8.87-1.08.18-.28.36-.23.61-.14.25.09 1.59.75 1.86.89.27.14.45.21.52.32.07.11.07.64-.17 1.32Z"})}),"Continuar en WhatsApp"]})]},n):"visit_slot"===r.kind&&r.cta_message?(0,t.jsxs)("div",{className:"flex w-48 flex-none flex-col gap-0.5 rounded-[var(--brand-radius)] border border-neutral-200 bg-white p-3",children:[(0,t.jsx)("strong",{className:"font-body text-xs",children:r.title}),r.subtitle&&(0,t.jsx)("span",{className:"font-body text-[11px] text-neutral-500",children:r.subtitle}),(0,t.jsx)("button",{type:"button",onClick:()=>ek(r.cta_message,"card"),className:"mt-2 rounded-[var(--brand-radius)] bg-brand-primary px-3 py-2 font-body text-xs font-semibold text-white",children:r.cta_label||"Reservar"})]},n):null)})]},r)}),O&&(0,t.jsx)("div",{className:"flex items-start",children:(0,t.jsx)("div",{className:`flex gap-1.5 rounded-[var(--brand-radius)] rounded-bl-md px-4 py-3.5 ${L?"bg-white shadow-lg":"bg-neutral-100"}`,"aria-label":"Escribiendo",children:[0,1,2].map(e=>(0,t.jsx)("span",{className:"size-1.5 animate-pulse rounded-full bg-neutral-400",style:{animationDelay:`${150*e}ms`}},e))})}),R&&!O&&!es&&(0,t.jsx)(v,{leadForm:W,onSubmit:eN}),I.length>0&&!O&&!es&&!R&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:I.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>ek(e,"chip"),className:L?"rounded-full border border-white/35 bg-white/10 px-3.5 py-1.5 font-body text-xs font-semibold text-white backdrop-blur-sm transition-colors hover:bg-white/20":"rounded-full border border-brand-primary/30 bg-white px-3.5 py-1.5 font-body text-xs font-semibold text-brand-primary transition-colors hover:bg-brand-primary/5",children:e},e))})]}),(0,t.jsx)("div",{ref:en})]}),L&&!em&&e&&M&&(0,t.jsx)("div",{className:"mt-auto flex flex-wrap gap-2 px-1 pb-3",children:H.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>ek(e,"chip"),className:"rounded-full border border-white/35 bg-white/10 px-3.5 py-2 text-left font-body text-[13px] font-medium text-white backdrop-blur-sm transition-colors hover:bg-white/20",children:e},e))}),ef?(0,t.jsx)("div",{className:L?"flex justify-center pt-1":"border-t border-neutral-100 bg-white p-3 text-center",children:(0,t.jsx)("button",{type:"button",onClick:()=>{T(!1),window.setTimeout(()=>eu.current?.focus({preventScroll:!0}),0)},className:L?"rounded-full px-4 py-2 font-body text-sm text-white/80 underline decoration-white/40 underline-offset-4 transition-colors hover:text-white":"font-body text-sm text-neutral-500 underline decoration-neutral-300 underline-offset-4 hover:text-neutral-800",children:"Ahora no, prefiero seguir preguntando"})}):L?(0,t.jsxs)("form",{className:"flex items-end gap-2 rounded-[28px] bg-white py-2 pl-5 pr-2 shadow-2xl ring-1 ring-black/5",onSubmit:e=>{e.preventDefault(),ek(D)},children:[(0,t.jsx)("textarea",{ref:eu,rows:1,value:D,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),!O&&M&&D.trim()&&ek(D))},placeholder:em?"Escribe tu mensaje…":x[Y],"aria-label":"Tu pregunta",disabled:!M,className:"block max-h-32 min-h-[40px] w-full resize-none self-center bg-transparent py-2 font-body text-base leading-snug text-neutral-900 outline-none placeholder:text-neutral-400"}),(0,t.jsx)("button",{type:"submit","aria-label":"Enviar",disabled:O||!M||!D.trim(),className:"grid size-10 flex-none place-items-center rounded-full bg-brand-primary text-white transition-transform hover:scale-105 disabled:opacity-40",children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-5",children:(0,t.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})})})]}):(0,t.jsxs)("form",{className:`bg-white p-3.5 ${em?"border-t border-neutral-100":""}`,onSubmit:e=>{e.preventDefault(),ek(D)},children:[(0,t.jsx)("textarea",{ref:eu,rows:1,value:D,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),!O&&M&&D.trim()&&ek(D))},placeholder:M?em?"Escribe tu mensaje…":x[Y]:"El asistente aún no está activo en este colegi
1o","aria-label":"Tu pregunta",disabled:O||!M,className:"block max-h-40 min-h-[52px] w-full resize-none bg-transparent px-1 py-0.5 font-body text-base leading-relaxed text-neutral-900 outline-none placeholder:text-neutral-400"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"pl-1 font-body text-[11px] text-neutral-400",children:"Enter para enviar"}),(0,t.jsx)("button",{type:"submit","aria-label":"Enviar",disabled:O||!M||!D.trim(),className:"grid size-10 flex-none place-items-center rounded-[var(--brand-radius)] bg-brand-primary text-white transition-transform hover:scale-105 disabled:opacity-40",children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-5",children:(0,t.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})})})]})]})]}),!L&&!em&&e&&M&&(0,t.jsx)("div",{className:`mt-4 grid gap-2.5 ${a}`,children:H.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>ek(e,"chip"),className:"flex items-center justify-between gap-2.5 rounded-[var(--brand-radius)] border border-white/25 bg-white/10 px-4 py-3 text-left font-body text-[13px] font-medium text-white backdrop-blur-sm transition-all hover:-translate-y-0.5 hover:bg-white/20",children:[(0,t.jsx)("span",{children:e}),(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5 flex-none opacity-70",children:[(0,t.jsx)("path",{d:"M5 12h14"}),(0,t.jsx)("path",{d:"m12 5 7 7-7 7"})]})]},e))}),(0,t.jsx)("p",{className:`mx-auto max-w-xl text-center font-body text-[11px] leading-relaxed ${L?"mt-2.5 text-white/55":"mt-3 text-white/65"}`,style:{textAlign:"center"},children:K}),(0,t.jsx)("style",{children:`
2          .aah-orb{width:30px;height:30px;border-radius:50%;position:relative;flex:none;overflow:hidden;background:color-mix(in srgb,var(--brand-primary) 72%,#000);}
3          .aah-orb::before{content:"";position:absolute;inset:-40%;background:
4            radial-gradient(circle at 30% 28%,color-mix(in srgb,var(--brand-primary) 45%,#fff),transparent 42%),
5            radial-gradient(circle at 72% 60%,var(--brand-primary),transparent 48%),
6            radial-gradient(circle at 50% 82%,color-mix(in srgb,var(--brand-primary) 60%,#000),transparent 50%);
7            animation:aahSwirl 4.5s linear infinite;transition:opacity .3s;}
8          .aah-orb::after{content:"";position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 68% 72%,rgba(255,255,255,.25),transparent 55%);}
9          @keyframes aahSwirl{to{transform:rotate(360deg)}}
10          .aah-orb-eq{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:2.5px;opacity:0;transition:opacity .25s;}
11          .aah-orb-eq i{width:2.5px;height:5px;border-radius:2px;background:color-mix(in srgb,var(--brand-primary) 25%,#fff);animation:aahEq 1s ease-in-out infinite;}
12          .aah-orb-eq i:nth-child(2){animation-delay:.15s}.aah-orb-eq i:nth-child(3){animation-delay:.3s}.aah-orb-eq i:nth-child(4){animation-delay:.45s}
13          @keyframes aahEq{0%,100%{height:5px}50%{height:14px}}
14          @media (prefers-reduced-motion:reduce){.aah-orb::before,.aah-orb-eq i{animation:none}}
15          .aah-orb.is-thinking::before{opacity:.22;animation-play-state:paused;}
16          .aah-orb.is-thinking .aah-orb-eq{opacity:1;}
17        `})]}),em&&!eg&&M&&(0,t.jsxs)("button",{type:"button",onClick:eS,"aria-label":"Volver al chat del asistente",className:"fixed inset-x-0 z-[900] mx-auto flex w-fit max-w-[calc(100vw-2rem)] items-center gap-2.5 rounded-full bg-brand-primary px-5 py-3 font-body text-sm font-semibold text-white shadow-2xl ring-1 ring-white/15 transition-transform [animation:assistant-return-in_.32s_cubic-bezier(.2,.8,.2,1)] hover:-translate-y-0.5",style:{bottom:"max(1rem, env(safe-area-inset-bottom))"},children:[(0,t.jsxs)("span",{className:"relative grid size-5 flex-none place-items-center",children:[(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",className:"size-5",children:(0,t.jsx)("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5Z"})}),(0,t.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 roun
17ded-full bg-emerald-400 ring-2 ring-brand-primary","aria-hidden":!0})]}),"Volver al chat"]}),F&&(0,t.jsx)(k,{items:F.items,index:F.index,onIndex:e=>V(t=>t?{...t,index:e}:t),onClose:()=>V(null)})]})}function v(e){let a,o,s,i,l,c,d,u,h,m,x,f,p,b,g,y,v,j=(0,r.c)(46),{leadForm:k,onSubmit:N}=e,[_,S]=(0,n.useState)(""),[C,L]=(0,n.useState)(""),[M,z]=(0,n.useState)(!1),E=(0,n.useRef)(null),$=(0,n.useRef)(null),I=k?.headline||"¿Te gustaría que te contactemos?",A=k?.subline||"Déjanos tus datos y el equipo de admisiones te contacta.",R=k?.cta||"Enviar mis datos";j[0]===Symbol.for("react.memo_cache_sentinel")?(a=/^[^@\s]+@[^@\s.]+\.[^@\s]+$/,j[0]=a):a=j[0],j[1]!==C?(o=a.test(C.trim()),j[1]=C,j[2]=o):o=j[2];let T=o;j[3]!==C?(s=C.match(/\d/g)||[],j[3]=C,j[4]=s):s=j[4];let W=s.length>=8;j[5]!==_?(i=_.trim(),j[5]=_,j[6]=i):i=j[6];let B=i.length>=2,O=T||W,q=B&&O,D=M&&!B,P=M&&!O,F=w;j[7]!==C||j[8]!==T||j[9]!==_||j[10]!==B||j[11]!==q||j[12]!==N?(l=e=>{if(e.preventDefault(),!q){z(!0),(B?$:E).current?.focus();return}let t=C.trim();N(T?{name:_.trim(),email:t,phone:null}:{name:_.trim(),email:"",phone:t})},j[7]=C,j[8]=T,j[9]=_,j[10]=B,j[11]=q,j[12]=N,j[13]=l):l=j[13],j[14]!==I?(c=(0,t.jsx)("p",{className:"font-display text-base font-bold leading-snug text-neutral-900",children:I}),j[14]=I,j[15]=c):c=j[15],j[16]!==A?(d=(0,t.jsx)("p",{className:"mt-0.5 font-body text-xs leading-relaxed text-neutral-500",children:A}),j[16]=A,j[17]=d):d=j[17],j[18]!==c||j[19]!==d?(u=(0,t.jsxs)("div",{children:[c,d]}),j[18]=c,j[19]=d,j[20]=u):u=j[20],j[21]===Symbol.for("react.memo_cache_sentinel")?(h=e=>S(e.target.value),j[21]=h):h=j[21];let V=F(D);j[22]!==_||j[23]!==D||j[24]!==V?(m=(0,t.jsx)("input",{ref:E,value:_,onChange:h,placeholder:"Tu nombre",autoComplete:"name","aria-invalid":D,className:V}),j[22]=_,j[23]=D,j[24]=V,j[25]=m):m=j[25],j[26]!==D?(x=D&&(0,t.jsx)("p",{className:"-mt-1.5 font-body text-xs text-red-600",children:"Escribe tu nombre"}),j[26]=D,j[27]=x):x=j[27],j[28]===Symbol.for("react.memo_cache_sentinel")?(f=e=>L(e.target.value),j[28]=f):f=j[28];let H=F(P);return j[29]!==C||j[30]!==P||j[31]!==H?(p=(0,t.jsx)("input",{ref:$,value:C,onChange:f,placeholder:"Correo o WhatsApp","aria-invalid":P,className:H}),j[29]=C,j[30]=P,j[31]=H,j[32]=p):p=j[32],j[33]!==P?(b=P&&(0,t.jsx)("p",{className:"-mt-1.5 font-body text-xs text-red-600",children:"Escribe un correo o un número de WhatsApp"}),j[33]=P,j[34]=b):b=j[34],j[35]!==R?(g=(0,t.jsx)("button",{type:"submit",className:"rounded-[var(--brand-radius)] bg-brand-primary px-4 py-3 font-body text-sm font-semibold text-white shadow-sm transition-transform hover:-translate-y-px",children:R}),j[35]=R,j[36]=g):g=j[36],j[37]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)("p",{className:"text-center font-body text-[11px] leading-snug text-neutral-400",children:"Respuesta el mismo día · Sin compromiso · Solo el colegio ve tus datos"}),j[37]=y):y=j[37],j[38]!==m||j[39]!==x||j[40]!==p||j[41]!==b||j[42]!==g||j[43]!==l||j[44]!==u?(v=(0,t.jsxs)("form",{className:"flex max-w-sm flex-col gap-2.5 rounded-[var(--brand-radius)] border border-neutral-200 bg-white p-4",onSubmit:l,children:[u,m,x,p,b,g,y]}),j[38]=m,j[39]=x,j[40]=p,j[41]=b,j[42]=g,j[43]=l,j[44]=u,j[45]=v):v=j[45],v}function w(e){return`rounded-[var(--brand-radius)] border px-3.5 py-2.5 font-body text-sm outline-none ${e?"border-red-400 focus:border-red-500":"border-neutral-200 focus:border-brand-primary"}`}function j(e){let a,o,s,i,l,c,d,u,h,m=(0,r.c)(15),{children:x}=e,f=(0,n.useRef)(null);m[0]===Symbol.for("react.memo_cache_sentinel")?(a={left:!1,right:!1},m[0]=a):a=m[0];let[p,b]=(0,n.useState)(a);m[1]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=f.current;e&&b({left:e.scrollLeft>4,right:e.scrollLeft+e.clientWidth<e.scrollWidth-4})},m[1]=o):o=m[1];let g=o;m[2]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{g();let e=f.current;if(!e||"u"<typeof ResizeObserver)return;let t=new ResizeObserver(g);return t.observe(e),()=>t.disconnect()},i=[g],m[2]=s,m[3]=i):(s=m[2],i=m[3]),(0,n.useEffect)(s,i),m[4]===Symbol.for("react.memo_cache_sentinel")?(l=e=>f.current?.scrollBy({left:220*e,behavior:"smooth"}),m[4]=l):l=m[4];let y=l;return m[5]!==x?(c=(0,t.jsx)("div",{ref:f,onScroll:g,className:"flex max-w-full snap-x gap-2.5 overflow-x-auto pb-1 [scrollbar-width:none]",children:x}
17),m[5]=x,m[6]=c):c=m[6],m[7]!==p.left?(d=p.left&&(0,t.jsx)("button",{type:"button","aria-label":"Ver anteriores",onClick:()=>y(-1),className:"absolute top-1/2 z-10 grid size-8 -translate-y-1/2 place-items-center rounded-full bg-white text-neutral-800 shadow-lg ring-1 ring-black/10 transition-opacity hover:bg-neutral-50 -left-2",children:(0,t.jsx)(_,{dir:"left"})}),m[7]=p.left,m[8]=d):d=m[8],m[9]!==p.right?(u=p.right&&(0,t.jsx)("button",{type:"button","aria-label":"Ver más",onClick:()=>y(1),className:"absolute top-1/2 z-10 grid size-8 -translate-y-1/2 place-items-center rounded-full bg-white text-neutral-800 shadow-lg ring-1 ring-black/10 transition-opacity hover:bg-neutral-50 -right-2",children:(0,t.jsx)(_,{dir:"right"})}),m[9]=p.right,m[10]=u):u=m[10],m[11]!==c||m[12]!==d||m[13]!==u?(h=(0,t.jsxs)("div",{className:"relative max-w-full",children:[c,d,u]}),m[11]=c,m[12]=d,m[13]=u,m[14]=h):h=m[14],h}function k(e){let o,s,i,l,c,d,u,h,m,x,f,p,b=(0,r.c)(37),{items:g,index:y,onIndex:v,onClose:w}=e,j=g.length>1;b[0]!==y||b[1]!==g.length||b[2]!==v?(o=e=>v((y+e+g.length)%g.length),b[0]=y,b[1]=g.length,b[2]=v,b[3]=o):o=b[3];let k=o;b[4]!==k||b[5]!==j||b[6]!==w?(s=()=>{let e=e=>{if("Escape"===e.key)w();else if("ArrowRight"===e.key&&j)k(1);else{if("ArrowLeft"!==e.key||!j)return;k(-1)}e.stopImmediatePropagation(),e.preventDefault()};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},i=[k,j,w],b[4]=k,b[5]=j,b[6]=w,b[7]=s,b[8]=i):(s=b[7],i=b[8]),(0,n.useEffect)(s,i);let S=(0,n.useRef)(null);if("u"<typeof document)return null;let C=g[y]??g[0],L=C.title||"Foto ampliada";b[9]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{S.current=e.touches[0]?.clientX??null},b[9]=l):l=b[9],b[10]!==k||b[11]!==j?(c=e=>{let t=S.current;S.current=null;let r=e.changedTouches[0]?.clientX;!j||null==t||null==r||40>Math.abs(r-t)||k(r<t?1:-1)},b[10]=k,b[11]=j,b[12]=c):c=b[12],b[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-5",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),b[13]=d):d=b[13],b[14]!==w?(u=(0,t.jsx)("button",{type:"button","aria-label":"Cerrar",onClick:w,className:"fixed right-4 top-4 flex size-10 items-center justify-center rounded-full border-0 bg-white/15 text-white hover:bg-white/25",children:d}),b[14]=w,b[15]=u):u=b[15];let M=C.title||"";return b[16]!==C.url||b[17]!==M?(h=(0,t.jsx)("img",{src:C.url,alt:M,className:"max-h-[78vh] max-w-full rounded-xl object-contain shadow-2xl"},C.url),b[16]=C.url,b[17]=M,b[18]=h):h=b[18],b[19]!==y||b[20]!==C.title||b[21]!==g.length||b[22]!==j?(m=(C.title||j)&&(0,t.jsxs)("figcaption",{className:"flex items-center justify-center gap-3 text-center font-body text-sm font-medium text-white",children:[C.title&&(0,t.jsx)("span",{children:C.title}),j&&(0,t.jsxs)("span",{className:"tabular-nums text-white/60",children:[y+1," / ",g.length]})]}),b[19]=y,b[20]=C.title,b[21]=g.length,b[22]=j,b[23]=m):m=b[23],b[24]!==h||b[25]!==m?(x=(0,t.jsxs)("figure",{className:"m-0 flex max-h-[88vh] max-w-[min(92vw,1100px)] cursor-default flex-col gap-2.5",onClick:N,children:[h,m]}),b[24]=h,b[25]=m,b[26]=x):x=b[26],b[27]!==k||b[28]!==j?(f=j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button","aria-label":"Foto anterior",onClick:e=>{e.stopPropagation(),k(-1)},className:"absolute top-1/2 grid size-11 -translate-y-1/2 place-items-center rounded-full bg-white/15 text-white backdrop-blur-sm transition-colors hover:bg-white/25 left-3 md:left-6",children:(0,t.jsx)(_,{dir:"left"})}),(0,t.jsx)("button",{type:"button","aria-label":"Foto siguiente",onClick:e=>{e.stopPropagation(),k(1)},className:"absolute top-1/2 grid size-11 -translate-y-1/2 place-items-center rounded-full bg-white/15 text-white backdrop-blur-sm transition-colors hover:bg-white/25 right-3 md:right-6",children:(0,t.jsx)(_,{dir:"right"})})]}),b[27]=k,b[28]=j,b[29]=f):f=b[29],b[30]!==w||b[31]!==x||b[32]!==f||b[33]!==L||b[34]!==c||b[35]!==u?(p=(0,a.createPortal)((0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":L,onClick:w,onTouchStart:l,onTouchEnd:c,className:"fixed inset-0 z-[1000] flex cursor-zoom-out items-center justify-center bg-[rgba(6,12,20,.92)] p-6",children:[u,x,f]}),document.body),b[30]=w,b[31]=x,b[32]=f,b[33]=L,b[34]=c,b[35]=u,b[36]=p):p=b[36],p}function N(e){return e.stopPropagation()}function _(e){let n,a=(0,r.c)(2),{dir:o}=e,s="left"===o?"m15 18-6-6 6-6":"m9 18 6-6-6-6";return a[0]!==s?(n=(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-5","aria-hidden":"true",children:(0,t.jsx)("path",{d:s})}),a[0]=s,a[1]=n):n=a[1],n}e.s(["AssistantChatPanel",()=>y],59350)}]);

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.