1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3484],{"(pages-dir-browser)/./components/CaseStudyGrid/CaseStudyMedia.js":(e,s,t)=>{t.r(s),t.d(s,{default:()=>x});var a=t("(pages-dir-browser)/./node_modules/react/jsx-runtime.js"),l=t("(pages-dir-browser)/./node_modules/@storyblok/react/dist/index.mjs"),i=t("(pages-dir-browser)/./node_modules/luxon/build/es6/luxon.mjs"),o=t("(pages-dir-browser)/./node_modules/next/image.js"),r=t.n(o),n=t("(pages-dir-browser)/./node_modules/next/link.js"),d=t.n(n),c=t("(pages-dir-browser)/./node_modules/swiper/modules/index.mjs"),u=t("(pages-dir-browser)/./node_modules/swiper/swiper-react.mjs"),h=t("(pages-dir-browser)/./helpers/utilities.js"),p=t("(pages-dir-browser)/./node_modules/react/index.js"),m=t("(pages-dir-browser)/./node_modules/gsap/index.js");let g=({logos:e})=>{let s=(0,p.useRef)(null),t=(0,p.useRef)(new Map);return(0,p.useEffect)(()=>{let e=s.current,a=Array.from(t.current.values());if(!e||0===a.length)return;let l=(e,s)=>!(e.right<=s.left||e.left>=s.right||e.bottom<=s.top||e.top>=s.bottom),i=e=>{let s=e.offsetWidth,t=e.offsetHeight,a=e._gsap&&"number"==typeof e._gsap.x?e._gsap.x:0,l=e._gsap&&"number"==typeof e._gsap.y?e._gsap.y:0;return{left:a,top:l,right:a+s,bottom:l+t,width:s,height:t}},o=(e,s,t,a,i,o=30)=>{for(let r=0;r<o;r++){let o=Math.random()*a,r=Math.random()*i,n={left:o,top:r,right:o+e,bottom:r+s},d=!0;for(let e of t)if(l(n,e)){d=!1;break}if(d)return{x:o,y:r}}return{x:Math.random()*a,y:Math.random()*i}},r=[],n=[],d=[];a.forEach((s,t)=>{let l=s.offsetWidth,c=s.offsetHeight,u=Math.max(e.clientWidth-l,0),h=Math.max(e.clientHeight-c,0),p=o(l,c,a.slice(0,t).map(e=>i(e)),u,h,40);m.Ay.set(s,{x:p.x,y:p.y});let g=()=>{let n=Math.max(e.clientWidth-l,0),d=Math.max(e.clientHeight-c,0),u=o(l,c,a.filter((e,s)=>s!==t).map(e=>i(e)),n,d,30),h=u.x,p=u.y,y=m.Ay.to(s,{x:h,y:p,duration:6,ease:"power1.inOut",onComplete:g});r[t]=y};d[t]=g;let y=.18*t+.6*Math.random();n[t]=m.Ay.delayedCall(y,g)});let c=()=>{let s=e.clientWidth,t=e.clientHeight;r.forEach(e=>e&&e.kill()),n.forEach(e=>e&&e.kill()),a.forEach((e,a)=>{let l=e.offsetWidth,i=e.offsetHeight,o=Math.max(0,Math.min(e._gsap?.x||0,s-l)),r=Math.max(0,Math.min(e._gsap?.y||0,t-i));m.Ay.to(e,{x:o,y:r,duration:.45,ease:"power2.out"});let c=.6*Math.random()+.05*a;"function"==typeof d[a]&&(n[a]=m.Ay.delayedCall(c,d[a]))})};return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c);try{void 0!==r&&r.forEach(e=>e&&e.kill()),void 0!==n&&n.forEach(e=>e&&e.kill())}catch(e){}}},[e]),(0,a.jsx)("div",{ref:s,style:{position:"relative",width:"100%",height:"100%"},className:"logos-container",children:e.map(e=>(0,a.jsx)("div",{ref:s=>{let a=t.current;s?a.set(e.Image.filename,s):a.delete(e.Image.filename)},style:{position:"absolute"},className:"casestudylogo_wrapper",children:(0,a.jsx)(r(),{loading:"lazy",width:60,height:60,src:e?.Image?.filename,alt:e?.Image?.alt||(0,h.Vw)(e?.Image?.filename)})},e.Image.filename||index))})};var y=t("(pages-dir-browser)/./lib/jsonCache.js"),f=t("(pages-dir-browser)/./node_modules/process/browser.js");let x=({blok:e})=>{let[s,t]=(0,p.useState)(null);(0,p.useEffect)(()=>{(0,y.n)(`${f.env.NEXT_PUBLIC_BASEPATH||""}/caseStudyData.json`).then(t).catch(e=>console.error("Error loading case study data:",e))},[]);let o=e=>{if(!e||"object"!=typeof e)return null;if("CaseStudyDetails"===e.component)return{...e,uuid:e.uuid||e._uid};if(e?.content?.component==="CaseStudyDetails")return{...e.content,uuid:e?.uuid||e?.content?.uuid,full_slug:e?.full_slug,published_at:e?.first_published_at};if(Array.isArray(e?.content?.body)){let s=e.content.body.find(e=>e?.component==="CaseStudyDetails");if(s)return{...s,uuid:e?.uuid||s?.uuid,full_slug:e?.full_slug,published_at:e?.first_published_at}}return null},n=s?((e=[])=>e.map(o).filter(Boolean))(s?.stories)?.sort((e,s)=>{let t=i.c9.fromFormat((0,h.bU)(e.published_at),"MMMM dd yyyy").toMillis();return i.c9.fromFormat((0,h.bU)(s.published_at),"MMMM dd yyyy").toMillis()-t}):[],m=n.reduce((e,s)=>(s?.uuid&&(e[s.uuid]=s),e),{}),x=((e=[])=>e.map(e=>
1"string"==typeof e?m[e]||null:o(e)).filter(Boolean))(e?.CaseStudies),_=x.length>0?x:n,b=(0,h.Iu)(),j=(0,h.Iu)(767),w=(0,h.Iu)(1024),[v,M]=(0,p.useState)(0),[N,C]=(0,p.useState)(null),[k,L]=(0,p.useState)(!0);return(0,a.jsx)(a.Fragment,{children:_?.length>0&&(0,a.jsx)("div",{id:e?.Layout==="layout-2"&&"collapsibleCaseStudy",className:"casestudyMedia",children:e?.Layout==="layout-1"?(0,a.jsx)(u.RC,{spaceBetween:10,slidesPerView:1,centeredSlides:!1,autoplay:{delay:2500,disableOnInteraction:!1},pagination:{type:"bullets",clickable:!0},navigation:!0,loop:!0,modules:[c.Ij,c.dK],speed:500,className:"container",children:_?.map((s,t)=>(0,a.jsx)(u.qr,{id:"casestudyMedia__slide",children:(0,a.jsxs)("div",{className:`casestudyMedia__container ${e?.ReverseLayout?"casestudyMedia__reverse":""}`,style:e?.BGColor?.color?{background:e?.BGColor?.color}:{},children:[(0,a.jsxs)("div",{className:"casestudyMedia__content",children:[e?.Tags&&(0,a.jsx)("div",{className:"section-title tag",children:e?.Tags&&Array.isArray(e?.Tags)?e?.Tags?.map((e,s)=>(0,a.jsx)(l.Dp,{blok:e},s)):null}),(0,a.jsxs)("div",{className:"inner",children:[s?.Title&&(0,a.jsx)("h2",{style:e?.TitleColor?.color?{color:e?.TitleColor?.color}:{},className:"title",children:s?.Title}),s?.Description&&(0,a.jsx)("p",{className:"custom-color desc",style:e?.DescriptionColor?.color?{color:e?.DescriptionColor?.color}:{},children:b?s?.Description?.length>150?s?.Description?.slice(0,150)+"...":s?.Description:s?.Description?.length>345?s?.Description?.slice(0,345)+"...":s?.Description}),s?.full_slug&&(0,a.jsx)("div",{className:"axil-button-group",children:(0,a.jsx)(d(),{href:s?.full_slug||"/",className:"casestudy_btn hoverable axil-button btn-solid btn-large",locale:!1,children:(0,a.jsx)("span",{className:"button-text hoverable px-0",children:s?.Label||"Read Case Study"})})})]})]}),s?.Image&&s?.Image?.filename&&(0,a.jsxs)("div",{className:"casestudyMedia__image",style:{position:"relative"},children:[(0,a.jsx)(r(),{loading:"lazy",width:681,height:467,className:"image w-100 paralax-image",src:s?.Image?.filename,alt:s?.Image?.alt?s?.Image?.alt:(0,h.Vw)(s?.Image?.filename)}),s?.Logo&&s?.Logo?.filename&&(0,a.jsx)("div",{className:"logo_wrapper",children:(0,a.jsx)(r(),{loading:"lazy",width:134,height:110,className:"logo_image",src:s?.Logo?.filename,alt:s?.Logo?.alt?s?.Logo?.alt:(0,h.Vw)(s?.Logo?.filename)})})]})]})},t))}):(0,a.jsx)("div",{className:"container casestudyMedia__slides-wrapper",children:_?.map((s,t)=>(0,a.jsx)("div",{onClick:()=>{k&&v!==t&&(M(t),L(!1),setTimeout(()=>{L(!0)},350))},onMouseEnter:()=>C(t),onMouseLeave:()=>C(null),style:{maxWidth:!w&&(v===t?"834px":N===t?"150px":"126px"),maxHeight:w&&(v===t?b?"200px":j?"335px":"595px":N===t?b?"70px":"150px":b?"64px":"126px")},className:`casestudyMedia__slide ${N===t?"hovered":""} ${v===t?"active":""}`,id:"casestudyMedia__slide",children:(0,a.jsxs)("div",{className:`casestudyMedia__container ${e?.ReverseLayout?"casestudyMedia__reverse":""}`,style:{backgroundImage:`url(${s?.Image?.filename})`},children:[(0,a.jsx)("div",{className:`casestudyMedia__overlay ${v===t?"active":""}`}),v===t&&(0,a.jsx)("div",{className:"casestudyMedia__logos-wrapper",style:{opacity:k&&v===t?1:0},children:(0,a.jsx)(g,{logos:s?.TechnologyLogos||[]})}),(0,a.jsx)(d(),{href:s?.full_slug||"/",className:`casestudyMedia-link ${v===t?"active":""}`,locale:!1}),(0,a.jsx)("div",{style:{opacity:k&&v===t?1:0,display:v===t?"block":"none"},className:"casestudyMedia__content",children:(0,a.jsxs)("div",{className:"inner",children:[s?.Title&&(0,a.jsx)("h2",{style:{color:e?.TitleColor?.color||"white"},className:"title",children:s?.Title}),!w&&s?.Description&&(0,a.jsx)("p",{className:"custom-color desc",style:{color:e?.DescriptionColor?.color||"white"},children:s?.Description?.length>75?s?.Description?.slice(0,75)+"...":s?.Description}),!w&&s?.full_slug&&(0,a.jsx)("div",{className:"axil-button-group",children:(0,a.jsx)(d(),{href:s?.full_slug||"/",id:"casestudyMedia-btn",className:"casestudyMedia-btn casestudy_btn hoverable axil-button btn-solid btn-large",locale:!1,children:(0,a.jsx)("span",{className:"button-text hoverable px-0",children:s?.Label||"Read Case Study"})})})]})}),(0,a.jsxs)("div",{className:"casestudyMedia__inactive-content",style:{display:v!==t?"flex":"none"},children:[s?.Title&&(0,a.jsx)("h3",{className:"casestudyMedia__vertical-title",style:{color:e?.TitleColor?.color||"white"},children:s?.Title}),(0,a.jsx)("div",{className:"casestudyMedia__plus-icon",children:(0,a.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 32 32",id:"i-plus",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"#ffffff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",children:[(0,a.jsx)("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),(0,a.jsx)("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#ffffff",strokeWidth:"0.8320000000000001"}),(0,a.jsx)("g",{id:"SVGRepo_iconCarrier",children:(0,a.jsx)("path",{d:"M16 2 L16 30 M2 16 L30 16"})})]})})]})]})},t))})})})}},"(pages-dir-browser)/./lib/jsonCache.js":(e,s,t)=>{t.d(s,{n:()=>l});let a={};function l(e){return a[e]||(a[e]=fetch(e).then(s=>{if(!s.ok)throw delete a[e],Error(`Failed to fetch ${e}: ${s.status}`);return s.json()})),a[e]}}}]);
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.