1"use strict";(self.webpackChunken_base_studio=self.webpackChunken_base_studio||[]).push([[204],{1277:function(e,r,t){t.r(r),t.d(r,{default:function(){return T}});var a=t(4942),n=t(9439),i=(t(8559),t(7294)),s=t(9797),o=t(8956);function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?c(Object(t),!0).forEach((function(r){(0,a.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u=function(e,r){var t,a;return null!==(t=null==(a=null==e?void 0:e.breakpoints)?void 0:a[r])&&void 0!==t?t:r};function m(e){var r=e.breakpoint,t=void 0===r?"":r,a=e.below,n=e.above,i=(0,s.Fg)(),o=u(i,a),c=u(i,n),l=t;return o?l="(max-width: ".concat(o,")"):c&&(l="(min-width: ".concat(c,")")),l}function f(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.ssr,a=void 0===t||t,s=r.fallback,c=(0,o.O)(),u=Array.isArray(e)?e:[e],m=Array.isArray(s)?s:[s];m=m.filter((function(e){return null!=e}));var f=(0,i.useState)((function(){return u.map((function(e,r){return{media:e,matches:a?!!m[r]:c.window.matchMedia(e).matches}}))})),d=(0,n.Z)(f,2),p=d[0],h=d[1];return(0,i.useEffect)((function(){h(u.map((function(e){return{media:e,matches:c.window.matchMedia(e).matches}})));var e=u.map((function(e){return c.window.matchMedia(e)})),r=function(e){h((function(r){return r.slice().map((function(r){return r.media===e.media?l(l({},r),{},{matches:e.matches}):r}))}))};return e.forEach((function(e){"function"==typeof e.addListener?e.addListener(r):e.addEventListener("change",r)})),function(){e.forEach((function(e){"function"==typeof e.removeListener?e.removeListener(r):e.removeEventListener("change",r)}))}}),[c.window]),p.map((function(e){return e.matches}))}function d(e){var r=e.breakpoint,t=e.hide,a=e.children,i=f(r,{ssr:e.ssr}),s=(0,n.Z)(i,1)[0];return(t?!s:s)?a:null}function p(e){var r=e.children,t=e.ssr,a=m(e);return i.createElement(d,{breakpoint:a,ssr:t},r)}p.displayName="Show";var h=t(5116),v=t(3723),b=t(4690),g=t(3579),j=t(3550),y=t(5861),x=t(7757),w=t.n(x),O=t(2972),N=t(9441),S=t(3338),I=t(5987),k=t(5200),C=["className","rows"];function P(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function E(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?P(Object(t),!0).forEach((function(r){(0,a.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function A(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,r){if(!e)return;if("string"==typeof e)return L(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return L(e,r)}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==t.return||t.return()}finally{if(o)throw i}}}}function L(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}var z=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.filter(Boolean).join(" ")};var D=["h","minH","height","minHeight"],Z=(0,s.Gp)((function(e,r){var t=(0,s.mq)("Textarea",e),a=(0,k.Lr)(e),n=a.className,o=a.rows,c=(0,I.Z)(a,C),l=(0,N.Yp)(c),u=o?function(e){var r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=Object.assign({},e),n=A(t);try{for(n.s();!(r=n.n()).done;){var i=r.value;i in a&&delete a[i]}}catch(s){n.e(s)}finally{n.f()}return a}(t,D):t;return i.createElement(s.m$.textarea,E(E({ref:r,rows:o},l),{}
1,{className:z("chakra-textarea",n),__css:u}))}));Z.displayName="Textarea";var _=t(7108),B=t(5893);function M(){var e=(0,j.Z)().format,r=(0,O.pm)(),t=(0,i.useState)({name:{value:"",error:""},lastName:{value:"",error:""},email:{value:"",error:""},message:{value:"",error:""},salsaLizano:{value:"",error:""}}),a=t[0],n=t[1],s=(0,i.useState)(!1),o=s[0],c=s[1],l=function(e){var r=e.target,t=r.name,a=r.value;n((function(e){var r;return Object.assign({},e,((r={})[t]={value:a,error:""},r))}))},u=function(){var t=(0,y.Z)(w().mark((function t(i){var s,o,l,u,m,f,d;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(l in i.preventDefault(),s=!0,o=function(r){""===a[r].value&&"salsaLizano"!==r&&(s=!1,n((function(t){var a;return Object.assign({},t,((a={})[r]=Object.assign({},t[r],{error:e("thisFieldIsRequired")}),a))})))},a)o(l);if(u=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,a.email.value&&!u.test(a.email.value)&&(s=!1,n((function(r){return Object.assign({},r,{email:Object.assign({},r.email,{error:e("pleaseEnterAValidEmail")})})}))),s){t.next=8;break}return t.abrupt("return");case 8:return c(!0),m=Object.fromEntries(Object.entries(a).map((function(e){return[e[0],e[1].value]}))),t.prev=10,t.next=13,fetch("/api/mail",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(m)});case 13:return f=t.sent,t.next=16,f.json();case 16:d=t.sent,c(!1),200===f.status?(n({name:{value:"",error:""},lastName:{value:"",error:""},email:{value:"",error:""},message:{value:"",error:""},salsaLizano:{value:"",error:""}}
1),r({title:e("thankYouForContactingUs"),description:e("weWillGetBackToYouShortly"),status:"success",duration:9e3,isClosable:!0,position:"bottom-right"})):r({title:400===f.status?d.message:e("thereWasAnError"),description:400===f.status?"":e("pleaseTryAgain"),status:"error",duration:9e3,isClosable:!0,position:"bottom-right"}),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(10),console.log("error",t.t0);case 24:return t.prev=24,c(!1),t.finish(24);case 27:case"end":return t.stop()}}),t,null,[[10,21,24,27]])})));return function(e){return t.apply(this,arguments)}}();return(0,B.jsxs)(h.W2,{py:"12",maxW:"lg",children:[(0,B.jsx)(h.X6,{mb:"10",children:e("contactUs")}),(0,B.jsx)("form",{onSubmit:u,children:(0,B.jsxs)(h.gC,{spacing:5,children:[(0,B.jsxs)(h.MI,{columns:2,spacing:4,width:"100%",children:[(0,B.jsxs)(N.NI,{id:"name",isInvalid:!!a.name.error,children:[(0,B.jsx)(N.lX,{children:e("name")}),(0,B.jsx)(S.II,{type:"text",focusBorderColor:"primary.500",value:a.name.value,onChange:l,name:"name","aria-errormessage":"name-error"}),a.name.error&&(0,B.jsx)(N.J1,{id:"name-error",children:a.name.error})]}),(0,B.jsxs)(N.NI,{id:"lastName",isInvalid:!!a.lastName.error,children:[(0,B.jsx)(N.lX,{children:e("lastName")}),(0,B.jsx)(S.II,{type:"text",focusBorderColor:"primary.500",value:a.lastName.value,onChange:l,name:"lastName","aria-errormessage":"lastName-error"}),a.lastName.error&&(0,B.jsx)(N.J1,{id:"lastName-error",children:a.lastName.error})]})]}),(0,B.jsxs)(N.NI,{id:"email",isInvalid:!!a.email.error,children:[(0,B.jsx)(N.lX,{children:e("email")}),(0,B.jsx)(S.II,{type:"email",focusBorderColor:"primary.500",value:a.email.value,onChange:l,name:"email","aria-errormessage":"email-error"}),a.email.error&&(0,B.jsx)(N.J1,{id:"email-error",children:a.email.error})]}),(0,B.jsxs)(N.NI,{id:"message",isInvalid:!!a.message.error,children:[(0,B.jsx)(N.lX,{children:e("message")}),(0,B.jsx)(Z,{focusBorderColor:"primary.500",value:a.message.value,onChange:l,name:"message","aria-errormessage":"message-error"}),a.message.error&&(0,B.jsx)(N.J1,{id:"message-error",children:a.message.error})]}),(0,B.jsxs)(N.NI,{id:"salsaLizano",display:"none",children:[(0,B.jsx)(N.lX,{children:"Salsa Lizano"}),(0,B.jsx)(S.II,{type:"text",focusBorderColor:"primary.500",value:a.salsaLizano.value,onChange:l,name:"salsaLizano"})]}),(0,B.jsx)(_.zx,{type:"submit",variant:"solid",size:"lg",colorScheme:"primary",w:"100%",disabled:o,children:e("sendMessage")})]})}),(0,B.jsxs)(h.xu,{pt:"12",children:[(0,B.jsx)(h.xv,{children:e("emailUs")}),(0,B.jsx)(_.zx,{variant:"link",color:"primary.900",as:"a",href:"mailto:[email protected]",children:"[email protected]"}),(0,B.jsx)(h.xv,{mt:"5",children:e("phone")}),(0,B.jsx)(_.zx,{variant:"link",color:"primary.900",as:"a",href:"tel:+50684010525",children:"+(506) 8401-0525"})]})]})}function T(e){var r=e.data,a=(0,j.Z)().translate;return(0,B.jsxs)("div",{children:[(0,B.jsx)(b.Z,{title:r.page.title?a(r.page.title):"Contacto"}),(0,B.jsxs)(h.xu,{display:"grid",gridTemplateColumns:"1fr auto",h:"100%",children:[(0,B.jsx)(p,{above:"lg",children:(0,B.jsx)(h.xu,{children:(0,B.jsx)(v.S,{src:"../images/productos.jpg",alt:"Productos",style:{height:"100%",width:"100%",objectFit:"cover"},__imageData:t(5368)})})}),(0,B.jsxs)(h.M5,{w:"100vw",maxW:{lg:"container.sm"},children:[(0,B.jsx)(g.Z,{data:r.page.content}),(0,B.jsx)(M,{})]})]})]})}},5368:function(e){e.exports=JSON.parse('{"layout":"constrained","backgroundColor":"#d8c8c8","images":{"fallback":{"src":"/static/bf80c24a4c782e324b5c03934fa00720/0e51f/productos.jpg","srcSet":"/static/bf80c24a4c782e324b5c03934fa00720/70297/productos.jpg 1392w,\\n/static/bf80c24a4c782e324b5c03934fa00720/af6df/productos.jpg 2784w,\\n/static/bf80c24a4c782e324b5c03934fa00720/0e51f/productos.jpg 5568w","sizes":"(min-width: 5568px) 5568px, 100vw"},"sources":[{"srcSet":"/static/bf80c24a4c782e324b5c03934fa00720/be774/productos.webp 1392w,\\n/static/bf80c24a4c782e324b5c03934fa00720/63929/productos.webp 2784w,\\n/static/bf80c24a4c782e324b5c03934fa00720/01126/productos.webp 5568w","type":"image/webp","sizes":"(min-width: 5568px) 5568px, 100vw"}]},"width":5568,"height":3712}')}}]); 2//# sourceMappingURL=component---src-pages-contacto-tsx-a4ecf30506661e8b27ea.js.map
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.