<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">const y=["p","h1","h2","h3","h4","h5","h6","li"];function f(r,t){return r.type===t||typeof r.type=="object"&amp;&amp;r.type.tag===t||r.tag===t}function u(r){return f(r,"text")||f(r,Symbol.for("v-txt"))}function l(r){var t;return Array.isArray(r.children)||typeof r.children=="string"?r.children:typeof((t=r.children)==null?void 0:t.default)=="function"?r.children.default():[]}function n(r){if(!r)return"";if(Array.isArray(r))return r.map(n).join("");if(u(r))return r.children||r.value||"";const t=l(r);return Array.isArray(t)?t.map(n).filter(Boolean).join(""):""}function h(r,t=[]){if(Array.isArray(r))return r.flatMap(e=&gt;h(e,t));let i=r;return t.some(e=&gt;e==="*"||f(r,e))&amp;&amp;(i=l(r)||r,!Array.isArray(i)&amp;&amp;y.some(e=&gt;f(r,e))&amp;&amp;(i=[i])),i}function p(r,t=[]){return r=Array.isArray(r)?r:[r],t.length?r.flatMap(i=&gt;p(h(i,[t[0]]),t.slice(1))).filter(i=&gt;!(u(i)&amp;&amp;n(i).trim()==="")):r}function a(r,t=[]){return typeof t=="string"&amp;&amp;(t=t.split(/[,\s]/).map(i=&gt;i.trim()).filter(Boolean)),t.length?p(r,t).reduce((i,e)=&gt;(u(e)?typeof i[i.length-1]=="string"?i[i.length-1]+=e.children:i.push(e.children):i.push(e),i),[]):r}export{a as f};
</pre></body></html>