1import{r as d,j as e,L as b,d as O}from"./vendor-react-B4BIr4_A.js";import{e as F,w as D,x as A,y as B,u as U,n as G,G as W,bf as $,S as X,bg as H,C as Y,aZ as q,a_ as K}from"./app-BCfwVS8x.js";import{R as Z}from"./RadarCard-BXjlo1sl.js";import{R as J}from"./RadarPulseIcon-DcjMgmpL.js";import{u as Q}from"./useSpotlightSwipe-BleoQ9x2.js";import{u as V}from"./useSpotlightPause-prFAWAvE.js";import{i as E}from"./crashBlackBox-NHteRanH.js";import{aR as ee,aN as ae,R as y,an as se,k as T,M as te,X as re,L as ie,a3 as le}from"./icone-sito-BiOTxGdK.js";import{R as ce,r as oe,a as ne}from"./radarPopupFlag-C-th3QA2.js";import{S as de}from"./SiteBacheca-B6m4KEyo.js";import{u as me}from"./bacheca-Ike3uJ-r.js";import{D as L,i as pe}from"./home.content-CfUOXRNL.js";/* empty css */import"./modulepreload-polyfill-B5Qt9EMX.js";import"./evento-comune-FmQYl2SX.js";import"./vendor-firebase-AOn3Fvmd.js";import"./firebase-config-Dn2Tu_JL.js";import"./publicUrls-C1QEMgMu.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./eventCardBits-BLuH3RLO.js";import"./programmaPdf-IwHG3E72.js";import"./LitCard-DNMht5fl.js";import"./litStore-BAu2Ol6r.js";import"./litDemo-4ZkYE-7D.js";import"./index.es-DqwPoA9i.js";import"./iso2ToNumeric-DDaumHnS.js";import"./string-6IgTyK7O.js";import"./eventsStore-DaNHU_lI.js";import"./emailTemplate-CZj6Czj1.js";import"./fondoRiferimento-ChLBv03J.js";import"./emailFactCards-PLh9byk8.js";import"./SiteCaseMap-kfHR376y.js";import"./isoCountries-Cnu1460U.js";import"./sediCorti-B8ZWV3RO.js";import"./siteCasesStore-SY5mg2QC.js";import"./RichText-CBxD8j-c.js";import"./SpazioLettore-zzCyF7o7.js";import"./callsStore-fW7q8YkO.js";import"./apphubLinks-BUxarVZc.js";import"./loghiReali-lfCC5BbQ.js";import"./newsletterSubscriber-BVbXfR8E.js";import"./siteSocialWallStore-FL7Ko0Xq.js";import"./newsletterArchiveStore-BHV4Juzk.js";import"./phdHubStore-B_CG5LY1.js";import"./phdhub.content-C9DBDx4g.js";import"./eventSpeakers-BY3TMAgh.js";import"./eventSatellites-b0JbInge.js";function he(a){const n=[],s=c=>{const r=typeof c=="string"?c.trim():"";r&&!n.includes(r)&&n.push(r)};s(a==null?void 0:a.cover_url);for(const c of(a==null?void 0:a.blocks)||[])if(c&&(c.type==="image"&&s(c.url),c.type==="gallery"&&(c.images||[]).forEach(r=>s(r&&r.url)),n.length>=6))break;return n.slice(0,6)}const ue=6500,xe=8;function M(a){return F(a.color,a.slug||a.category||a.title)}function be({posts:a}){const n=Array.isArray(a)?a.slice(0,xe):[],s=n.length,[c,r]=d.useState(0),{fermo:m,pausaDiMano:f,focusProps:j}=V(),h=je(),{stageProps:u}=Q(s,i=>{f(),r(o=>(o+i+s)%s)});if(d.useEffect(()=>{c>s-1&&r(0)},[s,c]),d.useEffect(()=>{if(s<=1||m||h)return;const i=setInterval(()=>r(o=>(o+1)%s),ue);return()=>clearInterval(i)},[s,m,h]),s===0)return null;const p=Math.min(c,s-1),x=M(n[p]);return e.jsxs("div",{className:"radar-spotlight"+(s>1?" has-rotation":""),style:{"--spot-accent":x},...j,"aria-roledescription":s>1?"carousel":void 0,"aria-label":"Featured updates",children:[e.jsx("div",{className:"radar-spot-stage",...u,children:n.map((i,o)=>e.jsx(fe,{post:i,active:o===p},i.id||i.slug||o))}),s>1&&e.jsxs("div",{className:"radar-spot-controls",children:[e.jsx("button",{type:"button",className:"radar-spot-arrow","aria-label":"Previous featured update",onClick:()=>r(i=>(i-1+s)%s),children:e.jsx(ee,{size:18,"aria-hidden":"true"})}),e.jsx("div",{className:"radar-spot-dots",role:"tablist","aria-label":"Choose featured update",children:n.map((i,o)=>e.jsx("button",{type:"button",role:"tab","aria-selected":o===p,"aria-label":`Featured update ${o+1} of ${s}`,className:"radar-spot-dot"+(o===p?" is-active":""),onClick:()=>r(o)},i.id||i.slug||o))}),e.jsx("button",{type:"button",className:"radar-spot-arrow","aria-label":"Next featured update",onClick:()=>r(i=>(i+1)%s),children:e.jsx(ae,{size:18,"aria-hidden":"true"})})]})]})}function fe({post:a,active:n}){const s=M(a),c=he(a),r=d.useRef(null),[m,f]=d.useState(0),j=()=>{const i=r.current;!i||!i.clientWidth||f(Math.round(i.scrollLeft/i.clientWidth))},h=D(a.published_at),u=`/radar/${a.slug}`,p=n?void 0:-1,x={color:s,background:A(s,.16),borderColor:A(s,.34)};return e.jsxs("article",{className:"radar-spot-slide"+(n?" is-active":""),style:{"--slide-accent":s},"aria-hidden":n?void 0:"true",children:[e.jsx(b,{to:u,className:"radar-spot-hit",tabIndex:-1,"aria-hidden":"true"}),e.jsx(b,{to:u,className:"radar-spot-media",tabIndex:-1,"aria-hidden":"true",children:c.length>1?e.jsxs("span",{className:"radar-spot-gal",children:[e.jsx("span",{className:"radar-spot-track",onScroll:j,ref:r,children:c.map((i,o)=>e.jsx("img",{className:"radar-spot-shot",src:E(i),alt:"",loading:o===0?"eager":"lazy"},i))}),e.jsx("span",{className:"radar-spot-pips",children:c.map((i,o)=>e.jsx("span",{className:"radar-spot-pip"+(o===m?" is-on":"")},i))})]}):a.cover_url?e.jsx("img",{className:"radar-spot-cover",src:E(a.cover_url),alt:"",loading:"lazy"}):e.jsx("span",{className:"radar-spot-placeholder",style:{background:B(s,a.cover_tone)},children:e.jsx(y,{"aria-hidden":"true"})})}),e.jsxs("div",{className:"radar-spot-content",children:[e.jsxs("span",{className:"radar-spot-eyebrow",children:[e.jsx(se,{size:12,"aria-hidden":"true"})," Featured"]}),e.jsx("h3",{className:"radar-spot-title",children:e.jsx(b,{to:u,tabIndex:p,children:a.title})}),a.excerpt&&e.jsx("p",{className:"radar-spot-excerpt",children:a.excerpt}),e.jsxs("div",{className:"radar-spot-meta",children:[a.category&&e.jsx("span",{className:"radar-pill",style:x,children:a.category_label}),h&&e.jsx("span",{className:"radar-spot-date",children:h})]}),e.jsxs(b,{to:u,className:"radar-spot-cta",tabIndex:p,children:["Read the update ",e.jsx(T,{size:17,"aria-hidden":"true"})]})]})]})}
1function je(){const[a,n]=d.useState(!1);return d.useEffect(()=>{if(!window.matchMedia)return;const s=window.matchMedia("(prefers-reduced-motion: reduce)"),c=()=>n(s.matches);return c(),s.addEventListener("change",c),()=>s.removeEventListener("change",c)},[]),a}const _="#9e2a5c",ge=[{to:"/site/events",label:"Events"},{to:"/site/calls",label:"Calls"},{to:"/site/research/publications",label:"Publications"},{to:"/people",label:"People"}];function va(){const[a,n]=d.useState(null),[s,c]=O(),r=s.get("category")||"",m=s.get("tag")||"",f=U([a,r,m]),[j,h]=d.useState(!1),[u,p]=d.useState(!1),[x,i]=d.useState(L),{voci:o,tracce:z}=me({});d.useEffect(()=>G(l=>n(l)),[]),d.useEffect(()=>W(pe,L,i),[]);const N=d.useMemo(()=>{if(!Array.isArray(a))return[];const t=a.filter(l=>!(r&&l.category!==r||m&&!l.tags.some(g=>String(g).toLowerCase()===m.toLowerCase())));return[...t.filter(l=>l.featured),...t.filter(l=>!l.featured)]},[a,r,m]),w=d.useMemo(()=>{if(!Array.isArray(a))return[];const t=new Set(a.map(l=>l.category).filter(Boolean));return $.filter(l=>t.has(l))},[a]),C=d.useMemo(()=>{if(!Array.isArray(a))return[];const t=new Map;return a.forEach(l=>(l.tags||[]).forEach(g=>{const v=String(g).trim();v&&t.set(v,(t.get(v)||0)+1)})),[...t.entries()].sort((l,g)=>g[1]-l[1]).slice(0,10).map(([l])=>l)},[a]);function S(t){const l=new URLSearchParams(s);t?l.set("category",t):l.delete("category"),c(l,{replace:!0})}function I(){const t=new URLSearchParams(s);t.delete("tag"),c(t,{replace:!0})}const R=!r&&!m,k=R?N.filter(t=>t.featured):[],P=R?N.filter(t=>!t.featured):N;return e.jsxs(X,{tone:"dark",accent:_,children:[e.jsxs("div",{ref:f,children:[e.jsx("section",{className:"site-band site-band-tight site-band-radar",children:e.jsxs("div",{className:"site-wrap",children:[e.jsxs("p",{className:"site-eyebrow site-eyebrow-radar reveal",children:[e.jsx(J,{size:14}),"Climpact Radar"]}),e.jsx("h1",{className:"site-band-title reveal","data-d":"1",children:"Our way to keep you up to date"}),e.jsxs("p",{className:"site-lead reveal","data-d":"2",style:{marginTop:18},children:[e.jsx("strong",{children:"News, calls for papers, workshops and dispatches"})," from the world of climate litigation â ",e.jsx("strong",{children:"straight from the Climpact research team"}),"."]}),e.jsx("div",{className:"reveal","data-d":"2",style:{marginTop:20},children:e.jsxs(b,{to:"/radar/newsletter",className:"site-btn site-btn-ghost",children:[e.jsx(te,{size:15,"aria-hidden":"true"})," Newsletter archive"]})}),k.length>0&&e.jsxs("div",{className:"reveal","data-d":"3",style:{marginTop:"clamp(30px, 4.5vh, 50px)"},children:[e.jsx("h2",{className:"site-sr-only",children:"Featured dispatches"}),e.jsx(be,{posts:k})]})]})}),e.jsx("section",{className:"site-band site-band-tight site-band-invert site-band-white",children:e.jsx("div",{className:"site-wrap",children:e.jsxs("div",{className:"site-editorial site-editorial--radar-list",children:[e.jsxs("div",{className:"site-editorial-main",children:[m&&e.jsx("div",{className:"radar-filters","aria-label":"Active tag filter",children:e.jsxs("button",{type:"button",className:"radar-chip is-active",onClick:I,children:["Tag: ",m," ",e.jsx(re,{size:13,"aria-hidden":"true"})]})}),a===null?e.jsxs("div",{className:"site-card site-empty",children:[e.jsx(ie,{size:26,className:"site-spin site-empty-icon","aria-hidden":"true"}),e.jsx("p",{className:"site-empty-body",children:"Loading updatesâ¦"})]}):N.length===0?e.jsxs("div",{className:"site-card site-empty",children:[e.jsx(y,{size:30,className:"site-empty-icon","aria-hidden":"true"}),e.jsx("h2",{className:"site-empty-title",children:"Nothing here yet"}),e.jsx("p",{className:"site-empty-body",children:r||m?"No published posts match this filter.":"No updates have been published yet. Check back soon."}),(r||m)&&e.jsx(b,{to:"/radar",className:"site-btn site-btn-ghost",children:"Clear filters"})]}):P.length===0?null:e.jsxs("div",{className:"site-card-grid",children:[e.jsx("h2",{className:"site-sr-only",children:"All dispatches"}),P.map((t,l)=>e.jsx("div",{className:"reveal","data-d":String(l%3+1),children:e.jsx(Z,{post:t})},t.id))]})]}),e.jsxs("aside",{className:"site-rail reveal","data-d":"1",children:[w.length>0&&e.jsxs("div",{className:"site-rail-card rail-browse",children:[e.jsx("p",{className:"site-rail-h",children:"Browse"}),e.jsxs("div",{className:"radar-rail-filters",role:"group","aria-label":"Filter by category",children:[e.jsx("button",{type:"button",className:"radar-chip"+(r?"":" is-active"),onClick:()=>S(""),children:"All updates"}),w.map(t=>e.jsx("button",{type:"button",className:"radar-chip"+(r===t?" is-active":""),onClick:()=>S(t),children:H[t]},t))]})]}),C.length>0&&e.jsxs("div",{className:"site-rail-card rail-topics",children:[e.jsx("p",{className:"site-rail-h",children:"Topics"}),e.jsx("div",{className:"radar-rail-tags",children:C.map(t=>e.jsx(b,{to:`/radar?tag=${encodeURIComponent(t)}`,className:"radar-tag-chip",children:Y(t)},t))})]}),e.jsxs("div",{className:"site-rail-card rail-subscribe",children:[e.jsx("p",{className:"site-rail-h",children:"Stay updated"}),e.jsx("p",{className:"site-rail-text",children:"New cases, calls and dispatches â straight to your inbox."}),e.jsxs("button",{type:"button",className:"radar-rail-subscribe",onClick:()=>p(!0),children:[e.jsx(y,{size:15,"aria-hidden":"true"})," Subscribe"]})]}),e.jsxs("div",{className:"site-rail-card rail-lead",children:[e.jsx("p",{className:"site-rail-h",children:"Have a lead?"}),e.jsx("p",{className:"site-rail-text",children:"Seen a case, ruling or a piece of news we should cover? Tell the team."}),e.jsxs("button",{type:"button",className:"radar-rail-subscribe",onClick:()=>h(!0),children:[e.jsx(le,{size:15,"aria-hidden":"true"})," Suggest to Climpact"]})]}),e.jsxs("div",{className:"site-rail-card rail-explore",children:[e.jsx("p",{className:"site-rail-h",children:"Explore"}),e.jsx("nav",{className:"site-rail-links","aria-label":"Explore the site",children:ge.map(t=>e.jsxs(b,{to:t.to,className:"site-rail-link",children:[t.label," ",e.jsx(T,{size:15,"aria-hidden":"true"})]},t.to))})]})]})]})})}),o.length>0&&e.jsx("section",{className:"site-band site-band-invert site-band-white radar-bacheca",children:e.jsx("div",{className:"site-wrap",children:e.jsx(de,{voci:o,tracce:z,occhiello:"On the board",titolo:"Whatâs happening at Climpact"})})})]}),e.jsx(ce,{enabled:oe(ne),max:3}),e.jsx(q,{open:j,onClose:()=>h(!1),eyebrow:"Climpact Radar",title:"Seen something we should cover?",sub:"A ruling, a filing, a piece of news â tell us what happened and where you read it. It goes straight to the team that writes Radar, and you get a confirmation by email.",source:"site-radar-lead",tipi:["news","case"],defaultType:"news",tinta:_}),e.jsx(K,{open:u,onClose:()=>p(!1),eyebrow:x.newsletter_eyebrow,headline:x.newsletter_headline,sub:x.newsletter_sub,success:x.newsletter_success,source:"site-radar"})]})}
1export{va as default};
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.