PageSourceSearch

https://hotelzify.com/static/js/2642.0c27b3c8.chunk.js

js hotelzify.com collected 2026-10-01 15:35:18 UTC 5,736 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunklanding_page=self.webpackChunklanding_page||[]).push([[2642],{2642:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(5043),c=n(7950),l=n(5346),s=n(579);const o=()=>(0,s.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}),a=()=>(0,s.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})}),i=e=>{let{images:t,currentIndex:n=0,onClose:i,altPrefix:u="Image"}=e;const[h,x]=(0,r.useState)(n),[g,d]=(0,r.useState)(null),[m,f]=(0,r.useState)("idle"),[b,v]=(0,r.useState)("next"),[p,w]=(0,r.useState)(!1),[y,k]=(0,r.useState)(!1),j=(0,r.useRef)(null),C=(0,r.useRef)(null);(0,r.useEffect)(()=>(document.body.style.overflow="hidden",requestAnimationFrame(()=>w(!0)),()=>{document.body.style.overflow=""}),[]);const R=(0,r.useCallback)(()=>{k(!0),w(!1),setTimeout(()=>{i(!1)},260)},[i]),N=(0,r.useCallback)((e,t)=>{e!==h&&("idle"!==m&&(clearTimeout(C.current),d(null),f("idle")),v(t),d(h),x(e),f("start"),requestAnimationFrame(()=>{requestAnimationFrame(()=>f("animating"))}),C.current=setTimeout(()=>{d(null),f("idle")},500))},[h,m]),L=(0,r.useCallback)(e=>{N(e,e>h?"next":"prev")},[N,h]),E=(0,r.useCallback)(()=>{const e=0===h?t.length-1:h-1;N(e,"prev")},[h,t.length,N]),M=(0,r.useCallback)(()=>{const e=h===t.length-1?0:h+1;N(e,"next")},[h,t.length,N]);(0,r.useEffect)(()=>{const e=e=>{"Escape"===e.key?R():"ArrowLeft"===e.key?E():"ArrowRight"===e.key&&M()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[R,E,M]);const S=(0,r.useCallback)(e=>{const t=j.current;if(!t)return;const n=t.children[h];if(!n)return;const r=n.offsetLeft-t.offsetWidth/2+n.offsetWidth/2;if(!e)return void(t.scrollLeft=r);const c=t.scrollLeft,l=r-c;let s=null;const o=e=>{s||(s=e);const n=e-s,r=Math.min(n/700,1);var a;t.scrollLeft=c+l*((a=r)<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2),r<1&&requestAnimationFrame(o)};requestAnimationFrame(o)},[h]);(0,r.useEffect)(()=>{S(!0)},[S]);const T=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!T.current){T.current=!0;const e=setTimeout(()=>S(!1),50);return()=>clearTimeout(e)}},[S]);const[A,q]=(0,r.useState)(1),[F,X]=(0,r.useState)({x:0,y:0}),_=(0,r.useRef)(!1),P=(0,r.useRef)(0),Y=(0,r.useRef)(1),z=(0,r.useRef)({x:0,y:0}),B=(0,r.useRef)({x:0,y:0});(0,r.useEffect)(()=>{q(1),X({x:0,y:0}),B.current={x:0,y:0}},[h]);const D=(0,r.useRef)(null),I=(0,r.useRef)(0),W=(0,r.useRef)(!1),G=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},H=(0,r.useRef)(0),J="lightbox-overlay".concat(p?" lightbox-open":"").concat(y?" lightbox-closing":"");return(0,c.createPortal)((0,s.jsxs)("div",{className:J,onClick:e=>{e.target===e.currentTarget&&R()},children:[(0,s.jsxs)("span",{className:"lightbox-counter",children:[h+1," / ",t.length]}),(0,s.jsxs)("div",{className:"lightbox-content",children:[(0,s.jsx)("button",{className:"lightbox-close",onClick:R,"aria-label":"Close lightbox",children:"\xd7"}),(0,s.jsxs)("div",{className:"lightbox-main",onTouchStart:e=>{2===e.touches.length?(_.current=!0,W.current=!0,P.current=G(e.touches),Y.current=A,D.current=null):1===e.touches.length&&(W.current=!1,A>1?(z.current={x:e.touches[0].clientX,y:e.touches[0].clientY},B.current={x:F.x,y:F.y},D.current=null):(D.current=e.touches[0].clientX,I.current=0))},onTouchMove:e=>{if(2===e.touches.length&&_.current){const t=G(e.touches),n=Math.min(4,Math.max(1,Y.current*(t/P.current)));return q(n),void(n<=1&&(X({x:0,y:0}),B.current={x:0,y:0}))}if(1===e.touches.length&&A>1){const t=e.touches[0].clientX-z.current.x,n=e.touches[0].clientY-z.current.y;X({x:B.current.x+t,y:B.current.y+n})}else null!==D.current&&(I.current=e.touches[0].clientX-D.current)},onTouchEnd:e=>{if(e.touches.length<2&&(_.current=!1),W.current||A>1)return D.current=null,I.current=0,void(W.current=!1);Math.abs(I.current)>50&&(I.current>0?E():M()),D.current=null,I.current=0},onClick:e=>{const t=Date.now();t-H.current<300&&(e.preventDefault(),A>1?(q(1),X({x:0,y:0}),B.current={x:0,y:0}):q(2.5)),H.current=t},style:{touchAction:A>1?"none":"pan-y"},children:[null!==g&&(0,s.jsx)("div",{className:"lightbox-image-wrapper lightbox-slide-exit".concat("animating"===m?" lightbox-slide-exit-active":"").concat("prev"===b?" lightbox-dir-prev":""),children:(0,s.jsx)("img",{src:t[g],alt:"".concat(u," ").concat(g+1),draggable:!1})},"exit-"+g),(0,s.jsx)("div",{className:"lightbox-image-wrapper".concat(null!==g?" lightbox-slide-enter".concat("animating"===m?" lightbox-slide-enter-active":"").concat("prev"===b?" lightbox-dir-prev":""):""),children:(0,s.jsx)("img",{src:t[h],alt:"".concat(u," ").concat(h+1),draggable:!1,style:A>1?{transform:"scale(".concat(A,") translate(").concat(F.x/A,"px, ").concat(F.y/A,"px)"),transition:_.current?"none":"transform 0.15s ease-out"}:void 0})},"enter-"+h),t.length>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{className:"lightbox-arrow lightbox-arrow-left",onClick:e=>{e.stopPropagation(),E()},"aria-label":"Previous image",children:(0,s.jsx)(o,{})}),(0,s.jsx)("button",{className:"lightbox-arrow lightbox-arrow-right",onClick:e=>{e.stopPropagation(),M()},"aria-label":"Next image",children:(0,s.jsx)(a,{})})]})]})]}),t.length>
11&&(0,s.jsx)("div",{className:"lightbox-thumbnails",ref:j,children:t.map((e,t)=>(0,s.jsx)("div",{className:"lightbox-thumb".concat(t===h?" lightbox-thumb-active":""),onClick:()=>{(0,l.fireGtmEvent)("room_lightbox_thumb_clicked",{index:t,room_name:u}),L(t)},children:(0,s.jsx)("img",{src:e,alt:"".concat(u," thumbnail ").concat(t+1),draggable:!1})},t))})]}),document.body)}}}]);
2//# sourceMappingURL=2642.0c27b3c8.chunk.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.