1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[529],{7855:(e,t,n)=>{"use strict";n.d(t,{default:()=>F});var r=n(5155),o=n(2115),i=n(7856),a=n.n(i);let l=[-.0739933,51.0758008],s="https://cdn.prod.website-files.com/6699a3b10119fe0ddb946217/69bcf7d4604bb732790f5a23_ATF-LOGO-26-logo-white%20(1)%20(1).png",d="https://www.allthingsfungi.co.uk",c=[{id:"fungi",label:"Fungi",emoji:"\uD83C\uDF44"},{id:"slime",label:"Slime moulds",emoji:"\uD83D\uDFE1"},{id:"plants",label:"Plants",emoji:"\uD83C\uDF3F"},{id:"animals",label:"Animals",emoji:"\uD83D\uDC1B"},{id:"other",label:"Other",emoji:"â"}],p=c.map(e=>e.id),h={accent:"#3b7bff",colors:{fungi:"#3b7bff",slime:"#ffc300",plants:"#00d68f",animals:"#ff4d4d",other:"#dfe6ee"}},u={bg:"#0a0a0a",panel:"#0c0c0d",bar:"#101014",scrim:"rgba(12,12,14,0.86)",line:"rgba(255,255,255,0.09)",lineSoft:"rgba(255,255,255,0.05)",control:"rgba(255,255,255,0.34)",text:"#fff",dim:"rgba(255,255,255,0.66)",faint:"rgba(255,255,255,0.52)",onMap:"rgba(255,255,255,0.78)",head:"Oswald, sans-serif",body:"Open Sans, sans-serif"},g="#ffc94d",x="#45d4a0",f="#ffb454",m="#c4c4cc",b="#9fc2ff",y=(e,t)=>e?e.replace("square",t):null;function v(e){return e?new Date(e+"T12:00:00Z").toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"short"}):""}function j(e){return null==e?null:e<=1?"Only record worldwide":e<100?"Seldom recorded":e<500?"Rarely recorded":e<2e3?"Uncommon on iNaturalist":e<1e4?"Fairly well recorded":null}let w=new Set(["species","subspecies","variety","form","hybrid"]),k=e=>!e||w.has(e),S=e=>/\bsp\.\s*'/.test(e||""),z=e=>(null!=e?e:0).toLocaleString(),C=e=>e?e.slice(0,4):null;function F(e){let{initial:t,embed:n=!1}=e,i=(0,o.useRef)(null),s=(0,o.useRef)(null),d=(0,o.useRef)([]),g=(0,o.useRef)(null),[f,m]=(0,o.useState)(()=>t||{observations:[],years:[],species:0,total:0,live:!1,generatedAt:null}),[b,j]=(0,o.useState)(null),w=(0,o.useRef)(!1),[k,S]=(0,o.useState)(n?"map":"overview"),[C,F]=(0,o.useState)(null),[M,D]=(0,o.useState)(!0),[L,Y]=(0,o.useState)(0),[Z,q]=(0,o.useState)(n),[G,X]=(0,o.useState)("all"),[J,Q]=(0,o.useState)(()=>new Set(p)),[K,V]=(0,o.useState)(""),[$,ee]=(0,o.useState)("all"),[et,en]=(0,o.useState)(!1),[er,eo]=(0,o.useState)(null),[ei,ea]=(0,o.useState)(!1),[el,es]=(0,o.useState)(!1),[ed,ec]=(0,o.useState)(0),[ep,eh]=(0,o.useState)(!1),[eu,eg]=(0,o.useState)("records"),[ex,ef]=(0,o.useState)("peek"),[em,eb]=(0,o.useState)(!1),[ey,ev]=(0,o.useState)(0),[ej,ew]=(0,o.useState)(!1),[ek,eS]=(0,o.useState)(!0),ez=f.observations,eC=(0,o.useMemo)(()=>c.map(e=>({...e,dot:h.colors[e.id]})),[]),eF=(0,o.useCallback)(e=>h.colors[e]||h.colors.other,[]),eN=(0,o.useCallback)(e=>{var t;return(null==(t=c.find(t=>t.id===e))?void 0:t.label)||"Other"},[]),eT=(0,o.useCallback)(e=>{var t;return(null==(t=c.find(t=>t.id===e))?void 0:t.emoji)||"â"},[]),eR=h.accent;(0,o.useEffect)(()=>{let e=()=>D(window.innerWidth>860);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,o.useEffect)(()=>{let e=document.createElement("div");e.style.cssText="position:fixed;left:-9999px;bottom:0;height:env(safe-area-inset-bottom,0px)",document.body.appendChild(e);let t=()=>Y(Math.round(e.getBoundingClientRect().height)||0);return t(),window.addEventListener("resize",t),window.addEventListener("orientationchange",t),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),e.remove()}},[]),(0,o.useEffect)(()=>{let e=new URLSearchParams(window.location.search);("1"===e.get("embed")||"true"===e.get("embed"))&&(q(!0),S("map"));let t=e.get("year");t&&/^\d{4}$/.test(t)&&X(Number(t))},[]),(0,o.useEffect)(()=>{d.current=f.observations},[f.observations]),(0,o.useEffect)(()=>{f.generatedAt&&j(new Date(f.generatedAt))},[f.generatedAt]);let eI=!!f.live;(0,o.useEffect)(()=>{let e=eI?6e4:3e5,t=Date.now(),n=!1,r=async()=>{if("visible"===document.visibilityState){t=Date.now();try{var e;let t=await fetch("/api/observations",{cache:"no-store"});if(!t.ok)return;let r=await t.json();if(n||!(null==r||null==(e=r.observations)?void 0:e.length)||!1===r.complete&&r.total<(f.total||0))return;m(e=>r.generatedAt===e.generatedAt&&r.total===e.total?e:{observations:r.observations,years:r.years||[],species:r.species||0,total:r.total||0,live:!!r.live,generatedAt:r.generatedAt||null}),j(new Date),F(null)}catch(e){}}},o=setInterval(r,e),i=()=>{"visible"===document.visibilityState&&Date.now()-t>e&&r()};
1return document.addEventListener("visibilitychange",i),()=>{n=!0,clearInterval(o),document.removeEventListener("visibilitychange",i)}},[eI,f.total]),(0,o.useEffect)(()=>{((null==t?void 0:t.observations)||[]).length>0||fetch("/api/observations").then(e=>e.json()).then(e=>m({observations:e.observations||[],years:e.years||[],species:e.species||0,total:e.total||0,live:!!e.live,generatedAt:e.generatedAt||null})).catch(e=>F(String((null==e?void 0:e.message)||e)))},[t]);let eB=(0,o.useMemo)(()=>f.years.filter(e=>e.observations>0).sort((e,t)=>t.year-e.year),[f.years]),eO=(0,o.useMemo)(()=>eB.length?eB[0].year:null,[eB]),eE=(0,o.useMemo)(()=>{let e=[...f.years].sort((e,t)=>t.year-e.year);return e.find(e=>0===e.observations)||e[0]||null},[f.years]),eM=(0,o.useMemo)(()=>{if(!eO)return new Set;let e=new Set(ez.filter(e=>e.year<eO).map(e=>e.taxonId).filter(Boolean));return new Set(ez.filter(t=>t.year===eO&&t.taxonId&&!e.has(t.taxonId)).map(e=>e.taxonId))},[ez,eO]),eW=(0,o.useMemo)(()=>"all"===G?ez:ez.filter(e=>e.year===G),[ez,G]),eD=(0,o.useMemo)(()=>{var e;let t=Object.fromEntries(p.map(e=>[e,0]));for(let n of eW)t[n.group]=(null!=(e=t[n.group])?e:0)+1;return t},[eW]),eA=(0,o.useMemo)(()=>{let e=eW.filter(e=>J.has(e.group));"rare"===$&&(e=e.filter(e=>null!=e.globalObsCount&&e.globalObsCount<500),et&&(e=e.filter(e=>"research"===e.qualityGrade))),"new"===$&&(e=e.filter(e=>eM.has(e.taxonId)));let t=K.trim().toLowerCase();return t&&(e=e.filter(e=>(e.commonName||"").toLowerCase().includes(t)||(e.taxonName||"").toLowerCase().includes(t)||(e.observer||"").toLowerCase().includes(t))),e},[eW,J,$,eM,K,et]),eL=(0,o.useMemo)(()=>[...new Set(eA.map(e=>e.observedOn).filter(Boolean))].sort(),[eA]);(0,o.useEffect)(()=>{ev(0),ew(!1)},[G,J,$]),(0,o.useEffect)(()=>{if(!ej||0===eL.length)return;let e=setInterval(()=>{ev(e=>e>=eL.length-1?(ew(!1),e):e+1)},900);return()=>clearInterval(e)},[ej,eL.length]);let eH=eL[ey]||null,eP=(0,o.useMemo)(()=>em&&0!==eL.length?ek?eA.filter(e=>!e.observedOn||e.observedOn<=eH):eA.filter(e=>e.observedOn===eH):eA,[eA,em,ek,eH,eL.length]),eY=(0,o.useMemo)(()=>{let e=(e,t)=>(t.observedOn||"").localeCompare(e.observedOn||"")||t.id-e.id;if("all"===$)return[...eP].sort(e);let t=new Map;for(let e of eP){if(!e.taxonId)continue;let n=t.get(e.taxonId);n&&(!e.photoThumb||n.photoThumb)||t.set(e.taxonId,e)}let n=[...t.values()];return"rare"===$?n.sort((e,t)=>{var n,r;return(null!=(n=e.globalObsCount)?n:1/0)-(null!=(r=t.globalObsCount)?r:1/0)}):n.sort(e)},[eP,$]),eZ=(0,o.useMemo)(()=>new Set(eP.map(e=>e.taxonId).filter(Boolean)).size,[eP]),eq=(0,o.useMemo)(()=>{var e,t;return"all"===G?f.species:null!=(t=null==(e=f.years.find(e=>e.year===G))?void 0:e.species)?t:0},[G,f]),eU="all"!==G||J.size!==p.length||"all"!==$||!!K.trim()||em,e_=(0,o.useMemo)(()=>"rare"===$?eY.filter(e=>"research"===e.qualityGrade).length:0,[eY,$]),eG=(0,o.useCallback)(()=>({center:M?l:[l[0],l[1]-.0035],zoom:M?14.9:14.2,pitch:58}),[M]);(0,o.useEffect)(()=>{if(s.current||!i.current)return;a().accessToken="pk.eyJ1Ijoic2hvdWxkZXJzIiwiYSI6ImNseTFuZXBsMjBzZmsyanNiaDB0ZzNqY3QifQ.Lojg3LDXz2PAdAL0cjs-gg";let e=new(a()).Map({container:i.current,style:"mapbox://styles/mapbox/satellite-v9",center:l,zoom:14.9,pitch:58,bearing:-24,minZoom:13.5,maxZoom:22,interactive:!1,attributionControl:!1});return s.current=e,e.addControl(new(a()).AttributionControl({compact:!0}),"bottom-right"),e.addControl(new(a()).NavigationControl({showCompass:!1}),"bottom-left"),e.once("load",()=>{for(let t of e.getStyle().layers||[])"raster"===t.type&&(e.setPaintProperty(t.id,"raster-saturation",.16),e.setPaintProperty(t.id,"raster-contrast",.05),e.setPaintProperty(t.id,"raster-brightness-max",.97));e.addSource("obs",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),e.addLayer({id:"obs-dot",type:"circle",source:"obs",paint:{"circle-radius":["interpolate",["linear"],["zoom"],13.5,3.2,16,5,19,8],"circle-color":["get","dotColor"],"circle-stroke-width":1,"circle-stroke-color":"rgba(8,8,10,0.55)","circle-opacity":.92}}),e.addLayer({id:"obs-selected-ring",type:"circle",source:"obs",filter:["==",["get","id"],-1],paint:{"circle-radius":12,"circle-color":"transparent","circle-stroke-width":2,"circle-stroke-color":"#ffffff","circle-opacity":0}}),e.on("click","obs-dot",t=>{let n=t.features[0].properties.id,r=d.current.find(e=>e.id===n);r&&(eo(r),e.flyTo({center:[r.lng,r.lat],zoom:Math.max(e.getZoom(),16.5),speed:1.6}))}),e.on("click",t=>{0===e.queryRenderedFeatures(t.point,{layers:["obs-dot"]}).length&&eo(null)}),e.on("mouseenter","obs-dot",()=>{e.getCanvas().style.cursor="pointer"}),e.on("mouseleave","obs-dot",()=>{e.getCanvas().style.cursor=""}),es(!0)}),()=>{e.remove(),s.current=null,es(!1)}},[]);let eX=(0,o.useMemo)(()=>{let e=ez.filter(e=>null!==e.lat&&null!==e.lng);if(0===e.length)return null;let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of e)i.lng<t&&(t=i.lng),i.lng>r&&(r=i.lng),i.lat<n&&(n=i.lat),i.lat>o&&(o=i.lat);return[[t,n],[r,o]]},[ez]),eJ=(0,o.useMemo)(()=>M?{right:400,bottom:150}:{right:0,bottom:156+L},[M,L]),eQ=(0,o.useCallback)((e,t)=>{let{bearing:n,pitch:r,margin:o=40,zoomBack:i=0,leftFrac:a=0}=t,l=ez.filter(e=>null!==e.lat&&null!==e.lng).map(e=>[e.lng,e.lat]);if(0===l.length)return null;let s=e.getCanvas(),d=Math.round(s.clientWidth*a),c=s.clientWidth-eJ.right-d,p=s.clientHeight-eJ.bottom;if(c<=2*o||p<=2*o)return null;let h={top:0,right:eJ.right,bottom:eJ.bottom,left:d},u={center:e.getCenter(),zoom:e.getZoom(),pitch:e.getPitch(),bearing:e.getBearing()},g=()=>{let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of l){let a=e.project(i);a.x<t&&(t=a.x),a.x>r&&(r=a.x),a.y<n&&(n=a.y),a.y>o&&(o=a.y)}return{x1:t,y1:n,x2:r,y2:o}};e.jumpTo({...u,pitch:r,bearing:n,padding:h});for(let t=0;t<4;t++){let t=g(),n=Math.min((c-2*o)/Math.max(t.x2-t.x1,1),(p-2*o)/Math.max(t.y2-t.y1,1));e.setZoom(Math.min(18.5,e.getZoom()+Math.log2(n)));let r=g();e.panBy([(r.x1+r.x2)/2-(d+c/2),(r.y1+r.y2)/2-p/2],{duration:0})}let x={center:e.getCenter(),zoom:Math.max(0,e.getZoom()-i)};return e.jumpTo({...u,padding:h}),{...x,pitch:r,bearing:n,padding:h}},[ez,eJ]),eK=(0,o.useRef)(!1);(0,o.useEffect)(()=>{eK.current=!1},[k]);let eV=(0,o.useCallback)(e=>"map"===k?{bearing:-17,pitch:45}:{bearing:e.getBearing(),pitch:58,margin:70,zoomBack:.5,leftFrac:.44*!!M},[k,M]),e$=(0,o.useCallback)((e,t)=>{let n=eQ(e,eV(e)),r=window.matchMedia("(prefers-reduced-motion: reduce)").matches;return e.easeTo({...n||("map"===k?{center:l,zoom:15.2,pitch:45,bearing:-17,padding:{top:0,right:eJ.right,bottom:eJ.bottom,left:0}}:{...eG(),padding:{top:0,right:0,bottom:0,left:0}}),duration:r?0:t,essential:!0}),!!n},[eQ,eV,k,eJ,eG]);(0,o.useEffect)(()=>{let e=s.current;e&&el&&(["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"].forEach(t=>{var n,r;return"map"===k?null==(n=e[t])?void 0:n.enable():null==(r=e[t])?void 0:r.disable()}),e$(e,"map"===k?1600:1300))},[k,el,e$]),(0,o.useEffect)(()=>{let e=s.current;e&&el&&!eK.current&&eX&&e$(e,600)},[eX,el,e$]),(0,o.useEffect)(()=>{let e=s.current;if(!e||!el)return;let t=()=>{eK.current||e$(e,0)};return e.on("resize",t),()=>{e.off("resize",t)}},[el,e$]),(0,o.useEffect)(()=>{let e=s.current;if(!e||!el||"map"!==k||!eX)return;let[[t,n],[r,o]]=eX,i=Math.max((r-t)*.08,4e-4),a=Math.max((o-n)*.08,3e-4),l=[t-i,n-a],d=[r+i,o+a],c=!1,p=()=>
1{if(c)return;let t=e.getCenter(),n=Math.min(Math.max(t.lng,l[0]),d[0]),r=Math.min(Math.max(t.lat,l[1]),d[1]);(n!==t.lng||r!==t.lat)&&(c=!0,e.setCenter([n,r]),c=!1)},h=e=>{e.originalEvent&&(eK.current=!0,p())},u=e=>{e.originalEvent&&(eK.current=!0),eK.current&&p()};return e.on("move",h),e.on("moveend",u),()=>{e.off("move",h),e.off("moveend",u)}},[el,k,eX]),(0,o.useEffect)(()=>{let e=s.current;if(!e||!el||"map"===k||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let t=null,n=performance.now(),r=o=>{let i=o-n;n=o,e.setBearing(e.getBearing()+6e-4*i),t=requestAnimationFrame(r)};return t=requestAnimationFrame(r),()=>{t&&cancelAnimationFrame(t)}},[k,el]);let e0=(0,o.useMemo)(()=>ez.filter(e=>null!==e.lat&&null!==e.lng).sort((e,t)=>(e.observedOn||"").localeCompare(t.observedOn||"")||e.id-t.id),[ez]);(0,o.useEffect)(()=>{if("map"===k||!el||0===e0.length)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w.current)return void ec(e0.length);ec(0);let e=0,t=setInterval(()=>{e+=1,ec(Math.round(e0.length*e/28)),e>=28&&(w.current=!0,clearInterval(t))},130);return()=>clearInterval(t)},[k,el,e0]),(0,o.useEffect)(()=>{let e=s.current;if(!e||!el)return;let t=e.getSource("obs");if(t){var n;t.setData((n="map"===k?eP:e0.slice(0,ed),{type:"FeatureCollection",features:n.filter(e=>null!==e.lat&&null!==e.lng).map(e=>({type:"Feature",geometry:{type:"Point",coordinates:[e.lng,e.lat]},properties:{id:e.id,dotColor:eF(e.group)}}))}))}},[el,k,eP,e0,ed,eF]),(0,o.useEffect)(()=>{var e;let t=s.current;t&&el&&t.getLayer("obs-selected-ring")&&t.setFilter("obs-selected-ring",["==",["get","id"],null!=(e=null==er?void 0:er.id)?e:-1])},[er,el]);let e1=(0,o.useCallback)(e=>{eo(e);let t=s.current;t&&null!==e.lat&&t.flyTo({center:[e.lng,e.lat],zoom:Math.max(t.getZoom(),16.5),speed:1.6})},[]);function e5(){X("all"),Q(new Set(p)),ee("all"),en(!1),V(""),eb(!1),ew(!1),ev(0),eo(null)}function e2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;X(e),Q(new Set(t?[t]:p)),ee("all"),eh(!0),S("map"),setTimeout(()=>eh(!1),650)}let e6=(0,r.jsx)(I,{playing:ej,togglePlay:function(){if(ej)return void ew(!1);em?ey>=eL.length-1&&ev(0):(eb(!0),ev(0),g.current=null),ew(!0)},timelineOn:em,stopTimeline:function(){eb(!1),ew(!1),ev(0)},sliderIdx:ey,scrubTo:function(e){eb(!0),ew(!1),ev(e)},dateRange:eL,currentDate:eH,cumulative:ek,setCumulative:eS,accent:eR,compact:!M}),e4=(0,r.jsx)(R,{years:eB,activeYear:G,onYear:function(e){eo(null),X(e),"new"===$&&"all"!==e&&e!==eO&&ee("all")},recordFilter:$,onRecordFilter:function(e){eo(null),ee(e),"rare"!==e&&en(!1),"new"===e&&eO&&X(eO)},latestYear:eO,searchQuery:K,setSearchQuery:V,compact:!M,isFiltered:eU,onReset:e5}),e8=(0,r.jsxs)("div",{style:{padding:"9px 16px",borderBottom:"1px solid ".concat(u.lineSoft),flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,minHeight:40},children:[(0,r.jsxs)("p",{style:{color:u.dim,fontSize:11.5},children:["all"===$&&"".concat(z(eY.length)," records \xb7 ").concat(z(eZ)," taxa"),"rare"===$&&"".concat(z(eY.length)," taxa under ").concat(z(500)," records worldwide"),"new"===$&&"".concat(z(eY.length)," taxa new to the festival")]}),eU&&(0,r.jsx)(P,{onClick:e5,small:!0,children:"Reset"})]}),e3="rare"===$?(0,r.jsx)(B,{confirmed:e_,total:eY.length,verifiedOnly:et,setVerifiedOnly:en}):null,e7=(0,r.jsx)(O,{obs:eY,selected:er,onSelect:e1,mode:$,latestYear:eO,newThisYear:eM,searchQuery:K,onReset:e5,colorOf:eF,groupLabel:eN,groupEmoji:eT,isDesktop:M}),e9=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:{position:"absolute",top:M?16:12,left:M?16:12,zIndex:12,pointerEvents:"auto"},children:(0,r.jsx)(N,{compact:!M,showOverview:!Z,onOverview:function(){eo(null),S("overview")},joinYear:eE,accent:eR})}),(0,r.jsx)("div",{style:{position:"absolute",right:M?16:12,top:M?16:12,zIndex:12,pointerEvents:"auto"},children:(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:8},children:(0,r.jsx)(T,{groups:eC,counts:eD,active:J,onToggle:function(e){Q(t=>{let n=new Set(t);
1if(n.has(e)){if(1===n.size)return n;n.delete(e)}else n.add(e);return n})},onShowAll:()=>Q(new Set(p)),compact:!M,open:ei,setOpen:ea})})}),(0,r.jsx)("div",{style:{position:"absolute",left:0,right:0,bottom:0,height:64,pointerEvents:"none",background:"linear-gradient(to bottom, rgba(10,10,12,0) 0%, rgba(10,10,12,0.55) 100%)"}})]}),te="overview"===k||ep;return(0,r.jsxs)("div",{style:{position:"fixed",inset:0,background:u.bg,fontFamily:u.body,overflow:"hidden"},children:[(0,r.jsx)(_,{accent:eR}),(0,r.jsx)("div",{ref:i,className:"map"===k?"atf-map":"atf-map is-hero",style:{position:"absolute",inset:0,zIndex:0,pointerEvents:"map"===k?"auto":"none"}}),"map"===k&&(0,r.jsxs)("div",{className:"screen-in",style:{position:"absolute",inset:0,zIndex:1,display:"flex",pointerEvents:"none"},children:[M?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{flex:1,position:"relative",display:"flex",flexDirection:"column",minWidth:0},children:[(0,r.jsx)("div",{style:{flex:1,position:"relative",minHeight:0},children:e9}),(0,r.jsx)("div",{style:{pointerEvents:"auto"},children:e6})]}),(0,r.jsxs)("aside",{style:{width:400,background:u.panel,borderLeft:"1px solid ".concat(u.line),display:"flex",flexDirection:"column",flexShrink:0,pointerEvents:"auto"},children:[(0,r.jsxs)("div",{style:{padding:"14px 16px 12px",borderBottom:"1px solid ".concat(u.line),flexShrink:0},children:[(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:13,letterSpacing:1.5,textTransform:"uppercase",color:u.text},children:"Biodiversity records"}),(0,r.jsxs)("p",{style:{fontSize:11,color:u.faint,marginTop:3},children:["all"===G?"All festivals":"Festival ".concat(G)," \xb7 ",z(eq)," species"]}),b&&(0,r.jsxs)("p",{style:{fontSize:10,color:u.faint,marginTop:5,display:"flex",alignItems:"center",gap:6},children:[(0,r.jsx)("span",{className:"live-dot",style:{width:5,height:5,borderRadius:"50%",background:eI?x:eR,flexShrink:0}}),eI?"Festival live \xb7 updating every minute":"Live from iNaturalist"," \xb7 checked ",b.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"})]})]}),e4,e8,e3,er&&(0,r.jsxs)("div",{style:{borderBottom:"1px solid ".concat(u.line),flexShrink:0},children:[(0,r.jsxs)("div",{style:{background:"#000",aspectRatio:"4/3",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",position:"relative"},children:[er.photoUrl?(0,r.jsx)("img",{src:y(er.photoThumb,"large")||er.photoUrl,alt:"",style:{width:"100%",height:"100%",objectFit:"contain"}}):(0,r.jsx)("span",{style:{fontSize:44},children:eT(er.group)}),(0,r.jsx)("button",{onClick:()=>eo(null),"aria-label":"Close record",className:"icon-btn",style:{position:"absolute",top:10,right:10,width:34,height:34},children:"â"}),(0,r.jsx)("div",{style:{position:"absolute",bottom:8,left:10},children:(0,r.jsx)(U,{color:eF(er.group),label:eN(er.group)})})]}),(0,r.jsx)("div",{style:{padding:"12px 16px 14px"},children:(0,r.jsx)(W,{obs:er,isNew:eM.has(er.taxonId),latestYear:eO,accent:eR})})]}),e7]})]}):(0,r.jsxs)("div",{style:{flex:1,position:"relative",minWidth:0},children:[e9,(0,r.jsxs)("div",{style:{position:"absolute",left:0,right:0,bottom:0,zIndex:22,pointerEvents:"auto",display:"flex",flexDirection:"column",background:u.panel,borderTop:"1px solid ".concat(u.line),boxShadow:"0 -16px 34px rgba(0,0,0,0.5)",borderRadius:"14px 14px 0 0",paddingBottom:L},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px 6px",flexShrink:0},children:[(0,r.jsxs)("span",{style:{fontFamily:u.head,fontSize:13,letterSpacing:.5,color:u.text,flexShrink:0},children:[z(eY.length)," records"]}),(0,r.jsxs)("span",{style:{fontSize:11,color:u.faint,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["all"===G?"all years":G,"rare"===$?" \xb7 rarest":"new"===$?" \xb7 new in ".concat(eO):"",em&&eH?" \xb7 ".concat(v(eH)):""]}),(0,r.jsxs)("button",{onClick:()=>ef(e=>"open"===e?"peek":"open"),"aria-expanded":"open"===ex,style:{marginLeft:"auto",flexShrink:0,display:"flex",alignItems:"center",gap:6,background:"open"===ex?"rgba(255,255,255,0.1)":"transparent",border:"1px solid ".concat(u.control),borderRadius:4,padding:"5px 10px",color:u.text,fontFamily:u.head,fontSize:10.5,letterSpacing:1,textTransform:"uppercase",cursor:"pointer"},children:[eU&&"open"!==ex&&(0,r.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:eR}}
1),"Filters ","open"===ex?"â¼":"â²"]})]}),(0,r.jsx)("div",{className:"sheet-body",style:{height:"open"!==ex?111:"timeline"===eu?em?196:150:"min(440px, 55vh)",overflow:"hidden",display:"flex",flexDirection:"column",minHeight:0,borderTop:"open"===ex?"1px solid ".concat(u.lineSoft):"none"},children:"open"===ex?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:{padding:"8px 12px 0",flexShrink:0},children:(0,r.jsx)(H,{full:!0,value:eu,onChange:eg,options:[{id:"records",label:"Records"},{id:"timeline",label:"Timeline"}]})}),"records"===eu?(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",minHeight:0,flex:1,marginTop:8},children:[e4,e3,e7]}):(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",flex:1,minHeight:0},children:e6})]}):(0,r.jsx)(E,{obs:eY,selected:er,onSelect:e1,colorOf:eF,groupEmoji:eT,onReset:e5})})]})]}),!M&&er&&(0,r.jsx)("div",{onClick:()=>eo(null),style:{position:"absolute",inset:0,zIndex:30,background:"rgba(0,0,0,0.6)",display:"flex",flexDirection:"column",justifyContent:"flex-end",pointerEvents:"auto"},children:(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),style:{background:"#111",borderRadius:"16px 16px 0 0",border:"1px solid ".concat(u.line),borderBottom:"none",maxHeight:"88vh",display:"flex",flexDirection:"column"},children:[(0,r.jsxs)("div",{style:{background:"#000",flexShrink:0,aspectRatio:"4/3",maxHeight:"42vh",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"16px 16px 0 0",overflow:"hidden",position:"relative"},children:[er.photoUrl?(0,r.jsx)("img",{src:er.photoUrl,alt:"",style:{width:"100%",height:"100%",objectFit:"contain"}}):(0,r.jsx)("span",{style:{fontSize:44},children:eT(er.group)}),(0,r.jsx)("button",{onClick:()=>eo(null),"aria-label":"Close record",className:"icon-btn",style:{position:"absolute",top:12,right:12,width:36,height:36},children:"â"}),(0,r.jsx)("div",{style:{position:"absolute",bottom:8,left:10},children:(0,r.jsx)(U,{color:eF(er.group),label:eN(er.group)})})]}),(0,r.jsx)("div",{style:{overflowY:"auto",padding:"14px 16px 32px"},children:(0,r.jsx)(W,{obs:er,isNew:eM.has(er.taxonId),latestYear:eO,accent:eR})})]})})]}),te&&(0,r.jsx)("div",{className:ep?"screen-out":"screen-in",style:{position:"absolute",inset:0,zIndex:2,overflowY:"auto",overflowX:"hidden",pointerEvents:ep?"none":"auto"},children:(0,r.jsx)(A,{data:f,groups:eC,groupCounts:eD,accent:eR,isDesktop:M,loading:0===f.observations.length,loadError:C,onOpen:e2,onSelect:e=>{e2(),setTimeout(()=>e1(e),1200)}})})]})}function N(e){let{compact:t,showOverview:n,onOverview:o,joinYear:i,accent:a}=e;return(0,r.jsxs)("div",{style:{position:"relative"},children:[(0,r.jsxs)("div",{className:"corner-pill",style:{display:"flex",alignItems:"stretch",background:u.scrim,border:"1px solid ".concat(u.line),borderRadius:10,overflow:"hidden",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"},children:[(0,r.jsx)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"corner-logo",title:"Back to allthingsfungi.co.uk",style:{display:"flex",alignItems:"center",padding:t?"8px 11px":"10px 14px",textDecoration:"none"},children:(0,r.jsx)("img",{src:s,alt:"All Things Fungi Festival, back to the festival site",style:{height:t?28:38,display:"block"}})}),n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{width:1,background:u.line,flexShrink:0}}),(0,r.jsxs)("button",{onClick:o,className:"corner-btn",style:{display:"flex",alignItems:"center",gap:6,padding:t?"0 12px":"0 16px",background:"none",border:"none",color:u.dim,fontFamily:u.head,fontSize:t?10.5:11,letterSpacing:1.1,textTransform:"uppercase",cursor:"pointer",whiteSpace:"nowrap"},children:[(0,r.jsx)("span",{style:{fontSize:12,lineHeight:1},children:"â"})," Overview"]})]}),i&&(0,r.jsxs)("a",{href:i.url,target:"_blank",rel:"noopener",className:"corner-add",title:"Add your own records: join the ".concat(i.year," project on iNaturalist"),style:{display:"flex",alignItems:"center",gap:7,padding:t?"0 13px":"0 17px",background:a,color:"#0b0b12",fontFamily:u.head,fontWeight:600,fontSize:t?10.5:11.5,letterSpacing:1.1,textTransform:"uppercase",textDecoration:"none",whiteSpace:"nowrap"},children:[(0,r.jsx)("span",{style:{fontSize:14,lineHeight:1,marginTop:-1},children:"+"}),t?"Add":"Add your records",(0,r.jsx)(Y,{kind:"out",size:12})]})]}),!t&&(0,r.jsx)("p",{className:"corner-hint",style:{position:"absolute",top:"100%",left:4,marginTop:6,whiteSpace:"nowrap",fontFamily:u.head,fontSize:9.5,letterSpacing:1.2,textTransform:"uppercase",color:"rgba(255,255,255,0.7)",textShadow:"0 1px 4px rgba(0,0,0,0.95)",pointerEvents:"none"},children:"allthingsfungi.co.uk â"})]})}function T(e){let{groups:t,counts:n,active:o,onToggle:i,onShowAll:a,compact:l,open:s,setOpen:d}=e,c=o.size===t.length,p=t.filter(e=>{var t;return(null!=(t=n[e.id])?t:0)>0}),h=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8,padding:"0 7px 7px"},children:[(0,r.jsx)("span",{style:{fontFamily:u.head,fontSize:9,letterSpacing:1.6,textTransform:"uppercase",color:u.faint},children:"Key \xb7 click to filter"}),!c&&(0,r.jsx)("button",{onClick:a,className:"mini-link",style:{background:"none",border:"none",padding:0,cursor:"pointer",fontFamily:u.head,fontSize:9,letterSpacing:1,textTransform:"uppercase",color:b},children:"All"})]}),(0,r.jsx)("div",{style:{display:"grid",gap:1},children:p.map(e=>
1{let t=o.has(e.id);return(0,r.jsxs)("button",{onClick:()=>i(e.id),className:"legend-row",title:t?"Hide ".concat(e.label):"Show ".concat(e.label),style:{display:"flex",alignItems:"center",gap:8,padding:"5px 7px",borderRadius:5,background:"none",border:"none",cursor:"pointer",textAlign:"left",width:"100%"},children:[(0,r.jsx)("span",{style:{width:9,height:9,borderRadius:"50%",flexShrink:0,background:t?e.dot:"transparent",border:"1.5px solid ".concat(t?e.dot:u.control)}}),(0,r.jsx)("span",{style:{flex:1,fontSize:11.5,color:t?u.text:u.faint,fontFamily:u.body,whiteSpace:"nowrap"},children:e.label}),(0,r.jsx)("span",{style:{fontSize:10.5,fontFamily:u.head,letterSpacing:.4,color:t?u.dim:u.faint},children:z(n[e.id])})]},e.id)})})]});return l?(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"},children:[(0,r.jsxs)("button",{onClick:()=>d(e=>!e),className:"legend-pill",style:{display:"flex",alignItems:"center",gap:8,padding:"8px 11px",borderRadius:9,cursor:"pointer",background:u.scrim,border:"1px solid ".concat(u.line),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"},children:[(0,r.jsx)("span",{style:{display:"flex",gap:3},children:p.map(e=>(0,r.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:o.has(e.id)?e.dot:"transparent",border:"1.5px solid ".concat(o.has(e.id)?e.dot:u.control)}},e.id))}),(0,r.jsxs)("span",{style:{fontFamily:u.head,fontSize:10,letterSpacing:1.2,textTransform:"uppercase",color:u.dim},children:[c?"Key":"".concat(o.size," of ").concat(p.length)," ",s?"â´":"â¾"]})]}),s&&(0,r.jsx)("div",{style:{marginTop:6,padding:"9px 9px 10px",borderRadius:9,background:u.scrim,border:"1px solid ".concat(u.line),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",width:236,maxWidth:"78vw"},children:h})]}):(0,r.jsx)("div",{style:{padding:"9px 9px 10px",borderRadius:9,background:u.scrim,border:"1px solid ".concat(u.line),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",width:236},children:h})}function R(e){let{years:t,activeYear:n,onYear:o,recordFilter:i,onRecordFilter:a,latestYear:l,searchQuery:s,setSearchQuery:d,compact:c,isFiltered:p,onReset:h}=e;return(0,r.jsxs)("div",{style:{padding:c?"0 12px 9px":"14px 16px 12px",borderBottom:"1px solid ".concat(u.line),flexShrink:0,display:"grid",gap:c?7:12},children:[(0,r.jsxs)("div",{style:{display:"flex",gap:7,alignItems:"center"},children:[(0,r.jsxs)("div",{style:{position:"relative",flex:1,minWidth:0},children:[(0,r.jsx)("input",{type:"text",placeholder:"Search species or recorderâ¦",value:s,onChange:e=>d(e.target.value),style:{width:"100%",background:"rgba(255,255,255,0.05)",border:"1px solid ".concat(u.control),borderRadius:5,padding:c?"7px 28px 7px 10px":"9px 30px 9px 12px",color:u.text,fontSize:12.5,fontFamily:u.body,outline:"none",boxSizing:"border-box"}}),s&&(0,r.jsx)("button",{onClick:()=>d(""),"aria-label":"Clear search",style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",background:"none",border:"none",color:u.faint,cursor:"pointer",fontSize:12,padding:4},children:"â"})]}),c&&p&&(0,r.jsx)(P,{onClick:h,small:!0,children:"Reset"})]}),(0,r.jsxs)("div",{style:{display:c?"flex":"grid",gap:c?7:12},children:[(0,r.jsx)("div",{style:{flex:1,minWidth:0,display:"flex"},children:(0,r.jsx)(H,{full:!0,compact:c,value:n,onChange:o,options:[{id:"all",label:"All"},...t.map(e=>({id:e.year,label:String(e.year)}))]})}),(0,r.jsx)("div",{style:{flex:1,minWidth:0,display:"flex"},children:(0,r.jsx)(H,{full:!0,compact:c,value:i,onChange:a,options:[{id:"all",label:c?"All":"All records"},{id:"rare",label:"Rarest"},...l?[{id:"new",label:c?"New ".concat(l):"New in ".concat(l)}]:[]]})})]})]})}function I(e){let{playing:t,togglePlay:n,timelineOn:i,stopTimeline:a,sliderIdx:l,scrubTo:s,dateRange:d,currentDate:c,cumulative:p,setCumulative:h,accent:g,compact:x}=e,f=d.length>1,m=(0,o.useRef)(null),y=(0,o.useRef)(!1),j=(0,o.useMemo)(()=>{let e=[];return d.forEach((t,n)=>{let r=C(t),o=e[e.length-1];o&&o.year===r?o.count+=1:e.push({year:r,count:1,start:n})}),e},[d]),w=i&&c?C(c):null,k=e=>{var t,n,r;let o=m.current;if(!o||0===d.length)return 0;let i=o.getBoundingClientRect(),a=Math.max(0,Math.min(1,((null!=(r=null==(n=e.touches)||null==(t=n[0])?void 0:t.clientX)?r:e.clientX)-i.left)/i.width));return Math.min(d.length-1,Math.floor(a*d.length))};(0,o.useEffect)(()=>{let e=e=>{y.current&&s(k(e))},t=()=>{y.current=!1};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}});let S=(0,r.jsxs)("div",{style:{flex:1,minWidth:200*!x,position:"relative"},children:[(0,r.jsx)("div",{ref:m,className:"day-track",onPointerDown:e=>{y.current=!0,s(k(e))},role:"slider",tabIndex:0,"aria-label":"Recording day","aria-valuemin":1,"aria-valuemax":d.length,"aria-valuenow":l+1,onKeyDown:e=>{"ArrowRight"===e.key&&s(Math.min(d.length-1,l+1)),"ArrowLeft"===e.key&&s(Math.max(0,l-1))},style:{display:"flex",gap:2,height:22,alignItems:"stretch",cursor:f?"pointer":"default"},children:d.map((e,t)=>{let n=i&&t===l,o=!i||(p?t<=l:t===l);return(0,r.jsx)("div",{title:"".concat(v(e)," ").concat(C(e)),style:{flex:1,minWidth:0,display:"flex",alignItems:"flex-end"},children:(0,r.jsx)("div",{style:{width:"100%",height:n?"100%":"60%",borderRadius:3,background:n?g:o?"".concat(g).concat(i?"70":"8c"):"rgba(255,255,255,0.11)",boxShadow:n?"0 0 10px ".concat(g,"8
10"):"none",transition:"height 0.12s, background 0.12s"}})},e)})}),(0,r.jsx)("div",{style:{display:"flex",gap:2,marginTop:3},children:j.map(e=>{let t=e.year===w;return(0,r.jsx)("div",{style:{flex:e.count,minWidth:0,borderTop:"2px solid ".concat(t?g:"transparent"),paddingTop:2},children:(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:9.5,letterSpacing:1,color:t?u.text:u.faint,whiteSpace:"nowrap",overflow:"hidden"},children:e.year})},e.year)})})]}),z=(0,r.jsxs)("button",{onClick:n,disabled:!f,className:"play-btn","aria-label":t?"Pause the timeline":"Play the timeline",style:{background:t?"rgba(255,255,255,0.1)":g,border:"1px solid ".concat(t?"rgba(255,255,255,0.22)":"transparent"),borderRadius:6,padding:x?"0 12px":"0 14px",height:34,display:"flex",alignItems:"center",gap:8,cursor:f?"pointer":"not-allowed",color:t?"#fff":"#12121a",fontFamily:u.head,fontSize:11.5,fontWeight:600,letterSpacing:1.1,textTransform:"uppercase",flexShrink:0,opacity:f?1:.4},children:[(0,r.jsx)("span",{style:{fontSize:9},children:t?"ââ":"â¶"}),t?"Pause":"Play"]}),F=(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:12,letterSpacing:.5,color:i&&c?u.text:u.dim,whiteSpace:"nowrap",flexShrink:0},children:i&&c?(0,r.jsxs)(r.Fragment,{children:[v(c)," ",(0,r.jsx)("span",{style:{color:b},children:C(c)})]}):"All ".concat(d.length," days")}),N=i?(0,r.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",flexShrink:0},children:[(0,r.jsx)(H,{value:p?"cum":"day",onChange:e=>h("cum"===e),options:[{id:"cum",label:"Cumulative"},{id:"day",label:"Daily"}]}),(0,r.jsx)(P,{onClick:a,small:!0,children:"All dates"})]}):null;return(0,r.jsx)("div",{style:{background:u.bar,borderTop:"1px solid ".concat(u.line),boxShadow:"0 -14px 30px rgba(0,0,0,0.45)",padding:x?"8px 12px 10px":"10px 20px 12px",flexShrink:0,zIndex:20},children:x?(0,r.jsxs)("div",{style:{display:"grid",gap:8},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[z,F,(0,r.jsx)("span",{style:{marginLeft:"auto"},children:N})]}),S]}):(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14},children:[z,S,F,N]})})}function B(e){let{confirmed:t,total:n,verifiedOnly:i,setVerifiedOnly:a}=e,[l,s]=(0,o.useState)(!1);return(0,r.jsxs)("div",{style:{padding:"10px 16px 12px",borderBottom:"1px solid ".concat(u.lineSoft),background:"rgba(255,255,255,0.025)",flexShrink:0},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,r.jsxs)("span",{style:{fontSize:11.5,color:u.dim},children:[(0,r.jsx)("strong",{style:{color:u.text,fontFamily:u.head,fontSize:13,letterSpacing:.4},children:z(t)})," ","of ",z(n)," confirmed"]}),(0,r.jsxs)("button",{onClick:()=>a(e=>!e),className:"ghost-btn","aria-pressed":i,style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:6,background:i?"".concat(x,"1f"):"transparent",border:"1px solid ".concat(i?"".concat(x,"66"):u.control),borderRadius:4,padding:"4px 9px",color:i?x:u.dim,fontSize:10,fontFamily:u.head,letterSpacing:.9,textTransform:"uppercase",cursor:"pointer"},children:[(0,r.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:i?x:"transparent",border:"1.5px solid ".concat(i?x:u.control)}}),"Confirmed only"]})]}),(0,r.jsx)("button",{onClick:()=>s(e=>!e),"aria-expanded":l,style:{marginTop:7,background:"none",border:"none",padding:0,cursor:"pointer",color:b,fontSize:11,fontFamily:u.body,textAlign:"left",textDecoration:"underline",textUnderlineOffset:3},children:l?"Hide":"What does ârarestâ mean?"}),l&&(0,r.jsxs)("div",{style:{position:"relative",marginTop:9},children:[(0,r.jsxs)("div",{className:"rare-note",style:{maxHeight:168,overflowY:"auto",paddingRight:8,paddingBottom:4,display:"grid",gap:8},children:[(0,r.jsx)("p",{style:{fontSize:11.5,color:u.text,lineHeight:1.65},children:"The least-recorded taxa found at the festival. Several have only a handful of records anywhere in the world, so a confirmed one here genuinely adds to what is known about them."}),(0,r.jsx)("p",{style:{fontSize:11.5,color:u.dim,lineHeight:1.65},children:"The count is how often a taxon has been recorded on iNaturalist worldwide, so it tracks recording effort as well as scarcity. Fungi that need a microscope or a sequencer to name go under-recorded everywhere, which is exactly why recording one counts. Read the number with three things:"}),(0,r.jsxs)("ul",{style:{fontSize:11.5,color:u.dim,lineHeight:1.65,paddingLeft:16,display:"grid",gap:5},children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{style:{color:u.text},children:"Confirmed:"})," two identifiers agree."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{style:{color:u.text},children:"Rank:"})," genus or above counts a whole group."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{style:{color:u.text},children:"Provisional"})," (",(0,r.jsx)("em",{children:"sp. âUK01â"}),"): a lineage separated by DNA, so the name is new rather than the fungus scarce."]})]})]}),(0,r.jsx)("div",{style:{position:"absolute",left:0,right:0,bottom:0,height:20,pointerEvents:"none",background:"linear-gradient(to bottom, rgba(12,12,13,0), rgba(12,12,13,0.95))"}})]})]})}function O(e){let{obs:t,selected:n,onSelect:o,mode:i,latestYear:a,newThisYear:l,searchQuery:s,onReset:d,colorOf:c,groupLabel:p,groupEmoji:h,isDesktop:g}=e;if(0===t.length)return(0,r.jsxs)("div",{style:{flex:1,overflowY:"auto",padding:"34px 22px",textAlign:"center"},children:[(0,r.jsx)("p",{style:{color:u.dim,fontSize:12.5,lineHeight:1.6,marginBottom:14},children:s?"Nothing matches â".concat(s,"â."):"new"===i?"No first-time finds for ".concat(a," with these filters."):"rare"===i?"No rare finds with these filters.":"No records with these filters."}),(0,r.jsx)(P,{onClick:d,small:!0,children:"Reset filters"})]});let x=g?146:76;return(0,r.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"6px 10px 10px"},children:t.map(e=>{let t=(null==n?void 0:n.id)===e.id,s=y(e.photoThumb,g?"small":"square");return(0,r.jsxs)("button",{className:"obs-row",onClick:()=>o(e),style:{display:"flex",gap:12,padding:8,borderRadius:7,marginBottom:3,curs
1or:"pointer",width:"100%",textAlign:"left",background:t?"rgba(255,255,255,0.07)":"transparent",border:"1px solid ".concat(t?"rgba(255,255,255,0.14)":"transparent")},children:[(0,r.jsx)("div",{style:{width:x,height:x,borderRadius:6,overflow:"hidden",flexShrink:0,border:"1px solid ".concat(t?"rgba(255,255,255,0.5)":u.line),background:"#000"},children:s?(0,r.jsx)("img",{src:s,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):(0,r.jsx)("span",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:.36*x},children:h(e.group)})}),(0,r.jsx)("div",{style:{minWidth:0,flex:1,alignSelf:"center"},children:(0,r.jsx)(M,{obs:e,mode:i,isNew:null==l?void 0:l.has(e.taxonId),latestYear:a,colorOf:c,groupLabel:p,roomy:g})})]},e.id)})})}function E(e){let{obs:t,selected:n,onSelect:o,colorOf:i,groupEmoji:a,onReset:l}=e;return 0===t.length?(0,r.jsxs)("div",{style:{height:111,display:"flex",alignItems:"center",justifyContent:"center",gap:12,padding:"0 16px"},children:[(0,r.jsx)("p",{style:{color:u.dim,fontSize:12},children:"No records with these filters."}),(0,r.jsx)(P,{onClick:l,small:!0,children:"Reset"})]}):(0,r.jsx)("div",{className:"obs-strip",style:{display:"flex",gap:8,overflowX:"auto",overflowY:"hidden",paddingTop:2,paddingBottom:12,paddingLeft:12,paddingRight:12,flexShrink:0,scrollSnapType:"x proximity",scrollPaddingLeft:12,WebkitOverflowScrolling:"touch"},children:t.slice(0,60).map(e=>{let t=(null==n?void 0:n.id)===e.id;return(0,r.jsxs)("button",{onClick:()=>o(e),style:{flexShrink:0,width:78,padding:0,background:"none",border:"none",cursor:"pointer",textAlign:"left",scrollSnapAlign:"start"},children:[(0,r.jsxs)("div",{style:{width:78,height:78,borderRadius:7,overflow:"hidden",background:"#000",border:"2px solid ".concat(t?"#fff":u.line),position:"relative"},children:[e.photoThumb?(0,r.jsx)("img",{src:e.photoThumb,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):(0,r.jsx)("span",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:30},children:a(e.group)}
1),(0,r.jsx)("span",{style:{position:"absolute",top:5,left:5,width:8,height:8,borderRadius:"50%",background:i(e.group),boxShadow:"0 0 0 1.5px rgba(0,0,0,0.6)"}})]}),(0,r.jsx)("p",{style:{color:u.text,fontSize:10.5,lineHeight:1.3,marginTop:5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.commonName||e.taxonName||"Unidentified"})]},e.id)})})}function M(e){let{obs:t,mode:n,isNew:o,latestYear:i,colorOf:a,groupLabel:l,roomy:s}=e,d=j(t.globalObsCount),c=null!=t.globalObsCount&&t.globalObsCount<=1,p="research"===t.qualityGrade,h=null!=t.globalObsCount&&t.globalObsCount<500;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[(0,r.jsx)("p",{style:{color:u.text,fontSize:13,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:t.commonName||t.taxonName||"Unidentified"}),c&&(0,r.jsx)(Z,{color:g,children:"Unique"})]}),t.taxonName&&t.taxonName!==t.commonName&&(0,r.jsx)("p",{style:{color:u.faint,fontSize:11,fontStyle:"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:2},children:t.taxonName}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:6},children:[(0,r.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:a(t.group),flexShrink:0}}),(0,r.jsx)("p",{style:{color:u.dim,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:"rare"===n&&null!=t.globalObsCount?c?"The only record worldwide":"".concat(z(t.globalObsCount)," worldwide \xb7 ").concat(d):"".concat(l(t.group)," \xb7 ").concat(v(t.observedOn)||""," ").concat(t.observedOn?C(t.observedOn):t.year)})]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:6,flexWrap:"wrap"},children:[t.observer&&(0,r.jsxs)(Z,{color:m,children:["@",t.observer]}),p?(0,r.jsx)(Z,{color:x,children:"Research grade"}):"rare"===n?(0,r.jsx)(Z,{color:f,children:"Needs ID"}):(0,r.jsx)(Z,{color:m,children:"Needs ID"}),o&&(0,r.jsxs)(Z,{color:x,children:["New in ",i]}),"rare"===n&&!k(t.taxonRank)&&(0,r.jsxs)(Z,{color:m,children:["Only to ",t.taxonRank]}),"rare"===n&&S(t.taxonName)&&(0,r.jsx)(Z,{color:b,children:"Provisional"}),s&&"rare"!==n&&h&&!c&&(0,r.jsx)(Z,{color:b,children:d})]})]})}function W(e){let{obs:t,isNew:n,latestYear:o,accent:i}=e,a=j(t.globalObsCount),l=null!=t.globalObsCount&&t.globalObsCount<=1,s="research"===t.qualityGrade,d=S(t.taxonName),c=!k(t.taxonRank);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{style:{fontFamily:u.head,fontWeight:500,fontSize:17,color:u.text,marginBottom:2,letterSpacing:.3},children:t.commonName||t.taxonName||"Unidentified"}),(0,r.jsx)("p",{style:{color:u.dim,fontSize:11.5,fontStyle:"italic",marginBottom:11},children:t.taxonName}),(0,r.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:[(0,r.jsx)(q,{children:t.observedOn?"".concat(v(t.observedOn)," ").concat(C(t.observedOn)):t.year}),t.observer&&(0,r.jsxs)(q,{children:["@",t.observer]}),(0,r.jsx)(q,{accent:s?x:f,children:s?"Research grade":"Needs ID"}),n&&(0,r.jsxs)(q,{accent:x,children:["New in ",o]}),a&&(0,r.jsx)(q,{accent:l?g:b,children:a})]}),null!=t.globalObsCount&&(0,r.jsx)("p",{style:{color:l?g:u.dim,fontSize:11.5,lineHeight:1.6,marginBottom:8},children:l?"The only observation of this taxon on iNaturalist.":"".concat(z(t.globalObsCount)," observations of this taxon worldwide on iNaturalist.")}),null!=t.globalObsCount&&t.globalObsCount<500&&(0,r.jsx)("p",{style:{color:u.faint,fontSize:11,lineHeight:1.6,marginBottom:11},children:c?"Identified only to ".concat(t.taxonRank,", so that count covers the whole group."):d?"A provisional name for a DNA-separated lineage not yet formally described, so the count is low because the name is new.":s?"Confirmed by at least two identifiers. Seldom recorded rather than proven scarce: hard-to-name fungi are under-recorded everywhere.":"Not yet confirmed by a second identifier, so treat the name and the count with caution."}),(0,r.jsx)("a",{href:"https://www.inaturalist.org/observations/".concat(t.id),target:"_blank",rel:"noopener",style:{display:"block",textAlign:"center",padding:"10px",background:"rgba(255,255,255,0.05)",border:"1px solid ".concat(u.line),borderRadius:4,color:"rgba(255,255,255,0.75)",fontSize:11.5,fontFamily:u.head,letterSpacing:1,textTransform:"uppercase",textDecoration:"none"},children:(0,r.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:7},children:["View on iNaturalist ",(0,r.jsx)(Y,{kind:"out",size:13})]})})]})}function D(e,t){let[n,r]=(0,o.useState)(0);return(0,o.useEffect)(()=>
1{if(!t||!e)return void r(e||0);if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return void r(e);let n=null,o=performance.now(),i=t=>{let a=Math.min(1,(t-o)/1100);r(Math.round(e*(1-Math.pow(1-a,3)))),a<1&&(n=requestAnimationFrame(i))};return n=requestAnimationFrame(i),()=>{n&&cancelAnimationFrame(n)}},[e,t]),n}function A(e){let{data:t,groups:n,groupCounts:o,accent:i,isDesktop:a,loading:l,loadError:c,onOpen:p,onSelect:h}=e,{total:g,species:x,observations:f}=t,m=[...t.years].sort((e,t)=>t.year-e.year),v=m.filter(e=>e.observations>0),j=m.find(e=>0===e.observations)||m[0],w=f.filter(e=>e.photoThumb).sort((e,t)=>(t.observedOn||"").localeCompare(e.observedOn||"")||t.id-e.id),k=Math.max(1,...m.map(e=>e.observations)),S=m.filter(e=>e.reported&&e.observations!==e.reported),C=D(g,!l),F=D(x,!l),N={display:"flex",alignItems:"center",justifyContent:"center",gap:9,padding:a?"15px 26px":"14px 20px",width:a?void 0:"100%",borderRadius:5,fontFamily:u.head,fontWeight:600,fontSize:a?14:13,letterSpacing:1.6,textTransform:"uppercase",cursor:"pointer",boxSizing:"border-box"},T=[{n:C,raw:g,label:"Observations"},{n:F,raw:x,label:"Species"},{n:v.length,raw:v.length,label:1===v.length?"Festival":"Festivals"}];return(0,r.jsxs)("div",{style:{position:"relative",color:u.text,fontFamily:u.body,minHeight:"100%"},children:[(0,r.jsx)("style",{children:"\n @keyframes riseIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}\n .rise{animation:riseIn 0.7s cubic-bezier(.2,.7,.3,1) both}\n .hero-cta:hover{transform:translateY(-1px)}\n .hero-cta{transition:transform .15s,background .15s,border-color .15s}\n .hero-year{transition:background .15s,border-color .15s,transform .15s}\n .hero-year:hover{background:rgba(20,20,26,0.72)!important;border-color:rgba(255,255,255,0.28)!important;transform:translateY(-1px)}\n @media (prefers-reduced-motion: reduce){.hero-year:hover{transform:none}}\n .year-card{transition:background .15s,border-color .15s,transform .15s}\n .year-card:hover{background:rgba(255,255,255,0.06)!important;border-color:rgba(255,255,255,0.2)!important;transform:translateY(-2px)}\n .photo-tile img{transition:transform .35s cubic-bezier(.2,.7,.3,1)}\n .photo-tile:hover img{transform:scale(1.06)}\n .photo-tile .cap{opacity:0;transition:opacity .2s}\n .photo-tile:hover .cap{opacity:1}\n .scroll-cue{animation:cue 2.2s ease-in-out infinite}\n @keyframes cue{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(5px);opacity:1}}\n @media (prefers-reduced-motion: reduce){.rise,.scroll-cue{animation:none}}\n "}),(0,r.jsx)("div",{style:{position:"fixed",inset:0,zIndex:0,pointerEvents:"none",background:"linear-gradient(to bottom, rgba(10,10,12,0.78) 0%, rgba(10,10,12,0.52) 20%, rgba(10,10,12,0.62) 34%, rgba(10,10,12,0.76) 48%, rgba(10,10,12,0.92) 100%)"}}),(0,r.jsxs)("div",{style:{position:"relative",zIndex:1},children:[(c||S.length>0)&&(0,r.jsx)("div",{style:{padding:"10px 16px",textAlign:"center",background:c?"rgba(255,77,77,0.14)":"rgba(255,195,0,0.12)",borderBottom:"1px solid ".concat(c?"rgba(255,77,77,0.3)":"rgba(255,195,0,0.25)")},children:(0,r.jsx)("p",{style:{fontSize:11.5,color:c?"#ffb3b3":"rgba(255,220,150,0.92)"},children:c?"Could not reach iNaturalist just now, showing what loaded. (".concat(c,")"):S.map(e=>"".concat(e.year,": showing ").concat(z(e.observations),", iNaturalist reports ").concat(z(e.reported))).join(" \xb7 ")})}),(0,r.jsxs)("section",{className:"atf-section",style:{minHeight:"100vh",display:"flex",flexDirection:"column",justifyContent:"space-between",paddingTop:a?30:20,paddingBottom:a?34:26,boxSizing:"border-box"},children:[(0,r.jsxs)("div",{className:"atf-container",style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:16},children:[(0,r.jsx)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"site-badge",style:{display:"block",textDecoration:"none",padding:a?"11px 15px":"9px 12px",borderRadius:9,background:u.scrim,border:"1px solid ".concat(u.line),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"},children:(0,r.jsx)("img",{src:s,alt:"All Things Fungi Festival, back to the festival site",style:{height:a?46:32,dis
1play:"block"}})}),(0,r.jsxs)("p",{style:{fontFamily:u.head,fontSize:9.5,letterSpacing:2,textTransform:"uppercase",color:u.onMap,textAlign:"right",lineHeight:1.8,textShadow:"0 1px 6px rgba(0,0,0,0.8)"},children:["Chiddinglye Estate",(0,r.jsx)("br",{}),"West Sussex"]})]}),(0,r.jsxs)("div",{className:"atf-container",children:[(0,r.jsxs)("div",{style:{maxWidth:860},children:[(0,r.jsxs)("p",{className:"rise",style:{display:"flex",alignItems:"center",gap:8,fontFamily:u.head,fontSize:10,letterSpacing:3,textTransform:"uppercase",color:"rgba(255,255,255,0.8)",marginBottom:a?18:12,textShadow:"0 1px 8px rgba(0,0,0,0.95)"},children:[(0,r.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:i,boxShadow:"0 0 8px ".concat(i),flexShrink:0}}),"Biodiversity map \xb7 ",v.length?"".concat(v[v.length-1].year,"â").concat(v[0].year):"iNaturalist"]}),(0,r.jsxs)("h1",{className:"rise",style:{fontFamily:u.head,fontWeight:600,fontSize:a?60:34,lineHeight:1.02,letterSpacing:-.5,marginBottom:a?20:14,textShadow:"0 2px 24px rgba(0,0,0,0.75)",animationDelay:"0.06s"},children:["Everything found",(0,r.jsx)("br",{}),"at the festival, mapped."]}),(0,r.jsx)("p",{className:"rise",style:{fontSize:a?15:13.5,color:"rgba(255,255,255,0.82)",maxWidth:520,lineHeight:1.65,marginBottom:a?34:24,textShadow:"0 1px 10px rgba(0,0,0,0.8)",animationDelay:"0.12s"},children:"Every fungus, slime mould, plant and creature recorded by festival-goers on iNaturalist, plotted where it was found, year by year."}),(0,r.jsx)("div",{className:"rise",style:{display:"flex",gap:a?40:22,marginBottom:a?34:24,flexWrap:"wrap",animationDelay:"0.18s"},children:T.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:a?46:32,fontWeight:700,lineHeight:1,textShadow:"0 2px 16px rgba(0,0,0,0.8)",color:l?u.faint:u.text,transition:"color .4s"},children:l&&!e.raw?"â":z(e.n)}),(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:9.5,letterSpacing:2,textTransform:"uppercase",color:"rgba(255,255,255,0.68)",marginTop:6,textShadow:"0 1px 8px rgba(0,0,0,0.95)"},children:e.label})]},e.label))}),(0,r.jsxs)("div",{className:"rise",style:{display:"flex",gap:10,flexWrap:"wrap",marginBottom:a?26:20,animationDelay:"0.24s"},children:[(0,r.jsxs)("button",{className:"hero-cta",onClick:()=>p(),style:{...N,background:"#fff",border:"1px solid transparent",color:"#111"},children:["Explore the map ",(0,r.jsx)(Y,{kind:"right"})]}),j&&(0,r.jsxs)("a",{className:"hero-cta",href:j.url,target:"_blank",rel:"noopener",style:{...N,background:u.scrim,border:"1px solid ".concat(u.line),color:u.text,textDecoration:"none",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"},children:["Add your observations ",(0,r.jsx)(Y,{kind:"out"})]})]}),(0,r.jsx)("div",{className:"rise",style:{display:"flex",gap:a?16:11,flexWrap:"wrap",animationDelay:"0.3s"},children:n.filter(e=>{var t;return(null!=(t=o[e.id])?t:0)>0}).map(e=>(0,r.jsxs)("button",{onClick:()=>p("all",e.id),className:"ghost-btn",style:{display:"flex",alignItems:"center",gap:7,background:"transparent",border:"none",padding:0,cursor:"pointer"},children:[(0,r.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:e.dot,flexShrink:0,boxShadow:"0 0 8px ".concat(e.dot,"99")}}),(0,r.jsx)("span",{style:{fontFamily:u.head,fontSize:12,letterSpacing:.6,color:u.text,textShadow:"0 1px 6px rgba(0,0,0,0.9)"},children:z(o[e.id])}),(0,r.jsx)("span",{style:{fontSize:11.5,color:"rgba(255,255,255,0.72)",textShadow:"0 1px 6px rgba(0,0,0,0.9)"},children:e.label})]},e.id))}),a&&v.length>0&&(0,r.jsx)("div",{className:"rise",style:{display:"flex",gap:10,flexWrap:"wrap",marginTop:22,animationDelay:"0.36s"},children:v.map(e=>(0,r.jsxs)("button",{onClick:()=>p(e.year),className:"hero-year",title:"Open the ".concat(e.year," festival on the map"),style:{display:"flex",alignItems:"baseline",gap:9,padding:"9px 14px",borderRadius:6,cursor:"pointer",background:"rgba(12,12,16,0.5)",border:"1px solid ".concat(u.line),backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:[(0,r.jsx)("span",{style:{fontFamily:u.head,fontWeight:600,fontSize:15,letterSpacing:.8,color:u.text},children:e.year}),(0,r.jsxs)("span",{style:{fontSize:11.5,color:"rgba(255,255,255,0.78)",whiteSpace:"nowrap"},children:[z(e.observations)," records \xb7 ",z(e.species)," species"]}),(0,r.jsx)("span",{style:{fontFamily:u.head,fontSize:12,color:b},"aria-hidden":"true",children:"â"})]},e.year))})]}),(0,r.jsx)("p",{className:"scroll-cue",style:{fontFamily:u.head,fontSize:9.5,letterSpacing:2,textTransform:"uppercase",color:"rgba(255,255,255,0.68)",textShadow:"0 1px 8px rgba(0,0,0,0.95)",marginTop:a?3
10:22},children:l?"Loading recordsâ¦":a?"Scroll for the latest finds â":"Scroll for the year-by-year â"})]})]}),(0,r.jsx)("section",{className:"atf-section",style:{background:"rgba(10,10,12,0.88)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",borderTop:"1px solid ".concat(u.line),paddingTop:a?64:40,paddingBottom:a?72:52},children:(0,r.jsxs)("div",{className:"atf-container",children:[(0,r.jsx)(L,{accent:i,children:"Year by year"}),(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:a?"repeat(auto-fit, minmax(228px, 1fr))":"1fr",gap:12,marginBottom:a?64:44},children:m.map(e=>{let t=0===e.observations,n=function(e,t){if(!e)return null;let n=new Date(e+"T12:00:00Z"),r=t?new Date(t+"T12:00:00Z"):null,o=e=>e.getUTCDate(),i=e=>e.toLocaleDateString("en-GB",{month:"long",timeZone:"UTC"});return r?i(n)===i(r)?"".concat(o(n),"â").concat(o(r)," ").concat(i(n)):"".concat(o(n)," ").concat(i(n)," â ").concat(o(r)," ").concat(i(r)):"".concat(o(n)," ").concat(i(n))}(e.starts,e.ends);return(0,r.jsxs)("div",{className:t?void 0:"year-card",onClick:t?void 0:()=>p(e.year),style:{padding:"20px 20px 18px",borderRadius:12,border:"1px solid ".concat(t?u.line:"rgba(255,255,255,0.14)"),background:t?"rgba(255,255,255,0.02)":"rgba(255,255,255,0.06)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",cursor:t?"default":"pointer"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8,marginBottom:14},children:[(0,r.jsx)("span",{style:{fontFamily:u.head,fontSize:26,fontWeight:600,letterSpacing:1,color:t?u.dim:u.text},children:e.year}),n&&(0,r.jsx)("span",{style:{fontFamily:u.head,fontSize:10,letterSpacing:1,textTransform:"uppercase",color:u.faint},children:n})]}),t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{style:{fontSize:12.5,color:u.dim,lineHeight:1.6,marginBottom:14},children:"No records yet. Join the project and yours will appear here."}),(0,r.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"8px 14px",borderRadius:4,border:"1px solid ".concat(b,"66"),color:b,fontFamily:u.head,fontSize:10.5,letterSpacing:1.2,textTransform:"uppercase",textDecoration:"none"},children:["Join on iNaturalist ",(0,r.jsx)(Y,{kind:"out",size:13})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{display:"flex",gap:22,marginBottom:14},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:22,fontWeight:600,lineHeight:1},children:z(e.observations)}),(0,r.jsx)("p",{style:{fontSize:10,color:u.faint,marginTop:4,textTransform:"uppercase",letterSpacing:1.2,fontFamily:u.head},children:"Records"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:22,fontWeight:600,lineHeight:1},children:z(e.species)}),(0,r.jsx)("p",{style:{fontSize:10,color:u.faint,marginTop:4,textTransform:"uppercase",letterSpacing:1.2,fontFamily:u.head},children:"Species"})]})]}),(0,r.jsx)("div",{style:{height:3,background:"rgba(255,255,255,0.08)",borderRadius:2,marginBottom:12},children:(0,r.jsx)("div",{style:{height:"100%",width:"".concat(e.observations/k*100,"%"),background:i,borderRadius:2}})}),(0,r.jsxs)("p",{style:{fontFamily:u.head,fontSize:10.5,letterSpacing:1.2,textTransform:"uppercase",color:u.dim},children:["Explore ",e.year," â"]})]})]},e.year)})}),w.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L,{accent:i,children:"Latest finds"}),(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:a?"repeat(6, 1fr)":"repeat(3, 1fr)",gap:8,marginBottom:a?64:44},children:w.slice(0,a?18:12).map(e=>(0,r.jsxs)("button",{className:"photo-tile",onClick:()=>h(e),style:{position:"relative",padding:0,cursor:"pointer",borderRadius:8,overflow:"hidden",aspectRatio:"1",border:"1px solid rgba(255,255,255,0.14)",background:"#000"},children:[(0,r.jsx)("img",{src:y(e.photoThumb,"medium"),srcSet:"".concat(y(e.photoThumb,"small")," 170w, ").concat(y(e.photoThumb,"medium")," 350w"),sizes:a?"(min-width: 1528px) 227px, 16vw":"32vw",alt:e.commonName||e.taxonName||"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"},loading:"lazy"}),(0,r.jsx)("span",{className:"cap",style:{position:"absolute",inset:0,display:"flex",alignItems:"flex-end",padding:8,background:"linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0) 60%)"},children:(0,r.jsx)("span",{style:{fontSize:10.5,color:"#fff",textAlign:"left",lineHeight:1.3},children:e.commonName||e.taxonName})})]},e.id))})]}),(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:a?"1fr 1fr":"1fr",gap:12,marginBottom:40},children:[(0,r.jsxs)("div",{style:{padding:"24px 24px 22px",borderRadius:12,border:"1px solid ".concat(u.line),background:"rgba(255,255,255,0.055)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:[(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:16,letterSpacing:.5,marginBottom:8},children:"Record your own finds"}),(0,r.jsxs)("p",{style:{fontSize:12.5,color:u.dim,lineHeight:1.7,marginBottom:16},children:["Photograph what you find at the festival with the iNaturalist app.",j?" Join the ".concat(j.year," project and your records join this map automatically."):""]}),(0,r.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[j&&(0,r.jsxs)("a",{href:j.url,target:"_blank",rel:"noopener",className:"hero-cta",style:{display:"inline-flex",alignItems:"center",gap:7,padding:"11px 18px",borderRadius:4,background:i,color:"#0b0b0f",fontFamily:u.head,fontSize:11.5,fontWeight:600,letterSpacing:1.3,textTransform:"uppercase",textDecoration:"none"},children:["Join the ",j.year," project ",(0,r.jsx)(Y,{kind:"out",size:13})]}),(0,r.jsx)("a",{href:"https://www.inaturalist.org/pages/getting+started",target:"_blank",rel:"noopener",className:"hero-cta",style:{padding:"11px 18px",borderRadius:4,border:"1px solid ".concat(u.control),color:u.text,fontFamily:u.head,fontSize:11.5,letterSpacing:1.3,textTransform:"uppercase",textDecoration:"none"},children:"New to iNaturalist?"})]})]}),(0,r.jsxs)("div",{style:{padding:"24px 24px 22px",borderRadius:12,border:"1px solid ".concat(u.line),background:"rgba(255,255,255,0.055)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:[(0,r.jsx)("p",{style:{fontFamily:u.head,fontSize:16,letterSpacing:.5,marginBottom:8},children:"Where the data comes from"}),(0,r.jsx)("p",{style:{fontSize:12.5,color:u.dim,lineHeight:1.7,marginBottom:16},children:"Every record is pulled live from the festival's iNaturalist projects, so this map matches the project pages and updates as records and identifications change, within about fifteen minutes and while the page is open."}),(0,r.jsx)("div",{style:{display:"flex",gap:14,flexWrap:"wrap"},children:m.map(e=>(0,r.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener",style:{color:u.faint,fontSize:11,textDecoration:"none",fontFamily:u.head,letterSpacing:1},children:["iNat ",e.year," â"]},e.year))})]})]}),(0,r.jsx)("button",{className:"hero-cta",onClick:()=>p(),style:{width:"100%",padding:"17px",background:"#fff",border:"none",borderRadius:5,color:"#111",fontFamily:u.head,fontWeight:600,fontSize:14,letterSpacing:2,textTransform:"uppercase",cursor:"pointer"},children:(0,r.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:9},children:["Explore the biodiversity map ",(0,r.jsx)(Y,{kind:"right"})]})})]})})]})]})}function L(e){let{children:t,accent:n}=e;return(0,r.jsxs)("p",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:u.head,fontSize:10,textTransform:"uppercase",letterSpacing:2.4,color:"rgba(255,255,255,0.7)",marginBottom:18},children:[(0,r.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:n||u.faint,flexShrink:0}}),t]})}function H(e){let{options:t,value:n,onChange:o,full:i,compact:a}=e;return(0,r.jsx)("div",{style:{display:"flex",border:"1px solid ".concat(u.control),borderRadius:5,overflow:"hidden",
1width:i?"100%":void 0,flexShrink:0},children:t.map((e,t)=>{let l=e.id===n;return(0,r.jsx)("button",{onClick:()=>o(e.id),className:l?"seg-btn is-active":"seg-btn",style:{flex:i?1:void 0,padding:a?"5px 8px":"7px 12px",background:l?"#fff":"transparent",color:l?"#111":u.dim,border:"none",borderLeft:0===t?"none":"1px solid ".concat(u.line),fontFamily:u.head,fontSize:a?10.5:11,letterSpacing:a?.6:.9,textTransform:"uppercase",cursor:"pointer",whiteSpace:"nowrap"},children:e.label},e.id)})})}function P(e){let{children:t,onClick:n,active:o,small:i,solid:a}=e;return(0,r.jsx)("button",{onClick:n,className:"ghost-btn",style:{background:a?u.scrim:o?"rgba(255,255,255,0.12)":"transparent",backdropFilter:a?"blur(10px)":void 0,WebkitBackdropFilter:a?"blur(10px)":void 0,border:"1px solid ".concat(o?"rgba(255,255,255,0.45)":u.control),borderRadius:4,padding:i?"4px 9px":"6px 12px",color:o?u.text:u.dim,fontSize:i?10:11,fontFamily:u.head,letterSpacing:.9,textTransform:"uppercase",cursor:"pointer",whiteSpace:"nowrap",flexShrink:0},children:t})}function Y(e){let{kind:t="right",size:n=15}=e;return(0,r.jsx)("svg",{width:n,height:n,viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",style:{flexShrink:0,display:"block"},children:(0,r.jsx)("path",{d:"out"===t?"M6 14 L14 6 M7.4 6 H14 V12.6":"M3 10 H16 M11.4 5.4 L16 10 L11.4 14.6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function Z(e){let{children:t,color:n}=e;return(0,r.jsx)("span",{style:{fontSize:9,background:"".concat(n,"1f"),border:"1px solid ".concat(n,"40"),color:n,padding:"1px 5px",borderRadius:3,flexShrink:0,fontFamily:u.head,letterSpacing:.5,textTransform:"uppercase"},children:t})}function q(e){let{children:t,accent:n}=e;return(0,r.jsx)("span",{style:{background:n?"".concat(n,"14"):"rgba(255,255,255,0.06)",border:"1px solid ".concat(n?"".concat(n,"33"):u.line),color:n||"rgba(255,255,255,0.7)",fontSize:10,padding:"3px 8px",borderRadius:3,fontWeight:600,fontFamily:u.body},children:t})}function U(e){let{color:t,label:n}=e;return(0,r.jsxs)("span",{style:{background:"rgba(0,0,0,0.7)",border:"1px solid ".concat(u.line),color:u.text,fontSize:9.5,fontWeight:600,padding:"3px 8px",borderRadius:3,display:"inline-flex",alignItems:"center",gap:6,fontFamily:u.head,letterSpacing:.8,textTransform:"uppercase"},children:[(0,r.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:t,display:"inline-block"}}),n]})}function _(e){let{accent:t}=e;return(0,r.jsx)("style",{children:"\n .obs-row:hover{background:rgba(255,255,255,0.06)!important}\n .legend-row:hover,.legend-pill:hover{background:rgba(255,255,255,0.09)!important}\n .mini-link:hover{filter:brightness(1.3)}\n .seg-btn:not(.is-active):hover{color:#fff;background:rgba(255,255,255,0.06)}\n .ghost-btn:hover{color:#fff!important;border-color:rgba(255,255,255,0.3)!important}\n .play-btn:hover:not(:disabled){filter:brightness(1.1)}\n .day-track:focus-visible{outline:2px solid ".concat(t,";outline-offset:3px;border-radius:3px}\n /* Sits on top of a photograph, so it carries its own contrast rather than\n borrowing it: a black disc, a solid white ring and a white glyph. */\n .icon-btn{background:#000;border:2px solid #fff;border-radius:50%;color:#fff;font-size:14px;font-weight:700;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 10px rgba(0,0,0,0.65)}\n .icon-btn:hover{background:#fff;color:#000}\n .screen-in{animation:screenIn .5s cubic-bezier(.2,.7,.3,1) both}\n .screen-out{animation:screenOut .55s cubic-bezier(.4,0,.6,1) both}\n @keyframes screenIn{from{opacity:0}to{opacity:1}}\n @keyframes screenOut{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.03)}}\n .atf-map.is-hero .mapboxgl-ctrl-group{display:none}\n @media (prefers-reduced-motion: reduce){.screen-in,.screen-out{animation-duration:.01s}}\n .live-dot{animation:livePulse 2.6s ease-in-out infinite}\n @keyframes livePulse{0%,100%{opacity:.45}50%{opacity:1}}\n @media (prefers-reduced-motion: reduce){.live-dot{animation:none}}\n .corner-add{transition:filter .15s}\n .corner-add:hover{filter:brightness(1.12)}\n .corner-pill{transition:border-color .15s}\n .corner-pill:hover{border-color:rgba(255,255,255,0.26)}\n .corner-logo,.corner-btn{transition:background .15s,color .15s}\n .corner-logo:hover,.corner-btn:hover{background:rgba(255,255,255,0.09)}\n .corner-btn:hover{color:#fff}\n .corner-hint{opacity:0;transition:opacity .18s}\n .corner-pill:has(.corner-logo:hover) + .corner-hint{opacity:1}\n .site-badge{transition:border-color 0.15s,background 0.15s}\n .site-badge:hover{border-color:rgba(255,255,255,0.32)!important;background:rgba(18,18,22,0.9)!important}\n /* The overview sits under the same container and gutters as\n allthingsfungi.co.uk: a 1200px column, 4rem of side padding stepping\n down to 2rem and then 1rem. */\n .atf-section{padding-left:4rem;padding-right:4rem}\n .atf-container{width:100%;max-width:1400px;margin-left:auto;margin-right:auto}\n @media (max-width:991px){.atf-section{padding-left:2rem;padding-right:2rem}}\n @media (max-width:767px){.atf-section{padding-left:1rem;padding-right:1rem}}\n .sheet-body{transition:height .28s cubic-bezier(.2,.7,.3,1)}\n @media (prefers-reduced-motion: reduce){.sheet-body{transition:none}}\n /* A visible track, since the box is short enough that a hidden one\n would leave no sign there is more to read. */\n .rare-note{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.28) transparent}\n .rare-note::-webkit-scrollbar{width:6px}\n .rare-note::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.28);border-radius:3px}\n .obs-strip{scrollbar-width:none}\n .obs-strip::-webkit-scrollbar{height:0}\n ::-webkit-scrollbar{width:5px;height:5px}\n ::-webkit-scrollbar-track{background:transparent}\n ::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.14);border-radius:3px}\n input[type=text]::placeholder{color:rgba(255,255,255,0.5)}\n button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid ").concat(t,";outline-offset:1px}\n .mapboxgl-ctrl-group{background:rgba(12,12,14,0.82)!important;border:1px solid rgba(255,255,255,0.09)!important;backdrop-filter:blur(10px)}\n .mapboxgl-ctrl-group button+button{border-top:1px solid rgba(255,255,255,0.09)!important}\n .mapboxgl-ctrl-group button .mapboxgl-ctrl-icon{filter:invert(1) opacity(0.75)}\n .mapboxgl-ctrl-attrib{background:rgba(12,12,14,0.82)!important}\n .mapboxgl-ctrl-attrib a{color:rgba(255,255,255,0.72)!important}\n ")})}}
1,9529:(e,t,n)=>{Promise.resolve().then(n.bind(n,7855))}}]);
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.