(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"4.2.860"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a2f39d13-e46e-41ab-bbe9-aa30fb33e9fd",e._sentryDebugIdIdentifier="sentry-dbid-a2f39d13-e46e-41ab-bbe9-aa30fb33e9fd")})()}catch{}var d,l,P,y,s=function(e,n){return{name:e,value:n===void 0?-1:n,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},b=function(e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(e==="first-input"&&!("PerformanceEventTiming"in self))return;var i=new PerformanceObserver(function(r){return r.getEntries().map(n)});return i.observe({type:e,buffered:!0}),i}}catch{}},h=function(e,n){var i=function r(t){t.type!=="pagehide"&&document.visibilityState!=="hidden"||(e(t),n&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",i,!0),addEventListener("pagehide",i,!0)},g=function(e){addEventListener("pageshow",function(n){n.persisted&&e(n)},!0)},m=function(e,n,i){var r;return function(t){n.value>=0&&(t||i)&&(n.delta=n.value-(r||0),(n.delta||r===void 0)&&(r=n.value,e(n)))}},v=-1,S=function(){return document.visibilityState==="hidden"?0:1/0},L=function(){h(function(e){var n=e.timeStamp;v=n},!0)},w=function(){return v<0&&(v=S(),L(),g(function(){setTimeout(function(){v=S(),L()},0)})),{get firstHiddenTime(){return v}}},A=function(e,n){var i,r=w(),t=s("FCP"),o=function(f){f.name==="first-contentful-paint"&&(u&&u.disconnect(),f.startTime<r.firstHiddenTime&&(t.value=f.startTime,t.entries.push(f),i(!0)))},a=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],u=a?null:b("paint",o);(a||u)&&(i=m(e,t,n),a&&o(a),g(function(f){t=s("FCP"),i=m(e,t,n),requestAnimationFrame(function(){requestAnimationFrame(function(){t.value=performance.now()-f.timeStamp,i(!0)})})}))},F=!1,T=-1,q=function(e,n){F||(A(function(c){T=c.value}),F=!0);var i,r=function(c){T>-1&&e(c)},t=s("CLS",0),o=0,a=[],u=function(c){if(!c.hadRecentInput){var k=a[0],R=a[a.length-1];o&&c.startTime-R.startTime<1e3&&c.startTime-k.startTime<5e3?(o+=c.value,a.push(c)):(o=c.value,a=[c]),o>t.value&&(t.value=o,t.entries=a,i())}},f=b("layout-shift",u);f&&(i=m(r,t,n),h(function(){f.takeRecords().map(u),i(!0)}),g(function(){o=0,T=-1,t=s("CLS",0),i=m(r,t,n)}))},p={passive:!0,capture:!0},B=new Date,D=function(e,n){d||(d=n,l=e,P=new Date,I(removeEventListener),C())},C=function(){if(l>=0&&l<P-B){var e={entryType:"first-input",name:d.type,target:d.target,cancelable:d.cancelable,startTime:d.timeStamp,processingStart:d.timeStamp+l};y.forEach(function(n){n(e)}),y=[]}},_=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(i,r){var t=function(){D(i,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",t,p),removeEventListener("pointercancel",o,p)};addEventListener("pointerup",t,p),addEventListener("pointercancel",o,p)}(n,e):D(n,e)}},I=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(n){return e(n,_,p)})},H=function(e,n){var i,r=w(),t=s("FID"),o=function(u){u.startTime<r.firstHiddenTime&&(t.value=u.processingStart-u.startTime,t.entries.push(u),i(!0))},a=b("first-input",o);i=m(e,t,n),a&&h(function(){a.takeRecords().map(o),a.disconnect()},!0),a&&g(function(){var u;t=s("FID"),i=m(e,t,n),y=[],l=-1,d=null,I(addEventListener),u=o,y.push(u),C()})},E={},N=function(e,n){var i,r=w(),t=s("LCP"),o=function(f){var c=f.startTime;c<r.firstHiddenTime&&(t.value=c,t.entries.push(f),i())},a=b("largest-contentful-paint",o);if(a){i=m(e,t,n);var u=function(){E[t.id]||(a.takeRecords().map(o),a.disconnect(),E[t.id]=!0,i(!0))};["keydown","click"].forEach(function(f){addEventListener(f,u,{once:!0,capture:!0})}),h(u,!0),g(function(f){t=s("LCP"),i=m(e,t,n),requestAnimationFrame(function(){requestAnimationFrame(function(){t.value=performance.now()-f.timeStamp,E[t.id]=!0,i(!0)})})})}},M=function(e){var n,i=s("TTFB");n=function(){try{var r=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,o={entryType:"navigation",startTime:0};for(var a in t)a!=="navigationStart"&&a!=="toJSON"&&(o[a]=Math.max(t[a]-t.navigationStart,0));return o}();if(i.value=i.delta=r.responseStart,i.value<0||i.value>performance.now())return;i.entries=[r],e(i)}catch{}},document.readyState==="complete"?setTimeout(n,0):addEventListener("load",function(){return setTimeout(n,0)})};export{q as getCLS,A as getFCP,H as getFID,N as getLCP,M as getTTFB};
//# sourceMappingURL=web-vitals-Du4E0njc.js.map
