import{Wt as e}from"./630ba094.L_X-5TXi.js";import{xO as t}from"./6ec9a0fa.rdcQt2v8.js";var o=function(e){return e.Loading="loading",e.Usable="usable",e.Complete="complete",e}({});function n({stage:o,id:n}){if("undefined"==typeof window)return;const{client:s}=t(),a=s.unstable_legacyNavigationPerformance;e(()=>{"usable"===o?a?.usable():"complete"===o?a?.finish():a?.mark(o,n)},[a,o,n])}var s=class extends Error{constructor(...e){super(...e),this.name="SkeletonNotRemovedError"}};function a(o){const{observability:n}=t();e(()=>{let e=document.body.classList.contains("Loading");if(!e)return;const t=setTimeout(()=>{e=document.body.classList.contains("Loading"),e&&n.error(new s("The skeleton is still in the DOM after 10 seconds."),{metadata:{skeleton:{page:o,visibilityState:document.visibilityState}}})},1e4);return()=>clearTimeout(t)},[n,o])}export{a as n,n as r,o as t};