(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6134],{10830:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/news",function(){return l(67053)}])},81061:function(e,t,l){"use strict";var s=l(85893),r=l(67294),n=l(16750),c=l(28313),i=l(9781),a=l(24517),o=l(31604),d=l(27286),u=l(33892);t.Z=e=>{let{isSearchOn:t,setIsSearchOn:l}=e,[x,m]=(0,r.useState)(""),[p,h]=(0,r.useState)("production_strapi-content"),[f,g]=(0,r.useState)(!1),{height:v}=(0,a.Z)(),[b,w]=(0,r.useState)(0);(0,r.useEffect)(()=>{var e,t;let l=document.getElementById("search-box"),s=null==l?void 0:l.getBoundingClientRect();w(v-((null!==(e=null==s?void 0:s.top)&&void 0!==e?e:0)+(null!==(t=null==s?void 0:s.height)&&void 0!==t?t:0)))},[v]),(0,r.useEffect)(()=>{N()},[t]),(0,r.useEffect)(()=>{let e=setTimeout(()=>N(),200);return()=>clearInterval(e)},[x]);let j=(0,r.useCallback)((e,t)=>{m(e),l(e.length>0),t(e)},[l]);(0,r.useEffect)(()=>{let e;e=(0,d.y)()?"production":"development",h("".concat(e,"_strapi-content"))},[]);let N=()=>{var e,t;let l=document.getElementById("search-results");g((null!==(e=null==l?void 0:l.scrollHeight)&&void 0!==e?e:0)>(null!==(t=null==l?void 0:l.clientHeight)&&void 0!==t?t:0))};return(0,s.jsx)("div",{className:"w-full !max-w-[600px] self-center my-8 700px:mb-0 relative",children:(0,s.jsxs)(n.p,{searchClient:o.J,indexName:p,insights:!0,future:{preserveSharedStateOnUnmount:!1},children:[(0,s.jsx)(c.R,{id:"search-box",classNames:{root:"flex flex-row items-center bg-blog-cvr-bck rounded-md pr-4",form:"flex flex-row gap-1 w-full justify-between",input:"flex-1 bg-blog-cvr-bck border-none outline-none rounded-md pl-4 py-2",submitIcon:"w-4 h-4",reset:"hidden"},placeholder:"Search...",onFocus:()=>{x.length>0&&l(!0)},queryHook:j}),(0,s.jsx)(i.m,{id:"search-results",hitComponent:u.Z,classNames:{root:"absolute left-24px right-24px z-10 bg-menu-bg-hover ".concat(t?"px-2 700px:px-8 pt-2":"h-0 px-8 p-0"," overflow-scroll hide-scroll shadow-lg rounded-b-xl ").concat(f?"search-scroll-indicator":"")},style:{maxHeight:t?b-10:0,height:"auto"},onScroll:e=>{e.currentTarget.scrollTop+e.currentTarget.offsetHeight>=e.currentTarget.scrollHeight?g(!1):g(!0)}})]})})}},33892:function(e,t,l){"use strict";var s=l(85893),r=l(25675),n=l.n(r),c=l(41664),i=l.n(c),a=l(24517);t.Z=e=>{var t,l;let{hit:r}=e,{width:c}=(0,a.Z)(),o="/blog/".concat(null!==(t=r.slug)&&void 0!==t?t:"");return r.objectID.startsWith("media-article::")&&(o="/news/".concat(null!==(l=r.slug)&&void 0!==l?l:"")),(0,s.jsxs)(i(),{href:o,className:"flex items-center relative gap-4 max-w-1200px py-1em px-4 rounded-lg border-b-1px transition-all hover:bg-secondary-button-hover",children:[c>700&&r.cover&&(0,s.jsx)("div",{id:"search-item-image-container",className:"relative w-80px h-54px",children:(0,s.jsx)(n(),{id:"search-item-image",alt:r.title,src:r.cover.url,fill:!0,className:"object-cover rounded-lg"})}),(0,s.jsxs)("div",{id:"search-item-details",className:"flex flex-col gap-1 flex-1 overflow-hidden",children:[(0,s.jsx)("h1",{id:"search-item-title",className:"font-semibold",children:r.title}),(0,s.jsx)("p",{id:"search-item-description",className:"text-feature-block-overline text-14px whitespace-nowrap overflow-hidden text-ellipsis",children:r.description})]})]},r.id)}},77280:function(e,t,l){"use strict";var s=l(85893);l(67294),t.Z=e=>{let{children:t,className:l,id:r,plain:n,grey:c=!1,narrow:i=!0,containerClassName:a}=e;return(0,s.jsxs)("div",{className:"relative ".concat(i?"":"my-4em"," ").concat(a),children:[(0,s.jsx)("div",{id:r,className:"ml-0 mr-0 bg-contain bg-center bg-no-repeat -z-10 w-full absolute left-0 right-0 top-0 bottom-0 h-full opacity-70 ".concat(l," ").concat(c?"bg-gry-atl":n?"bg-grid-background-plain":"bg-grid-background ")}),(0,s.jsx)("div",{className:"z-10 flex justify-center items-center relative w-full",children:t})]})}},60423:function(e,t,l){"use strict";var s=l(85893);l(67294),t.Z=e=>{let{children:t}=e;return(0,s.jsx)("div",{id:"page-container",className:"flex flex-col items-center overflow-exception",children:t})}},35323:function(e,t,l){"use strict";var s=l(85893);l(67294);var r=l(56472);t.Z=e=>{let{buttons:t,subtitle:l,title:n}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-center gap-12px 1200px:gap-24px z-10 mt-2em",children:[(0,s.jsx)("h1",{className:"text-1_5em text-center font-semibold max-w-500px 900px:max-w-550px 1200px:max-w-1050px 900px:text-60px",children:n}),(0,s.jsx)("h2",{className:"text-18px text-center",children:l}),(0,s.jsx)("div",{className:"flex flex-col 800px:flex-row gap-16px 800px:gap-24px items-center",children:t&&t.map((e,t)=>(0,s.jsx)(r.Z,{...e},t))})]})}},67053:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSG:function(){return h},default:function(){return f}});var s=l(85893),r=l(67294),n=l(21894),c=l(28948),i=l(81061),a=l(77280),o=l(86098),d=l(60423),u=l(45405),x=l(35323),m=l(2421);let p={title:"Insights & News",subtitle:"Welcome to Cerbos Insights & News. Here, you’ll find company news, thought leadership, success stories and industry insights.",buttons:[]};var h=!0,f=e=>{let{blogs:t,totalPages:l,visiblePageNumbers:h}=e,[f,g]=(0,r.useState)(!1),v=e=>{var t,l;let s=e.target.id,r=null===(l=e.target.parentElement)||void 0===l?void 0:null===(t=l.parentElement)||void 0===t?void 0:t.id;s.startsWith("search-item")||s.includes("search-results")||"search-box"===r||g(!1)};return(0,r.useEffect)(()=>(document.addEventListener("click",v),()=>document.removeEventListener("click",v)),[]),(0,s.jsxs)(d.Z,{children:[(0,s.jsx)(u.Z,{metadata:m.Vo}),(0,s.jsx)(a.Z,{containerClassName:"!py-[10px] text-center",children:(0,s.jsx)("div",{className:"900px:max-w-[600px]",children:(0,s.jsx)(x.Z,{...p})})}),(0,s.jsx)(i.Z,{isSearchOn:f,setIsSearchOn:g}),t&&t.length>0&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center w-full max-w-full px-0 mx-auto 700px:px-30px",children:[(0,s.jsx)("div",{className:"flex flex-row flex-wrap max-w-1200px mt-2_5em",children:(0,s.jsx)(n.Z,{blogs:t,page:1,tagSelected:!1})}),l>0&&(0,s.jsx)(c.Z,{visiblePageNumbers:h,totalPages:l,root:"/news",currentPage:1})]}),(0,s.jsx)(o.Z,{})]})}},31604:function(e,t,l){"use strict";l.d(t,{J:function(){return r}});var s=l(70290);let r=l.n(s)()("MQKF3V4QW1","00fa610294fa6129b264ca0e955432d2")}},function(e){e.O(0,[6589,8395,2888,9774,179],function(){return e(e.s=10830)}),_N_E=e.O()}]);