1var v,y,U,L,D,V=-1,m=function(t){addEventListener("pageshow",function(n){n.persisted&&(V=n.timeStamp,t(n))},!0)},M=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},S=function(){var t=M();return t&&t.activationStart||0},f=function(t,n){var r=M(),i="navigate";return V>=0?i="back-forward-cache":r&&(document.prerendering||S()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:t,value:n===void 0?-1:n,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},g=function(t,n,r){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var i=new PerformanceObserver(function(e){Promise.resolve().then(function(){n(e.getEntries())})});return i.observe(Object.assign({type:t,buffered:!0},r||{})),i}}catch{}},d=function(t,n,r,i){var e,a;return function(c){n.value>=0&&(c||i)&&((a=n.value-(e||0))||e===void 0)&&(e=n.value,n.delta=a,n.rating=function(u,o){return u>o[1]?"poor":u>o[0]?"needs-improvement":"good"}(n.value,r),t(n))}},k=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},P=function(t){var n=function(r){r.type!=="pagehide"&&document.visibilityState!=="hidden"||t(r)};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},B=function(t){var n=!1;return function(r){n||(t(r),n=!0)}},h=-1,R=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},w=function(t){document.visibilityState==="hidden"&&h>-1&&(h=t.type==="visibilitychange"?t.timeStamp:0,nn())},H=function(){addEventListener("visibilitychange",w,!0),addEventListener("prerenderingchange",w,!0)},nn=function(){removeEventListener("visibilitychange",w,!0),removeEventListener("prerenderingchange",w,!0)},x=function(){return h<0&&(h=R(),H(),m(function(){setTimeout(function(){h=R(),H()},0)})),{get firstHiddenTime(){return h}}},E=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},O=[1800,3e3],tn=function(t,n){n=n||{},E(function(){var r,i=x(),e=f("FCP"),a=g("paint",function(c){c.forEach(function(u){u.name==="first-contentful-paint"&&(a.disconnect(),u.startTime<i.firstHiddenTime&&(e.value=Math.max(u.startTime-S(),0),e.entries.push(u),r(!0)))})});a&&(r=d(t,e,O,n.reportAllChanges),m(function(c){e=f("FCP"),r=d(t,e,O,n.reportAllChanges),k(function(){e.value=performance.now()-c.timeStamp,r(!0)})}))})},q=[.1,.25],un=function(t,n){n=n||{},tn(B(function(){var r,i=f("CLS",0),e=0,a=[],c=function(o){o.forEach(function(s){if(!s.hadRecentInput){var p=a[0],b=a[a.length-1];e&&s.startTime-b.startTime<1e3&&s.startTime-p.startTime<5e3?(e+=s.value,a.push(s)):(e=s.value,a=[s])}}),e>i.value&&(i.value=e,i.entries=a,r())},u=g("layout-shift",c);u&&(r=d(t,i,q,n.reportAllChanges),P(function(){c(u.takeRecords()),r(!0)}),m(function(){e=0,i=f("CLS",0),r=d(t,i,q,n.reportAllChanges),k(function(){return r()})}),setTimeout(r,0))}))},T={passive:!0,capture:!0},en=new Date,j=function(t,n){v||(v=n,y=t,U=new Date,X(removeEventListener),W())},W=function(){if(y>=0&&y<U-en){var t={entryType:"first-input",name:v.type,target:v.target,cancelable:v.cancelable,startTime:v.timeStamp,processingStart:v.timeStamp+y};L.forEach(function(n){n(t)}),L=[]}},rn=function(t){if(t.cancelable){var n=(t.timeStamp>
11e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(r,i){var e=function(){j(r,i),c()},a=function(){c()},c=function(){removeEventListener("pointerup",e,T),removeEventListener("pointercancel",a,T)};addEventListener("pointerup",e,T),addEventListener("pointercancel",a,T)}(n,t):j(n,t)}},X=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(n){return t(n,rn,T)})},_=[100,300],sn=function(t,n){n=n||{},E(function(){var r,i=x(),e=f("FID"),a=function(o){o.startTime<i.firstHiddenTime&&(e.value=o.processingStart-o.startTime,e.entries.push(o),r(!0))},c=function(o){o.forEach(a)},u=g("first-input",c);r=d(t,e,_,n.reportAllChanges),u&&P(B(function(){c(u.takeRecords()),u.disconnect()})),u&&m(function(){var o;e=f("FID"),r=d(t,e,_,n.reportAllChanges),L=[],y=-1,v=null,X(addEventListener),o=a,L.push(o),W()})})},Y=0,I=1/0,C=0,an=function(t){t.forEach(function(n){n.interactionId&&(I=Math.min(I,n.interactionId),C=Math.max(C,n.interactionId),Y=C?(C-I)/7+1:0)})},Z=function(){return D?Y:performance.interactionCount||0},on=function(){"interactionCount"in performance||D||(D=g("event",an,{type:"event",buffered:!0,durationThreshold:0}))},z=[200,500],$=0,G=function(){return Z()-$},l=[],F={},J=function(t){var n=l[l.length-1],r=F[t.interactionId];if(r||l.length<10||t.duration>n.latency){if(r)r.entries.push(t),r.latency=Math.max(r.latency,t.duration);else{var i={id:t.interactionId,latency:t.duration,entries:[t]};F[i.id]=i,l.push(i)}l.sort(function(e,a){return a.latency-e.latency}),l.splice(10).forEach(function(e){delete F[e.id]})}},fn=function(t,n){n=n||{},E(function(){var r;on();var i,e=f("INP"),a=function(u){u.forEach(function(p){p.interactionId&&J(p),p.entryType==="first-input"&&!l.some(function(b){return b.entries.some(function(N){return p.duration===N.duration&&p.startTime===N.startTime})})&&J(p)});var o,s=(o=Math.min(l.length-1,Math.floor(G()/50)),l[o]);s&&s.latency!==e.value&&(e.value=s.latency,e.entries=s.entries,i())},c=g("event",a,{durationThreshold:(r=n.durationThreshold)!==null&&r!==void 0?r:40});i=d(t,e,z,n.reportAllChanges),c&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&c.observe({type:"first-input",buffered:!0}),P(function(){a(c.takeRecords()),e.value<0&&G()>0&&(e.value=0,e.entries=[]),i(!0)}),m(function(){l=[],$=Z(),e=f("INP"),i=d(t,e,z,n.reportAllChanges)}))})},K=[2500,4e3],A={},dn=function(t,n){n=n||{},E(function(){var r,i=x(),e=f("LCP"),a=function(o){var s=o[o.length-1];s&&s.startTime<i.firstHiddenTime&&(e.value=Math.max(s.startTime-S(),0),e.entries=[s],r())},c=g("largest-contentful-paint",a);if(c){r=d(t,e,K,n.reportAllChanges);var u=B(function(){A[e.id]||(a(c.takeRecords()),c.disconnect(),A[e.id]=!0,r(!0))});["keydown","click"].forEach(function(o){addEventListener(o,function(){return setTimeout(u,0)},!0)}),P(u),m(function(o){e=f("LCP"),r=d(t,e,K,n.reportAllChanges),k(function(){e.value=performance.now()-o.timeStamp,A[e.id]=!0,r(!0)})})}})},Q=[800,1800],cn=function t(n){document.prerendering?E(function(){return t(n)}):document.readyState!=="complete"?addEventListener("load",function(){return t(n)},!0):setTimeout(n,0)},ln=function(t,n){n=n||{};var r=f("TTFB"),i=d(t,r,Q,n.reportAllChanges);cn(function(){var e=M();if(e){var a=e.responseStart;if(a<=0||a>performance.now())return;r.value=Math.max(a-S(),0),r.entries=[e],i(!0),m(function(){r=f("TTFB",0),(i=d(t,r,Q,n.reportAllChanges))(!0)})}})};export{q as CLSThresholds,O as FCPThresholds,_ as FIDThresholds,z as INPThresholds,K as LCPThresholds,Q as TTFBThresholds,un as getCLS,tn as getFCP,sn as getFID,fn as getINP,dn as getLCP,ln as getTTFB,un as onCLS,tn as onFCP,sn as onFID,fn as onINP,dn as onLCP,ln 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.