1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2226],{4942:function(e,t,l){Promise.resolve().then(l.bind(l,5320)),Promise.resolve().then(l.bind(l,5522)),Promise.resolve().then(l.bind(l,1982))},5320:function(e,t,l){"use strict";l.d(t,{default:function(){return o}});var a=l(7437),r=l(9027),n=l(2265),s=l(1921);let i=[{key:"respondent_name",label:"Nombre",type:"text",required:!0,placeholder:"Tu nombre"},{key:"respondent_email",label:"Correo electr\xf3nico",type:"email",required:!0,placeholder:"[email protected]",helpText:"Lo usamos solo para confirmar contigo la informaci\xf3n del punto."}],c=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function o(e){let{formSlug:t,fields:l,settings:o,triggerLabel:u}=e,[x,m]=(0,n.useState)(!1),[f,p]=(0,n.useState)({}),[b,h]=(0,n.useState)({}),[g,v]=(0,n.useState)(null),[y,j]=(0,n.useState)(!1),[N,k]=(0,n.useTransition)(),w=[...i,...l],$=(e,t)=>{p(l=>({...l,[e]:t})),h(t=>{if(!t[e])return t;let{[e]:l,...a}=t;return a})},C=()=>{p({}),h({}),v(null),j(!1)};return(0,a.jsxs)(r.fC,{open:x,onOpenChange:e=>{m(e),!e&&y&&C()},children:[(0,a.jsx)(r.xz,{asChild:!0,children:(0,a.jsx)("button",{type:"button",className:"inline-block bg-pear border-2 border-eerie-black rounded-md px-5 py-2.5 font-dk-canoodle text-lg lg:text-xl hover:-translate-y-0.5 duration-200",children:u})}),(0,a.jsxs)(r.h_,{children:[(0,a.jsx)(r.aV,{className:"fixed inset-0 bg-black/40 animate-fade animate-duration-300 z-40"}),(0,a.jsxs)(r.VY,{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[92vw] max-w-2xl max-h-[88vh] overflow-y-auto rounded-lg bg-baby-powder p-6 lg:p-8 z-50 animate-fade animate-duration-300",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(r.Dx,{className:"font-dk-canoodle text-2xl lg:text-3xl",children:u}),(null==o?void 0:o.successMessage)&&!y&&(0,a.jsx)(r.dk,{className:"sr-only",children:"Formulario para reportar un punto de acopio"})]}),(0,a.jsx)(r.x8,{asChild:!0,children:(0,a.jsx)("button",{type:"button",className:"text-lg font-medium underline flex-shrink-0",children:"Cerrar"})})]}),y?(0,a.jsxs)("div",{className:"mt-8",children:[(0,a.jsx)("p",{className:"text-lg lg:text-xl",children:(null==o?void 0:o.successMessage)??"Tu reporte qued\xf3 registrado. \xa1Gracias!"}),(0,a.jsx)("button",{type:"button",className:"mt-6 underline text-lg",onClick:C,children:"Reportar otro punto"})]}):(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),v(null);let l={};for(let e of w){let t=f[e.key],a=!t||"string"==typeof t&&!t.trim();e.required&&a?l[e.key]="Este campo es obligatorio":"email"!==e.type||a||c.test(String(t))||(l[e.key]="Escribe un correo v\xe1lido")}if(Object.keys(l).length>0){h(l);let e=w.find(e=>l[e.key]);if(e){let t=document.getElementById(`acopio-${e.key}`);null==t||t.scrollIntoView({block:"center",behavior:"smooth"}),null==t||t.focus({preventScroll:!0})}return}let{respondent_name:a,respondent_email:r,...n}=f;k(async()=>{let e=await (0,s.R2)({formSlug:t,data:n,respondentName:String(a??"").trim(),respondentEmail:String(r??"").trim()});e.success?j(!0):v(e.error??"No pudimos enviar el reporte.")})},noValidate:!0,className:"mt-6 flex flex-col gap-y-5",children:[w.map(e=>(0,a.jsx)(d,{campo:e,valor:"string"==typeof f[e.key]?f[e.key]:"",error:b[e.key],alEscribir:$},e.key)),g&&(0,a.jsx)("p",{className:"text-imperial-red font-medium",role:"alert",children:g}),(0,a.jsxs)("div",{className:"flex items-center gap-x-4 pt-2",children:[(0,a.jsx)("button",{type:"submit",disabled:N,className:"bg-pear border-2 border-eerie-black rounded-md px-5 py-2.5 font-dk-canoodle text-lg lg:text-xl disabled:opacity-60",children:N?"Enviando...":(null==o?void 0:o.submitButtonText)??"Enviar"}),(0,a.jsxs)("p",{className:"text-sm text-davys-gray",children:["Los campos con ",(0,a.jsx)("span",{className:"text-imperial-red",children:"*"})," son obligatorios."]})]})]})]})]})]})}function d(e){let{campo:t,valor:l,error:r,alEscribir:n}=e;if("hidden"===t.type)return null;let s=`acopio-${t.key}`,i=`w-full rounded-md border-2 bg-white px-3 py-2 text-base ${r?"border-imperial-red":"border-eerie-black"}`,c=(0,a.jsxs)("label",{htmlFor:s,className:"block font-medium text-lg",children:[t.label,t.required&&(0,a.jsx)("span",{className:"text-imperial-red",children:" *"})]}),o=t.helpText&&(0,a.jsx)("p",{className:"text-sm text-davys-gray",children:t.helpText}),d=r&&(0,a.jsx)("p",{className:"text-sm text-imperial-red",role:"alert",children:r});if("radio"===t.type||"select"===t.type){let e=t.options??[];return(0,a.jsxs)("fieldset",{children:[(0,a.jsxs)("legend",{className:"block font-medium text-lg",children:[t.label,t.required&&(0,a.jsx)("span",{className:"text-imperial-red",children:" *"})]}),o,(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-x-6 gap-y-2",children:e.map(e=>(0,a.jsxs)("label",{className:"flex items-center gap-x-2 text-base cursor-pointer",children:[(0,a.jsx)("input",{type:"radio",name:s,value:e,checked:l===e,onChange:e=>n(t.key,e.target.value)}),e]},e))}),d]})}if("textarea"===t.type)return(0,a.jsxs)("div",{children:[c,o,(0,a.jsx)("textarea",{id:s,rows:3,className:`mt-2 ${i}
1`,placeholder:t.placeholder,value:l,onChange:e=>n(t.key,e.target.value)}),d]});let u="email"===t.type?"email":"tel"===t.type?"tel":"number"===t.type?"number":"text";return(0,a.jsxs)("div",{children:[c,o,(0,a.jsx)("input",{id:s,type:u,className:`mt-2 ${i}`,placeholder:t.placeholder,value:l,onChange:e=>n(t.key,e.target.value)}),d]})}},5522:function(e,t,l){"use strict";l.d(t,{default:function(){return n}});var a=l(7437),r=l(2265);function n(e){let{src:t,title:l,height:n}=e,s=(0,r.useRef)(null);return(0,a.jsx)("div",{ref:s,onMouseEnter:()=>{let e=s.current;if(!e||!window.matchMedia("(hover: hover) and (pointer: fine)").matches)return;let{top:t}=e.getBoundingClientRect();if(2>=Math.abs(t))return;let l=window.matchMedia("(prefers-reduced-motion: reduce)").matches;e.scrollIntoView({behavior:l?"auto":"smooth",block:"center"})},children:(0,a.jsx)("iframe",{src:t,title:l,className:n?"w-full block border-0":"w-full h-screen block border-0",style:n?{height:`${n}px`}:void 0,loading:"eager"})})}},1982:function(e,t,l){"use strict";l.d(t,{default:function(){return n}});var a=l(7437),r=l(7648);function n(){return(0,a.jsx)("div",{className:"min-h-[60vh] flex items-center justify-center py-20",children:(0,a.jsx)("div",{className:"u-container",children:(0,a.jsxs)("div",{className:"max-w-2xl mx-auto text-center",children:[(0,a.jsx)("h1",{className:"font-dk-canoodle text-6xl lg:text-7xl text-indigo-dye",children:"Pa'l servicio"}),(0,a.jsx)("h2",{className:"mt-6 font-dk-canoodle text-3xl lg:text-4xl text-indigo-dye",children:"Recargar p\xe1gina nuevamente"}),(0,a.jsx)("p",{className:"mt-6 text-lg lg:text-xl text-davys-gray",children:"No pudimos cargar el contenido. Por favor, recarga la p\xe1gina o vuelve al inicio en unos segundos."}),(0,a.jsxs)("div",{className:"mt-10 flex flex-wrap gap-4 justify-center",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>window.location.reload(),className:"relative h-[54px] px-8",children:[(0,a.jsx)("div",{className:"relative z-10 flex items-center justify-center h-full",children:(0,a.jsx)("span",{className:"font-dk-canoodle text-2xl lg:text-3xl -translate-y-1",children:"Recargar p\xe1gina"})}),(0,a.jsx)("div",{className:"absolute top-0 left-0 w-full h-full",children:(0,a.jsx)("img",{className:"w-full h-full",src:"/images/noticias/paper-view-all.svg",alt:"paper button"})})]}),(0,a.jsxs)(r.default,{href:"/",className:"relative h-[54px] px-8 inline-block",children:[(0,a.jsx)("div",{className:"relative z-10 flex items-center justify-center h-full",children:(0,a.jsx)("span",{className:"font-dk-canoodle text-2xl lg:text-3xl -translate-y-1",children:"Volver al inicio"})}),(0,a.jsx)("div",{className:"absolute top-0 left-0 w-full h-full",children:(0,a.jsx)("img",{className:"w-full h-full",src:"/images/noticias/paper-view-all.svg",alt:"paper button"})})]})]})]})})})}},1921:function(e,t,l){"use strict";l.d(t,{J4:function(){return c},Kz:function(){return d},Np:function(){return s},R2:function(){return n},xM:function(){return i},yv:function(){return r},z1:function(){return o}}),l(3079);var a=l(2119),r=(0,a.$)("11719b61cd9f12bb7872f3cb7c73f1698189b0c8"),n=(0,a.$)("34964d4f6234819fae1df017b74e98608ff4c465"),s=(0,a.$)("d33685304b98b7c1c15ad74af6558a137673c06e"),i=(0,a.$)("acc77ea703466857a010fdb28b41c7feb55eee8b"),c=(0,a.$)("7791344560bda41db02a194841e6f14b7ac83126"),o=(0,a.$)("5d5e67b64061bca89f8cedd5fba0523662b28cf5"),d=(0,a.$)("9bb791502054d1b2e8cd58dbd8f5bb835c35d9f0");(0,a.$)("5fb895c34219645d558d6a43ce2142445915f80c"),(0,a.$)("e4304451d8304a11baed17b1f9b870acf453b79d"),(0,a.$)("0dd6ee33b2b5ed8889be7b238b6eae4d5c89558e"),(0,a.$)("bb26f214cb0e09ed5f7f5bd16c4fbc9364aa5a62"),(0,a.$)("c73592e24e436bf5917a81babf72eec47b1a30ec")}},function(e){e.O(0,[2972,4032,7423,6655,2971,2117,1744],function(){return e(e.s=4942)}),_N_E=e.O()}]);
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.