1const w=[[1,"<strong>","</strong>"],[2,"<em>","</em>"],[4,"<s>","</s>"],[8,"<u>","</u>"],[16,"<code>","</code>"],[32,"<sub>","</sub>"],[64,"<sup>","</sup>"]];function f(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function u(t){return f(t)}function y(t){const e=t.trim().toLowerCase();return!e.startsWith("javascript:")&&!e.startsWith("data:")}function T(t){const e=t.format??0;let s=f(t.text??"");for(const[a,o,c]of w)e&a&&(s=`${o}${s}${c}`);return s}function n(t){return t!=null&&t.length?t.map(p).join(""):""}function p(t){var e,s,a,o,c;if(!t||typeof t!="object")return"";switch(t.type){case"text":return T(t);case"linebreak":return"<br>";case"link":{const r=(e=t.fields)==null?void 0:e.url,i=n(t.children);if(typeof r!="string"||!y(r))return i;const g=(s=t.fields)==null?void 0:s.newTab,$=(a=t.fields)==null?void 0:a.button,b=(o=t.fields)==null?void 0:o.download,l=(c=t.fields)==null?void 0:c.downloadFilename,m=g?' target="_blank" rel="noopener noreferrer"':"",d=$?' class="btn btn-outline-dark-1"':"",h=b?typeof l=="string"&&l?` download="${u(l)}"`:" download":"";return`<a href="${u(r)}"${d}${m}${h}>${i}</a>`}case"paragraph":{const r=n(t.children);return r?`<p>${r}</p>`:""}case"heading":{const r=typeof t.tag=="string"&&/^h[1-6]$/.test(t.tag)?t.tag:"h2";return`<${r}>${n(t.children)}</${r}>`}case"quote":return`<blockquote>${n(t.children)}</blockquote>`;case"list":{const r=t.listType==="number"?"ol":"ul";return`<${r}>${n(t.children)}</${r}>`}case"listitem":return`<li>${n(t.children)}</li>`;case"root":return n(t.children);default:return n(t.children)}}function k(t){if(!t||typeof t!="object")return"";const e=t.root;return e?p(e):""}export{k as l};
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.