!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).webVitals=e.webVitals||{})}(this,(function(e){"use strict";var t=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},n=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},i=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},a=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},r="function"==typeof WeakSet?new WeakSet:new Set,o=function(e,t,n){var i;return function(){t.value>=0&&(n||r.has(t)||"hidden"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},u=-1,s=function(){i((function(e){var t=e.timeStamp;u=t}),!0)},c=function(){return u<0&&((u=self.webVitals.firstHiddenTime)===1/0&&s(),a((function(){setTimeout((function(){u="hidden"===document.visibilityState?0:1/0,s()}),0)}))),{get timeStamp(){return u}}};e.getCLS=function(e,r){var u,s=t("CLS",0),c=function(e){e.hadRecentInput||(s.value+=e.value,s.entries.push(e),u())},f=n("layout-shift",c);f&&(u=o(e,s,r),i((function(){f.takeRecords().map(c),u()})),a((function(){s=t("CLS",0),u=o(e,s,r)})))},e.getFCP=function(e,i){var u,s=c(),f=t("FCP"),d=function(e){"first-contentful-paint"===e.name&&(l&&l.disconnect(),e.startTime