1import{j as e,r as a}from"./components-BQBQZtji.js";import{O as oe}from"./optimised-image-C3mnI61v.js";import{c as z,u as B,d as se}from"./cn-Mszrrdy2.js";import{b as ae,I as G}from"./url-helpers-Cqlvt3hB.js";import{d as le}from"./contentful-component-renderer-DDEadYDW.js";import{C as P}from"./cta-CAm39BC5.js";import{P as $,a as ie,u as ce,b as y,d as W,g as de,D as ue,c as xe}from"./Combination-_dhIysmg.js";import{R as me,A as fe,a as pe,c as Y,C as he}from"./index-BgS3X89o.js";import{M as R}from"./multi-media-ClvzuAVR.js";import{f as ge}from"./article-card-Dq5GTy10.js";import{M as ve}from"./constants-IYF9OJ2P.js";function be({author:t,href:n}){return e.jsxs("a",{href:n,className:"flex flex-1 flex-row gap-x-3",children:[e.jsx(oe,{url:t.image.asset.url,altText:t.image.altText,"data-cy":"author-image",className:z("h-[46px] w-[46px] rounded-full"),height:46,width:46}),e.jsxs("div",{className:"flex flex-col gap-y-0.5",children:[e.jsx("p",{className:"font-medium underline","data-cy":"author-name",children:t.name}),e.jsx("p",{className:"text-sm font-normal text-neutral-gray","data-cy":"author-title",children:t.title})]})]})}const ut=({authors:t,title:n,lang:r,locale:o})=>t.length===0?null:e.jsxs("div",{"data-cy":"article-author-section",children:[e.jsx("h3",{className:"mb-2 font-medium",children:n}),e.jsx("div",{className:"flex flex-col items-baseline gap-x-5 gap-y-5 lg:flex-row",children:t.map(s=>e.jsx(be,{author:s,href:ae({lang:r,locale:o,slug:s.slug})},s._id))})]}),je=(t,n)=>{t.preventDefault(),document.getElementById(n)?.scrollIntoView({behavior:"smooth"});const r=()=>{window.history.pushState(null,"",`#${n}`),document.removeEventListener("scrollend",r)};"scrollend"in window?document.addEventListener("scrollend",r):setTimeout(()=>{window.history.pushState(null,"",`#${n}`)},500)},U=t=>t.filter(n=>n.id&&n.id.trim()!==""),O=t=>!!(t&&t.trim()!==""),ye=({id:t,title:n,isActive:r})=>e.jsx("a",{href:`#${t}`,onClick:o=>{je(o,t)},className:r?"font-medium text-primary":"font-normal text-neutral-gray",children:n}),we=({headings:t,activeId:n})=>e.jsx("ul",{className:"flex flex-col gap-4",children:t.map(r=>e.jsx("li",{children:e.jsx(ye,{id:r.id,title:r.title,isActive:r.id===n})},r.id))}),Ne=t=>{const[n,r]=a.useState([]);return a.useEffect(()=>{const o=t.current;if(!o)return;const i=Array.from(o.querySelectorAll("h2:not([data-exclude-from-toc])")).map(l=>({id:l.id,title:l.innerText,items:[]})),m=U(i);r(m)},[t]),{nestedHeadings:n}},Te=150,Ce=(t,n,r)=>{const o=a.useRef({});a.useEffect(()=>{const s=r.current;if(!s)return;const c=Array.from(s.querySelectorAll("h2")),i=U(c),m=x=>i.findIndex(f=>f.id===x),l=()=>Object.values(o.current).filter(x=>x.isIntersecting),u=x=>{const f=x[0].target.id;O(f)&&t(f)},d=x=>{const g=[...x].sort((b,j)=>m(b.target.id)-m(j.target.id))[0].target.id;O(g)&&t(g)},p=()=>{const x=i.find(b=>b.id===n);if(!x)return;const f=m(n);if(x.getBoundingClientRect().y>Te&&f>0){const b=i[f-1].id;O(b)&&t(b)}},v=x=>{x.forEach(g=>{o.current[g.target.id]=g});const f=l();f.length===1?u(f):f.length>1?d(f):p()},h=new IntersectionObserver(v,{threshold:.1});return i.forEach(x=>{h.observe(x)}),()=>{h.disconnect()}},[t,n,r])};function xt({containerRef:t,articlePagination:n}){const[r,o]=a.useState(""),{nestedHeadings:s}=Ne(t);Ce(o,r,t);const c=s.length>0;return!c&&!n?null:e.jsx("div",{className:"container lg:absolute lg:top-0 lg:right-0 lg:bottom-0 lg:mr-4 lg:w-1/4 lg:max-w-none",children:e.jsx("div",{className:"lg:sticky lg:top-0 lg:z-10",children:e.jsxs("nav",{"aria-label":"Table of Contents",className:"flex flex-col gap-4 roun
1ded-lg bg-background px-4 py-4 lg:max-w-[400px]","data-cy":"table-of-contents",children:[c&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-2xl font-medium",children:"Contents"}),e.jsx(we,{headings:s,activeId:r})]}),n&&e.jsx("div",{className:"hidden lg:block",children:e.jsx(le,{...n})})]})})})}var Ee=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ke="VisuallyHidden",q=a.forwardRef((t,n)=>e.jsx($.span,{...t,ref:n,style:{...Ee,...t.style}}));q.displayName=ke;var Pe=q,[L]=xe("Tooltip",[Y]),_=Y(),X="TooltipProvider",Re=700,S="tooltip.open",[Ae,D]=L(X),K=t=>{const{__scopeTooltip:n,delayDuration:r=Re,skipDelayDuration:o=300,disableHoverableContent:s=!1,children:c}=t,i=a.useRef(!0),m=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),e.jsx(Ae,{scope:n,isOpenDelayedRef:i,delayDuration:r,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:m,onPointerInTransitChange:a.useCallback(u=>{m.current=u},[]),disableHoverableContent:s,children:c})};K.displayName=X;var E="Tooltip",[He,k]=L(E),J=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:s,onOpenChange:c,disableHoverableContent:i,delayDuration:m}
1=t,l=D(E,t.__scopeTooltip),u=_(n),[d,p]=a.useState(null),v=ie(),h=a.useRef(0),x=i??l.disableHoverableContent,f=m??l.delayDuration,g=a.useRef(!1),[b,j]=ce({prop:o,defaultProp:s??!1,onChange:F=>{F?(l.onOpen(),document.dispatchEvent(new CustomEvent(S))):l.onClose(),c?.(F)},caller:E}),N=a.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),T=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,j(!0)},[j]),C=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,j(!1)},[j]),V=a.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,j(!0),h.current=0},f)},[f,j]);return a.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),e.jsx(me,{...u,children:e.jsx(He,{scope:n,contentId:v,open:b,stateAttribute:N,trigger:d,onTriggerChange:p,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?V():T()},[l.isOpenDelayedRef,V,T]),onTriggerLeave:a.useCallback(()=>{x?C():(window.clearTimeout(h.current),h.current=0)},[C,x]),onOpen:T,onClose:C,disableHoverableContent:x,children:r})})};J.displayName=E;var I="TooltipTrigger",Q=a.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,s=k(I,r),c=D(I,r),i=_(r),m=a.useRef(null),l=B(n,m,s.onTriggerChange),u=a.useRef(!1),d=a.useRef(!1),p=a.useCallback(()=>u.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),e.jsx(fe,{asChild:!0,...i,children:e.jsx($.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:l,onPointerMove:y(t.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!c.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:y(t.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:y(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:y(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:y(t.onBlur,s.onClose),onClick:y(t.onClick,s.onClose)})})});Q.displayName=I;var M="TooltipPortal",[Le,_e]=L(M,{forceMount:void 0}),Z=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:s}=t,c=k(M,n);return e.jsx(Le,{scope:n,forceMount:r,children:e.jsx(W,{present:r||c.open,children:e.jsx(de,{asChild:!0,container:s,children:o})})})};Z.displayName=M;var w="TooltipContent",ee=a.forwardRef((t,n)=>{const r=_e(w,t.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...c}=t,i=k(w,t.__scopeTooltip);return e.jsx(W,{present:o||i.open,children:i.disableHoverableContent?e.jsx(te,{side:s,...c,ref:n}):e.jsx(Oe,{side:s,...c,ref:n})})}),Oe=a.forwardRef((t,n)=>{const r=k(w,t.__scopeTooltip),o=D(w,t.__scopeTooltip),s=a.useRef(null),c=B(n,s),[i,m]=a.useState(null),{trigger:l,onClose:u}=r,d=s.current,{onPointerInTransitChange:p}=o,v=a.useCallback(()=>{m(null),p(!1)},[p]),h=a.useCallback((x,f)=>{const g=x.currentTarget,b={x:x.clientX,y:x.clientY},j=Me(b,g.getBoundingClientRect()),N=Ve(b,j),T=Fe(f.getBoundingClientRect()),C=Be([...N,...T]);m(C),p(!0)},[p]);return a.useEffect(()=>()=>v(),[v]),a.useEffect(()=>{if(l&&d){const x=g=>h(g,d),f=g=>h(g,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",f),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",f)}}},[l,d,h,v]),a.useEffect(()=>{if(i){const x=f=>{const g=f.target,b={x:f.clientX,y:f.clientY},j=l?.contains(g)||d?.contains(g),N=!ze(b,i);j?v():N&&(v(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,i,u,v]),e.jsx(te,{...t,ref:c})}),[Se,Ie]=L(E,{isInside:!1}),De=se("TooltipContent"),te=a.forwardRef((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":s,onEscapeKeyDown:c,onPointerDownOutside:i,...m}=t,l=k(w,r),u=_(r),{onClose:d}=l;return a.useEffect(()=>(document.addEventListener(S,d),()=>document.removeEventListener(S,d)),[d]),a.useEffect(()=>{if(l.trigger){const p=v=>{v.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,d]),e.jsx(ue,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:e.jsxs(he,{"data-state":l.stateAttribute,...u,...m,ref:n,style:{...m.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e.jsx(De,{children:o}),e.jsx(Se,{scope:r,isInside:!0,children:e.jsx(Pe,{id:l.contentId,role:"tooltip",children:s||o})})]})})});ee.displayName=w;
1var ne="TooltipArrow",re=a.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,s=_(r);return Ie(ne,r).isInside?null:e.jsx(pe,{...s,...o,ref:n})});re.displayName=ne;function Me(t,n){const r=Math.abs(n.top-t.y),o=Math.abs(n.bottom-t.y),s=Math.abs(n.right-t.x),c=Math.abs(n.left-t.x);switch(Math.min(r,o,s,c)){case c:return"left";case s:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Ve(t,n,r=5){const o=[];switch(n){case"top":o.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":o.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":o.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":o.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return o}function Fe(t){const{top:n,right:r,bottom:o,left:s}=t;return[{x:s,y:n},{x:r,y:n},{x:r,y:o},{x:s,y:o}]}function ze(t,n){const{x:r,y:o}=t;let s=!1;for(let c=0,i=n.length-1;c<n.length;i=c++){const m=n[c],l=n[i],u=m.x,d=m.y,p=l.x,v=l.y;d>o!=v>o&&r<(p-u)*(o-d)/(v-d)+u&&(s=!s)}return s}function Be(t){const n=t.slice();return n.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),Ge(n)}function Ge(t){if(t.length<=1)return t.slice();const n=[];for(let o=0;o<t.length;o++){const s=t[o];for(;n.length>=2;){const c=n[n.length-1],i=n[n.length-2];if((c.x-i.x)*(s.y-i.y)>=(c.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}n.pop();const r=[];for(let o=t.length-1;o>=0;o--){const s=t[o];for(;r.length>=2;){const c=r[r.length-1],i=r[r.length-2];if((c.x-i.x)*(s.y-i.y)>=(c.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var $e=K,We=J,Ye=Q,Ue=Z,qe=ee,Xe=re;function Ke({delayDuration:t=0,...n}){return e.jsx($e,{"data-slot":"tooltip-provider",delayDuration:t,...n})}function Je({...t}){return e.jsx(Ke,{children:e.jsx(We,{"data-slot":"tooltip",...t})})}function Qe({...t}){return e.jsx(Ye,{"data-slot":"tooltip-trigger",...t})}function Ze({className:t,sideOffset:n=0,children:r,...o}){return e.jsx(Ue,{children:e.jsxs(qe,{"data-slot":"tooltip-content",sideOffset:n,className:z("z-50 w-fit max-w-65 origin-(--radix-tooltip-content-transform-origin) rounded-md bg-bark-blue px-4 py-2 text-center text-sm text-balance text-background shadow-sm shadow-foreground animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",t),...o,children:[r,e.jsx(Xe,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-bark-blue fill-bark-blue"})]})})}const A=a.memo(function({priceInterval:n}){return n?e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(G,{name:"pricing-circle",size:"lg",className:"h-12 w-12 text-primary-light"}),e.jsx("div",{className:"text-4xl leading-tight font-medium tracking-tight text-foreground","data-cy":"price-range",children:n})]})}):null}),H=a.memo(function({text:n,tooltip:r}){const[o,s]=a.useState(!1);return n?r?e.jsxs(Je,{open:o,children:[e.jsx(Qe,{asChild:!0,children:e.jsxs("button",{className:"flex w-fit cursor-pointer items-center gap-2 hover:opacity-80",onClick:()=>{s(!o)},onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},children:[e.jsx("span",{className:"flex-1 text-sm font-medium text-primary-accent underline",children:n}),e.jsx(G,{name:"info",size:"sm",className:"text-primary"})]})}),e.jsx(Ze,{children:r})]}):e.jsx("div",{className:"flex items-baseline",children:e.jsx("span",{className:"text-sm font-medium text-primary-accent underline",children:n})}):null});function mt({heading:t,subheading:n,lastUpdated:r,image:o,variant:s="solid-background",priceInterval:c,priceDescription:i,priceDescriptionTooltip:m,cta:l}){const u=ge(r??""),d=a.useMemo(()=>{const p={...o?.asset,width:void 0,height:void 0};return{desktop:{...p,assetWidth:600},mobile:{...p,assetWidth:ve}}},[o]);return s==="solid-background"?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block",children:e.jsx("header",{className:"bg-primary-light py-10 lg:py-18",children:e.jsxs("div",{className:"container mx-auto flex flex-col items-center gap-10 px-4 lg:flex-row lg:items-start",children:[e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center lg:w-1/2 lg:items-start lg:text-left",children:[e.jsx("h1",{className:"text-[32px] leading-tight font-medium tracking-tight text-balance lg:text-[40px]","data-cy":"article-header",children:t}),u&&e.jsxs("p",{className:"text-sm font-medium text-muted-foreground","data-cy":"last-updated-text",children:["Last updated ",u]}),n&&e.jsx("p",{className:"text-base leading-relaxed font-normal text-foreground","data-cy":"article-subheading",children:n}),e.jsx(A,{priceInterval:c}),e.jsx(H,{text:i,tooltip:m}),l&&e.jsx(P,{...l,className:"mx-auto lg:mx-0"})]}),o&&e.jsx("div",{className:"w-full overflow-hidden rounded-lg lg:h-[400px] lg:w-1/2",children:e.jsx(R,{...o,className:"h-full w-full object-cover",clickthrough:void 0,asset:d.desktop})})]})})}),e.jsx("div",{className:"block lg:hidden",children:e.jsxs("header",{className:"bg-primary-light",children:[e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"flex flex-col gap-4 pt-6 pb-8",children:[e.jsx("h1",{className:"text-[32px] leading-tight font-medium tracking-tight text-balance lg:text-[40px]",children:t}),u&&e.jsxs("p",{className:"text-sm font-medium text-muted-foreground",children:["Last updated ",u]}),n&&e.jsx("p",{className:"text-base leading-normal font-normal text-muted-foreground",children:n}),e.jsx(A,{priceInterval:c}),e.jsx(H,{text:i,tooltip:m}),l&&e.jsx(P,{...l,className:"w-full"})]})}),o&&e.jsx("div",{className:"w-full overflow-hidden",children:e.jsx(R,{...o,className:"h-[277px] w-full object-cover",clickthrough:void 0,asset:d.mobile})})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block",children:e.jsx("header",{className:"bg-primary-light py-10 lg:py-18",children:e.jsxs("div",{className:"container mx-auto flex flex-col items-center gap-10 px-4 lg:flex-row lg:items-start",children:[e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center lg:w-1/2 lg:items-start lg:text-left",children:[e.jsx("h1",{className:"text-[32px] leading-tight font-medium tracking-tight text-balance lg:text-[40px]","data-cy":"article-header",children:t}),u&&e.jsxs("p",{className:"text-sm font-medium text-muted-foreground","data-cy":"last-updated-text",children:["Last updated ",u]}),n&&e.jsx("p",{className:"text-base leading-relaxed font-normal text-foreground","data-cy":"article-subheading",children:n}),e.jsx(A,{priceInterval:c}),e.jsx(H,{text:i,tooltip:m}),l&&e.jsx(P,{...l,className:"mx-auto lg:mx-0"})]}),o&&e.jsx("div",{className:"w-full overflow-hidden rounded-lg lg:w-1/2",children:e.jsx(R,{...o,className:"h-full w-full object-cover",clickthrough:void 0,asset:d.desktop,dataCy:"article-image"})})]})})}),e.jsx("div",{className:"block lg:hidden",children:e.jsxs("header",{children:[o?e.jsxs("div",{className:"relative h-[320px] overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0",children:e.jsx(R,{...o,className:"h-full w-full object-cover",clickthrough:void 0,asset:d.mobile})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent to-primary-light"}),e.jsx("div",{className:"absolute right-0 bottom-0 left-0 p-6 pb-2",children:e.jsx("h1",{className:"text-[32px] leading-tight font-medium tracking-tight text-balance text-foreground lg:text-[40px]","data-cy":"article-header",children:t})})]}):e.jsx("div",{className:"bg-primary-light p-6",children:e.jsx("h1",{className:"text-[32px] leading-tight font-medium tracking-tight text-balance text-foreground lg:text-[40px]",children:t})}),e.jsx("div",{className:"bg-primary-light p-6 pt-0",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[u&&e.jsxs("p",{className:"text-sm font-medium text-neutral-gray","data-cy":"last-updated-header-text",children:["Last updated ",u]}),n&&e.jsx("p",{className:"text-base leading-normal font-normal text-foreground",children:n}),e.jsx(A,{priceInterval:c}),e.jsx(H,{text:i,tooltip:m}),l&&e.jsx(P,{...l,className:"w-full"})]})})]})})]})}const ft="/bwrAssets/logo-dWBsN-dd.png";export{mt as A,ft as L,xt as T,ut as a};
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.