import{ft as e,gt as t}from"../../index.js";var n=t(e(),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};