1import{j as e}from"./react-vendor-eUQHqTr8.js";import{c as s,T as o}from"./index-Wm-ehMmj.js";import{T as c}from"./Tooltip-QJmVpwZI.js";const m={Resident:"Res",Migrant:"Mi","Passage migrant":"Mi",Visitor:"Vis","Non-breeding visitor":"Vis",Vagrant:"Vagr","Former resident":"Ex",Introduced:"Intr"};function f(n){if(!n)return"";const i=m[n];if(i)return i;const t=String(n).toLowerCase();return t.includes("former resident")?"Ex":t.includes("introduced")?"Intr":t.includes("vagrant")?"Vagr":t.includes("non-breeding visitor")||t.includes("visitor")?"Vis":t.includes("passage migrant")||t.includes("migrant")?"Mi":t.includes("resident")?"Res":String(n).slice(0,4)}function u(n){return String(n).split(/\s+and\s+/i).map(i=>i.trim()).filter(Boolean)}function h(n,i){if(n!=null&&n.length)return n.flatMap(r=>{if(r&&typeof r=="object"){const a=u(r.short_name||"");if(a.length<=1){const l=r.extra_short_name||f(r.short_name||"");return[{abbrev:l,label:r.short_name||l,definition:r.definition||null}]}return a.map(l=>({abbrev:f(l),label:l,definition:null}))}return u(String(r)).map(a=>({abbrev:f(a),label:a,definition:null}))}).filter(r=>r.abbrev);const t=f(i);return t?[{abbrev:t,label:i||t,definition:null}]:[]}function d(n){return n==="Res"?o.sage:n==="Mi"?o.amber:n==="Vis"?o.sky:n==="Vagr"?o.coral:o.textDim}function v({item:n}){return e.jsx(c,{content:e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontFamily:s,fontWeight:700,color:d(n.abbrev),marginBottom:n.definition?4:0},children:n.label}),n.definition&&e.jsx("div",{style:{color:o.textDim},children:n.definition})]}),children:e.jsx("span",{style:{fontFamily:s,fontSize:14,fontWeight:600,color:d(n.abbrev),textDecorationLine:"underline",textDecorationStyle:"dotted",textUnderlineOffset:"2px"},children:n.abbrev})})}function M(n,i){const t=n!=null&&n.length?Math.max(...n):0;return t>0?i==="ind/yr"?t<.01?"<0.01":t<1?t.toFixed(2):t.toFixed(1):t<.1?"<0.1%":`${t.toFixed(1)}%`:null}export{v as S,M as f,h as g,d as s};
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.