1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cc9ddf31-4122-4bcf-a1be-6753d0a345a0",e._sentryDebugIdIdentifier="sentry-dbid-cc9ddf31-4122-4bcf-a1be-6753d0a345a0")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2088],{2088:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>_});var n=l(37876),o=l(14232),a=l(54587),r=l.n(a),i=l(18847),c=l.n(i),u=l(98477),d=l(48815),s=l.n(d),h=l(53784);let g=c()(()=>l.e(8165).then(l.t.bind(l,48165,23)),{loadableGenerated:{webpack:()=>[48165]},ssr:!1}),_=e=>{let{images:t=[],guideDetails:l,rateCard:a,data:i}=e,[c,d]=(0,o.useState)(0),[_,p]=(0,o.useState)(!1),[m,f]=(0,o.useState)({x:0,y:0}),[v,y]=(0,o.useState)(!1),[b,x]=(0,o.useState)(0),[w,j]=(0,o.useState)(null),[C,k]=(0,o.useState)(new Set),M=(0,o.useRef)(null),S=(0,o.useRef)(null),{rateCardImages:I,customerImages:N,coverImage:z}=(0,o.useMemo)(()=>{var e;let l=(null==a||null==(e=a.media)?void 0:e.filter(e=>"images"===e.media_type))||[];return{rateCardImages:l,customerImages:(null==t?void 0:t.filter(e=>"images"===e.media_type))||[],coverImage:(null==i?void 0:i.coverpicture)?{url:i.coverpicture,mediapath:i.coverpicture,alt_text:i.coverpicture_alt_text||i.title,media_type:"images",is_cover:!0}:null}},[null==a?void 0:a.media,t,null==i?void 0:i.coverpicture,null==i?void 0:i.coverpicture_alt_text,null==i?void 0:i.title]),E=(0,o.useMemo)(()=>{let e=[];return z&&e.push(z),e.push(...I,...N),e.filter((e,t)=>!C.has(t))},[z,I,N,C]),[R,D]=(0,o.useState)(E.length),F=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";let n=e.url||e.mediapath;if(!n)return"";if(e.is_cover){let e=e=>(null==e?void 0:e.startsWith("/"))?e.substring(1):e;return l?"".concat(s().cloudfront,"300x300/").concat(e(n)):"".concat(s().cloudfront).concat(e(n))}return t?l?"".concat(s().cloudfront,"300x300/").concat(n):"".concat(s().cloudfront).concat(n):e.is_ai?l?"".concat(s().jackImgCDN,"300x300/").concat(n):"".concat(s().jackImgCDN).concat(n):l?"".concat(s().cloudfront,"300x300/").concat(n):"".concat(s().cloudfront).concat(n)};(0,o.useLayoutEffect)(()=>{let e=()=>{if(!M.current||0===E.length)return;let e=M.current.offsetWidth;if(80*E.length+(E.length-1)*8<=e)return void D(E.length);let t=1;for(let l=1;l<E.length;l++){let n=(e-(l-1)*8)/l;if(n>=80&&n<=120)t=l;else if(n<80)break}D(t)};e();let t=new ResizeObserver(e);return M.current&&t.observe(M.current),()=>t.disconnect()},[E.length]);let{lightboxSources:T,lightboxTypes:W,lightboxCaptions:B}=(0,o.useMemo)(()=>{let e=[],t=[],l=[];return E.filter(e=>(null==e?void 0:e.mediapath)||(null==e?void 0:e.url)).forEach((n,o)=>{let a=+!!z,r=F(n,o>=a&&o<I.length+a);r&&r.length>0&&(e.push(r),t.push("image"),l.push((null==n?void 0:n.alt)||(null==n?void 0:n.alt_text)||(null==n?void 0:n.caption)||""))}),{lightboxSources:e,lightboxTypes:t,lightboxCaptions:l}},[E,I.length]);if(!E||0===E.length)return null;let H=E[c],L=+!!z,O=F(H,c>=L&&c<I.length+L);return(0,n.jsxs)("div",{className:h.gallery_container,children:[(0,n.jsxs)("div",{className:h.zoom_wrapper,children:[(0,n.jsx)("div",{ref:S,className:h.main_image,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onMouseMove:e=>{var t;let l=e.currentTarget.getBoundingClientRect(),n=(null==(t=e.currentTarget.closest(".gallery_container"))?void 0:t.getBoundingClientRect())||l;j({...l,galleryTop:n.top,galleryHeight:n.height}),f({x:(e.clientX-l.left)/l.width*100,y:(e.clientY-l.top)/l.height*100})},onClick:()=>{x(c),y(!0)},style:{cursor:"pointer"},children:O?(0,n.jsx)("img",{src:O,alt:(null==H?void 0:H.alt)||(null==H?void 0:H.alt_text),style:{width:"100%",height:"100%",objectFit:"contain"}}):(0,n.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"#f5f5f5",color:"#999"},children:"No image available"})}),_&&O&&w&&"undefined"!=typeof document&&window.innerWidth>=768&&(0,u.createPortal)((0,n.jsx)("div",{className:h.zoom_lens,style:{position:"fixed",top:Math.max(20,w.top+(w.height-400)/2),left:w.right+20,width:"400px",height:"400px",backgroundColor:"white",border:"2px s
1olid #ddd",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",pointerEvents:"none",zIndex:999999,overflow:"hidden"},children:(0,n.jsx)("img",{src:O,alt:"Zoomed view",style:{position:"absolute",width:"200%",height:"200%",objectFit:"contain",left:"-".concat(m.x,"%"),top:"-".concat(m.y,"%")}})}),document.body)]}),(0,n.jsx)("div",{className:h.thumbnails,ref:M,style:{display:"flex",gap:"8px",width:"100%"},children:E.slice(0,R).map((e,t)=>{let l=0===t&&z,o=!l&&t>=+!!z&&t<I.length+ +!!z,a=t===R-1,i=E.length>R,u=E.length-R;return(0,n.jsxs)("div",{className:"".concat(h.thumbnail," ").concat(l?h.cover_thumb:o?h.rate_card_thumb:""," ").concat(c===t?h.active:""),onMouseEnter:()=>d(t),onClick:()=>d(t),style:{flex:"1 1 0",minWidth:"80px",maxWidth:"120px"},children:[(0,n.jsx)(r(),{src:F(e,o,!0),alt:(null==e?void 0:e.alt)||(null==e?void 0:e.alt_text)||(l?"Cover image":"Thumbnail ".concat(t+1)),width:100,height:100,style:{objectFit:"cover"},onError:()=>{k(e=>new Set([...e,t]))}}),a&&i&&(0,n.jsxs)("div",{className:h.overlay,onClick:e=>{e.stopPropagation(),x(I.length>0?I.length:0),y(!0)},children:["+",u]})]},t)})}),v&&T.length>0&&"undefined"!=typeof document&&(0,u.createPortal)((0,n.jsx)(g,{toggler:v,sources:T,types:W,captions:B,slide:Math.min(b+1,T.length),disableLocalStorage:!0,onClose:()=>y(!1),openOnMount:!0}),document.body)]})}},53784:e=>{e.exports={gallery_container:"product-gallery_gallery_container__R5HCn",zoom_wrapper:"product-gallery_zoom_wrapper__H6jDj",main_image:"product-gallery_main_image__myRkf",zoom_lens:"product-gallery_zoom_lens__MF_uw",zoom_text:"product-gallery_zoom_text__Utaoa",thumbnails:"product-gallery_thumbnails__FXUMa",thumbnail:"product-gallery_thumbnail__koGOe",active:"product-gallery_active__FjvCE",rate_card_thumb:"product-gallery_rate_card_thumb__ofKj4",overlay:"product-gallery_overlay__B6JRv"}}}]); 2//# sourceMappingURL=2088.84657fc7670eaed9.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.