import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{i as t}from"./framework-D_rUT4EX.js";var n=e(t(),1),r=`data-vinext-streamed-icon`;function i(e,t){let n=e.getAttribute(r),i=`${t}:`;if(!n?.startsWith(i))return null;let a=Number(n.slice(i.length));return Number.isInteger(a)&&a>=0?a:null}function a(e){document.querySelectorAll(`body link[${r}]`).forEach(e=>document.head.appendChild(e));let t=[...document.querySelectorAll(`head link[${r}]`)],n=new Map;for(let r of t){let t=i(r,e);if(t===null){r.remove();continue}let a=n.get(t);a&&a.remove(),n.set(t,r)}for(let[,e]of[...n].sort(([e],[t])=>e-t))document.head.appendChild(e)}function o({metadataKey:e}){return(0,n.useLayoutEffect)(()=>a(e),[e]),null}export{o as StreamedIconsInsertion,a as reconcileStreamedIcons};