1var $=Object.defineProperty;var j=(t,e,i)=>e in t?$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var h=(t,e,i)=>j(t,typeof e!="symbol"?e+"":e,i);let O=-1;const f=t=>{addEventListener("pageshow",e=>{e.persisted&&(O=e.timeStamp,t(e))},!0)},d=(t,e,i,n)=>{let r,s;return a=>{e.value>=0&&(a||n)&&(s=e.value-(r??0),(s||r===void 0)&&(r=e.value,e.delta=s,e.rating=((o,c)=>o>c[1]?"poor":o>c[0]?"needs-improvement":"good")(e.value,i),t(e)))}},P=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},w=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},v=()=>{var t;return((t=w())==null?void 0:t.activationStart)??0},u=(t,e=-1)=>{const i=w();let n="navigate";return O>=0?n="back-forward-cache":i&&(document.prerendering||v()>0?n="prerender":document.wasDiscarded?n="restore":i.type&&(n=i.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},M=new WeakMap;function I(t,e){let i=M.get(e);return i||(i=new WeakMap,M.set(e,i)),i.get(t)||i.set(t,new e),i.get(t)}class z{constructor(){h(this,"t");h(this,"i",0);h(this,"o",[])}h(e){var r;if(e.hadRecentInput)return;const i=this.o[0],n=this.o.at(-1);this.i&&i&&n&&e.startTime-n.startTime<1e3&&e.startTime-i.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),(r=this.t)==null||r.call(this,e)}}const g=(t,e,i={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const n=new PerformanceObserver(r=>{queueMicrotask(()=>{e(r.getEntries())})});return n.observe({type:t,buffered:!0,...i}),n}}catch{}},A=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let m=-1;const W=new Set,k=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,b=t=>{if(document.visibilityState==="hidden"){if(t.type==="visibilitychange")for(const e of W)e();isFinite(m)||(m=t.type==="visibilitychange"?t.timeStamp:0,removeEventListener("prerenderingchange",b,!0))}},y=()=>{var t;if(m<0){const e=v();m=(document.prerendering||(t=globalThis.performance.getEntriesByType("visibility-state").find(n=>n.name==="hidden"&&n.startTime>=e))==null?void 0:t.startTime)??k(),addEventListener("visibilitychange",b,!0),addEventListener("prerenderingchange",b,!0),f(()=>{setTimeout(()=>{m=k()})})}return{get firstHiddenTime(){return m},onHidden(e){W.add(e)}}},C=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},F=[1800,3e3],G=(t,e={})=>{C(()=>{const i=y();let n,r=u("FCP");const s=g("paint",a=>{for(const o of a)o.name==="first-contentful-paint"&&(s.disconnect(),o.startTime<i.firstHiddenTime&&(r.value=Math.max(o.startTime-v(),0),r.entries.push(o),n(!0)))});s&&(n=d(t,r,F,e.reportAllChanges),f(a=>{r=u("FCP"),n=d(t,r,F,e.reportAllChanges),P(()=>{r.value=performance.now()-a.timeStamp,n(!0)})}))})},B=[.1,.25],X=(t,e={})=>{const i=y();G(A(()=>{let n,r=u("CLS",0);const s=I(e,z),a=c=>{for(const l of c)s.h(l);s.i>r.value&&(r.value=s.i,r.entries=s.o,n())},o=g("layout-shift",a);o&&(n=d(t,r,B,e.reportAllChanges),i.onHidden(()=>{a(o.takeRecords()),n(!0)}),f(()=>{s.i=0,r=u("CLS",0),n=d(t,r,B,e.reportAllChanges),P(n)}),setTimeout(n))}))};let D=0,L=1/0,T=0;const J=t=>{for(const e of t)e.interactionId&&(L=Math.min(L,e.interactionId),T=Math.max(T,e.interactionId),D=T?(T-L)/7+1:0)};let S;const H=()=>S?D:performance.interactionCount??0,K=()=>{"interactionCount"in performance||S||(S=g("event",J,{durationThreshold:0}))};let x=0;class Q{constructor(){h(this,"l",[]);h(this,"u",new Map);h(this,"m");h(this,"p")}v(){x=H(),this.l.length=0,this.u.clear()}T(){const e=Math.min(this.l.length-1,Math.floor((H()-x)/50));return this.l[e]}h(e){var r,s;if((r=this.m)==null||r.call(this,e),!e.interactionId&&e.entryType!=="first-input")return;const i=this.l.at(-1);let n=this.u.get(e.interactionId);if(n||this.l.length<10||e.duration>i.L){if(n?e.duration>n.L?(n.entries=[e],n.L=e.duration):e.duration===n.L&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],L:e.duration},this.u.set(n.id,n),this.l.push(n)),this.l.sort((a,o)=>o.L-a.L),this.l.length>10){const a=this.l.splice(10);for(const o of a)this.u.delete(o.id)}(s=this.p)==null||s.call(this,n)}}}const _=t=>{const e=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")t();else{const n=A(t);let r=-1;const s=()=>{i(r),n()};addEventListener("visibilitychange",s,{once:!0,capture:!0}),r=e(()=>{removeEventListener("visibilitychange",s,{capture:!0}),n()})}},q=[200,500],Y=(t,e={})=>
1{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const i=y();C(()=>{K();let n,r=u("INP");const s=I(e,Q),a=c=>{_(()=>{for(const p of c)s.h(p);const l=s.T();l&&l.L!==r.value&&(r.value=l.L,r.entries=l.entries,n())})},o=g("event",a,{durationThreshold:e.durationThreshold??40});n=d(t,r,q,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),i.onHidden(()=>{a(o.takeRecords()),n(!0)}),f(()=>{s.v(),r=u("INP"),n=d(t,r,q,e.reportAllChanges)}))})};class U{constructor(){h(this,"m")}h(e){var i;(i=this.m)==null||i.call(this,e)}}const N=[2500,4e3],Z=(t,e={})=>{C(()=>{const i=y();let n,r=u("LCP");const s=I(e,U),a=c=>{e.reportAllChanges||(c=c.slice(-1));for(const l of c)s.h(l),l.startTime<i.firstHiddenTime&&(r.value=Math.max(l.startTime-v(),0),r.entries=[l],n())},o=g("largest-contentful-paint",a);if(o){n=d(t,r,N,e.reportAllChanges);const c=A(()=>{a(o.takeRecords()),o.disconnect(),n(!0)}),l=p=>{p.isTrusted&&(_(c),removeEventListener(p.type,l,{capture:!0}))};for(const p of["keydown","click","visibilitychange"])addEventListener(p,l,{capture:!0});f(p=>{r=u("LCP"),n=d(t,r,N,e.reportAllChanges),P(()=>{r.value=performance.now()-p.timeStamp,n(!0)})})}})},R=[800,1800],E=t=>{document.prerendering?C(()=>E(t)):document.readyState!=="complete"?addEventListener("load",()=>E(t),!0):setTimeout(t)},ee=(t,e={})=>{let i=u("TTFB"),n=d(t,i,R,e.reportAllChanges);E(()=>{const r=w();r&&(i.value=Math.max(r.responseStart-v(),0),i.entries=[r],n(!0),f(()=>{i=u("TTFB",0),n=d(t,i,R,e.reportAllChanges),n(!0)}))})};export{B as CLSThresholds,F as FCPThresholds,q as INPThresholds,N as LCPThresholds,R as TTFBThresholds,X as onCLS,G as onFCP,Y as onINP,Z as onLCP,ee as onTTFB};
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.