1import{a as e,o as t}from"./directory-BrtYj2ag.js";function n(){return e.all().filter(e=>e.indexState===`public_indexable`&&!e.sample)}function r(e){switch(e.type){case`artist`:return`Artist`;case`person`:return`Industry person`;case`organization`:return e.subtypeLabel;case`collection`:return`Collection`;case`opportunity`:return e.opportunityType}}function i(e){let t=Date.parse(e);return Number.isNaN(t)?1/0:Math.floor((Date.now()-t)/864e5)}function a(e=24){return n().slice().sort((e,t)=>t.updatedISO.localeCompare(e.updatedISO)).slice(0,e).map(e=>({...t(e),updatedISO:e.updatedISO,reason:`${r(e)} · record updated ${l(e.updatedISO)}`}))}function o(r){let i=t(r).href,a=e.collections().filter(e=>e.indexState===`public_indexable`&&!e.sample).filter(e=>e.members.some(e=>e.href===i)).length,o=new Set(n().map(e=>t(e).href)),s=r.related.filter(e=>o.has(e.href)).length;return a*2+s}function s(e=18){return n().map(e=>({record:e,score:o(e)})).filter(e=>e.score>0).sort((e,t)=>t.score-e.score||e.record.name.localeCompare(t.record.name)).slice(0,e).map(({record:e,score:n})=>({...t(e),updatedISO:e.updatedISO,reason:`${r(e)} · referenced ${n} ${n===1?`time`:`times`} elsewhere in the map`}))}function c(e=24){return n().filter(e=>i(e.reviewedISO)<=90).sort((e,t)=>t.reviewedISO.localeCompare(e.reviewedISO)).slice(0,e).map(e=>({...t(e),updatedISO:e.reviewedISO,reason:`${r(e)} · checked ${l(e.reviewedISO)}`}))}function l(e){let t=Date.parse(e);return Number.isNaN(t)?`recently`:new Date(t).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`})}function u(){let e=n();return e.length===0?null:e.reduce((e,t)=>t.updatedISO>e?t.updatedISO:e,e[0].updatedISO)}function d(t=6){return e.opportunities().filter(e=>!e.sample&&e.indexState===`public_indexable`&&e.status!==`expired`).sort((e,t)=>(e.deadlineISO??`9999`).localeCompare(t.deadlineISO??`9999`)).slice(0,t)}var f=[`/updates`,`/latest`,`/trending`,`/verified`];function p(e){switch(e){case`/updates`:case`/latest`:return a(6).length>=6;case`/trending`:return s(6).length>=6;case`/verified`:return c(6).length>=6}}function m(){let e=u();return e?f.filter(p).map(t=>({path:t,lastmod:e})):[]}export{a,c,u as i,p as n,s as o,l as r,d as s,m as t};
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.