PageSourceSearch

https://miahotelsandresorts.com/_next/static/chunks/pages/multimedia-mia-df93d33f1f95a903.js

js miahotelsandresorts.com collected 2026-10-05 02:48:41 UTC 72,201 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7119],{5693:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/multimedia-mia",function(){return c(390)}])},648:function(a,b,c){"use strict";c.d(b,{Z:function(){return j}});var d=c(5893),e=c(6240),f=c(8177),g={hidden:{opacity:0},visible:{opacity:1}},h={hidden:{opacity:0,y:28},visible:{opacity:1,y:0}},i={hidden:{opacity:0,y:-28},visible:{opacity:1,y:0}};function j(a){var b=a.children,c=a.top,j=a.bottom,k=a.className,l=(0,e.J)(),m=g;return!l&&(c?m=i:j&&(m=h)),(0,d.jsx)(f.E.div,{className:k,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.12},variants:m,transition:{duration:.55,ease:[.25,.1,.25,1]},children:b})}},3214:function(a,b,c){"use strict";c.d(b,{Z:function(){return r}});var d=c(1799),e=c(9396),f=c(5893),g=c(3070),h=c(1113);function i(a){var b=a.source;return a.alt,(0,f.jsx)(h.Parallax,{strength:500,style:{height:"100vh"},blur:{min:-20,max:23},children:(0,f.jsx)(h.Background,{className:"hero-video-container",children:(0,f.jsx)("div",{children:(0,f.jsxs)("video",{poster:"/files/mia_bacalar_aero.webp",muted:!0,playsInline:!0,autoPlay:!0,className:"hero-video",loop:!0,preload:"auto",style:{height:"100vh"},children:[(0,f.jsx)("source",{src:b,type:"video/mp4"}),(0,f.jsx)("source",{src:b,type:"video/ogg"})]})})})})}var j=c(701),k=c(648);function l(a){var b=a.leyend;return(0,f.jsx)("div",{className:"hero-leyend-containerr w-full h-full inset-0 absolute flex flex-col justify-center items-center bottom-0 gap-[2rem] z-[98]",children:(0,f.jsx)(k.Z,{children:(0,f.jsx)("div",{className:"hero-leyend-text-container hero-leyend-text",children:(0,f.jsx)("h1",{className:"px-4 md:p-0 hero-leyend-text text-white",children:void 0===b?"":b})})})})}var m=c(9583);function n(a){var b=function(a){a.preventDefault(),document.getElementById("mainContent").scrollIntoView({behavior:"smooth"})};return(0,f.jsx)("div",{className:"",children:(0,f.jsx)(k.Z,{top:!0,children:(0,f.jsx)("button",{onClick:function(a){return b(a)},className:"border border-white rounded-lg w-[40px] h-[40px] 2xl:w-[60px] 2xl:h-[60px] text-white flex justify-center items-center text-[1rem] 2xl:text-[1.5rem] cursor-pointer hover:bg-white hover:text-secondary",children:(0,f.jsx)(m.NWQ,{})})})})}var o=c(5152),p=c.n(o),q=p()(function(){return Promise.all([c.e(2749),c.e(8877)]).then(c.bind(c,5030))},{loadableGenerated:{webpack:function(){return[5030]}},ssr:!1});function r(a){var b,c=a.type,h=(a.source,a.alt),k=a.leyend,m=void 0===k?null:k,o=a.useArrowDown,p=a.showBookingWidget,r=a.customResort,s=a.useResortSelector,t=a.compact,u=void 0!==t&&t;"image"===c&&(b=(0,f.jsx)(g.Z,(0,e.Z)((0,d.Z)({},a),{alt:void 0===h?"":h}))),"video"===c&&(b=(0,f.jsx)(i,(0,d.Z)({},a))),"slider"===c&&(b=(0,f.jsx)(j.Z,(0,d.Z)({},a)));var v="text"===c?"hero-container-text":"hero-container".concat(u?" hero-container--compact":"");return(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{id:"heroContainer",className:"d drop-shadow-xl ".concat(v),children:[b,(0,f.jsx)("div",{className:"hero-cover__bg z-[97]"}),null!=m&&(0,f.jsx)(l,{leyend:m}),(void 0===o||o)&&!u&&(0,f.jsx)("div",{className:"w-full absolute bottom-0 pb-32 z-[98]",children:(0,f.jsx)("div",{className:"container flex justify-center",children:(0,f.jsx)(n,{})})})]}),(void 0===p||p)&&(0,f.jsx)(q,{isBordered:!0,customResort:r,useResortSelector:s})]})}},3070:function(a,b,c){"use strict";c.d(b,{Z:function(){return h}});var d=c(5893),e=c(5675),f=c.n(e),g=c(9202);function h(a){var b=a.source,c=a.alt,e=void 0===c?"M\xcdA Reef Hero":c;return(0,d.jsx)("div",{className:"hero-image-cover-container relative",children:(0,d.jsx)(f(),{layout:"fill",placeholder:"blur",blurDataURL:(0,g.Z)(),className:"hero-image-cover",src:b,alt:e,title:e})})}},701:function(a,b,c){"use strict";c.d(b,{Z:function(){return m}});var d=c(5893),e=c(8494);c(933),c(92);var f=c(1911),g=c(3070),h=c(648);function i(a){var b=a.leyend;return(0,d.jsx)("div",{className:"w-full h-full absolute inset-0 flex justify-center items-center z-[98]",children:(0,d.jsx)(h.Z,{children:(0,d.jsx)("div",{className:"hero-leyend-text",children:(0,d.jsx)("h1",{className:"hero-leyend-text text-white",children:void 0===b?"":b})})})})}var j=c(5152),k=c.n(j),l=k()(function(){return Promise.all([c.e(2749),c.e(8877)]).then(c.bind(c,5030))},{loadableGenerated:{webpack:function(){return[5030]}},ssr:!1});function m(a){var b=a.items;return(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{id:"heroContainer",className:"drop-shadow-xl hero-container",children:(0,d.jsx)("div",{className:"w-full h-full",children:(0,d.jsx)(e.tq,{navigation:!0,modules:[f.W_],className:"h-full",children:b.map(function(a,b){var c=null!=a.leyend;
1return(0,d.jsx)(e.o5,{children:(0,d.jsxs)("div",{className:"w-full h-full",children:[c&&(0,d.jsx)(i,{leyend:a.leyend}),(0,d.jsx)("div",{className:"hero-cover__bg z-[97]"}),(0,d.jsx)(g.Z,{source:a.source,alt:a.leyend})]})},"swiper_hero_slider_".concat(b))})})})}),(0,d.jsx)(l,{isBordered:!0})]})}},9987:function(a,b,c){"use strict";c.d(b,{Z:function(){return e}});var d=c(5893);function e(a){var b=a.applyTopSpace,c=a.applyBottomSpace;return(0,d.jsx)("div",{id:"mainContent",className:"".concat(void 0===b||b?"pt-[60px] md:pt-[120px]":""," ").concat(void 0===c||c?"pb-[60px]  md:pb-[120px]":""),children:a.children})}},4362:function(a,b,c){"use strict";c.d(b,{Z:function(){return f}});var d=c(5893),e=c(648);function f(a){var b=a.subtitle,c=a.summary,f=void 0===c?"":c,g=a.customColor;return(0,d.jsx)("section",{children:(0,d.jsxs)("div",{className:"container text-center ".concat(""===f?"pb-8 md:pb-16":""),children:[(0,d.jsx)(e.Z,{bottom:!0,children:(0,d.jsx)("h2",{className:"".concat(void 0===g?"text-primary":g," text-center text-4xl font-bold ").concat(""!==f?"pb-4 md:pb-8":""),children:b})}),""!==f&&(0,d.jsx)(e.Z,{bottom:!0,children:(0,d.jsx)("div",{className:"flex items-center justify-center pb-8 md:pb-16",children:(0,d.jsx)("div",{className:"w-full md:w-3/5",children:(0,d.jsx)("p",{className:"whitespace-pre-line text-center",children:f})})})})]})})}},9202:function(a,b,c){"use strict";function d(){var a,b,c,d=arguments.length>0&& void 0!==arguments[0]?arguments[0]:{},e=d.width,f=d.height;return"data:image/svg+xml;base64,".concat((c=(a={width:void 0===e?0:e,height:void 0===f?0:f},'\n        <svg width="'.concat(a,'" height="').concat(b,'" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n            <defs>\n                <linearGradient id="g">\n                    <stop stop-color="#333" offset="20%" />\n                    <stop stop-color="#222" offset="50%" />\n                    <stop stop-color="#333" offset="70%" />\n                </linearGradient>\n            </defs>\n            <rect width="').concat(a,'" height="').concat(b,'" fill="#333" />\n            <rect id="r" width="').concat(a,'" height="').concat(b,'" fill="url(#g)" />\n            <animate xlink:href="#r" attributeName="x" from="-').concat(a,'" to="').concat(a,'" dur="1s" repeatCount="indefinite" />\n        </svg>\n    ')),window.btoa(c)))}c.d(b,{Z:function(){return d}})},390:function(a,b,c){"use strict";c.r(b),c.d(b,{default:function(){return ao}});var d=c(1799),e=c(5893),f=c(1163),g=c(4050),h=c(5127),i=c(3214),j=c(9987),k=c(4362),l=c(7568),m=c(4051),n=c.n(m),o=c(7294),p=c(196),q="mia_otas_agent_token",r="mia_otas_agent_profile";function s(){try{return localStorage.getItem(q)||null}catch(a){return null}}function t(a,b){var c=arguments.length>2&& void 0!==arguments[2]?arguments[2]:43200;if(a){var d=Math.max(60,Number(c)||43200);try{localStorage.setItem(q,a),b&&localStorage.setItem(r,JSON.stringify(b))}catch(e){}document.cookie="".concat(q,"=").concat(encodeURIComponent(a),"; Path=/; Max-Age=").concat(d,"; SameSite=Lax")}}function u(){try{localStorage.removeItem(q),localStorage.removeItem(r)}catch(a){}document.cookie="".concat(q,"=; Path=/; Max-Age=0; SameSite=Lax")}function v(a){var b,c,d,e,f=(null==a?void 0:null===(b=a.response)|| void 0===b?void 0:b.status)||(null==a?void 0:a.status),g=(null==a?void 0:null===(c=a.response)|| void 0===c?void 0:null===(d=c.data)|| void 0===d?void 0:d.message)||(null==a?void 0:null===(e=a.data)|| void 0===e?void 0:e.message)||(null==a?void 0:a.message)||"";return 401===f||403===f||["agent_auth_required","invalid_agent_token","agent_revoked",].includes(String(g))}function w(){return p.Z.create({baseURL:"/api/otas/auth",headers:{Accept:"application/json","Content-Type":"application/json"},timeout:6e4,validateStatus:function(){return!0}})}function x(){var a=s();return a?{Authorization:"Bearer ".concat(a)}:{}}function y(a){return z.apply(this,arguments)}function z(){return(z=(0,l.Z)(n().mark(function a(b){var c,d,e,f,g,h,i;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=3,w().post("/request-code",{email:String(b).trim()});case 3:if(!((f=a.sent).status>=200&&f.status<300&&(null===(c=f.data)|| void 0===c?void 0:c.success)!== !1)){a.next=8;break}return a.abrupt("return",{success:!0,expires_in:null!==(i=null===(g=f.data)|| void 0===g?void 0:null===(h=g.data)|| void 0===h?void 0:h.expires_in)&& void 0!==i?i:600});case 8:return a.abrupt("return",{success:!1,status:f.status,message:(null===(d=f.data)|| void 0===d?void 0:d.message)||(null===(e=f.data)|| void 0===e?void 0:e.error)||"otas_agent_auth_failed"});case 9:case"end":return a.stop()}},a)}))).apply(this,arguments)}function A(a){return B.apply(this,arguments)}function B(){return(B=(0,l.Z)(n().mark(function a(b){var c,d,e,f,g,h,i,j,k,l;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return c=b.name,d=b.agency,e=b.email,a.next=4,w().post("/register",{name:String(c||"").trim(),agency:String(d||"").trim(),email:String(e||"").trim()});case 4:if(!((201===(i=a.sent).status||i.status>=200&&i.status<300)&&(null===(f=i.data)|| void 0===f?void 0:f.success)!== !1)){a.next=9;break}return a.abrupt("return",{success:!0,expires_in:null!==(l=null===(j=i.data)|| void 0===j?void 0:null===(k=j.data)|| void 0===k?void 0:k.expires_in)&& void 0!==l?l:600});case 9:return a.abrupt("return",{success:!1,status:i.status,message:(null===(g=i.data)|| void 0===g?void 0:g.message)||(null===(h=i.data)|| void 0===h?void 0:h.error)||"otas_agent_auth_failed"});case 10:case"end":return a.stop()}},a)}))).apply(this,arguments)}function C(a,b){return D.apply(this,arguments)}function D(){return(D=(0,l.Z)(n().mark(function a(b,c){var d,e,f,g,h,i;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=3,w().post("/verify",{email:String(b).trim(),code:String(c).trim()});case 3:if(!((g=a.sent).status>=200&&g.status<300&&(null===(d=g.data)|| void 0===d?void 0:d.success)!== !1)){a.next=9;break}return(i=(null===(h=g.data)|| void 0===h?void 0:h.data)||{}).token&&t(i.token,i.agent,i.expires_in),a.abrupt("return",{success:!0,token:i.token,agent:i.agent,expires_in:i.expires_in});case 9:return a.abrupt("return",{success:!1,status:g.status,message:(null===(e=g.data)|| void 0===e?void 0:e.message)||(null===(f=g.data)|| void 0===f?void 0:f.error)||"invalid_code"});case 10:case"end":return a.stop()}},a)}))).apply(this,arguments)}function E(){return F.apply(this,arguments)}function F(){return(F=(0,l.Z)(n().mark(function a(){var b,c,d,e,f,g,h;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(e=s()){a.next=4;break}return a.abrupt("return",{success:!1,status:401,message:"agent_auth_required"});case 4:return a.next=6,w().get("/me",{headers:x()});case 6:if(!((f=a.sent).status>=200&&f.status<300&&(null===(b=f.data)|| void 0===b?void 0:b.success)!== !1)){a.next=12;break}if(h=(null===(g=f.data)|| void 0===g?void 0:g.data)||null)try{localStorage.setItem(r,JSON.stringify(h))}catch(i){}return a.abrupt("return",{success:!0,agent:h});case 12:return a.abrupt("return",{success:!1,status:f.status,message:(null===(c=f.data)|| void 0===c?void 0:c.message)||(null===(d=f.data)|| void 0===d?void 0:d.error)||"invalid_agent_token"});case 13:case"end":return a.stop()}},a)}))).apply(this,arguments)}var G="mt-1.5 w-full rounded-full border border-neutral-200 bg-white px-4 py-2.5 text-sm font-normal normal-case tracking-normal text-neutral-900 outline-none transition focus:border-secondary focus:ring-1 focus:ring-secondary";function H(a,b){var c,d,e,f,g,h=(c=b,"email_already_registered"===c?"agent_already_exists":["invalid_email","invali
1d_code","invalid_name","invalid_agency","agent_not_invited","agent_revoked","agent_already_exists","otp_cooldown","otp_rate_limited","otp_locked","otas_agent_auth_failed","api_key_missing","agent_auth_required","invalid_agent_token",].includes(c)?c:"generic");return(null==a?void 0:null===(d=a.auth)|| void 0===d?void 0:null===(e=d.errors)|| void 0===e?void 0:e[h])||(null==a?void 0:null===(f=a.auth)|| void 0===f?void 0:null===(g=f.errors)|| void 0===g?void 0:g.generic)||b}function I(a,b){var c=a.setExpiresIn,d=a.setResendIn,e=a.setCode,f=a.setError,g=a.setStatus;c(b||600),d(60),e(""),f(""),g("code")}function J(a){var b,c,d,f=a.copy,g=a.children,h=(0,o.useState)("checking"),i=h[0],j=h[1],k=(0,o.useState)(""),m=k[0],p=k[1],q=(0,o.useState)(""),r=q[0],v=q[1],w=(0,o.useState)(""),x=w[0],z=w[1],B=(0,o.useState)(""),D=B[0],F=B[1],J=(0,o.useState)(null),K=J[0],L=J[1],M=(0,o.useState)(""),N=M[0],O=M[1],P=(0,o.useState)(!1),Q=P[0],R=P[1],S=(0,o.useState)(600),T=S[0],U=S[1],V=(0,o.useState)(0),W=V[0],X=V[1];(0,o.useEffect)(function(){var a=!1;return(0,l.Z)(n().mark(function b(){var c,d;return n().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=s()){b.next=4;break}return a||j("login"),b.abrupt("return");case 4:return b.next=6,E();case 6:if(d=b.sent,!a){b.next=9;break}return b.abrupt("return");case 9:d.success?(t(c,d.agent),L(d.agent),j("ready")):(u(),j("login"));case 10:case"end":return b.stop()}},b)}))(),function(){a=!0}},[]),(0,o.useEffect)(function(){if(!(W<=0)){var a=setTimeout(function(){return X(function(a){return Math.max(0,a-1)})},1e3);return function(){return clearTimeout(a)}}},[W]);var Y,Z,$,_,aa={setExpiresIn:U,setResendIn:X,setCode:F,setError:O,setStatus:j},ab=(Y=(0,l.Z)(n().mark(function a(b){var c,d,e;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(null==b||null===(c=b.preventDefault)|| void 0===c||c.call(b),O(""),d=m.trim()){a.next=7;break}return O(H(f,"invalid_email")),a.abrupt("return");case 7:return R(!0),a.prev=8,a.next=11,y(d);case 11:if(!(e=a.sent).success){a.next=15;break}return I(aa,e.expires_in),a.abrupt("return");case 15:if(!(404===e.status||"agent_not_invited"===e.message)){a.next=19;break}return O(""),j("register"),a.abrupt("return");case 19:O(H(f,e.message)),a.next=25;break;case 22:a.prev=22,a.t0=a.catch(8),O(H(f,"otas_agent_auth_failed"));case 25:return a.prev=25,R(!1),a.finish(25);case 28:case"end":return a.stop()}},a,null,[[8,22,25,28]])})),function(a){return Y.apply(this,arguments)}),ac=(Z=(0,l.Z)(n().mark(function a(b){var c,d,e,g,h,i;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(null==b||null===(c=b.preventDefault)|| void 0===c||c.call(b),O(""),d=m.trim(),e=r.trim(),g=x.trim(),e){a.next=9;break}return O(H(f,"invalid_name")),a.abrupt("return");case 9:if(g){a.next=12;break}return O(H(f,"invalid_agency")),a.abrupt("return");case 12:if(d){a.next=15;break}return O(H(f,"invalid_email")),a.abrupt("return");case 15:return R(!0),a.prev=16,a.next=19,A({name:e,agency:g,email:d});case 19:if((h=a.sent).success){a.next=36;break}if(!(409===h.status||"agent_already_exists"===h.message||"email_already_registered"===h.message)){a.next=30;break}return a.next=24,y(d);case 24:if(!(i=a.sent).success){a.next=28;break}return I(aa,i.expires_in),a.abrupt("return");case 28:return O(H(f,i.message)),a.abrupt("return");case 30:if("agent_revoked"!==h.message){a.next=34;break}return j("login"),O(H(f,"agent_revoked")),a.abrupt("return");case 34:return O(H(f,h.message)),a.abrupt("return");case 36:I(aa,h.expires_in),a.next=42;break;case 39:a.prev=39,a.t0=a.catch(16),O(H(f,"otas_agent_auth_failed"));case 42:return a.prev=42,R(!1),a.finish(42);case 45:case"end":return a.stop()}},a,null,[[16,39,42,45]])})),function(a){return Z.apply(this,arguments)}),ad=($=(0,l.Z)(n().mark(function a(b){var c,d,e;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(null==b||null===(c=b.preventDefault)|| void 0===c||c.call(b),O(""),!(6!==(d=String(D).replace(/\D/g,"").slice(0,6)).length)){a.next=7;break}return O(H(f,"invalid_code")),a.abrupt("return");case 7:return R(!0),a.prev=8,a.next=11,C(m.trim(),d);case 11:if((e=a.sent).success){a.next=15;break}return O(H(f,e.message)),a.abrupt("return");case 15:L(e.agent||null),O(""),j("ready"),a.next=23;break;
1case 20:a.prev=20,a.t0=a.catch(8),O(H(f,"invalid_code"));case 23:return a.prev=23,R(!1),a.finish(23);case 26:case"end":return a.stop()}},a,null,[[8,20,23,26]])})),function(a){return $.apply(this,arguments)}),ae=(_=(0,l.Z)(n().mark(function a(){var b;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!(W>0||Q)){a.next=2;break}return a.abrupt("return");case 2:return R(!0),O(""),a.prev=4,a.next=7,y(m.trim());case 7:if((b=a.sent).success){a.next=11;break}return O(H(f,b.message)),a.abrupt("return");case 11:U(b.expires_in||600),X(60),a.next=18;break;case 15:a.prev=15,a.t0=a.catch(4),O(H(f,"otas_agent_auth_failed"));case 18:return a.prev=18,R(!1),a.finish(18);case 21:case"end":return a.stop()}},a,null,[[4,15,18,21]])})),function(){return _.apply(this,arguments)}),af=function(){j("login"),O(""),F(""),v(""),z("")},ag=function(){u(),L(null),F(""),v(""),z(""),O(""),j("login")},ah=function(){u(),L(null),O(H(f,"agent_auth_required")),j("login")};if("checking"===i)return(0,e.jsx)("p",{className:"py-16 text-center text-neutral-500",children:(null==f?void 0:null===(b=f.auth)|| void 0===b?void 0:b.checking)||(null==f?void 0:f.loading)});if("ready"===i)return(0,e.jsxs)("div",{className:"w-full",children:[(0,e.jsxs)("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-3",children:[(0,e.jsxs)("p",{className:"text-sm text-neutral-600",children:[(null==f?void 0:null===(c=f.auth)|| void 0===c?void 0:c.hello)?f.auth.hello.replace("{name}",(null==K?void 0:K.name)||(null==K?void 0:K.email)||""):null,(null==K?void 0:K.agency)?(0,e.jsxs)("span",{className:"text-neutral-400",children:[" \xb7 ",K.agency]}):null]}),(0,e.jsx)("button",{type:"button",onClick:ag,className:"text-xs font-semibold uppercase tracking-wide text-neutral-500 underline-offset-2 hover:text-secondary hover:underline",children:(null==f?void 0:null===(d=f.auth)|| void 0===d?void 0:d.btn_logout)||"Log out"})]}),"function"==typeof g?g({agent:K,onAuthExpired:ah,onLogout:ag}):g]});var ai=(null==f?void 0:f.auth)||{},aj="code"===i?(ai.code_hint||"").replace("{minutes}",String(Math.max(1,Math.round((T||600)/60)))):"register"===i?ai.register_hint:ai.email_hint;return(0,e.jsxs)("div",{className:"mx-auto w-full max-w-md rounded-2xl border border-neutral-200 bg-white px-6 py-8 shadow-sm md:px-8",children:[(0,e.jsx)("h3",{className:"text-center text-xl font-bold text-secondary",children:"register"===i?ai.register_title||ai.title||"Access":ai.title||"Access"}),(0,e.jsx)("p",{className:"mt-2 text-center text-sm text-neutral-600",children:aj}),N?(0,e.jsx)("div",{role:"alert",className:"mt-4 rounded-xl border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800",children:N}):null,"login"===i?(0,e.jsxs)("form",{onSubmit:ab,className:"mt-6 flex flex-col gap-4",children:[(0,e.jsxs)("label",{className:"block text-left text-xs font-semibold uppercase tracking-wide text-neutral-500",children:[ai.email_label||"Email",(0,e.jsx)("input",{type:"email",autoComplete:"email",required:!0,value:m,onChange:function(a){return p(a.target.value)},className:G,placeholder:ai.email_placeholder||"[email protected]"})]}),(0,e.jsx)("button",{type:"submit",disabled:Q,className:"min-h-[48px] rounded-full bg-secondary px-6 py-3 text-sm font-semibold uppercase tracking-wide text-white transition hover:bg-secondarylight disabled:opacity-60",children:Q?ai.sending||"…":ai.btn_send_code||"Send code"})]}):null,"register"===i?(0,e.jsxs)("form",{onSubmit:ac,className:"mt-6 flex flex-col gap-4",children:[(0,e.jsxs)("label",{className:"block text-left text-xs font-semibold uppercase tracking-wide text-neutral-500",children:[ai.name_label||"Name",(0,e.jsx)("input",{type:"text",autoComplete:"name",required:!0,value:r,onChange:function(a){return v(a.target.value)},className:G,placeholder:ai.name_placeholder||""})]}),(0,e.jsxs)("label",{className:"block text-left text-xs font-semibold uppercase tracking-wide text-neutral-500",children:[ai.agency_label||"Agency",(0,e.jsx)("input",{type:"text",autoComplete:"organization",required:!0,value:x,onChange:function(a){return z(a.target.value)},className:G,placeholder:ai.agency_placeholder||""})]}),(0,e.jsxs)("label",{className:"block text-left text-xs font-semibold uppercase tracking-wide text-neutral-500",children:[ai.email_label||"Email",(0,e.jsx)("input",{type:"email",autoComplete:"email",required:!0,value:m,onChange:function(a){return p(a.target.value)},className:G,placeholder:ai.email_placeholder||"[email protected]"})]}),(0,e.jsx)("button",{type:"submit",disabled:Q,className:"min-h-[48px] rounded-full bg-secondary px-6 py-3 text-sm font-semibold uppercase tracking-wide text-white transition hover:bg-secondarylight disabled:opacity-60",children:Q?ai.registering||ai.sending||"…":ai.btn_register||"Continue"}),(0,e.jsx)("button",{type:"button",onClick:af,className:"text-xs font-medium uppercase tracking-wide text-neutral-500 underline-offset-2 hover:text-secondary hover:underline",children:ai.btn_back||ai.btn_change_email||"Back"})]}):null,"code"===i?(0,e.jsxs)("form",{onSubmit:ad,className:"mt-6 flex flex-col gap-4",children:[(0,e.jsxs)("p",{className:"text-center text-xs text-neutral-500",children:[m," \xb7 ",(0,e.jsx)("button",{type:"button",className:"underline underline-offset-2 hover:text-secondary",onClick:af,children:ai.btn_change_email||"Change email"})]}),(0,e.jsxs)("label",{className:"block text-left text-xs font-semibold uppercase tracking-wide text-neutral-500",children:[ai.code_label||"Code",(0,e.jsx)("input",{type:"text",inputMode:"numeric",autoComplete:"one-time-code",pattern:"[0-9]*",maxLength:6,required:!0,value:D,onChange:function(a){return F(a.target.value.replace(/\D/g,"").slice(0,6))},className:"mt-1.5 w-full rounded-full border border-neutral-200 bg-white px-4 py-2.5 text-center text-lg font-semibold tracking-[0.35em] text-neutral-900 outline-none transition focus:border-secondary focus:ring-1 focus:ring-secondary",placeholder:"••••••"})]}),(0,e.jsx)("button",{type:"submit",disabled:Q||6!==D.length,className:"min-h-[48px] rounded-full bg-secondary px-6 py-3 text-sm font-semibold uppercase tracking-wide text-white transition hover:bg-secondarylight disabled:opacity-60",children:Q?ai.verifying||"…":ai.btn_verify||"Enter"}),(0,e.jsx)("button",{type:"button",disabled:Q||W>0,onClick:ae,className:"text-xs font-medium uppercase tracking-wide text-neutral-500 underline-offset-2 hover:text-secondary hover:underline disabled:no-underline disabled:opacity-50",children:W>0?(ai.resend_wait||"Resend in {s}s").replace("{s}",String(W)):ai.btn_resend||"Resend code"})]}):null]})}var K=c(9815),L=c(3935);function M(a,b){return null!=b&&"undefined"!=typeof Symbol&&b[Symbol.hasInstance]?!!b[Symbol.hasInstance](a):a instanceof b}function N(){var a=p.Z.create({baseURL:"/api/otas",headers:{Accept:"application/json"},timeout:6e4});return a.interceptors.request.use(function(a){var b=s();return b&&(a.headers=a.headers||{},a.headers.Authorization="Bearer ".concat(b)),a}),a.interceptors.response.use(function(a){var b,c="object"!=typeof a.data||M(a.data,Blob)?void 0:null===(b=a.data)|| void 0===b?void 0:b.message;if(401===a.status||403===a.status||"agent_auth_required"===c||"invalid_agent_token"===c||"agent_revoked"===c){u();var d=Error(c||"agent_auth_required");throw d.response=a,d.status=a.status,d.code="agent_auth_required",d}return a},function(a){return v(a)&&u(),Promise.reject(a)}),a}function O(a){if(v(a)){u();var b,c,d=Error((null==a?void 0:null===(b=a.response)|| void 0===b?void 0:null===(c=b.data)|| void 0===c?void 0:c.message)||a.message||"agent_auth_required");throw d.code="agent_auth_required",d.response=a.response,d}throw a}function P(a){var b=arguments.length>1&& void 0!==arguments[1]?arguments[1]:"";if(!a)return null;var c=String(a),d=c.match(/\/api\/public\/otas\/assets\/(\d+)(\/[^?#]*)?(\?[^#]*)?/);if(d){var e=d[1],f=d[2]||"",g=d[3]||"",h="/api/otas/".concat(e).concat(f);return g&&(h+=g),b&&(h+=(h.includes("?")?"&":"?")+b.replace(/^\?/,"")),h}return c.startsWith("/api/otas/")?b?c+(c.includes("?")?"&":"?")+b.replace(/^\?/,""):c:null}function Q(a){var b=(arguments.length>1&& void 0!==arguments[1]?arguments[1]:{}).w,c=P(null==a?void 0:a.file_url)||((null==a?void 0:a.id)?"/api/otas/".concat(a.id,"/file"):null);return c?b?c+(c.includes("?")?"&":"?")+"w=".concat(b):c:null}function R(a){var b,c=(arguments.length>1&& void 0!==arguments[1]?arguments[1]:{}).w;if(!a)return null;var d=(null===(b=a.poster)|| void 0===b?void 0:b.ready)=== !0;if(!d&&a.poster_url);else if(!d&&!a.poster_url)return null;var e=P(a.poster_url)||(a.id?"/api/otas/".concat(a.id,"/poster"):null);return e?c?e+(e.includes("?")?"&":"?")+"w=".concat(c):e:null}function S(a){return P(null==a?void 0:a.download_original_url)||P(null==a?void 0:a.download_url)||((null==a?void 0:a.id)?"/api/otas/".concat(a.id,"/download?variant=original"):null)}function T(a){var b,c;return!!a&&((null===(b=a.web)|| void 0===b?void 0:b.ready)=== !0||(null===(c=a.web)|| void 0===c?void 0:c.status)==="ready"||null==a.web&&"video"===a.asset_type)}function U(a){var b;return!!a&&((null===(b=a.poster)|| void 0===b?void 0:b.ready)=== !0|| !!a.poster_url&&null==a.poster)}function V(a){return W.apply(this,arguments)}function W(){return(W=(0,l.Z)(n().mark(function a(b){var c,e,f,g,h;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(b){a.next=2;break}return a.abrupt("return",null);case 2:return c=s(),a.next=5,fetch(b,{headers:(0,d.Z)({Accept:"*/*"},c?{Authorization:"Bearer ".concat(c)}:{}),credentials:"same-origin"});case 5:if(!(401===(e=a.sent).status||403===e.status)){a.next=12;break}throw u(),(f=Error("agent_auth_required")).code="agent_auth_required",f.status=e.status,f;case 12:if(e.ok){a.next=16;break}throw(g=Error("otas_blob_fetch_failed")).status=e.status,g;case 16:return a.next=18,e.blob();case 18:return h=a.sent,a.abrupt("return",URL.createObjectURL(h));case 20:case"end":return a.stop()}},a)}))).apply(this,arguments)}function X(a){return Y.apply(this,arguments)}function Y(){return(Y=(0,l.Z)(n().mark(function a(b){var c,d,e,f,g,h,i,j,k,l,m,o,p;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=b.hotel_id,d=b.folder,e=b.type,f=b.q,g=b.page,h=void 0===g?1:g,i=b.per_page,j=void 0===i?20:i,c){a.next=3;break}throw Error("hotel_id_required");case 3:return k={hotel_id:c,page:h,per_page:Math.min(j,100)},d&&(k.folder=d),e&&(k.type=e),f&&(k.q=f),a.prev=7,a.next=11,N().get("/",{params:k});case 11:if((null===(l=(m=a.sent).data)|| void 0===l?void 0:l.success)!== !1){a.next=17;break}throw(p=Error((null===(o=m.data)|| void 0===o?void 0:o.message)||"otas_list_failed")).response=m,p;case 17:return a.abrupt("return",m.data);case 20:a.prev=20,a.t0=a.catch(7),O(a.t0);case 23:case"end":return a.stop()}},a,null,[[7,20]])}))).apply(this,arguments)}c(3454);function Z(a){return $.apply(this,arguments)}function $(){return($=(0,l.Z)(n().mark(function a(b){var c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,v=arguments;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=v.length>1&& void 0!==v[1]?v[1]:"download",e=S(d="object"==typeof b&&b?b:{id:b})||(d.id?"/api/otas/".concat(d.id,"/download?variant=original"):null)){a.next=5;break}throw Error("download_url_missing");case 5:return f=e.replace(/^\/api\/otas/,"")||"/".concat(d.id,"/download"),a.prev=6,a.next=9,N().get(f,{responseType:"blob",validateStatus:function(){return!0}});case 9:if(!(401===(g=a.sent).status||403===g.status)){a.next=16;break}throw u(),(h=Error("agent_auth_required")).code="agent_auth_required",h.response=g,h;case 16:if(!(g.status>=400)){a.next=32;break}if(i="download_failed",a.prev=18,!M(g.data,Blob)){a.next=25;break}return a.next=22,g.data.text();case 22:i=(k=JSON.parse(j=a.sent)).message||i;case 25:a.next=29;break;case 27:a.prev=27,a.t0=a.catch(18);case 29:throw(l=Error(i)).response=g,l;case 32:if(m=g.data,o=g.headers["content-type"]||"application/octet-stream",p=g.headers["content-disposition"]||"",q=d.filename||c,r=/filename\*?=(?:UTF-8''|")?([^";]+)/i.exec(p),null==r?void 0:r[1])try{q=decodeURIComponent(r[1].replace(/"/g,""))}catch(n){q=r[1].replace(/"/g,"")}s=window.URL.createObjectURL(new Blob([m],{type:o})),(t=document.createElement("a")).href=s,t.download=q,document.body.appendChild(t),t.click(),t.remove(),window.URL.revokeObjectURL(s),a.next=51;break;case 48:a.prev=48,a.t1=a.catch(6),O(a.t1);case 51:case"end":return a.stop()}},a,null,[[6,48],[18,27]])}))).apply(this,arguments)}var _=[{hotel_id:1,key:"reef",label_en:"M\xcdA Reef",label_es:"M\xcdA Reef"},{hotel_id:2,key:"bacalar",label_en:"M\xcdA Bacalar",label_es:"M\xcdA Bacalar"},],aa=["image","video","pdf","document","other",];function ab(a){return"image"===a.asset_type||a.mime_type&&String(a.mime_type).startsWith("image/")}function ac(a){return"video"===a.asset_type||a.mime_type&&String(a.mime_type).startsWith("video/")}function ad(a){var b=String(a.mime_type||"").toLowerCase(),c=String(a.filename||"").toLowerCase();return"pdf"===a.asset_type||"application/pdf"===b||c.endsWith(".pdf")}function ae(a){return!(ab(a)||ac(a)||ad(a))&&("document"===a.asset_type||"other"===a.asset_type||Boolean(a.mime_type))}function af(a){return ab(a)||ac(a)||ad(a)||ae(a)}function ag(a){var b=a.className;return(0,e.jsx)("svg",{className:void 0===b?"h-10 w-10":b,viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":!0,children:(0,e.jsx)("path",{d:"M8 5.14v13.72a1 1 0 001.5.86l11-6.86a1 1 0 000-1.72l-11-6.86a1 1 0 00-1.5.86z"})})}function ah(a){var b=a.className,c=a.pdf;return(0,e.jsxs)("svg",{className:void 0===b?"h-10 w-10":b,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":!0,children:[(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 3h7l5 5v13a1 1 0 01-1 1H7a1 1 0 01-1-1V4a1 1 0 011-1z"}),(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M14 3v5h5"}),void 0!==c&&c?(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 13h6M9 17h4"}):(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 13h6M9 17h6"})]})}function ai(a){var b=a.proxyUrl,c=a.alt,d=a.className,f=a.priority,g=a.onError,h=a.onAuthExpired,i=(0,o.useState)(null),j=i[0],k=i[1],m=(0,o.useState)(!1),p=m[0],q=m[1],r=(0,o.useRef)(null);return((0,o.useEffect)(function(){var a=!1;if(q(!1),k(null),b)return(0,l.Z)(n().mark(function c(){var d;return n().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,V(b);case 3:if(d=c.sent,!a){c.next=7;break}return URL.revokeObjectURL(d),c.abrupt("return");case 7:r.current&&URL.revokeObjectURL(r.current),r.current=d,k(d),c.next=19;break;case 12:if(c.prev=12,c.t0=c.catch(0),!a){c.next=16;break}return c.abrupt("return");case 16:(null===c.t0|| void 0===c.t0?void 0:c.t0.code)==="agent_auth_required"&&(null==h||h()),q(!0),null==g||g(c.t0);case 19:case"end":return c.stop()}},c,null,[[0,12]])}))(),function(){a=!0,r.current&&(URL.revokeObjectURL(r.current),r.current=null)}},[b,h,g]),p||!j)?(0,e.jsx)("span",{className:"block bg-neutral-200 ".concat(d||""),"aria-hidden":!0}):(0,e.jsx)("img",{src:j,alt:void 0===c?"":c,className:d,decoding:"async",fetchPriority:f?"high":"auto"})}function aj(a){var b=a.item,c=a.label,d=a.priority,f=a.processingLabel,g=a.onAuthExpired,h=U(b),i=T(b),j=h?R(b,{w:360}):null,k=(0,o.useState)(!1),l=k[0],m=k[1];return(0,e.jsxs)("span",{className:"relative block h-full w-full bg-neutral-800",children:[j&&!l?(0,e.jsx)(ai,{proxyUrl:j,className:"h-full w-full object-cover transition duration-500 ease-out group-hover:scale-110",priority:d,onAuthExpired:g,onError:function(){return m(!0)}}):(0,e.jsxs)("span",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 text-white",children:[(0,e.jsx)("span",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-white/15",children:(0,e.jsx)(ag,{className:"h-7 w-7 translate-x-0.5"})}),(0,e.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-white/80",children:c})]}),i?(0,e.jsx)("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,e.jsx)("span",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-black/45 text-white shadow-lg backdrop-blur-[1px] transition group-hover:scale-110 group-hover:bg-black/55",children:(0,e.jsx)(ag,{className:"h-6 w-6 translate-x-0.5"})})}):(0,e.jsx)("span",{className:"absolute inset-x-0 bottom-0 bg-black/65 px-2 py-1.5 text-center text-[10px] font-semibold uppercase tracking-wide text-white/90",children:f||"Processing…"})]})}function ak(a){var b=a.item,c=a.label,d=a.viewLabel,f=a.onOpen,g=a.priority,h=a.processingLabel,i=a.onAuthExpired,j=ab(b),k=ac(b),l=ad(b),m=ae(b),n=af(b),o=j?Q(b,{w:360}):null;return(0,e.jsxs)("button",{type:"button",onClick:function(){n&&f(b)},className:"group relative block aspect-square w-full overflow-hidden bg-neutral-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-secondary focus-visible:ring-offset-2","aria-label":c,children:[j&&o?(0,e.jsx)(ai,{proxyUrl:o,className:"h-full w-full object-cover transition duration-500 ease-out group-hover:scale-110",priority:g,onAuthExpired:i}):k?(0,e.jsx)(aj,{item:b,label:c,priority:g,processingLabel:h,onAuthExpired:i}):l||m?(0,e.jsxs)("span",{className:"flex h-full w-full flex-col items-center justify-center gap-2 px-3 text-center ".concat(l?"bg-[#3d4a2e] text-white":"bg-neutral-100 text-neutral-700"),children:[(0,e.jsx)(ah,{className:"h-12 w-12 ".concat(l?"text-white/90":"text-secondary"),pdf:l}),(0,e.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide ".concat(l?"text-white/80":"text-neutral-500"),
1children:c}),b.filename?(0,e.jsx)("span",{className:"line-clamp-2 max-w-full text-[10px] leading-tight ".concat(l?"text-white/50":"text-neutral-400"),children:b.filename}):null]}):(0,e.jsx)("span",{className:"flex h-full w-full items-center justify-center text-xs font-semibold uppercase tracking-wide text-neutral-500",children:c}),(0,e.jsx)("span",{className:"pointer-events-none absolute inset-0 bg-black/0 transition duration-300 group-hover:bg-black/35"}),n?(0,e.jsx)("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 transition duration-300 group-hover:opacity-100",children:(0,e.jsx)("span",{className:"rounded-full bg-white/95 px-4 py-2 text-[11px] font-semibold uppercase tracking-widest text-secondary shadow",children:d})}):null]})}function al(a){var b,c,d=a.items,f=a.index,g=a.copy,h=a.onClose,i=a.onPrev,j=a.onNext,k=a.onDownload,m=a.downloading,p=a.onAuthExpired,q=d[f],r=!!q&&ac(q),s=!!q&&ab(q),t=!!q&&ad(q),u=!!q&&ae(q),v=!!q&&T(q),w=(0,o.useState)(!1),x=w[0],y=w[1],z=q&&s?Q(q,{w:360}):null,A=q&&s?Q(q,{w:1100}):null,B=q&&r?P(null==(c=q)?void 0:c.file_url)||P(null==c?void 0:c.download_url)||((null==c?void 0:c.id)?"/api/otas/".concat(c.id,"/file"):null):"",C=q&&r&&U(q)?R(q,{w:1100}):null,D=(0,o.useState)(null),E=D[0],F=D[1],G=q&&t?P(q.file_url)||P(q.download_url)||"/api/otas/".concat(q.id,"/file"):"",H=(null===(b=g.types)|| void 0===b?void 0:b[null==q?void 0:q.asset_type])||(null==q?void 0:q.asset_type)||"";return((0,o.useEffect)(function(){var a=document.body.style.overflow;document.body.style.overflow="hidden",document.body.classList.add("modal-open");var b=function(a){"Escape"===a.key&&h(),"ArrowLeft"===a.key&&i(),"ArrowRight"===a.key&&j()};return window.addEventListener("keydown",b),function(){document.body.style.overflow=a,document.body.classList.remove("modal-open"),window.removeEventListener("keydown",b)}},[h,i,j]),(0,o.useEffect)(function(){y(!1),F(null);var a=!1,b=null;if(C)return(0,l.Z)(n().mark(function c(){return n().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,V(C);case 3:b=c.sent,a?URL.revokeObjectURL(b):F(b),c.next=10;break;case 7:c.prev=7,c.t0=c.catch(0),(null===c.t0|| void 0===c.t0?void 0:c.t0.code)==="agent_auth_required"&&(null==p||p());case 10:case"end":return c.stop()}},c,null,[[0,7]])}))(),function(){a=!0,b&&URL.revokeObjectURL(b)}},[null==q?void 0:q.id,C,p]),q&&"undefined"!=typeof document)?(0,L.createPortal)((0,e.jsxs)("div",{className:"fixed inset-0 z-[9999] h-[100dvh] w-screen",role:"dialog","aria-modal":"true","aria-label":g.preview_title||"Gallery",children:[(0,e.jsx)("div",{className:"absolute inset-0 bg-black/90",onClick:h,"aria-hidden":!0}),(0,e.jsx)("button",{type:"button",onClick:h,className:"absolute right-3 top-3 z-30 flex h-12 w-12 items-center justify-center rounded-full bg-white/10 text-white transition hover:bg-white/25 md:right-6 md:top-6","aria-label":g.btn_close||"Close",children:(0,e.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),d.length>1?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",onClick:function(a){a.stopPropagation(),i()},className:"absolute left-2 top-1/2 z-30 flex h-12 w-12 -translate-y-1/2 items-center justify-center rounded-full bg-white/10 text-white transition hover:bg-white/25 md:left-6","aria-label":g.btn_prev||"Previous",children:(0,e.jsx)("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,e.jsx)("button",{type:"button",onClick:function(a){a.stopPropagation(),j()},className:"absolute right-2 top-1/2 z-30 flex h-12 w-12 -translate-y-1/2 items-center justify-center rounded-full bg-white/10 text-white transition hover:bg-white/25 md:right-6","aria-label":g.btn_next||"Next",children:(0,e.jsx)("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}):null,(0,e.jsxs)("div",{className:"relative z-20 flex h-full flex-col items-center justify-center gap-5 px-4 py-16 sm:px-14 md:px-20",children:[(0,e.jsx)("div",{className:"relative flex w-full items-center justify-center ".concat(t?"h-[min(72dvh,860px)] max-w-5xl":"max-h-[min(72dvh,860px)] max-w-5xl"),onClick:function(a){return a.stopPropagation()},children:r?v?(0,e.jsxs)(e.Fragment,{children:[x?null:(0,e.jsx)("span",{className:"absolute text-sm text-white/70",children:g.loading||"Loading…"}),(0,e.jsx)("video",{src:B,poster:E||void 0,controls:!0,playsInl
1ine:!0,autoPlay:!0,preload:"auto",className:"max-h-[min(72dvh,860px)] w-auto max-w-full bg-black shadow-[0_25px_80px_rgba(0,0,0,0.55)] ".concat(x?"opacity-100":"opacity-0"),onLoadedData:function(){return y(!0)},onCanPlay:function(){return y(!0)},onError:function(){return y(!0)}},"vid-".concat(q.id))]}):(0,e.jsxs)("div",{className:"flex max-w-md flex-col items-center gap-4 rounded-2xl bg-white/10 px-8 py-10 text-center text-white",children:[(0,e.jsx)(ag,{className:"h-12 w-12 text-white/70"}),(0,e.jsx)("p",{className:"text-sm font-semibold uppercase tracking-wide",children:g.video_processing||"Processing…"}),(0,e.jsx)("p",{className:"text-sm text-white/60",children:g.video_processing_hint||"This video is still being prepared. You can download the original."})]}):t?(0,e.jsx)("iframe",{title:q.filename||"PDF",src:G,className:"h-full w-full rounded-lg bg-white shadow-[0_25px_80px_rgba(0,0,0,0.55)]"},"pdf-".concat(q.id)):u?(0,e.jsxs)("div",{className:"flex max-w-md flex-col items-center gap-4 rounded-2xl bg-white/10 px-8 py-10 text-center text-white backdrop-blur-sm",children:[(0,e.jsx)(ah,{className:"h-16 w-16 text-white/90"}),(0,e.jsx)("p",{className:"text-xs font-semibold uppercase tracking-widest text-white/50",children:H}),(0,e.jsx)("p",{className:"break-all text-base font-medium",children:q.filename||H}),(0,e.jsx)("p",{className:"text-sm text-white/60",children:g.doc_preview_hint||"Preview is not available for this file. You can download it."})]}):(0,e.jsx)("div",{className:"relative flex max-h-[min(72dvh,860px)] max-w-full items-center justify-center",children:z?(0,e.jsx)(ai,{proxyUrl:A||z,className:"max-h-[min(72dvh,860px)] w-auto max-w-full object-contain shadow-[0_25px_80px_rgba(0,0,0,0.55)]",onAuthExpired:p}):null})}),(0,e.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,e.jsxs)("p",{className:"max-w-md truncate text-center text-xs tracking-wide text-white/60",children:[q.filename?"".concat(q.filename," \xb7 "):"",f+1," / ",d.length]}),(0,e.jsx)("button",{type:"button",onClick:function(){return k(q)},disabled:m,className:"min-h-[48px] rounded-full bg-white px-8 py-3 text-sm font-semibold uppercase tracking-wide text-secondary shadow-lg transition hover:bg-neutral-100 disabled:opacity-60",children:m?g.downloading:g.btn_download})]})]})]}),document.body):null}function am(a){var b,c=a.locale,d=a.copy,f=a.onAuthExpired,g=(0,o.useState)(1),h=g[0],i=g[1],j=(0,o.useState)(""),k=j[0],m=j[1],p=(0,o.useState)(""),q=p[0],r=p[1],s=(0,o.useState)(""),t=s[0],u=s[1],w=(0,o.useState)(1),x=w[0],y=w[1],z=(0,o.useState)([]),A=z[0],B=z[1],C=(0,o.useState)({page:1,per_page:12,total:0,total_pages:1}),D=C[0],E=C[1],F=(0,o.useState)(!1),G=F[0],H=F[1],I=(0,o.useState)(!1),J=I[0],L=I[1],M=(0,o.useState)(""),N=M[0],O=M[1],P=(0,o.useState)(null),Q=P[0],R=P[1],S=(0,o.useState)(null),T=S[0],U=S[1],V=x<(D.total_pages||1),W=Boolean(q||t),Y=(0,o.useCallback)(function(){U(null),B([]),null==f||f()},[f]),$=(0,o.useMemo)(function(){return A.filter(function(a){return af(a)})},[A]),ab=(0,o.useCallback)((b=(0,l.Z)(n().mark(function a(b,c){var e,f,g,i,j;return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e=c.append;a.next=5;break;case 5:if(h){a.next=8;break}return O(d.error_hotel),a.abrupt("return");case 8:return e?L(!0):H(!0),O(""),a.prev=10,a.next=13,X({hotel_id:h,page:b,per_page:12,q:q||void 0,type:t||void 0});case 13:i=Array.isArray((g=(null==(f=a.sent)?void 0:f.data)||{}).items)?g.items:[],j=g.pagination||{page:b,per_page:12,total:i.length,total_pages:1},E(j),y(b),B(function(a){return e?(0,K.Z)(a).concat((0,K.Z)(i)):i}),a.next=30;break;case 22:if(a.prev=22,a.t0=a.catch(10),console.error(a.t0),!(v(a.t0)||(null===a.t0|| void 0===a.t0?void 0:a.t0.code)==="agent_auth_required")){a.next=28;break}return Y(),a.abrupt("return");case 28:e||B([]),O(d.error_generic);case 30:return a.prev=30,H(!1),L(!1),a.finish(30);case 34:case"end":return a.stop()}},a,null,[[10,22,30,34]])})),function(a,c){return b.apply(this,arguments)}),[!0,h,q,t,d.error_config,d.error_hotel,d.error_generic,Y,]);(0,o.useEffect)(function(){ab(1,{append:!1})},[ab]),(0,o.useEffect)(function(){var a=setTimeout(function(){r(k.trim())},400);return function(){return clearTimeout(a)}},[k]);var ac,ad=function(){m(""),r(""),u("")},ae=function(){!V||J||G||ab(x+1,{append:!0})},ag=(ac=(0,l.Z)(n().mark(function a(b){return n().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return R(b.id),a.prev=1,a.next=4,Z(b);case 4:a.next=13;break;case 6:if(a.prev=6,a.t0=a.catch(1),console.error(a.t0),!(v(a.t0)||(null===a.t0|| void 0===a.t0?void 0:a.t0.code)==="agent_auth_required")){a.next=12;break}return Y(),a.abrupt("return");case 12:O(d.download_error);case 13:return a.prev=13,R(null),a.finish(13);case 16:case"end":return a.stop()}},a,null,[[1,6,13,16]])})),function(a){return ac.apply(this,arguments)}
1),ah=function(a){if(af(a)){var b=$.findIndex(function(b){return b.id===a.id});b>=0&&U(b)}},ai=function(){return U(null)},aj=(0,o.useCallback)(function(){U(function(a){return null==a||0===$.length?a:(a-1+$.length)%$.length})},[$.length]),am=(0,o.useCallback)(function(){U(function(a){return null==a||0===$.length?a:(a+1)%$.length})},[$.length]),an=[{value:"",label:d.type_all},].concat((0,K.Z)(aa.map(function(a){var b;return{value:a,label:(null===(b=d.types)|| void 0===b?void 0:b[a])||a}})));return(0,e.jsxs)("div",{className:"w-full",children:[(0,e.jsx)("div",{className:"mb-6 flex flex-wrap gap-2",role:"tablist","aria-label":d.hotel_label,children:_.map(function(a){var b=h===a.hotel_id,d="es"===c?a.label_es:a.label_en;return(0,e.jsx)("button",{type:"button",role:"tab","aria-selected":b,onClick:function(){return i(a.hotel_id)},className:"rounded-full px-5 py-2.5 text-sm font-semibold uppercase tracking-wide transition ".concat(b?"bg-secondary text-white shadow":"bg-neutral-100 text-neutral-700 hover:bg-neutral-200"),children:d},a.hotel_id)})}),(0,e.jsxs)("div",{className:"mb-8 flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"relative max-w-md",children:[(0,e.jsx)("svg",{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":!0,children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z"})}),(0,e.jsx)("input",{type:"search",value:k,onChange:function(a){return m(a.target.value)},placeholder:d.search_placeholder,className:"w-full rounded-full border border-neutral-200 bg-white py-2.5 pl-10 pr-10 text-sm outline-none transition focus:border-secondary focus:ring-1 focus:ring-secondary","aria-label":d.search_placeholder}),k?(0,e.jsx)("button",{type:"button",onClick:function(){m(""),r("")},className:"absolute right-3 top-1/2 -translate-y-1/2 text-neutral-400 hover:text-neutral-700","aria-label":d.btn_clear,children:(0,e.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}):null]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",role:"group","aria-label":d.type_label,children:[an.map(function(a){var b=t===a.value;return(0,e.jsx)("button",{type:"button",onClick:function(){return u(a.value)},className:"rounded-full px-3.5 py-1.5 text-xs font-semibold uppercase tracking-wide transition ".concat(b?"bg-primary text-white":"bg-neutral-100 text-neutral-600 hover:bg-neutral-200"),children:a.label},a.value||"all")}),W?(0,e.jsx)("button",{type:"button",onClick:ad,className:"ml-1 text-xs font-medium uppercase tracking-wide text-neutral-400 underline-offset-2 hover:text-neutral-700 hover:underline",children:d.btn_clear}):null]})]}),N?(0,e.jsx)("div",{role:"alert",className:"mb-6 rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-800",children:N}):null,G?(0,e.jsx)("p",{className:"py-16 text-center text-neutral-500",children:d.loading}):0!==A.length||N?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("ul",{className:"grid grid-cols-2 gap-1 sm:gap-1.5 md:grid-cols-3 lg:grid-cols-4 lg:gap-2",children:A.map(function(a,b){var c;return(0,e.jsx)("li",{children:(0,e.jsx)(ak,{item:a,label:(null===(c=d.types)|| void 0===c?void 0:c[a.asset_type])||a.asset_type,viewLabel:d.btn_view||d.preview_title,onOpen:ah,priority:b<4,processingLabel:d.video_processing,onAuthExpired:Y})},a.id)})}),V?(0,e.jsx)("div",{className:"mt-12 flex justify-center",children:(0,e.jsx)("button",{type:"button",onClick:ae,disabled:J,className:"min-h-[48px] rounded-full bg-secondary px-10 py-3 text-sm font-semibold uppercase tracking-widest text-white transition hover:bg-secondarylight disabled:opacity-60",children:J?d.loading:d.btn_load_more})}):null]}):(0,e.jsx)("p",{className:"py-16 text-center text-neutral-500",children:d.empty}),null!=T&&$[T]?(0,e.jsx)(al,{items:$,index:T,copy:d,onClose:ai,onPrev:aj,onNext:am,onDownload:ag,downloading:Q===$[T].id,onAuthExpired:Y}):null]})}var an=JSON.parse('{"en":{"seo":{"metaTitle":"Discover, inspire and share M\xcdA — Travel agent media","metaDescription":"Exclusive media space for travel agencies and agents of M\xcdA Hotels & Resorts. Explore and download photos, videos and information from M\xcdA Reef Isla Mujeres and M\xcdA Bacalar."},"title":"Discover, inspire and share M\xcdA","subtitle":"Welcome to the exclusive space for travel agencies and agents of M\xcdA Hotels & Resorts.\\n\\nExplore and download photos, videos and information from M\xcdA Reef Isla Mujeres and M\xcdA Bacalar, created to help you present our destinations and inspire your clients’ next trip.\\n\\nTwo destinations, two unique experiences, one way of living M\xcdA.","hotel_label":"Hotel","search_placeholder":"Search by filename…","type_label":"Type","type_all":"All types","folder_label":"Folder","folder_all":"All folders","folder_hint":"e.g. rooms/","btn_search":"Search","btn_clear":"Clear","btn_download":"Download","btn_load_more":"Load more","btn_close":"Close","btn_view":"View","preview_title":"Preview","doc_preview_hint":"Preview is not available for this file type. You can download it.","video_processing":"Processing…","video_processing_hint":"This video is still being prepared. You can download the original.","btn_prev":"Previous","btn_next":"Next","empty":"No assets found for this hotel.","loading":"Loading assets…","error_config":"API is not configured. Set NEXT_PUBLIC_API_URL and NEXT_PUBLIC_API_KEY.","error_generic":"Could not load assets. Check the API key and that the backend is running.","error_hotel":"Select a hotel to continue.","downloading":"Downloading…","download_error":"Download failed.","results":"results","page_of":"Page","of":"of","size":"Size","created":"Added","types":{"image":"Image","video":"Video","pdf":"PDF","document":"Document","other":"Other"},"auth":{"checking":"Checking access…","title":"Agent access","email_hint":"Enter your work email to receive a one-time access code.","register_title":"Create your access","register_hint":"We don’t have this email yet. Tell us your name and agency to continue — we’ll email you a code.","code_hint":"Check your email. The code expires in {minutes} minutes.","email_label":"Email","email_placeholder":"[email protected]","name_label":"Name","name_placeholder":"Your full name","agency_label":"Agency","agency_placeholder":"Agency name","code_label":"6-digit code","btn_send_code":"Send code","btn_register":"Continue","btn_verify":"Enter","btn_resend":"Resend code","btn_change_email":"Change email","btn_back":"Back","btn_logout":"Log out","sending":"Sending…","registering":"Creating access…","verifying":"Verifying…","resend_wait":"Resend in {s}s","hello":"Hello, {name}
1","errors":{"invalid_email":"Please check your email address.","invalid_name":"Please enter your name.","invalid_agency":"Please enter your agency.","invalid_code":"Incorrect code.","agent_not_invited":"Complete your name and agency to continue.","agent_revoked":"Your access was deactivated. Contact M\xcdA.","agent_already_exists":"This email is already registered. We sent a new code.","otp_cooldown":"Wait a minute before requesting another code.","otp_rate_limited":"Too many attempts. Please wait a few minutes.","otp_locked":"Code locked. Request a new one.","otas_agent_auth_failed":"Could not send the email. Please try again.","api_key_missing":"Site API key is missing. Contact support.","agent_auth_required":"Your session expired. Please sign in again.","invalid_agent_token":"Your session is no longer valid. Please sign in again.","generic":"Something went wrong. Please try again."}}},"es":{"seo":{"metaTitle":"Descubre, inspira y comparte M\xcdA — Media para agencias","metaDescription":"Espacio exclusivo para agencias y agentes de viaje de M\xcdA Hotels & Resorts. Explora y descarga fotograf\xedas, videos e informaci\xf3n de M\xcdA Reef Isla Mujeres y M\xcdA Bacalar."},"title":"Descubre, inspira y comparte M\xcdA","subtitle":"Bienvenido al espacio exclusivo para agencias y agentes de viaje de M\xeda Hotels & Resorts.\\n\\nExplora y descarga fotograf\xedas, videos e informaci\xf3n de M\xeda Reef Isla Mujeres y M\xeda Bacalar, creados para ayudarte a presentar nuestros destinos e inspirar el pr\xf3ximo viaje de tus clientes.\\n\\nDos destinos, dos experiencias \xfanicas, una misma forma de vivir M\xcdA.","hotel_label":"Hotel","search_placeholder":"Buscar por nombre…","type_label":"Tipo","type_all":"Todos los tipos","folder_label":"Carpeta","folder_all":"Todas las carpetas","folder_hint":"ej. rooms/","btn_search":"Buscar","btn_clear":"Limpiar","btn_download":"Descargar","btn_load_more":"Cargar m\xe1s","btn_close":"Cerrar","btn_view":"Ver","preview_title":"Vista previa","doc_preview_hint":"Este tipo de archivo no se puede previsualizar. Puedes descargarlo.","video_processing":"Procesando…","video_processing_hint":"Este video a\xfan se est\xe1 preparando. Puedes descargar el original.","btn_prev":"Anterior","btn_next":"Siguiente","empty":"No hay assets para este hotel.","loading":"Cargando assets…","error_config":"API no configurada. Define NEXT_PUBLIC_API_URL y NEXT_PUBLIC_API_KEY.","error_generic":"No se pudieron cargar los assets. Revisa la API key y que el backend est\xe9 activo.","error_hotel":"Selecciona un hotel para continuar.","downloading":"Descargando…","download_error":"Error al descargar.","results":"resultados","page_of":"P\xe1gina","of":"de","size":"Tama\xf1o","created":"Alta","types":{"image":"Imagen","video":"Video","pdf":"PDF","document":"Documento","other":"Otro"},"auth":{"checking":"Verificando acceso…","title":"Acceso para agentes","email_hint":"Ingresa tu correo de trabajo para recibir un c\xf3digo de acceso.","register_title":"Crea tu acceso","register_hint":"A\xfan no tenemos este correo. Indica tu nombre y agencia para continuar — te enviaremos un c\xf3digo.","code_hint":"Revisa tu correo. El c\xf3digo caduca en {minutes} minutos.","email_label":"Correo","email_placeholder":"[email protected]","name_label":"Nombre","name_placeholder":"Tu nombre completo","agency_label":"Agencia","agency_placeholder":"Nombre de la agencia","code_label":"C\xf3digo de 6 d\xedgitos","btn_send_code":"Enviar c\xf3digo","btn_register":"Continuar","btn_verify":"Entrar","btn_resend":"Reenviar c\xf3digo","btn_change_email":"Cambiar correo","btn_back":"Volver","btn_logout":"Salir","sending":"Enviando…","registering":"Creando acceso…","verifying":"Verificando…","resend_wait":"Reenviar en {s}s","hello":"Hola, {name}","errors":{"invalid_email":"Revisa el correo.","invalid_name":"Ingresa tu nombre.","invalid_agency":"Ingresa tu agencia.","invalid_code":"C\xf3digo incorrecto.","agent_not_invited":"Completa tu nombre y agencia para continuar.","agent_revoked":"Tu acceso fue desactivado. Contacta a M\xcdA.","agent_already_exists":"Este correo ya est\xe1 registrado. Enviamos un nuevo c\xf3digo.","otp_cooldown":"Espera un minuto para pedir otro c\xf3digo.","otp_rate_limited":"Demasiados intentos. Espera unos minutos.","otp_locked":"C\xf3digo bloqueado. Pide uno nuevo.","otas_agent_auth_failed":"No se pudo enviar el correo. Reintenta.","api_key_missing":"Falta la API key del sitio. Contacta a soporte.","agent_auth_required":"Tu sesi\xf3n expir\xf3. Vuelve a entrar.","invali
1d_agent_token":"Tu sesi\xf3n ya no es v\xe1lida. Vuelve a entrar.","generic":"Algo sali\xf3 mal. Int\xe9ntalo de nuevo."}}}}');function ao(){var a=(0,f.useRouter)().locale,b=an[a]||an.en;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(g.Z,(0,d.Z)({},b.seo)),(0,e.jsxs)(h.Z,{landingVariant:"multimedia",children:[(0,e.jsx)(i.Z,{type:"image",source:"/files/mia-reef-isla-mujeres-banner.webp",leyend:b.title,showBookingWidget:!1,useArrowDown:!1,compact:!0}),(0,e.jsxs)(j.Z,{children:[(0,e.jsx)(k.Z,{subtitle:b.title,summary:b.subtitle}),(0,e.jsx)("section",{className:"container pb-8 md:pb-16",children:(0,e.jsx)(J,{copy:b,children:function(c){var d=c.onAuthExpired;return(0,e.jsx)(am,{locale:a,copy:b,onAuthExpired:d})}})})]})]})]})}},1113:function(a,b,c){!function(b,d){a.exports=d(c(7294))}("undefined"!=typeof self?self:this,function(a){return function(a){var b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,c),e.l=!0,e.exports}return c.m=a,c.c=b,c.d=function(a,b,d){c.o(a,b)||Object.defineProperty(a,b,{enumerable:!0,get:d})},c.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},c.t=function(a,b){if(1&b&&(a=c(a)),8&b||4&b&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&b&&"string"!=typeof a)for(var e in a)c.d(d,e,(function(b){return a[b]}).bind(null,e));return d},c.n=function(a){var b=a&&a.__esModule?function(){return a.default}:function(){return a};return c.d(b,"a",b),b},c.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},c.p="",c(c.s=3)}([function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function e(a,b){if(!(a instanceof b))throw TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&g(a,b)}function g(a,b){return(g=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a})(a,b)}function h(a){var b=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var c,d=j(a);if(b){var e=j(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return i(this,c)}}function i(a,b){return b&&("object"===d(b)||"function"==typeof b)?b:function(a){if(void 0===a)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(a)}function j(a){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(a)}var k=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.Background=b.Parallax=void 0;var l=k(c(0)),m=function(a){f(c,a);var b=h(c);function c(){return e(this,c),b.apply(this,arguments)}return c}(l.default.Component);b.Parallax=m;var n=function(a){f(c,a);var b=h(c);function c(){return e(this,c),b.apply(this,arguments)}return c}(l.default.Component);b.Background=n},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.canUseDOM=b.getNodeHeight=b.isScrolledIntoView=b.getWindowHeight=void 0,b.getWindowHeight=function(a){if(!a)return 0;var b=window,c=document,d=c.documentElement,e=c.getElementsByTagName("body")[0];return b.innerHeight||d.clientHeight||e.clientHeight},b.isScrolledIntoView=function(a){var c=arguments.length>1&& void 0!==arguments[1]?arguments[1]:0,d=arguments.length>2?arguments[2]:void 0;if(!d)return!1;var e=a.getBoundingClientRect().top-c,f=a.getBoundingClientRect().bottom+c;return e<=b.getWindowHeight(d)&&f>=0},b.getNodeHeight=function(a,c){return a?c&&"clientHeight"in c?c.clientHeight:b.getW
1indowHeight(a):0},b.canUseDOM=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},function(a,b,c){"use strict";var d=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.Background=b.Parallax=void 0;var e=d(c(4));b.Parallax=e.default;var f=d(c(7));b.Background=f.default},function(a,b,c){"use strict";function d(a){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function e(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function f(a,b){return(f=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a})(a,b)}function g(a){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(a)}var h=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0});var i=h(c(0)),j=c(1),k=c(5),l=c(2),m=h(c(6)),n={position:"absolute",left:"50%",WebkitTransform:"translate3d(-50%, 0, 0)",transform:"translate3d(-50%, 0, 0)",WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",MozBackfaceVisibility:"hidden",MsBackfaceVisibility:"hidden"},o=function(a){!function(a,b){if("function"!=typeof b&&null!==b)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&f(a,b)}(q,a);var b,c,h,j,o,p=(b=q,c=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}(),function(){var a,e,f,h=g(b);if(c){var i=g(this).constructor;f=Reflect.construct(h,arguments,i)}else f=h.apply(this,arguments);return a=this,e=f,e&&("object"===d(e)||"function"==typeof e)?e:function(a){if(void 0===a)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(a)});function q(a){var b;return function(a,b){if(!(a instanceof b))throw TypeError("Cannot call a class as a function")}(this,q),(b=p.call(this,a)).onWindowResize=function(){b.parentHeight=l.getNodeHeight(b.canUseDOM,b.parent),b.updatePosition()},b.onWindowLoad=function(){b.updatePosition()},b.onScroll=function(){if(b.canUseDOM){var a=Date.now();a-b.timestamp>=10&&l.isScrolledIntoView(b.node,100,b.canUseDOM)&&(window.requestAnimationFrame(b.updatePosition),b.timestamp=a)}},b.onContentMount=function(a){b.content=a},b.updatePosition=function(){if(b.content){var a=!1;b.contentHeight=b.content.getBoundingClientRect().height,b.contentWidth=b.node.getBoundingClientRect().width,b.img&&b.img.naturalWidth/b.img.naturalHeight<b.contentWidth/b.getImageHeight()&&(a=!0);var c=k.getRelativePosition(b.node,b.canUseDOM),d=!!b.img,e=b.bg&&b.state.splitChildren.bgChildren.length>0;d&&b.setImagePosition(c,a),e&&b.setBackgroundPosition(c),d||e||b.setState({percentage:c})}},b.state={bgImage:a.bgImage,bgImageSrcSet:a.bgImageSrcSet,bgImageSizes:a.bgImageSizes,imgStyle:n,bgStyle:Object.assign(Object.assign({},n),a.bgStyle),percentage:0,splitChildren:k.getSplitChildren(a)},b.canUseDOM=l.canUseDOM(),b.node=null,b.content=null,b.bgImageLoaded=!1,b.bgImageRef=void 0,b.parent=a.parent,b.parentHeight=l.getNodeHeight(b.canUseDOM,b.parent),b.timestamp=Date.now(),b.isDynamicBlur=k.getHasDynamicBlur(a.blur),b}return h=q,j=[{key:"componentDidMount",value:function(){var a=this.props.parent,b=this.state,c=b.bgImage,d=b.bgImageSrcSet,e=b.bgImageSizes;this.parent=a||document,this.addListeners(),c?this.loadImage(c,d,e):this.updatePosition()}},{key:"componentDidUpdate",value:function(a){var b=this.props,c=b.parent,d=b.bgImage,e=b.bgImageSrcSet,f=b.bgImageSizes,g=this.state.bgImage;a.parent!==c&&(this.removeListeners(this.parent),this.parent=c,c&&this.addListeners()),this.parentHeight=l.getNodeHeight(this.canUseDOM,this.parent),g!==d&&this.loadImage(d,e,f)}},{key:"componentWillUnmount",value:function(){this.removeListeners(this.parent),this.releaseImage()}}
1,{key:"setBackgroundPosition",value:function(a){var b=this.props,c=b.disabled,d=b.strength,e=Object.assign({},this.state.bgStyle);if(!c){var f="translate3d(-50%, ".concat((d<0?d:0)-d*a,"px, 0)");e.WebkitTransform=f,e.transform=f}this.setState({bgStyle:e,percentage:a})}},{key:"setImagePosition",value:function(a){var b=arguments.length>1&& void 0!==arguments[1]&&arguments[1],c=this.props,d=c.disabled,e=c.strength,f=c.blur,g=b?"auto":"".concat(this.getImageHeight(),"px"),h=b?"".concat(this.contentWidth,"px"):"auto",i=Object.assign(Object.assign({},this.state.imgStyle),{height:g,width:h});if(!d){var j=(e<0?e:0)-e*a,l="translate3d(-50%, ".concat(j,"px, 0)"),m="none";f&&(m="blur(".concat(k.getBlurValue(this.isDynamicBlur,f,a),"px)")),i.WebkitTransform=l,i.transform=l,i.WebkitFilter=m,i.filter=m}this.setState({imgStyle:i,percentage:a})}},{key:"getImageHeight",value:function(){var a=this.props.strength;return Math.floor(this.contentHeight+(a<0?2.5:1)*Math.abs(a))}},{key:"loadImage",value:function(a,b,c){var d=this;this.releaseImage(),this.bgImageRef=new Image,this.bgImageRef.onload=function(e){d.setState({bgImage:a,bgImageSrcSet:b,bgImageSizes:c},function(){return d.updatePosition()}),d.props.onLoad&&d.props.onLoad(e)},this.bgImageRef.onerror=this.bgImageRef.onload,this.bgImageRef.src=a,this.bgImageRef.srcset=b||"",this.bgImageRef.sizes=c||""}},{key:"releaseImage",value:function(){this.bgImageRef&&(this.bgImageRef.onload=null,this.bgImageRef.onerror=null,delete this.bgImageRef)}},{key:"addListeners",value:function(){this.canUseDOM&&this.parent&&(this.parent.addEventListener("scroll",this.onScroll,!1),window.addEventListener("resize",this.onWindowResize,!1),window.addEventListener("load",this.onWindowLoad,!1))}},{key:"removeListeners",value:function(a){this.canUseDOM&&(a&&a.removeEventListener("scroll",this.onScroll,!1),window.removeEventListener("resize",this.onWindowResize,!1),window.removeEventListener("load",this.onWindowLoad,!1))}},{key:"render",value:function(){var a=this,b=this.props,c=b.className,d=b.style,e=b.bgClassName,f=b.contentClassName,g=b.bgImageAlt,h=b.renderLayer,j=b.bgImageStyle,k=b.lazy,l=this.state,n=l.bgImage,o=l.bgImageSrcSet,p=l.bgImageSizes,q=l.percentage,r=l.imgStyle,s=l.bgStyle,t=l.splitChildren;return i.default.createElement("div",{className:"react-parallax ".concat(c),style:Object.assign({position:"relative",overflow:"hidden"},d),ref:function(b){a.node=b}},n?i.default.createElement("img",{className:e,src:n,srcSet:o,sizes:p,ref:function(b){a.img=b},alt:g,style:Object.assign(Object.assign({},r),j),loading:k?"lazy":"eager"}):null,h?h(-(q-1)):null,t.bgChildren.length>0?i.default.createElement("div",{className:"react-parallax-background-children",ref:function(b){a.bg=b},style:s},t.bgChildren):null,i.default.createElement(m.default,{onMount:this.onContentMount,className:f},t.children))}}],o=[{key:"getDerivedStateFromProps",value:function(a){return{splitChildren:k.getSplitChildren(a)}}}],j&&e(h.prototype,j),o&&e(h,o),q}(j.Parallax);o.defaultProps={bgClassName:"react-parallax-bgimage",bgImageAlt:"",className:"",contentClassName:"",disabled:!1,strength:100},b.default=o},function(a,b,c){"use strict";function d(a){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.setBlur=b.getBlurValue=b.getHasDynamicBlur=b.getSplitChildren=b.getRelativePosition=b.getPercentage=void 0;var e=c(0),f=c(2);b.getPercentage=function(a,b,c){return(c-a)/(b-a)||0},b.getRelativePosition=function(a,c){if(!c)return 0;var d=a.getBoundingClientRect(),e=d.top,g=d.height,h=f.getNodeHeight(c),i=g>h?g:h,j=Math.round(e>i?i:e);return b.getPercentage(0,i,j)},b.getSplitChildren=function(a){var b=[],c=e.Children.toArray(a.children);return c.forEach(function(a,d){var e=a;e.type&&e.type.isParallaxBackground&&(b=b.concat(c.splice(d,1)))}),{bgChildren:b,children:c}},b.getHasDynamicBlur=function(a){return"object"===d(a)&& void 0!==a.min&& void 0!==a.max},b.getBlurValue=function(a,b,c){return a?b.min+(1-c)*b.max:b},b.setBlur=function(a,b){a.style.webkitFilter="blur(".concat(b,"px)"),a.style.filter="blur(".concat(b,"px)")}},function(a,b,c){"use strict";var d=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};
1Object.defineProperty(b,"__esModule",{value:!0});var e=d(c(0));b.default=function(a){var b=a.children,c=a.onMount,d=a.className;return e.default.createElement("div",{ref:function(a){return c(a)},className:d||"react-parallax-content",style:{position:"relative"}},b)}},function(a,b,c){"use strict";function d(a){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function e(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function f(a,b){return(f=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a})(a,b)}function g(a){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(a)}var h=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0});var i=h(c(0)),j=function(a){!function(a,b){if("function"!=typeof b&&null!==b)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&f(a,b)}(m,a);var b,c,h,j,k,l=(b=m,c=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}(),function(){var a,e,f,h=g(b);if(c){var i=g(this).constructor;f=Reflect.construct(h,arguments,i)}else f=h.apply(this,arguments);return a=this,e=f,e&&("object"===d(e)||"function"==typeof e)?e:function(a){if(void 0===a)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(a)});function m(){return function(a,b){if(!(a instanceof b))throw TypeError("Cannot call a class as a function")}(this,m),l.apply(this,arguments)}return h=m,j=[{key:"render",value:function(){var a=this.props,b=a.className,c=a.children;return i.default.createElement("div",{className:"react-parallax-background ".concat(b)},c)}}],e(h.prototype,j),k&&e(h,k),m}
1(c(1).Background);j.defaultProps={className:""},j.isParallaxBackground=!0,b.default=j}])})},943:function(a,b,c){"use strict";function d(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}c.d(b,{Z:function(){return d}})},7568:function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(j){c(j);return}h.done?b(i):Promise.resolve(i).then(d,e)}function e(a){return function(){var b=this,c=arguments;return new Promise(function(e,f){var g=a.apply(b,c);function h(a){d(g,e,f,h,i,"next",a)}function i(a){d(g,e,f,h,i,"throw",a)}h(void 0)})}}c.d(b,{Z:function(){return e}})},3375:function(a,b,c){"use strict";function d(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}c.d(b,{Z:function(){return d}})},9815:function(a,b,c){"use strict";c.d(b,{Z:function(){return g}});var d=c(943),e=c(3375),f=c(1566);function g(a){return function(a){if(Array.isArray(a))return(0,d.Z)(a)}(a)||(0,e.Z)(a)||(0,f.Z)(a)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1566:function(a,b,c){"use strict";c.d(b,{Z:function(){return e}});var d=c(943);function e(a,b){if(a){if("string"==typeof a)return(0,d.Z)(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(c);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return(0,d.Z)(a,b)}}}},function(a){a.O(0,[5445,3985,6231,196,677,9774,2888,179],function(){var b;return a(a.s=5693)}),_N_E=a.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.