🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

web-vitals

Package Overview
Dependencies
Maintainers
3
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-vitals - npm Package Compare versions

Comparing version
5.3.0
to
6.0.0
+1
dist/modules/attribution/index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/attribution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAE5C,cAAc,aAAa,CAAC"}
{"version":3,"file":"onCLS.js","sourceRoot":"","sources":["../../../src/attribution/onCLS.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,KAAK,IAAI,iBAAiB,EAAC,MAAM,aAAa,CAAC;AAQvD,MAAM,0BAA0B,GAAG,CAAC,OA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,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAChD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAChD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAChD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAChD,OAAO,EAAC,MAAM,EAAE,cAAc,EAAC,MAAM,aAAa,CAAC;AAEnD,cAAc,YAAY,CAAC"}
{"version":3,"file":"bfcache.js","sourceRoot":"","sources":["../../../src/lib/bfcache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,IAAI,kBAAkB,GAAG,CAAC,CAAC,CAAC;AAE5B,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE,CAAC,kBAAkB,CAAC;AAE9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAA4B,EAAE,EAAE;IAC/D,gBAAgB,CACd,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;QACR,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACpB,kBAAkB,GAAG,KAAK,CAAC,SAAS,CAAC;YACrC,EAAE,CAAC,KAAK,CAAC,CAAC;QACZ,CAAC;IACH,CAAC,EACD,IAAI,CACL,CAAC;AACJ,CAAC,CAAC"}
{"version":3,"file":"bindReporter.js","sourceRoot":"","sources":["../../../src/lib/bindReporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,SAAS,GAAG,CAChB,KAAa,EACb,UAAkC,EACZ,EAAE;IACxB,IAAI,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1B,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,QAAmE,EACnE,MAA+C,EAC/C,UAAkC,EAClC,gBAA0B,EAC1B,EAAE;IACF,IAAI,SAAiB,CAAC;IACtB,IAAI,KAAa,CAAC;IAClB,OAAO,CAAC,WAAqB,EAAE,EAAE;QAC/B,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;YACtB,IAAI,WAAW,IAAI,gBAAgB,EAAE,CAAC;gBACpC,KAAK,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC;gBAExC,kEAAkE;gBAClE,sEAAsE;gBACtE,sCAAsC;gBACtC,4DAA4D;gBAC5D,IAAI,KAAK,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;oBACrC,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;oBACzB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;oBACrB,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;oBACpD,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
{"version":3,"file":"doubleRAF.js","sourceRoot":"","sources":["../../../src/lib/doubleRAF.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAiB,EAAE,EAAE;IAC7C,qBAAqB,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC"}
export declare class FCPEntryManager {
_softNavigationEntryMap?: Map<number, PerformanceSoftNavigation>;
}
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class FCPEntryManager {
_softNavigationEntryMap;
}
//# sourceMappingURL=FCPEntryManager.js.map
{"version":3,"file":"FCPEntryManager.js","sourceRoot":"","sources":["../../../src/lib/FCPEntryManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,OAAO,eAAe;IAC1B,uBAAuB,CAA0C;CAClE"}
{"version":3,"file":"generateUniqueID.js","sourceRoot":"","sources":["../../../src/lib/generateUniqueID.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,OAAO,MAAM,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC;AAC7E,CAAC,CAAC"}
{"version":3,"file":"getActivationStart.js","sourceRoot":"","sources":["../../../src/lib/getActivationStart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAE3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAW,EAAE;IAC7C,OAAO,kBAAkB,EAAE,EAAE,eAAe,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC"}
{"version":3,"file":"getLoadState.js","sourceRoot":"","sources":["../../../src/lib/getLoadState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAG3D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAa,EAAE;IAC3D,IAAI,QAAQ,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACtC,yEAAyE;QACzE,6DAA6D;QAC7D,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,YAAY,GAAG,kBAAkB,EAAE,CAAC;IAC1C,IAAI,YAAY,EAAE,CAAC;QACjB,IAAI,SAAS,GAAG,YAAY,CAAC,cAAc,EAAE,CAAC;YAC5C,OAAO,SAAS,CAAC;QACnB,CAAC;aAAM,IACL,YAAY,CAAC,0BAA0B,KAAK,CAAC;YAC7C,SAAS,GAAG,YAAY,CAAC,0BAA0B,EACnD,CAAC;YACD,iEAAiE;YACjE,0DAA0D;YAC1D,OAAO,iBAAiB,CAAC;QAC3B,CAAC;aAAM,IACL,YAAY,CAAC,WAAW,KAAK,CAAC;YAC9B,SAAS,GAAG,YAAY,CAAC,WAAW,EACpC,CAAC;YACD,kDAAkD;YAClD,0DAA0D;YAC1D,OAAO,oBAAoB,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,sEAAsE;IACtE,uEAAuE;IACvE,sDAAsD;IACtD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC"}
{"version":3,"file":"getNavigationEntry.js","sourceRoot":"","sources":["../../../src/lib/getNavigationEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAuC,EAAE;IACzE,MAAM,eAAe,GAAG,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtE,qEAAqE;IACrE,6DAA6D;IAC7D,oEAAoE;IACpE,wEAAwE;IACxE,0DAA0D;IAC1D,0DAA0D;IAC1D,0DAA0D;IAC1D,IACE,eAAe;QACf,eAAe,CAAC,aAAa,GAAG,CAAC;QACjC,eAAe,CAAC,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE,EACjD,CAAC;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;AACH,CAAC,CAAC"}
{"version":3,"file":"getSelector.js","sourceRoot":"","sources":["../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DAAsD;QACtD,IAAI,KAAK,CAAC,cAAc;YAAE,OAAO;QAEjC,MAAM,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAErD,oEAAoE;QACpE,gEAAgE;QAChE,mEAAmE;QACnE,WAAW;QACX,IACE,IAAI,CAAC,aAAa;YAClB,iBAAiB;YACjB,gBAAgB;YAChB,KAAK,CAAC,SAAS,GAAG,gBAAgB,CAAC,SAAS,GAAG,IAAI;YACnD,KAAK,CAAC,SAAS,GAAG,iBAAiB,CAAC,SAAS,GAAG,IAAI,EACpD,CAAC;YACD,IAAI,CAAC,aAAa,IAAI,KAAK,CAAC,KAAK,CAAC;YAClC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC;YACjC,IAAI,CAAC,eAAe,GAAG,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,CAAC,iCAAiC,EAAE,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;CACF"}
{"version":3,"file":"LCPEntryManager.js","sourceRoot":"","sources":["../../../src/lib/LCPEntryManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,OAAO,eAAe;IAC1B,wBAAwB,CAA2C;IACnE,uBAAuB,CAA0C;IAEjE,aAAa,CAAC,KAA6B;QACzC,IAAI,CAAC,wBAAwB,EAAE,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF"}
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../../../src/lib/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAeH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,KAAU,EACV,QAAk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,CAAC;KACM,CAAC,CAAC;AAChC,CAAC,CAAC"}
{"version":3,"file":"runOnce.js","sourceRoot":"","sources":["../../../src/lib/runOnce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAc,EAAE,EAAE;IACxC,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,EAAE,EAAE,CAAC;YACL,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
import type { ReportOpts } from '../types.js';
export declare const checkSoftNavsEnabled: (opts?: ReportOpts) => boolean | undefined;
export declare const storeSoftNavEntry: (map: Map<number, PerformanceSoftNavigation>, entry: PerformanceSoftNavigation) => void;
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const checkSoftNavsEnabled = (opts) => {
return (PerformanceObserver.supportedEntryTypes.includes('soft-navigation') &&
// Older implementations expose the value as an attribute rather than the
// method. We only support the newer method as that was what was launched
// to stable unflagged.
typeof globalThis.PerformanceSoftNavigation?.prototype
?.getLargestInteractionContentfulPaint === 'function' &&
opts &&
opts.reportSoftNavs);
};
// Stores a soft navigation entry keyed by its navigationId, keeping only
// the 2 most recent entries so the map cannot grow unbounded.
export const storeSoftNavEntry = (map, entry) => {
map.set(entry.navigationId, entry);
// Clean up older entries to prevent memory leaks, keeping only
// the 2 most recent entries.
if (map.size > 2) {
const firstKey = map.keys().next().value;
if (firstKey !== undefined) {
map.delete(firstKey);
}
}
};
//# sourceMappingURL=softNavs.js.map
{"version":3,"file":"softNavs.js","sourceRoot":"","sources":["../../../src/lib/softNavs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAiB,EAAE,EAAE;IACxD,OAAO,CACL,mBAAmB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACnE,yEAAyE;QACzE,yEAAyE;QACzE,uBAAuB;QACvB,OAAO,UAAU,CAAC,yBAAyB,EAAE,SAAS;YACpD,EAAE,oCAAoC,KAAK,UAAU;QACvD,IAAI;QACJ,IAAI,CAAC,cAAc,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,yEAAyE;AACzE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,GAA2C,EAC3C,KAAgC,EAChC,EAAE;IACF,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAa,EAAE,KAAK,CAAC,CAAC;IAEpC,+DAA+D;IAC/D,6BAA6B;IAC7B,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;QACzC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
{"version":3,"file":"whenActivated.js","sourceRoot":"","sources":["../../../src/lib/whenActivated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAoB,EAAE,EAAE;IACpD,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;QAC1B,gBAAgB,CAAC,oBAAoB,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,QA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;oBAClE,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;wBACxB,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;4BACvB,MAAM,GAAG,UAAU,CACjB,MAAM,EACN,CAAC,EACD,iBAAiB,EACjB,KAAK,CAAC,YAAY,EAClB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,SAAS,CAChB,CAAC;4BACF,MAAM,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;4BACzB,MAAM,GAAG,YAAY,CACnB,QAAQ,EACR,MAAM,EACN,cAAc,EACd,IAAI,CAAC,gBAAgB,CACtB,CAAC;4BACF,MAAM,CAAC,IAAI,CAAC,CAAC;wBACf,CAAC;oBACH,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC;gBACF,OAAO,CAAC,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,iBAAiB,CAAC;AAEhC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/types/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
{"version":3,"file":"cls.js","sourceRoot":"","sources":["../../../src/types/cls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
{"version":3,"file":"fcp.js","sourceRoot":"","sources":["../../../src/types/fcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
{"version":3,"file":"inp.js","sourceRoot":"","sources":["../../../src/types/inp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
{"version":3,"file":"lcp.js","sourceRoot":"","sources":["../../../src/types/lcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
{"version":3,"file":"ttfb.js","sourceRoot":"","sources":["../../../src/types/ttfb.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class FCPEntryManager {
_softNavigationEntryMap?: Map<number, PerformanceSoftNavigation>;
}
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {ReportOpts} from '../types.js';
export const checkSoftNavsEnabled = (opts?: ReportOpts) => {
return (
PerformanceObserver.supportedEntryTypes.includes('soft-navigation') &&
// Older implementations expose the value as an attribute rather than the
// method. We only support the newer method as that was what was launched
// to stable unflagged.
typeof globalThis.PerformanceSoftNavigation?.prototype
?.getLargestInteractionContentfulPaint === 'function' &&
opts &&
opts.reportSoftNavs
);
};
// Stores a soft navigation entry keyed by its navigationId, keeping only
// the 2 most recent entries so the map cannot grow unbounded.
export const storeSoftNavEntry = (
map: Map<number, PerformanceSoftNavigation>,
entry: PerformanceSoftNavigation,
) => {
map.set(entry.navigationId!, entry);
// Clean up older entries to prevent memory leaks, keeping only
// the 2 most recent entries.
if (map.size > 2) {
const firstKey = map.keys().next().value;
if (firstKey !== undefined) {
map.delete(firstKey);
}
}
};
+1
-0

@@ -27,1 +27,2 @@ /*

export * from '../types.js';
//# sourceMappingURL=index.js.map
+1
-1

@@ -1,2 +0,2 @@

import { CLSMetricWithAttribution, AttributionReportOpts } from '../types.js';
import type { CLSMetricWithAttribution, AttributionReportOpts } from '../types.js';
/**

@@ -3,0 +3,0 @@ * Calculates the [CLS](https://web.dev/articles/cls) value for the current page and

@@ -92,1 +92,2 @@ /*

};
//# sourceMappingURL=onCLS.js.map

@@ -1,8 +0,2 @@

import { FCPMetricWithAttribution, AttributionReportOpts } from '../types.js';
/**
* Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and
* calls the `callback` function once the value is ready, along with the
* relevant `paint` performance entry used to determine the value. The reported
* value is a `DOMHighResTimeStamp`.
*/
import type { FCPMetricWithAttribution, AttributionReportOpts } from '../types.js';
export declare const onFCP: (onReport: (metric: FCPMetricWithAttribution) => void, opts?: AttributionReportOpts) => void;

@@ -19,36 +19,57 @@ /*

import { getNavigationEntry } from '../lib/getNavigationEntry.js';
import { initUnique } from '../lib/initUnique.js';
import { FCPEntryManager } from '../lib/FCPEntryManager.js';
import { checkSoftNavsEnabled } from '../lib/softNavs.js';
import { onFCP as unattributedOnFCP } from '../onFCP.js';
const attributeFCP = (metric) => {
// Use a default object if no other attribution has been set.
let attribution = {
timeToFirstByte: 0,
firstByteToFCP: metric.value,
loadState: getLoadState(getBFCacheRestoreTime()),
export const onFCP = (onReport, opts = {}) => {
opts = Object.assign({}, opts);
// Init the fcpEntryManager (which will already be initialised in the
// unattributed onFCP method if soft navigation reporting is enabled
// and so will return that fcpEntryManager, rather than a new one)
const fcpEntryManager = initUnique(opts, FCPEntryManager);
if (checkSoftNavsEnabled(opts)) {
fcpEntryManager._softNavigationEntryMap = new Map();
}
const attributeFCP = (metric) => {
// Use a default object if no other attribution has been set.
let attribution = {
timeToFirstByte: 0,
firstByteToFCP: metric.value,
loadState: getLoadState(getBFCacheRestoreTime()),
};
if (metric.navigationType !== 'soft-navigation') {
if (metric.entries.length) {
const navigationEntry = getNavigationEntry();
const fcpEntry = metric.entries.at(-1);
if (navigationEntry) {
const responseStart = navigationEntry.responseStart;
const activationStart = navigationEntry.activationStart || 0;
const ttfb = Math.max(0, responseStart - activationStart);
attribution = {
timeToFirstByte: ttfb,
firstByteToFCP: metric.value - ttfb,
loadState: getLoadState(metric.entries[0].startTime),
navigationEntry,
fcpEntry,
};
}
}
}
else {
// Lookup the soft navigation entry. Do not use getEntriesByType since
// that is limited to the first 50 navigation entries due to buffer size.
const navigationEntry = fcpEntryManager._softNavigationEntryMap?.get(metric.navigationId);
if (navigationEntry) {
attribution = {
timeToFirstByte: 0,
firstByteToFCP: metric.value,
loadState: 'complete',
navigationEntry,
};
}
}
// Use `Object.assign()` to ensure the original metric object is returned.
const metricWithAttribution = Object.assign(metric, { attribution });
return metricWithAttribution;
};
if (metric.entries.length) {
const navigationEntry = getNavigationEntry();
const fcpEntry = metric.entries.at(-1);
if (navigationEntry) {
const activationStart = navigationEntry.activationStart || 0;
const ttfb = Math.max(0, navigationEntry.responseStart - activationStart);
attribution = {
timeToFirstByte: ttfb,
firstByteToFCP: metric.value - ttfb,
loadState: getLoadState(metric.entries[0].startTime),
navigationEntry,
fcpEntry,
};
}
}
// Use `Object.assign()` to ensure the original metric object is returned.
const metricWithAttribution = Object.assign(metric, { attribution });
return metricWithAttribution;
};
/**
* Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and
* calls the `callback` function once the value is ready, along with the
* relevant `paint` performance entry used to determine the value. The reported
* value is a `DOMHighResTimeStamp`.
*/
export const onFCP = (onReport, opts = {}) => {
unattributedOnFCP((metric) => {

@@ -58,1 +79,2 @@ onReport(attributeFCP(metric));

};
//# sourceMappingURL=onFCP.js.map

@@ -1,2 +0,2 @@

import { INPAttributionReportOpts, INPMetricWithAttribution } from '../types.js';
import type { INPAttributionReportOpts, INPMetricWithAttribution } from '../types.js';
/**

@@ -19,3 +19,3 @@ * Calculates the [INP](https://web.dev/articles/inp) value for the current

* be passed to control whether the `processedEventEntries` array in the
* attribution object is populated. The default value is `true`.
* attribution object is populated. The default value is `false`.
*

@@ -22,0 +22,0 @@ * If the `reportAllChanges` configuration option is set to `true`, the

@@ -19,3 +19,3 @@ /*

import { initUnique } from '../lib/initUnique.js';
import { InteractionManager } from '../lib/InteractionManager.js';
import { InteractionManager, } from '../lib/InteractionManager.js';
import { observe } from '../lib/observe.js';

@@ -49,3 +49,3 @@ import { whenIdleOrHidden } from '../lib/whenIdleOrHidden.js';

* be passed to control whether the `processedEventEntries` array in the
* attribution object is populated. The default value is `true`.
* attribution object is populated. The default value is `false`.
*

@@ -142,3 +142,3 @@ * If the `reportAllChanges` configuration option is set to `true`, the

// the user explicitly requests them (default is to include).
if (opts.includeProcessedEventEntries !== false) {
if (opts.includeProcessedEventEntries) {
group.entries.push(entry);

@@ -158,3 +158,3 @@ }

// the user explicitly requests them (default is to include).
entries: opts.includeProcessedEventEntries !== false ? [entry] : [],
entries: opts.includeProcessedEventEntries ? [entry] : [],
};

@@ -231,7 +231,11 @@ pendingEntriesGroups.push(group);

const attributeLoAFDetails = (attribution) => {
// If there is no LoAF data then nothing further to attribute
if (!attribution.longAnimationFrameEntries?.length) {
const interactionTime = attribution.interactionTime;
const nextPaintTime = attribution.nextPaintTime;
// If there is no LoAF data, interactionTime or paintTime
// then nothing further to attribute here.
if (!attribution.longAnimationFrameEntries?.length ||
!interactionTime ||
!nextPaintTime) {
return;
}
const interactionTime = attribution.interactionTime;
const inputDelay = attribution.inputDelay;

@@ -292,3 +296,3 @@ const processingDuration = attribution.processingDuration;

if (lastLoAFEndTime >= interactionTime + inputDelay + processingDuration) {
totalPaintDuration = attribution.nextPaintTime - lastLoAFEndTime;
totalPaintDuration = nextPaintTime - lastLoAFEndTime;
}

@@ -306,3 +310,3 @@ if (longestScriptEntry && longestScriptSubpart) {

attribution.totalUnattributedDuration =
attribution.nextPaintTime -
nextPaintTime -
interactionTime -

@@ -314,5 +318,23 @@ totalScriptDuration -

const attributeINP = (metric) => {
// Soft navs and bfcache can have a dummy INP as no first-input entry to
// fall back on so we report dummy values when the interactionCount has
// gone up, even if no entry was emitted.
// See https://github.com/GoogleChrome/web-vitals/issues/724
// All other INPs should have at least one entry, but we'll do same dummy
// processing if they don't for some reason.
if (metric.entries.length === 0) {
const navStartTime = metric.navigationStartTime || 0;
const attribution = {
processedEventEntries: [],
longAnimationFrameEntries: [],
inputDelay: 0,
processingDuration: 0,
presentationDelay: metric.value,
loadState: getLoadState(navStartTime),
};
return Object.assign(metric, { attribution });
}
const firstEntry = metric.entries[0];
const group = entryToEntriesGroupMap.get(firstEntry);
const processingStart = firstEntry.processingStart;
const processingStart = group.processingStart;
// Due to the fact that durations can be rounded down to the nearest 8ms,

@@ -361,3 +383,3 @@ // we have to clamp `nextPaintTime` so it doesn't appear to occur before

// Start observing LoAF entries for attribution.
observe('long-animation-frame', handleLoAFEntries);
observe(['long-animation-frame'], handleLoAFEntries, opts);
unattributedOnINP((metric) => {

@@ -367,1 +389,2 @@ onReport(attributeINP(metric));

};
//# sourceMappingURL=onINP.js.map

@@ -1,2 +0,2 @@

import { LCPMetricWithAttribution, AttributionReportOpts } from '../types.js';
import type { LCPMetricWithAttribution, AttributionReportOpts } from '../types.js';
/**

@@ -3,0 +3,0 @@ * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and

@@ -20,2 +20,3 @@ /*

import { LCPEntryManager } from '../lib/LCPEntryManager.js';
import { checkSoftNavsEnabled } from '../lib/softNavs.js';
import { onLCP as unattributedOnLCP } from '../onLCP.js';

@@ -41,2 +42,5 @@ /**

const lcpTargetMap = new WeakMap();
if (checkSoftNavsEnabled(opts)) {
lcpEntryManager._softNavigationEntryMap = new Map();
}
lcpEntryManager._onBeforeProcessingEntry = (entry) => {

@@ -80,6 +84,20 @@ const node = entry.element;

// Safari seems to fail to find a navigation entry.
const navigationEntry = getNavigationEntry();
let navigationEntry;
let activationStart = 0;
let responseStart = 0;
if (metric.navigationType !== 'soft-navigation') {
navigationEntry = getNavigationEntry();
activationStart = navigationEntry?.activationStart ?? 0;
responseStart = navigationEntry?.responseStart ?? 0;
}
else {
// Set activationStart to the navigation start time
activationStart = metric.navigationStartTime || 0;
// Lookup the soft navigation entry. Do not use getEntriesByType since
// that is limited to the first 50 navigation entries due to buffer
// size.
navigationEntry = lcpEntryManager._softNavigationEntryMap?.get(metric.navigationId);
}
if (navigationEntry) {
const activationStart = navigationEntry.activationStart || 0;
const ttfb = Math.max(0, navigationEntry.responseStart - activationStart);
const ttfb = Math.max(0, responseStart - activationStart);
const lcpRequestStart = Math.max(ttfb,

@@ -113,1 +131,2 @@ // Prefer `requestStart` (if TOA is set), otherwise use `startTime`.

};
//# sourceMappingURL=onLCP.js.map

@@ -1,2 +0,2 @@

import { TTFBMetricWithAttribution, AttributionReportOpts } from '../types.js';
import type { TTFBMetricWithAttribution, AttributionReportOpts } from '../types.js';
/**

@@ -3,0 +3,0 @@ * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the

@@ -18,2 +18,3 @@ /*

const attributeTTFB = (metric) => {
const navigationEntry = metric.entries[0];
// Use a default object if no other attribution has been set.

@@ -26,28 +27,33 @@ let attribution = {

requestDuration: 0,
// There should only be one instance per TTFB metric
navigationEntry: navigationEntry,
};
if (metric.entries.length) {
const navigationEntry = metric.entries[0];
const activationStart = navigationEntry.activationStart || 0;
// Measure from workerStart or fetchStart so any service worker startup
// time is included in cacheDuration (which also includes other sw time
// anyway, that cannot be accurately split out cross-browser).
const waitEnd = Math.max((navigationEntry.workerStart || navigationEntry.fetchStart) -
activationStart, 0);
const dnsStart = Math.max(navigationEntry.domainLookupStart - activationStart, 0);
const connectStart = Math.max(navigationEntry.connectStart - activationStart, 0);
const connectEnd = Math.max(navigationEntry.connectEnd - activationStart, 0);
attribution = {
waitingDuration: waitEnd,
cacheDuration: dnsStart - waitEnd,
// dnsEnd usually equals connectStart but use connectStart over dnsEnd
// for dnsDuration in case there ever is a gap.
dnsDuration: connectStart - dnsStart,
connectionDuration: connectEnd - connectStart,
// There is often a gap between connectEnd and requestStart. Attribute
// that to requestDuration so connectionDuration remains 0 for
// service worker controlled requests were connectStart and connectEnd
// are the same.
requestDuration: metric.value - connectEnd,
navigationEntry: navigationEntry,
};
// If it's the hard nav, then can give attribution.
// Otherwise it's 0 so the defaults are fine.
if (navigationEntry instanceof PerformanceNavigationTiming) {
const activationStart = navigationEntry.activationStart || 0;
// Measure from workerStart or fetchStart so any service worker startup
// time is included in cacheDuration (which also includes other sw time
// anyway, that cannot be accurately split out cross-browser).
const waitEnd = Math.max((navigationEntry.workerStart || navigationEntry.fetchStart || 0) -
activationStart, 0);
const dnsStart = Math.max(navigationEntry.domainLookupStart - activationStart, 0);
const connectStart = Math.max(navigationEntry.connectStart - activationStart, 0);
const connectEnd = Math.max(navigationEntry.connectEnd - activationStart, 0);
attribution = {
waitingDuration: waitEnd,
cacheDuration: dnsStart - waitEnd,
// dnsEnd usually equals connectStart but use connectStart over dnsEnd
// for dnsDuration in case there ever is a gap.
dnsDuration: connectStart - dnsStart,
connectionDuration: connectEnd - connectStart,
// There is often a gap between connectEnd and requestStart. Attribute
// that to requestDuration so connectionDuration remains 0 for
// service worker controlled requests were connectStart and connectEnd
// are the same.
requestDuration: metric.value - connectEnd,
navigationEntry: navigationEntry,
};
}
}

@@ -78,1 +84,2 @@ // Use `Object.assign()` to ensure the original metric object is returned.

};
//# sourceMappingURL=onTTFB.js.map

@@ -22,1 +22,2 @@ /*

export * from './types.js';
//# sourceMappingURL=index.js.map

@@ -26,1 +26,2 @@ /*

};
//# sourceMappingURL=bfcache.js.map

@@ -1,2 +0,2 @@

import { MetricType, MetricRatingThresholds } from '../types.js';
import type { MetricType, MetricRatingThresholds } from '../types.js';
export declare const bindReporter: <MetricName extends MetricType["name"]>(callback: (metric: Extract<MetricType, {

@@ -3,0 +3,0 @@ name: MetricName;

@@ -46,1 +46,2 @@ /*

};
//# sourceMappingURL=bindReporter.js.map

@@ -19,1 +19,2 @@ /*

};
//# sourceMappingURL=doubleRAF.js.map

@@ -22,3 +22,4 @@ /*

export const generateUniqueID = () => {
return `v5-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;
return `v6-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;
};
//# sourceMappingURL=generateUniqueID.js.map

@@ -20,1 +20,2 @@ /*

};
//# sourceMappingURL=getActivationStart.js.map

@@ -1,2 +0,2 @@

import { LoadState } from '../types.js';
import type { LoadState } from '../types.js';
export declare const getLoadState: (timestamp: number) => LoadState;

@@ -23,9 +23,9 @@ /*

}
const navigationEntry = getNavigationEntry();
if (navigationEntry) {
if (timestamp < navigationEntry.domInteractive) {
const hardNavEntry = getNavigationEntry();
if (hardNavEntry) {
if (timestamp < hardNavEntry.domInteractive) {
return 'loading';
}
if (navigationEntry.domContentLoadedEventStart === 0 ||
timestamp < navigationEntry.domContentLoadedEventStart) {
else if (hardNavEntry.domContentLoadedEventStart === 0 ||
timestamp < hardNavEntry.domContentLoadedEventStart) {
// If the `domContentLoadedEventStart` timestamp has not yet been

@@ -35,4 +35,4 @@ // set, or if the given timestamp is less than that value.

}
if (navigationEntry.domComplete === 0 ||
timestamp < navigationEntry.domComplete) {
else if (hardNavEntry.domComplete === 0 ||
timestamp < hardNavEntry.domComplete) {
// If the `domComplete` timestamp has not yet been

@@ -48,1 +48,2 @@ // set, or if the given timestamp is less than that value.

};
//# sourceMappingURL=getLoadState.js.map

@@ -31,1 +31,2 @@ /*

};
//# sourceMappingURL=getNavigationEntry.js.map

@@ -30,3 +30,3 @@ /*

? '#' + el.id
: [getName(el), ...Array.from(el.classList).sort()].join('.');
: [getName(el), ...Array.from(el.classList ?? []).sort()].join('.');
if (sel.length + part.length > MAX_LEN - 1) {

@@ -47,1 +47,2 @@ return sel || part;

};
//# sourceMappingURL=getSelector.js.map

@@ -1,4 +0,4 @@

export declare const getVisibilityWatcher: () => {
export declare const getVisibilityWatcher: (reset?: boolean) => {
readonly firstHiddenTime: number;
onHidden(cb: () => void): void;
};

@@ -56,3 +56,6 @@ /*

};
export const getVisibilityWatcher = () => {
export const getVisibilityWatcher = (reset = false) => {
if (reset) {
firstHiddenTime = Infinity;
}
if (firstHiddenTime < 0) {

@@ -102,1 +105,2 @@ // Check if we have a previous hidden `visibility-state` performance entry.

};
//# sourceMappingURL=getVisibilityWatcher.js.map

@@ -1,3 +0,3 @@

import { MetricType } from '../types.js';
export declare const initMetric: <MetricName extends MetricType["name"]>(name: MetricName, value?: number) => {
import type { MetricType } from '../types.js';
export declare const initMetric: <MetricName extends MetricType["name"]>(name: MetricName, value?: number, navigationType?: MetricType["navigationType"], navigationId?: number, navigationInteractionId?: number, navigationURL?: string, navigationStartTime?: number) => {
name: MetricName;

@@ -19,3 +19,7 @@ value: number;

id: string;
navigationType: "navigate" | "reload" | "back-forward" | "back-forward-cache" | "prerender" | "restore";
navigationType: "navigate" | "reload" | "back-forward" | "back-forward-cache" | "prerender" | "restore" | "soft-navigation";
navigationId: number;
navigationInteractionId: number | undefined;
navigationURL: string | undefined;
navigationStartTime: number;
};

@@ -20,17 +20,22 @@ /*

import { getNavigationEntry } from './getNavigationEntry.js';
export const initMetric = (name, value = -1) => {
const navEntry = getNavigationEntry();
let navigationType = 'navigate';
if (getBFCacheRestoreTime() >= 0) {
navigationType = 'back-forward-cache';
export const initMetric = (name, value = -1, navigationType, navigationId = 0, navigationInteractionId, navigationURL, navigationStartTime) => {
const hardNavEntry = getNavigationEntry();
const hardNavId = hardNavEntry?.navigationId || 0;
let _navigationType = 'navigate';
if (navigationType) {
// If it was passed in, then use that
_navigationType = navigationType;
}
else if (navEntry) {
else if (getBFCacheRestoreTime() >= 0) {
_navigationType = 'back-forward-cache';
}
else if (hardNavEntry) {
if (document.prerendering || getActivationStart() > 0) {
navigationType = 'prerender';
_navigationType = 'prerender';
}
else if (document.wasDiscarded) {
navigationType = 'restore';
_navigationType = 'restore';
}
else if (navEntry.type) {
navigationType = navEntry.type.replace(/_/g, '-');
else if (hardNavEntry.type) {
_navigationType = hardNavEntry.type.replace(/_/g, '-');
}

@@ -47,4 +52,9 @@ }

id: generateUniqueID(),
navigationType,
navigationType: _navigationType,
navigationId: navigationId || hardNavId,
navigationInteractionId: navigationInteractionId,
navigationURL: navigationURL || hardNavEntry?.name,
navigationStartTime: navigationStartTime || 0,
};
};
//# sourceMappingURL=initMetric.js.map

@@ -33,1 +33,2 @@ /*

}
//# sourceMappingURL=initUnique.js.map

@@ -0,1 +1,2 @@

import type { Metric } from '../types.js';
export interface Interaction {

@@ -25,3 +26,3 @@ _latency: number;

*/
_estimateP98LongestInteraction(): Interaction;
_estimateP98LongestInteraction(navigationType: Metric['navigationType']): Interaction;
/**

@@ -28,0 +29,0 @@ * Takes a performance entry and adds it to the list of worst interactions

@@ -53,4 +53,20 @@ /*

*/
_estimateP98LongestInteraction() {
const candidateInteractionIndex = Math.min(this._longestInteractionList.length - 1, Math.floor(getInteractionCountForNavigation() / 50));
_estimateP98LongestInteraction(navigationType) {
const interactionCountForNavigation = getInteractionCountForNavigation();
const candidateInteractionIndex = Math.min(this._longestInteractionList.length - 1, Math.floor(interactionCountForNavigation / 50));
// If we have a non-zero interactionCountForNavigation but no
// candidateInteractionIndex, then it's below the 16ms limit
// so report a dummy 8ms interaction. This is only needed for
// soft-navs and bfcache restores as `first-input` handles the
// rest.
if (interactionCountForNavigation &&
candidateInteractionIndex === -1 &&
(navigationType === 'soft-navigation' ||
navigationType === 'back-forward-cache')) {
return {
_latency: 8,
id: -1,
entries: [],
};
}
return this._longestInteractionList[candidateInteractionIndex];

@@ -113,1 +129,2 @@ }

}
//# sourceMappingURL=InteractionManager.js.map

@@ -45,1 +45,2 @@ /*

}
//# sourceMappingURL=LayoutShiftManager.js.map
export declare class LCPEntryManager {
_onBeforeProcessingEntry?: (entry: LargestContentfulPaint) => void;
_softNavigationEntryMap?: Map<number, PerformanceSoftNavigation>;
_processEntry(entry: LargestContentfulPaint): void;
}

@@ -18,2 +18,3 @@ /*

_onBeforeProcessingEntry;
_softNavigationEntryMap;
_processEntry(entry) {

@@ -23,1 +24,2 @@ this._onBeforeProcessingEntry?.(entry);

}
//# sourceMappingURL=LCPEntryManager.js.map
interface PerformanceEntryMap {
'event': PerformanceEventTiming[];
'first-input': PerformanceEventTiming[];
'interaction-contentful-paint': InteractionContentfulPaint[];
'layout-shift': LayoutShift[];

@@ -10,2 +11,3 @@ 'largest-contentful-paint': LargestContentfulPaint[];

'resource': PerformanceResourceTiming[];
'soft-navigation': PerformanceSoftNavigation[];
}

@@ -20,3 +22,3 @@ /**

*/
export declare const observe: <K extends keyof PerformanceEntryMap>(type: K, callback: (entries: PerformanceEntryMap[K]) => void, opts?: PerformanceObserverInit) => PerformanceObserver | undefined;
export declare const observe: <K extends keyof PerformanceEntryMap>(types: K[], callback: (entries: Array<PerformanceEntryMap[K][number]>) => void, opts?: PerformanceObserverInit) => PerformanceObserver | undefined;
export {};

@@ -24,5 +24,6 @@ /*

*/
export const observe = (type, callback, opts = {}) => {
export const observe = (types, callback, opts = {}) => {
try {
if (PerformanceObserver.supportedEntryTypes.includes(type)) {
const supportedTypes = types.filter((t) => PerformanceObserver.supportedEntryTypes.includes(t));
if (supportedTypes.length > 0) {
const po = new PerformanceObserver((list) => {

@@ -33,6 +34,20 @@ // Delay by a microtask to workaround a bug in Safari where the

queueMicrotask(() => {
callback(list.getEntries());
const entries = list.getEntries();
// When observing more than one entry type, entries from different
// types can be delivered out of order, so sort by end time
// (startTime + duration) to ensure they're in the right order.
// See: https://github.com/w3c/performance-timeline/issues/224
if (supportedTypes.length > 1) {
entries.sort((a, b) => {
const scoreA = a.startTime + a.duration;
const scoreB = b.startTime + b.duration;
return scoreA - scoreB;
});
}
callback(entries);
});
});
po.observe({ type, buffered: true, ...opts });
for (const t of supportedTypes) {
po.observe({ type: t, buffered: true, ...opts });
}
return po;

@@ -46,1 +61,2 @@ }

};
//# sourceMappingURL=observe.js.map

@@ -45,5 +45,6 @@ /*

return;
po = observe('event', updateEstimate, {
po = observe(['event'], updateEstimate, {
durationThreshold: 0,
});
};
//# sourceMappingURL=interactionCountPolyfill.js.map

@@ -25,1 +25,2 @@ /*

};
//# sourceMappingURL=runOnce.js.map

@@ -24,1 +24,2 @@ /*

};
//# sourceMappingURL=whenActivated.js.map

@@ -22,2 +22,6 @@ /*

export const whenIdleOrHidden = (cb) => {
// Cap the requestIdleCallback to 1 sec for very busy apps
// https://github.com/GoogleChrome/web-vitals/issues/754
// If not using rIC, then the setTimeout timeout should be 0
const timeout = 'requestIdleCallback' in globalThis ? 1000 : 0;
const rIC = globalThis.requestIdleCallback || setTimeout;

@@ -41,4 +45,5 @@ const cIC = globalThis.cancelIdleCallback || clearTimeout;

wrappedCb();
});
}, { timeout: timeout });
}
};
//# sourceMappingURL=whenIdleOrHidden.js.map

@@ -1,2 +0,2 @@

import { CLSMetric, MetricRatingThresholds, ReportOpts } from './types.js';
import type { CLSMetric, MetricRatingThresholds, ReportOpts } from './types.js';
/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */

@@ -3,0 +3,0 @@ export declare const CLSThresholds: MetricRatingThresholds;

@@ -16,5 +16,6 @@ /*

*/
import { onBFCacheRestore } from './lib/bfcache.js';
import { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';
import { bindReporter } from './lib/bindReporter.js';
import { doubleRAF } from './lib/doubleRAF.js';
import { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';
import { initMetric } from './lib/initMetric.js';

@@ -24,5 +25,5 @@ import { initUnique } from './lib/initUnique.js';

import { observe } from './lib/observe.js';
import { checkSoftNavsEnabled } from './lib/softNavs.js';
import { runOnce } from './lib/runOnce.js';
import { onFCP } from './onFCP.js';
import { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';
/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */

@@ -59,6 +60,8 @@ export const CLSThresholds = [0.1, 0.25];

const layoutShiftManager = initUnique(opts, LayoutShiftManager);
const handleEntries = (entries) => {
for (const entry of entries) {
layoutShiftManager._processEntry(entry);
}
const initNewCLSMetric = (navigationType, navigationId, navigationInteractionId, navigationURL, navigationStartTime) => {
metric = initMetric('CLS', 0, navigationType, navigationId, navigationInteractionId, navigationURL, navigationStartTime);
layoutShiftManager._sessionValue = 0;
report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);
};
const updateAndReportMetric = (forceReport = false) => {
// If the current session value is larger than the current CLS value,

@@ -69,6 +72,24 @@ // update CLS and the entries contributing to it.

metric.entries = layoutShiftManager._sessionEntries;
report();
}
report(forceReport);
};
const po = observe('layout-shift', handleEntries);
const handleSoftNavEntry = (entry) => {
updateAndReportMetric(true);
initNewCLSMetric('soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);
};
const handleEntries = (entries) => {
for (const entry of entries) {
if (entry.entryType === 'soft-navigation') {
handleSoftNavEntry(entry);
continue;
}
layoutShiftManager._processEntry(entry);
}
updateAndReportMetric();
};
const types = ['layout-shift'];
if (checkSoftNavsEnabled(opts)) {
types.push('soft-navigation');
}
const po = observe(types, handleEntries);
if (po) {

@@ -83,5 +104,3 @@ report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);

onBFCacheRestore(() => {
layoutShiftManager._sessionValue = 0;
metric = initMetric('CLS', 0);
report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);
initNewCLSMetric('back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());
doubleRAF(report);

@@ -96,1 +115,2 @@ });

};
//# sourceMappingURL=onCLS.js.map

@@ -1,2 +0,2 @@

import { FCPMetric, MetricRatingThresholds, ReportOpts } from './types.js';
import type { FCPMetric, MetricRatingThresholds, ReportOpts } from './types.js';
/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */

@@ -3,0 +3,0 @@ export declare const FCPThresholds: MetricRatingThresholds;

@@ -16,4 +16,4 @@ /*

*/
import { onBFCacheRestore } from './lib/bfcache.js';
import { bindReporter } from './lib/bindReporter.js';
import { checkSoftNavsEnabled, storeSoftNavEntry } from './lib/softNavs.js';
import { doubleRAF } from './lib/doubleRAF.js';

@@ -23,3 +23,6 @@ import { getActivationStart } from './lib/getActivationStart.js';

import { initMetric } from './lib/initMetric.js';
import { initUnique } from './lib/initUnique.js';
import { FCPEntryManager } from './lib/FCPEntryManager.js';
import { observe } from './lib/observe.js';
import { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';
import { whenActivated } from './lib/whenActivated.js';

@@ -35,3 +38,8 @@ /** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */

export const onFCP = (onReport, opts = {}) => {
const softNavsEnabled = checkSoftNavsEnabled(opts);
whenActivated(() => {
// Create a new FCP entry manager for each page activation
// This allows us to track soft navigations separately
// needed when attribution is enabled.
const fcpEntryManager = initUnique(opts, FCPEntryManager);
const visibilityWatcher = getVisibilityWatcher();

@@ -44,3 +52,3 @@ let metric = initMetric('FCP');

po.disconnect();
// Only report if the page wasn't hidden prior to the first paint.
// Only report if the page wasn't hidden prior to FCP.
if (entry.startTime < visibilityWatcher.firstHiddenTime) {

@@ -53,2 +61,4 @@ // The activationStart reference is used because FCP should be

metric.entries.push(entry);
metric.navigationId = entry.navigationId || metric.navigationId;
// FCP should only be reported once so can report right away
report(true);

@@ -59,3 +69,3 @@ }

};
const po = observe('paint', handleEntries);
const po = observe(['paint'], handleEntries);
if (po) {

@@ -66,3 +76,3 @@ report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);

onBFCacheRestore((event) => {
metric = initMetric('FCP');
metric = initMetric('FCP', -1, 'back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());
report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);

@@ -75,3 +85,26 @@ doubleRAF(() => {

}
if (softNavsEnabled) {
// As first-contentful-paint is only reported once, we can handle soft
// navigations afterwards on their own for simplicity, as no need to
// observe both and sort the entries like for the other metrics
const handleSoftNavEntries = (entries) => {
entries.forEach((entry) => {
// Store the soft navigation entries in the entry manager so that
// they can be retrieved for attribution if necessary. This code
// is only used when attribution is enabled which sets the
// _softNavigationEntryMap.
if (fcpEntryManager._softNavigationEntryMap && entry.navigationId) {
storeSoftNavEntry(fcpEntryManager._softNavigationEntryMap, entry);
}
// Clamp FCP at 0. It should never be less, but better safe than sorry.
const FCPTime = Math.max((entry.presentationTime || entry.paintTime || 0) - entry.startTime, 0);
metric = initMetric('FCP', FCPTime, 'soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);
report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);
report(true);
});
};
observe(['soft-navigation'], handleSoftNavEntries, opts);
}
});
};
//# sourceMappingURL=onFCP.js.map

@@ -1,2 +0,2 @@

import { INPMetric, MetricRatingThresholds, INPReportOpts } from './types.js';
import type { INPMetric, MetricRatingThresholds, INPReportOpts } from './types.js';
/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */

@@ -3,0 +3,0 @@ export declare const INPThresholds: MetricRatingThresholds;

@@ -16,3 +16,3 @@ /*

*/
import { onBFCacheRestore } from './lib/bfcache.js';
import { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';
import { bindReporter } from './lib/bindReporter.js';

@@ -23,2 +23,3 @@ import { initMetric } from './lib/initMetric.js';

import { observe } from './lib/observe.js';
import { checkSoftNavsEnabled } from './lib/softNavs.js';
import { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill.js';

@@ -32,2 +33,8 @@ import { whenActivated } from './lib/whenActivated.js';

// `event` entries via PerformanceObserver.
// Event Timing entries have their durations rounded to the nearest 8ms,
// so a duration of 40ms would be any event that spans 2.5 or more frames
// at 60Hz. This threshold is chosen to strike a balance between usefulness
// and performance. Running this callback for any interaction that spans
// just one or two frames is likely not worth the insight that could be
// gained.
const DEFAULT_DURATION_THRESHOLD = 40;

@@ -76,3 +83,21 @@ /**

const interactionManager = initUnique(opts, InteractionManager);
const handleEntries = (entries) => {
const initNewINPMetric = (navigationType, navigationId, navigationInteractionId, navigationURL, navigationStartTime) => {
interactionManager._resetInteractions();
metric = initMetric('INP', -1, navigationType, navigationId, navigationInteractionId, navigationURL, navigationStartTime);
report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);
};
const updateINPMetric = () => {
const inp = interactionManager._estimateP98LongestInteraction(metric.navigationType);
if (inp && inp._latency !== metric.value) {
metric.value = inp._latency;
metric.entries = inp.entries;
report();
}
};
const handleSoftNavEntry = (entry) => {
updateINPMetric();
report(true);
initNewINPMetric('soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);
};
const handleEntries = (entries, forceReport = false) => {
// Queue the `handleEntries()` callback in the next idle task.

@@ -86,19 +111,20 @@ // This is needed to increase the chances that all event entries that

for (const entry of entries) {
if (entry.entryType === 'soft-navigation') {
handleSoftNavEntry(entry);
continue;
}
interactionManager._processEntry(entry);
}
const inp = interactionManager._estimateP98LongestInteraction();
if (inp && inp._latency !== metric.value) {
metric.value = inp._latency;
metric.entries = inp.entries;
report();
updateINPMetric();
if (forceReport) {
report(true);
}
});
};
const po = observe('event', handleEntries, {
// Event Timing entries have their durations rounded to the nearest 8ms,
// so a duration of 40ms would be any event that spans 2.5 or more frames
// at 60Hz. This threshold is chosen to strike a balance between usefulness
// and performance. Running this callback for any interaction that spans
// just one or two frames is likely not worth the insight that could be
// gained.
const types = ['event', 'first-input'];
if (checkSoftNavsEnabled(opts)) {
types.push('soft-navigation');
}
const po = observe(types, handleEntries, {
...opts,
durationThreshold: opts.durationThreshold ?? DEFAULT_DURATION_THRESHOLD,

@@ -108,8 +134,4 @@ });

if (po) {
// Also observe entries of type `first-input`. This is useful in cases
// where the first interaction is less than the `durationThreshold`.
po.observe({ type: 'first-input', buffered: true });
visibilityWatcher.onHidden(() => {
handleEntries(po.takeRecords());
report(true);
handleEntries(po.takeRecords(), true);
});

@@ -119,5 +141,3 @@ // Only report after a bfcache restore if the `PerformanceObserver`

onBFCacheRestore(() => {
interactionManager._resetInteractions();
metric = initMetric('INP');
report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);
initNewINPMetric('back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());
});

@@ -127,1 +147,2 @@ }

};
//# sourceMappingURL=onINP.js.map

@@ -1,2 +0,2 @@

import { LCPMetric, MetricRatingThresholds, ReportOpts } from './types.js';
import type { LCPMetric, MetricRatingThresholds, ReportOpts } from './types.js';
/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */

@@ -3,0 +3,0 @@ export declare const LCPThresholds: MetricRatingThresholds;

@@ -17,6 +17,7 @@ /*

import { LCPEntryManager } from './lib/LCPEntryManager.js';
import { onBFCacheRestore } from './lib/bfcache.js';
import { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';
import { bindReporter } from './lib/bindReporter.js';
import { doubleRAF } from './lib/doubleRAF.js';
import { getActivationStart } from './lib/getActivationStart.js';
import { checkSoftNavsEnabled, storeSoftNavEntry } from './lib/softNavs.js';
import { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';

@@ -26,3 +27,2 @@ import { initMetric } from './lib/initMetric.js';

import { observe } from './lib/observe.js';
import { runOnce } from './lib/runOnce.js';
import { whenActivated } from './lib/whenActivated.js';

@@ -44,17 +44,54 @@ import { whenIdleOrHidden } from './lib/whenIdleOrHidden.js';

export const onLCP = (onReport, opts = {}) => {
// As InteractionContentfulPaint entries used by soft navs can emit after
// LCP is finalized, we need a flag to know to ignore them.
let isFinalized = false;
const softNavsEnabled = checkSoftNavsEnabled(opts);
whenActivated(() => {
const visibilityWatcher = getVisibilityWatcher();
let visibilityWatcher = getVisibilityWatcher();
let metric = initMetric('LCP');
let report;
const lcpEntryManager = initUnique(opts, LCPEntryManager);
const initNewLCPMetric = (navigation, navigationId, navigationInteractionId, navigationURL, navigationStartTime) => {
metric = initMetric('LCP', -1, navigation, navigationId, navigationInteractionId, navigationURL, navigationStartTime);
report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);
// Reset the finalized flag
isFinalized = false;
// If it's a soft nav, then need to reset the visibilityWatcher
if (navigation === 'soft-navigation') {
visibilityWatcher = getVisibilityWatcher(true);
}
};
const handleSoftNavEntry = (entry) => {
if (lcpEntryManager._softNavigationEntryMap && entry.navigationId) {
storeSoftNavEntry(lcpEntryManager._softNavigationEntryMap, entry);
}
if (!isFinalized)
report(true);
initNewLCPMetric('soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);
// Soft Navs should contain the largest paint until now, so handle that
// as if it just happened, then listen for more.
// It can however be null in rare circumstances
// (see https://github.com/GoogleChrome/web-vitals/issues/725)
const largestInteractionContentfulPaint = entry.getLargestInteractionContentfulPaint?.();
if (largestInteractionContentfulPaint) {
handleEntries([largestInteractionContentfulPaint]);
}
};
const handleEntries = (entries) => {
// If reportAllChanges is set then call this function for each entry,
// otherwise only consider the last one.
if (!opts.reportAllChanges) {
// If reportAllChanges is set or soft navs is enabled then call this
// function for each entry, otherwise only consider the last one.
if (!opts.reportAllChanges && !softNavsEnabled) {
entries = entries.slice(-1);
}
for (const entry of entries) {
lcpEntryManager._processEntry(entry);
// Only report if the page wasn't hidden prior to LCP.
if (entry.startTime < visibilityWatcher.firstHiddenTime) {
if (!entry)
continue;
if (entry.entryType === 'soft-navigation') {
handleSoftNavEntry(entry);
continue;
}
let value = 0;
let metricEntries = [];
let renderTime = entry.startTime;
if (entry.entryType === 'largest-contentful-paint') {
// The startTime attribute returns the value of the renderTime if it is

@@ -66,4 +103,32 @@ // not 0, and the value of the loadTime otherwise. The activationStart

// clamped at 0.
metric.value = Math.max(entry.startTime - getActivationStart(), 0);
metric.entries = [entry];
value = Math.max(entry.startTime - getActivationStart(), 0);
lcpEntryManager._processEntry(entry);
metricEntries = [entry];
}
else if (entry.entryType === 'interaction-contentful-paint') {
const ICPEntry = entry;
// InteractionContentfulPaints should only happen after a
// PerformanceSoftNavigation so the metric should have been set
// with a non-zero navigationId mapping to a soft nav.
if (!metric.navigationId)
continue;
// Ignore interactions not for this soft nav
// (either paints that have bled into this interaction or paints when
// we should have already finalized)
if ('interactionId' in ICPEntry &&
ICPEntry.interactionId != metric.navigationInteractionId) {
continue;
}
renderTime = ICPEntry.largestContentfulPaint?.renderTime || 0;
// Paints should never be less than 0 but add cap just in case
value = Math.max(renderTime - entry.startTime, 0);
if (ICPEntry.largestContentfulPaint) {
lcpEntryManager._processEntry(ICPEntry.largestContentfulPaint);
metricEntries = [ICPEntry.largestContentfulPaint];
}
}
// Only report if the page wasn't hidden prior to LCP.
if (renderTime < visibilityWatcher.firstHiddenTime) {
metric.value = value;
metric.entries = metricEntries;
report();

@@ -73,31 +138,44 @@ }

};
const po = observe('largest-contentful-paint', handleEntries);
const types = ['largest-contentful-paint'];
if (softNavsEnabled) {
types.push('interaction-contentful-paint', 'soft-navigation');
}
const po = observe(types, handleEntries);
if (po) {
report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);
// Ensure this logic only runs once, since it can be triggered from
// any of three different event listeners below.
const stopListening = runOnce(() => {
handleEntries(po.takeRecords());
po.disconnect();
report(true);
});
// Need a separate wrapper to ensure the `runOnce` function above is
// common for all three functions
const stopListeningWrapper = (event) => {
if (event.isTrusted) {
const finalizeEventTypes = ['keydown', 'click', 'visibilitychange'];
const finalizeLCP = (event) => {
if (event.isTrusted && !isFinalized) {
// Wrap the listener in an idle callback so it's run in a separate
// task to reduce potential INP impact.
// https://github.com/GoogleChrome/web-vitals/issues/383
whenIdleOrHidden(stopListening);
removeEventListener(event.type, stopListeningWrapper, {
capture: true,
const metricIdToFinalize = metric.id;
whenIdleOrHidden(() => {
if (!isFinalized) {
if (!softNavsEnabled) {
// Do some clean up since these won't be needed anymore.
po.disconnect();
for (const type of finalizeEventTypes) {
removeEventListener(type, finalizeLCP, { capture: true });
}
}
// As this is in a whenIdleOrHidden check, whether we're still
// on the metric you meant to finalize, and ignore if we've moved
// on in the meantime.
if (metricIdToFinalize === metric.id) {
isFinalized = true;
report(true);
}
}
});
}
};
// Stop listening after input or visibilitychange.
// Finalize the current LCP after input or visibilitychange.
// Although the browser will automatically stop emitting entries in these
// cases, we don't know it's finalized, so we track to allow early report.
// Note: while scrolling is an input that stops LCP observation, it's
// unreliable since it can be programmatically generated.
// See: https://github.com/GoogleChrome/web-vitals/issues/75
for (const type of ['keydown', 'click', 'visibilitychange']) {
addEventListener(type, stopListeningWrapper, {
for (const type of finalizeEventTypes) {
addEventListener(type, finalizeLCP, {
capture: true,

@@ -109,6 +187,7 @@ });

onBFCacheRestore((event) => {
metric = initMetric('LCP');
initNewLCPMetric('back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());
report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);
doubleRAF(() => {
metric.value = performance.now() - event.timeStamp;
isFinalized = true;
report(true);

@@ -120,1 +199,2 @@ });

};
//# sourceMappingURL=onLCP.js.map

@@ -1,2 +0,2 @@

import { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types.js';
import type { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types.js';
/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */

@@ -3,0 +3,0 @@ export declare const TTFBThresholds: MetricRatingThresholds;

@@ -17,6 +17,8 @@ /*

import { bindReporter } from './lib/bindReporter.js';
import { initMetric } from './lib/initMetric.js';
import { onBFCacheRestore } from './lib/bfcache.js';
import { checkSoftNavsEnabled } from './lib/softNavs.js';
import { getNavigationEntry } from './lib/getNavigationEntry.js';
import { getActivationStart } from './lib/getActivationStart.js';
import { initMetric } from './lib/initMetric.js';
import { observe } from './lib/observe.js';
import { getBFCacheRestoreTime, onBFCacheRestore } from './lib/bfcache.js';
import { whenActivated } from './lib/whenActivated.js';

@@ -57,7 +59,9 @@ /** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */

export const onTTFB = (onReport, opts = {}) => {
const softNavsEnabled = checkSoftNavsEnabled(opts);
let metric = initMetric('TTFB');
let report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);
whenReady(() => {
const navigationEntry = getNavigationEntry();
if (navigationEntry) {
const hardNavEntry = getNavigationEntry();
if (hardNavEntry) {
const responseStart = hardNavEntry.responseStart;
// The activationStart reference is used because TTFB should be

@@ -67,4 +71,4 @@ // relative to page activation rather than navigation start if the

// after the first byte is received, this time should be clamped at 0.
metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);
metric.entries = [navigationEntry];
metric.value = Math.max(responseStart - getActivationStart(), 0);
metric.entries = [hardNavEntry];
report(true);

@@ -74,8 +78,23 @@ // Only report TTFB after bfcache restores if a `navigation` entry

onBFCacheRestore(() => {
metric = initMetric('TTFB', 0);
metric = initMetric('TTFB', 0, 'back-forward-cache', metric.navigationId, metric.navigationInteractionId, metric.navigationURL, getBFCacheRestoreTime());
report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);
report(true);
});
// Listen for soft-navigation entries and emit a dummy 0 TTFB entry
if (softNavsEnabled) {
const reportSoftNavTTFBs = (entries) => {
entries.forEach((entry) => {
if (entry.navigationId) {
metric = initMetric('TTFB', 0, 'soft-navigation', entry.navigationId, entry.interactionId, entry.name, entry.startTime);
metric.entries = [entry];
report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);
report(true);
}
});
};
observe(['soft-navigation'], reportSoftNavTTFBs, opts);
}
}
});
};
//# sourceMappingURL=onTTFB.js.map

@@ -8,5 +8,9 @@ export * from './types/base.js';

interface PerformanceEntryMap {
navigation: PerformanceNavigationTiming;
resource: PerformanceResourceTiming;
paint: PerformancePaintTiming;
'event': PerformanceEventTiming;
'interaction-contentful-paint': InteractionContentfulPaint;
'layout-shift': LayoutShift;
'navigation': PerformanceNavigationTiming;
'paint': PerformancePaintTiming;
'resource': PerformanceResourceTiming;
'soft-navigation': PerformanceSoftNavigation;
}

@@ -21,6 +25,9 @@ declare global {

}
interface PerformanceEntry {
navigationId?: number;
}
interface PerformanceObserverInit {
durationThreshold?: number;
}
interface PerformanceNavigationTiming {
interface PerformanceNavigationTiming extends PerformanceEntry {
activationStart?: number;

@@ -51,2 +58,16 @@ }

}
interface InteractionContentfulPaint extends PerformanceEntry {
readonly interactionId: number;
readonly largestContentfulPaint?: LargestContentfulPaint;
}
interface PerformanceSoftNavigation extends PerformanceEntry {
readonly interactionId: number;
readonly navigationType?: NavigationType;
readonly paintTime?: number;
readonly presentationTime?: number;
readonly getLargestInteractionContentfulPaint?: () => InteractionContentfulPaint | null;
}
var PerformanceSoftNavigation: {
prototype: PerformanceSoftNavigation;
};
export type ScriptInvokerType = 'classic-script' | 'module-script' | 'event-listener' | 'user-callback' | 'resolve-promise' | 'reject-promise';

@@ -53,0 +74,0 @@ export type ScriptWindowAttribution = 'self' | 'descendant' | 'ancestor' | 'same-page' | 'other';

@@ -22,1 +22,2 @@ /*

export * from './types/ttfb.js';
//# sourceMappingURL=types.js.map

@@ -52,4 +52,25 @@ import type { CLSMetric, CLSMetricWithAttribution } from './cls.js';

* restored by the user.
* - 'soft-navigation': for soft navigations.
*/
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore' | 'soft-navigation';
/**
* The navigationId the metric happened for. This is particularly relevant for soft navigations where
* the metric may be reported for a previous URL.
*/
navigationId: number;
/**
* For metrics specific to a soft navigation, the interactionId of the
* interaction that triggered that soft navigation.
*/
navigationInteractionId?: number;
/**
* The navigation startTime the metric is based from. This is particularly
* relevant for soft navigations where time origin is not 0.
*/
navigationStartTime?: number;
/**
* The navigation URL the metric happened for. This is particularly relevant for soft navigations where
* the metric may be reported for a previous URL.
*/
navigationURL?: string;
}

@@ -84,2 +105,4 @@ /** The union of supported metric types. */

reportAllChanges?: boolean;
durationThreshold?: number;
reportSoftNavs?: boolean;
}

@@ -86,0 +109,0 @@ export interface AttributionReportOpts extends ReportOpts {

@@ -17,1 +17,2 @@ /*

export {};
//# sourceMappingURL=base.js.map

@@ -17,1 +17,2 @@ /*

export {};
//# sourceMappingURL=cls.js.map

@@ -39,3 +39,3 @@ import type { LoadState, Metric } from './base.js';

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
}

@@ -42,0 +42,0 @@ /**

@@ -17,1 +17,2 @@ /*

export {};
//# sourceMappingURL=fcp.js.map

@@ -45,4 +45,6 @@ import type { LoadState, Metric, ReportOpts, AttributionReportOpts } from './base.js';

* returns null or undefined.
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionTarget: string;
interactionTarget?: string;
/**

@@ -52,4 +54,6 @@ * The time when the user first interacted during the frame where the INP

* within the frame, only the first time is reported).
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionTime: DOMHighResTimeStamp;
interactionTime?: DOMHighResTimeStamp;
/**

@@ -61,4 +65,6 @@ * The type of interaction, based on the event type of the `event` entry

* and for "keydown" or "keyup" events this will be "keyboard".
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionType: 'pointer' | 'keyboard';
interactionType?: 'pointer' | 'keyboard';
/**

@@ -70,9 +76,11 @@ * The best-guess timestamp of the next paint after the interaction.

* reported after the processing times.
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
nextPaintTime: DOMHighResTimeStamp;
nextPaintTime?: DOMHighResTimeStamp;
/**
* An array of Event Timing entries that were processed within the same
* animation frame as the INP candidate interaction.
* This array can be quite large so it will be empty if the
* `includeProcessedEventEntries` configuration option is set to `false` to
* This array can be quite large so it will be empty unless the
* `includeProcessedEventEntries` configuration option is set to `true` to
* conserve memory if these entries are not required.

@@ -79,0 +87,0 @@ */

@@ -17,1 +17,2 @@ /*

export {};
//# sourceMappingURL=inp.js.map

@@ -57,3 +57,3 @@ import type { Metric } from './base.js';

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
/**

@@ -60,0 +60,0 @@ * The `resource` entry for the LCP resource (if applicable), which is useful

@@ -17,1 +17,2 @@ /*

export {};
//# sourceMappingURL=lcp.js.map

@@ -7,3 +7,3 @@ import type { Metric } from './base.js';

name: 'TTFB';
entries: PerformanceNavigationTiming[];
entries: PerformanceNavigationTiming[] | PerformanceSoftNavigation[];
}

@@ -53,3 +53,3 @@ /**

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
}

@@ -56,0 +56,0 @@ /**

@@ -17,1 +17,2 @@ /*

export {};
//# sourceMappingURL=ttfb.js.map

@@ -1,1 +0,2 @@

var webVitals=function(t){"use strict";class e{t;i=0;o=[];u(t){if(t.hadRecentInput)return;const e=this.o[0],n=this.o.at(-1);this.i&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}}const n=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},i=t=>{if("loading"===document.readyState)return"loading";const e=n();if(e){if(t<e.domInteractive)return"loading";if(0===e.domContentLoadedEventStart||t<e.domContentLoadedEventStart)return"dom-interactive";if(0===e.domComplete||t<e.domComplete)return"dom-content-loaded"}return"complete"},o=t=>{const e=t.nodeName;return 1===t.nodeType?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},r=t=>{let e="";try{for(;9!==t?.nodeType;){const n=t,i=n.id?"#"+n.id:[o(n),...Array.from(n.classList).sort()].join(".");if(e.length+i.length>99)return e||i;if(e=e?i+">"+e:i,n.id)break;t=n.parentNode}}catch{}return e},s=new WeakMap;function a(t,e){let n=s.get(e);return n||(n=new WeakMap,s.set(e,n)),n.get(t)||n.set(t,new e),n.get(t)}let c=-1;const u=()=>c,f=t=>{addEventListener("pageshow",e=>{e.persisted&&(c=e.timeStamp,t(e))},!0)},l=(t,e,n,i)=>{let o,r;return s=>{e.value>=0&&(s||i)&&(r=e.value-(o??0),(r||void 0===o)&&(o=e.value,e.delta=r,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},d=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},h=()=>n()?.activationStart??0,m=(t,e=-1)=>{const i=n();let o="navigate";u()>=0?o="back-forward-cache":i&&(document.prerendering||h()>0?o="prerender":document.wasDiscarded?o="restore":i.type&&(o=i.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},g=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver(t=>{queueMicrotask(()=>{e(t.getEntries())})});return i.observe({type:t,buffered:!0,...n}),i}}catch{}},p=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let y=-1;const v=new Set,b=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,M=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of v)t();isFinite(y)||(y="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",M,!0))}},T=()=>{if(y<0){const t=h(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(e=>"hidden"===e.name&&e.startTime>=t)?.startTime;y=e??b(),addEventListener("visibilitychange",M,!0),addEventListener("prerenderingchange",M,!0),f(()=>{setTimeout(()=>{y=b()})})}return{get firstHiddenTime(){return y},onHidden(t){v.add(t)}}},E=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},D=[1800,3e3],L=(t,e={})=>{E(()=>{const n=T();let i,o=m("FCP");const r=g("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(r.disconnect(),e.startTime<n.firstHiddenTime&&(o.value=Math.max(e.startTime-h(),0),o.entries.push(e),i(!0)))});r&&(i=l(t,o,D,e.reportAllChanges),f(n=>{o=m("FCP"),i=l(t,o,D,e.reportAllChanges),d(()=>{o.value=performance.now()-n.timeStamp,i(!0)})}))})},S=[.1,.25],P=t=>t.find(t=>1===t.node?.nodeType)||t[0];let w=0,k=1/0,_=0;const F=t=>{for(const e of t)e.interactionId&&(k=Math.min(k,e.interactionId),_=Math.max(_,e.interactionId),w=_?(_-k)/7+1:0)};let B;const C=()=>B?w:performance.interactionCount??0,O=()=>{"interactionCount"in performance||B||(B=g("event",F,{durationThreshold:0}))};let j=0;class I{l=[];h=new Map;m;p;v(){j=C(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((C()-j)/50));return this.l[t]}u(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.l.at(-1);let n=this.h.get(t.interactionId);if(n||this.l.length<10||t.duration>e.T){if(n?t.duration>n.T?(n.entries=[t],n.T=t.duration):t.duration===n.T&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],T:t.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort((t,e)=>e.T-t.T),this.l.length>10){const t=this.l.splice(10);for(const e of t)this.h.delete(e.id)}this.p?.(n)}}}const A=t=>{const e=globalThis.requestIdleCallback||setTimeout,n=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)t();else{const i=p(t);let o=-1;const r=()=>{n(o),i()};addEventListener("visibilitychange",r,{once:!0,capture:!0}),o=e(()=>{removeEventListener("visibilitychange",r,{capture:!0}),i()})}},W=[200,500];class q{m;u(t){this.m?.(t)}}const N=[2500,4e3],V=[800,1800],$=t=>{document.prerendering?E(()=>$(t)):"complete"!==document.readyState?addEventListener("load",()=>$(t),!0):setTimeout(t)};return t.CLSThresholds=S,t.FCPThresholds=D,t.INPThresholds=W,t.LCPThresholds=N,t.TTFBThresholds=V,t.onCLS=(t,n={})=>{const o=a(n=Object.assign({},n),e),s=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=P(t.sources),i=e?.node;if(i){const t=n.generateTarget?.(i)??r(i);s.set(e,t)}}};((t,n={})=>{const i=T();L(p(()=>{let o,r=m("CLS",0);const s=a(n,e),c=t=>{for(const e of t)s.u(e);s.i>r.value&&(r.value=s.i,r.entries=s.o,o())},u=g("layout-shift",c);u&&(o=l(t,r,S,n.reportAllChanges),i.onHidden(()=>{c(u.takeRecords()),o(!0)}),f(()=>{s.i=0,r=m("CLS",0),o=l(t,r,S,n.reportAllChanges),d(o)}),setTimeout(o))}))})(e=>{t((t=>{let e={};if(t.entries.length){const n=t.entries.reduce((t,e)=>t.value>e.value?t:e);if(n?.sources?.length){const t=P(n.sources);t&&(e={largestShiftTarget:s.get(t),largestShiftTime:n.startTime,largestShiftValue:n.value,largestShiftSource:t,largestShiftEntry:n,loadState:i(n.startTime)})}}return Object.assign(t,{attribution:e})})(e))},n)},t.onFCP=(t,e={})=>{L(e=>{t((t=>{let e={timeToFirstByte:0,firstByteToFCP:t.value,loadState:i(u())};if(t.entries.length){const o=n(),r=t.entries.at(-1);if(o){const n=o.activationStart||0,s=Math.max(0,o.responseStart-n);e={timeToFirstByte:s,firstByteToFCP:t.value-s,loadState:i(t.entries[0].startTime),navigationEntry:o,fcpEntry:r}}}return Object.assign(t,{attribution:e})})(e))},e)},t.onINP=(t,e={})=>{const n=a(e=Object.assign({},e),I);let o=[],s=[],c=0;const u=new WeakMap,d=new WeakMap;let h=!1;const p=()=>{h||(A(y),h=!0)},y=()=>{const t=new Set(n.l.map(t=>u.get(t.entries[0]))),e=s.length-10;s=s.filter((n,i)=>i>=e||t.has(n));const i=new Set;for(const t of s){const e=v(t.startTime,t.processingEnd);for(const t of e)i.add(t)}o=o.filter(t=>t.startTime>c||i.has(t)),h=!1};n.m=t=>{const n=t.startTime+t.duration;let i;c=Math.max(c,t.processingEnd);for(let o=s.length-1;o>=0;o--){const r=s[o];if(Math.abs(n-r.renderTime)<=8){i=r,i.startTime=Math.min(t.startTime,i.startTime),i.processingStart=Math.min(t.processingStart,i.processingStart),i.processingEnd=Math.max(t.processingEnd,i.processingEnd),!1!==e.includeProcessedEventEntries&&i.entries.push(t);break}}i||(i={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:!1!==e.includeProcessedEventEntries?[t]:[]},s.push(i)),(t.interactionId||"first-input"===t.entryType)&&u.set(t,i),p()},n.p=t=>{if(!d.get(t)){const n=t.entries.find(t=>t.target)?.target;if(n){const i=e.generateTarget?.(n)??r(n);d.set(t,i)}else{const e=t.entries.find(t=>t.targetSelector)?.targetSelector;e&&d.set(t,e)}}};const v=(t,e)=>{const n=[];for(const i of o)if(!(i.startTime+i.duration<t)){if(i.startTime>e)break;n.push(i)}return n},b=t=>{const e=t.entries[0],o=u.get(e),r=e.processingStart,s=Math.max(e.startTime+e.duration,r),a=Math.min(o.processingEnd,s),c=o.entries.sort((t,e)=>t.processingStart-e.processingStart),f=v(e.startTime,a),l=n.h.get(e.interactionId),h={interactionTarget:d.get(l),interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:s,processedEventEntries:c,longAnimationFrameEntries:f,inputDelay:r-e.startTime,processingDuration:a-r,presentationDelay:s-a,loadState:i(e.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{if(!t.longAnimationFrameEntries?.length)return;const e=t.interactionTime,n=t.inputDelay,i=t.processingDuration;let o,r,s=0,a=0,c=0,u=0;for(const c of t.longAnimationFrameEntries){a=a+c.startTime+c.duration-c.styleAndLayoutStart;for(const t of c.scripts){const c=t.startTime+t.duration;if(c<e)continue;const f=c-Math.max(e,t.startTime),l=t.duration?f/t.duration*t.forcedStyleAndLayoutDuration:0;s+=f-l,a+=l,f>u&&(r=t.startTime<e+n?"input-delay":t.startTime>=e+n+i?"presentation-delay":"processing-duration",o=t,u=f)}}const f=t.longAnimationFrameEntries.at(-1),l=f?f.startTime+f.duration:0;l>=e+n+i&&(c=t.nextPaintTime-l),o&&r&&(t.longestScript={entry:o,subpart:r,intersectingDuration:u}),t.totalScriptDuration=s,t.totalStyleAndLayoutDuration=a,t.totalPaintDuration=c,t.totalUnattributedDuration=t.nextPaintTime-e-s-a-c})(h),Object.assign(t,{attribution:h})};g("long-animation-frame",t=>{o=o.concat(t),p()}),((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=T();E(()=>{O();let i,o=m("INP");const r=a(e,I),s=t=>{A(()=>{for(const e of t)r.u(e);const e=r.M();e&&e.T!==o.value&&(o.value=e.T,o.entries=e.entries,i())})},c=g("event",s,{durationThreshold:e.durationThreshold??40});i=l(t,o,W,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(c.takeRecords()),i(!0)}),f(()=>{r.v(),o=m("INP"),i=l(t,o,W,e.reportAllChanges)}))})})(e=>{t(b(e))},e)},t.onLCP=(t,e={})=>{const i=a(e=Object.assign({},e),q),o=new WeakMap;i.m=t=>{const n=t.element;if(n){const i=e.generateTarget?.(n)??r(n);o.set(t,i)}else t.id&&o.set(t,`#${t.id}`)};((t,e={})=>{E(()=>{const n=T();let i,o=m("LCP");const r=a(e,q),s=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)r.u(e),e.startTime<n.firstHiddenTime&&(o.value=Math.max(e.startTime-h(),0),o.entries=[e],i())},c=g("largest-contentful-paint",s);if(c){i=l(t,o,N,e.reportAllChanges);const n=p(()=>{s(c.takeRecords()),c.disconnect(),i(!0)}),r=t=>{t.isTrusted&&(A(n),removeEventListener(t.type,r,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])addEventListener(t,r,{capture:!0});f(n=>{o=m("LCP"),i=l(t,o,N,e.reportAllChanges),d(()=>{o.value=performance.now()-n.timeStamp,i(!0)})})}})})(e=>{t((t=>{let e={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const i=t.entries.at(-1),r=i.url&&performance.getEntriesByType("resource").find(t=>t.name===i.url);e.target=o.get(i),e.lcpEntry=i,i.url&&(e.url=i.url),r&&(e.lcpResourceEntry=r);const s=n();if(s){const n=s.activationStart||0,i=Math.max(0,s.responseStart-n),o=Math.max(i,r?(r.requestStart||r.startTime)-n:0),a=Math.min(t.value,Math.max(o,r?r.responseEnd-n:0));e={...e,timeToFirstByte:i,resourceLoadDelay:o-i,resourceLoadDuration:a-o,elementRenderDelay:t.value-a,navigationEntry:s}}}return Object.assign(t,{attribution:e})})(e))},e)},t.onTTFB=(t,e={})=>{((t,e={})=>{let i=m("TTFB"),o=l(t,i,V,e.reportAllChanges);$(()=>{const r=n();r&&(i.value=Math.max(r.responseStart-h(),0),i.entries=[r],o(!0),f(()=>{i=m("TTFB",0),o=l(t,i,V,e.reportAllChanges),o(!0)}))})})(e=>{t((t=>{let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(t.entries.length){const n=t.entries[0],i=n.activationStart||0,o=Math.max((n.workerStart||n.fetchStart)-i,0),r=Math.max(n.domainLookupStart-i,0),s=Math.max(n.connectStart-i,0),a=Math.max(n.connectEnd-i,0);e={waitingDuration:o,cacheDuration:r-o,dnsDuration:s-r,connectionDuration:a-s,requestDuration:t.value-a,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e))},e)},t}({});
var webVitals=function(t){"use strict";class n{t;o=0;i=[];l(t){if(t.hadRecentInput)return;const n=this.i[0],e=this.i.at(-1);this.o&&n&&e&&t.startTime-e.startTime<1e3&&t.startTime-n.startTime<5e3?(this.o+=t.value,this.i.push(t)):(this.o=t.value,this.i=[t]),this.t?.(t)}}const e=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},o=t=>{if("loading"===document.readyState)return"loading";const n=e();if(n){if(t<n.domInteractive)return"loading";if(0===n.domContentLoadedEventStart||t<n.domContentLoadedEventStart)return"dom-interactive";if(0===n.domComplete||t<n.domComplete)return"dom-content-loaded"}return"complete"},i=t=>{const n=t.nodeName;return 1===t.nodeType?n.toLowerCase():n.toUpperCase().replace(/^#/,"")},a=t=>{let n="";try{for(;9!==t?.nodeType;){const e=t,o=e.id?"#"+e.id:[i(e),...Array.from(e.classList??[]).sort()].join(".");if(n.length+o.length>99)return n||o;if(n=n?o+">"+n:o,e.id)break;t=e.parentNode}}catch{}return n},r=new WeakMap;function s(t,n){let e=r.get(n);return e||(e=new WeakMap,r.set(n,e)),e.get(t)||e.set(t,new n),e.get(t)}let c=-1;const f=()=>c,l=t=>{addEventListener("pageshow",n=>{n.persisted&&(c=n.timeStamp,t(n))},!0)},u=(t,n,e,o)=>{let i,a;return r=>{n.value>=0&&(r||o)&&(a=n.value-(i??0),(a||void 0===i)&&(i=n.value,n.delta=a,n.rating=((t,n)=>t>n[1]?"poor":t>n[0]?"needs-improvement":"good")(n.value,e),t(n)))}},d=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},h=()=>e()?.activationStart??0;let g=-1;const v=new Set,p=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,m=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of v)t();isFinite(g)||(g="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",m,!0))}},y=(t=!1)=>{if(t&&(g=1/0),g<0){const t=h(),n=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(n=>"hidden"===n.name&&n.startTime>=t)?.startTime;g=n??p(),addEventListener("visibilitychange",m,!0),addEventListener("prerenderingchange",m,!0),l(()=>{setTimeout(()=>{g=p()})})}return{get firstHiddenTime(){return g},onHidden(t){v.add(t)}}},b=(t,n=-1,o,i=0,a,r,s)=>{const c=e(),l=c?.navigationId||0;let u="navigate";o?u=o:f()>=0?u="back-forward-cache":c&&(document.prerendering||h()>0?u="prerender":document.wasDiscarded?u="restore":c.type&&(u=c.type.replace(/_/g,"-")));return{name:t,value:n,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:u,navigationId:i||l,navigationInteractionId:a,navigationURL:r||c?.name,navigationStartTime:s||0}},M=(t,n,e={})=>{try{const o=t.filter(t=>PerformanceObserver.supportedEntryTypes.includes(t));if(o.length>0){const t=new PerformanceObserver(t=>{queueMicrotask(()=>{const e=t.getEntries();o.length>1&&e.sort((t,n)=>t.startTime+t.duration-(n.startTime+n.duration)),n(e)})});for(const n of o)t.observe({type:n,buffered:!0,...e});return t}}catch{}},T=t=>PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&t&&t.reportSoftNavs,E=(t,n)=>{if(t.set(n.navigationId,n),t.size>2){const n=t.keys().next().value;void 0!==n&&t.delete(n)}},D=t=>{let n=!1;return()=>{n||(t(),n=!0)}};class w{u}const P=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},S=[1800,3e3],k=(t,n={})=>{const e=T(n);P(()=>{const o=s(n,w),i=y();let a,r=b("FCP");const c=M(["paint"],t=>{for(const n of t)"first-contentful-paint"===n.name&&(c.disconnect(),n.startTime<i.firstHiddenTime&&(r.value=Math.max(n.startTime-h(),0),r.entries.push(n),r.navigationId=n.navigationId||r.navigationId,a(!0)))});if(c&&(a=u(t,r,S,n.reportAllChanges),l(e=>{r=b("FCP",-1,"back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,f()),a=u(t,r,S,n.reportAllChanges),d(()=>{r.value=performance.now()-e.timeStamp,a(!0)})})),e){M(["soft-navigation"],e=>{e.forEach(e=>{o.u&&e.navigationId&&E(o.u,e);const i=Math.max((e.presentationTime||e.paintTime||0)-e.startTime,0);r=b("FCP",i,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),a=u(t,r,S,n.reportAllChanges),a(!0)})},n)}})},L=[.1,.25],F=t=>t.find(t=>1===t.node?.nodeType)||t[0];let _=0,B=1/0,C=0;const I=t=>{for(const n of t)n.interactionId&&(B=Math.min(B,n.interactionId),C=Math.max(C,n.interactionId),_=C?(C-B)/7+1:0)};let O;const j=()=>O?_:performance.interactionCount??0,A=()=>{"interactionCount"in performance||O||(O=M(["event"],I,{durationThreshold:0}))};let q=0;class N{h=[];v=new Map;p;m;M(){q=j(),this.h.length=0,this.v.clear()}T(t){const n=j()-q,e=Math.min(this.h.length-1,Math.floor(n/50));return!n||-1!==e||"soft-navigation"!==t&&"back-forward-cache"!==t?this.h[e]:{D:8,id:-1,entries:[]}}l(t){if(this.p?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const n=this.h.at(-1);let e=this.v.get(t.interactionId);if(e||this.h.length<10||t.duration>n.D){if(e?t.duration>e.D?(e.entries=[t],e.D=t.duration):t.duration===e.D&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(e={id:t.interactionId,entries:[t],D:t.duration},this.v.set(e.id,e),this.h.push(e)),this.h.sort((t,n)=>n.D-t.D),this.h.length>10){const t=this.h.splice(10);for(const n of t)this.v.delete(n.id)}this.m?.(e)}}}const W=t=>{const n="requestIdleCallback"in globalThis?1e3:0,e=globalThis.requestIdleCallback||setTimeout,o=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)t();else{const i=D(t);let a=-1;const r=()=>{o(a),i()};addEventListener("visibilitychange",r,{once:!0,capture:!0}),a=e(()=>{removeEventListener("visibilitychange",r,{capture:!0}),i()},{timeout:n})}},R=[200,500];class U{p;u;l(t){this.p?.(t)}}const V=[2500,4e3],$=[800,1800],x=t=>{document.prerendering?P(()=>x(t)):"complete"!==document.readyState?addEventListener("load",()=>x(t),!0):setTimeout(t)};return t.CLSThresholds=L,t.FCPThresholds=S,t.INPThresholds=R,t.LCPThresholds=V,t.TTFBThresholds=$,t.onCLS=(t,e={})=>{const i=s(e=Object.assign({},e),n),r=new WeakMap;i.t=t=>{if(t?.sources?.length){const n=F(t.sources),o=n?.node;if(o){const t=e.generateTarget?.(o)??a(o);r.set(n,t)}}};((t,e={})=>{const o=y();k(D(()=>{let i,a=b("CLS",0);const r=s(e,n),c=(n,o,s,c,f)=>{a=b("CLS",0,n,o,s,c,f),r.o=0,i=u(t,a,L,e.reportAllChanges)},h=(t=!1)=>{r.o>a.value&&(a.value=r.o,a.entries=r.i),i(t)},g=t=>{h(!0),c("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},v=t=>{for(const n of t)"soft-navigation"!==n.entryType?r.l(n):g(n);h()},p=["layout-shift"];T(e)&&p.push("soft-navigation");const m=M(p,v);m&&(i=u(t,a,L,e.reportAllChanges),o.onHidden(()=>{v(m.takeRecords()),i(!0)}),l(()=>{c("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,f()),d(i)}),setTimeout(i))}))})(n=>{t((t=>{let n={};if(t.entries.length){const e=t.entries.reduce((t,n)=>t.value>n.value?t:n);if(e?.sources?.length){const t=F(e.sources);t&&(n={largestShiftTarget:r.get(t),largestShiftTime:e.startTime,largestShiftValue:e.value,largestShiftSource:t,largestShiftEntry:e,loadState:o(e.startTime)})}}return Object.assign(t,{attribution:n})})(n))},e)},t.onFCP=(t,n={})=>{const i=s(n=Object.assign({},n),w);T(n)&&(i.u=new Map);k(n=>{t((t=>{let n={timeToFirstByte:0,firstByteToFCP:t.value,loadState:o(f())};if("soft-navigation"!==t.navigationType){if(t.entries.length){const i=e(),a=t.entries.at(-1);if(i){const e=i.responseStart,r=i.activationStart||0,s=Math.max(0,e-r);n={timeToFirstByte:s,firstByteToFCP:t.value-s,loadState:o(t.entries[0].startTime),navigationEntry:i,fcpEntry:a}}}}else{const e=i.u?.get(t.navigationId);e&&(n={timeToFirstByte:0,firstByteToFCP:t.value,loadState:"complete",navigationEntry:e})}return Object.assign(t,{attribution:n})})(n))},n)},t.onINP=(t,n={})=>{const e=s(n=Object.assign({},n),N);let i=[],r=[],c=0;const d=new WeakMap,h=new WeakMap;let g=!1;const v=()=>{g||(W(p),g=!0)},p=()=>{const t=new Set(e.h.map(t=>d.get(t.entries[0]))),n=r.length-10;r=r.filter((e,o)=>o>=n||t.has(e));const o=new Set;for(const t of r){const n=m(t.startTime,t.processingEnd);for(const t of n)o.add(t)}i=i.filter(t=>t.startTime>c||o.has(t)),g=!1};e.p=t=>{const e=t.startTime+t.duration;let o;c=Math.max(c,t.processingEnd);for(let i=r.length-1;i>=0;i--){const a=r[i];if(Math.abs(e-a.renderTime)<=8){o=a,o.startTime=Math.min(t.startTime,o.startTime),o.processingStart=Math.min(t.processingStart,o.processingStart),o.processingEnd=Math.max(t.processingEnd,o.processingEnd),n.includeProcessedEventEntries&&o.entries.push(t);break}}o||(o={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:e,entries:n.includeProcessedEventEntries?[t]:[]},r.push(o)),(t.interactionId||"first-input"===t.entryType)&&d.set(t,o),v()},e.m=t=>{if(!h.get(t)){const e=t.entries.find(t=>t.target)?.target;if(e){const o=n.generateTarget?.(e)??a(e);h.set(t,o)}else{const n=t.entries.find(t=>t.targetSelector)?.targetSelector;n&&h.set(t,n)}}};const m=(t,n)=>{const e=[];for(const o of i)if(!(o.startTime+o.duration<t)){if(o.startTime>n)break;e.push(o)}return e},E=t=>{if(0===t.entries.length){const n=t.navigationStartTime||0,e={processedEventEntries:[],longAnimationFrameEntries:[],inputDelay:0,processingDuration:0,presentationDelay:t.value,loadState:o(n)};return Object.assign(t,{attribution:e})}const n=t.entries[0],i=d.get(n),a=i.processingStart,r=Math.max(n.startTime+n.duration,a),s=Math.min(i.processingEnd,r),c=i.entries.sort((t,n)=>t.processingStart-n.processingStart),f=m(n.startTime,s),l=e.v.get(n.interactionId),u={interactionTarget:h.get(l),interactionType:n.name.startsWith("key")?"keyboard":"pointer",interactionTime:n.startTime,nextPaintTime:r,processedEventEntries:c,longAnimationFrameEntries:f,inputDelay:a-n.startTime,processingDuration:s-a,presentationDelay:r-s,loadState:o(n.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{const n=t.interactionTime,e=t.nextPaintTime;if(!t.longAnimationFrameEntries?.length||!n||!e)return;const o=t.inputDelay,i=t.processingDuration;let a,r,s=0,c=0,f=0,l=0;for(const e of t.longAnimationFrameEntries){c=c+e.startTime+e.duration-e.styleAndLayoutStart;for(const t of e.scripts){const e=t.startTime+t.duration;if(e<n)continue;const f=e-Math.max(n,t.startTime),u=t.duration?f/t.duration*t.forcedStyleAndLayoutDuration:0;s+=f-u,c+=u,f>l&&(r=t.startTime<n+o?"input-delay":t.startTime>=n+o+i?"presentation-delay":"processing-duration",a=t,l=f)}}const u=t.longAnimationFrameEntries.at(-1),d=u?u.startTime+u.duration:0;d>=n+o+i&&(f=e-d),a&&r&&(t.longestScript={entry:a,subpart:r,intersectingDuration:l}),t.totalScriptDuration=s,t.totalStyleAndLayoutDuration=c,t.totalPaintDuration=f,t.totalUnattributedDuration=e-n-s-c-f})(u),Object.assign(t,{attribution:u})};M(["long-animation-frame"],t=>{i=i.concat(t),v()},n),((t,n={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const e=y();P(()=>{A();let o,i=b("INP");const a=s(n,N),r=(e,r,s,c,f)=>{a.M(),i=b("INP",-1,e,r,s,c,f),o=u(t,i,R,n.reportAllChanges)},c=()=>{const t=a.T(i.navigationType);t&&t.D!==i.value&&(i.value=t.D,i.entries=t.entries,o())},d=t=>{c(),o(!0),r("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},h=(t,n=!1)=>{W(()=>{for(const n of t)"soft-navigation"!==n.entryType?a.l(n):d(n);c(),n&&o(!0)})},g=["event","first-input"];T(n)&&g.push("soft-navigation");const v=M(g,h,{...n,durationThreshold:n.durationThreshold??40});o=u(t,i,R,n.reportAllChanges),v&&(e.onHidden(()=>{h(v.takeRecords(),!0)}),l(()=>{r("back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,f())}))})})(n=>{t(E(n))},n)},t.onLCP=(t,n={})=>{const o=s(n=Object.assign({},n),U),i=new WeakMap;T(n)&&(o.u=new Map),o.p=t=>{const e=t.element;if(e){const o=n.generateTarget?.(e)??a(e);i.set(t,o)}else t.id&&i.set(t,`#${t.id}`)};((t,n={})=>{let e=!1;const o=T(n);P(()=>{let i,a=y(),r=b("LCP");const c=s(n,U),g=(o,s,c,f,l)=>{r=b("LCP",-1,o,s,c,f,l),i=u(t,r,V,n.reportAllChanges),e=!1,"soft-navigation"===o&&(a=y(!0))},v=t=>{c.u&&t.navigationId&&E(c.u,t),e||i(!0),g("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime);const n=t.getLargestInteractionContentfulPaint?.();n&&p([n])},p=t=>{n.reportAllChanges||o||(t=t.slice(-1));for(const n of t){if(!n)continue;if("soft-navigation"===n.entryType){v(n);continue}let t=0,e=[],o=n.startTime;if("largest-contentful-paint"===n.entryType)t=Math.max(n.startTime-h(),0),c.l(n),e=[n];else if("interaction-contentful-paint"===n.entryType){const i=n;if(!r.navigationId)continue;if("interactionId"in i&&i.interactionId!=r.navigationInteractionId)continue;o=i.largestContentfulPaint?.renderTime||0,t=Math.max(o-n.startTime,0),i.largestContentfulPaint&&(c.l(i.largestContentfulPaint),e=[i.largestContentfulPaint])}o<a.firstHiddenTime&&(r.value=t,r.entries=e,i())}},m=["largest-contentful-paint"];o&&m.push("interaction-contentful-paint","soft-navigation");const T=M(m,p);if(T){i=u(t,r,V,n.reportAllChanges);const a=["keydown","click","visibilitychange"],s=t=>{if(t.isTrusted&&!e){const t=r.id;W(()=>{if(!e){if(!o){T.disconnect();for(const t of a)removeEventListener(t,s,{capture:!0})}t===r.id&&(e=!0,i(!0))}})}};for(const t of a)addEventListener(t,s,{capture:!0});l(o=>{g("back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,f()),i=u(t,r,V,n.reportAllChanges),d(()=>{r.value=performance.now()-o.timeStamp,e=!0,i(!0)})})}})})(n=>{t((t=>{let n={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const a=t.entries.at(-1),r=a.url&&performance.getEntriesByType("resource").find(t=>t.name===a.url);let s;n.target=i.get(a),n.lcpEntry=a,a.url&&(n.url=a.url),r&&(n.lcpResourceEntry=r);let c=0,f=0;if("soft-navigation"!==t.navigationType?(s=e(),c=s?.activationStart??0,f=s?.responseStart??0):(c=t.navigationStartTime||0,s=o.u?.get(t.navigationId)),s){const e=Math.max(0,f-c),o=Math.max(e,r?(r.requestStart||r.startTime)-c:0),i=Math.min(t.value,Math.max(o,r?r.responseEnd-c:0));n={...n,timeToFirstByte:e,resourceLoadDelay:o-e,resourceLoadDuration:i-o,elementRenderDelay:t.value-i,navigationEntry:s}}}return Object.assign(t,{attribution:n})})(n))},n)},t.onTTFB=(t,n={})=>{((t,n={})=>{const o=T(n);let i=b("TTFB"),a=u(t,i,$,n.reportAllChanges);x(()=>{const r=e();if(r){const e=r.responseStart;i.value=Math.max(e-h(),0),i.entries=[r],a(!0),l(()=>{i=b("TTFB",0,"back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,f()),a=u(t,i,$,n.reportAllChanges),a(!0)}),o&&M(["soft-navigation"],e=>{e.forEach(e=>{e.navigationId&&(i=b("TTFB",0,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),i.entries=[e],a=u(t,i,$,n.reportAllChanges),a(!0))})},n)}})})(n=>{t((t=>{const n=t.entries[0];let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0,navigationEntry:n};if(t.entries.length&&n instanceof PerformanceNavigationTiming){const o=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart||0)-o,0),a=Math.max(n.domainLookupStart-o,0),r=Math.max(n.connectStart-o,0),s=Math.max(n.connectEnd-o,0);e={waitingDuration:i,cacheDuration:a-i,dnsDuration:r-a,connectionDuration:s-r,requestDuration:t.value-s,navigationEntry:n}}return Object.assign(t,{attribution:e})})(n))},n)},t}({});
//# sourceMappingURL=web-vitals.attribution.iife.js.map

@@ -1,1 +0,2 @@

class t{t;o=0;i=[];u(t){if(t.hadRecentInput)return;const e=this.i[0],n=this.i.at(-1);this.o&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(this.o+=t.value,this.i.push(t)):(this.o=t.value,this.i=[t]),this.t?.(t)}}const e=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},n=t=>{if("loading"===document.readyState)return"loading";const n=e();if(n){if(t<n.domInteractive)return"loading";if(0===n.domContentLoadedEventStart||t<n.domContentLoadedEventStart)return"dom-interactive";if(0===n.domComplete||t<n.domComplete)return"dom-content-loaded"}return"complete"},o=t=>{const e=t.nodeName;return 1===t.nodeType?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},i=t=>{let e="";try{for(;9!==t?.nodeType;){const n=t,i=n.id?"#"+n.id:[o(n),...Array.from(n.classList).sort()].join(".");if(e.length+i.length>99)return e||i;if(e=e?i+">"+e:i,n.id)break;t=n.parentNode}}catch{}return e},r=new WeakMap;function s(t,e){let n=r.get(e);return n||(n=new WeakMap,r.set(e,n)),n.get(t)||n.set(t,new e),n.get(t)}let a=-1;const c=()=>a,u=t=>{addEventListener("pageshow",e=>{e.persisted&&(a=e.timeStamp,t(e))},!0)},f=(t,e,n,o)=>{let i,r;return s=>{e.value>=0&&(s||o)&&(r=e.value-(i??0),(r||void 0===i)&&(i=e.value,e.delta=r,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},l=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},d=()=>e()?.activationStart??0,h=(t,n=-1)=>{const o=e();let i="navigate";c()>=0?i="back-forward-cache":o&&(document.prerendering||d()>0?i="prerender":document.wasDiscarded?i="restore":o.type&&(i=o.type.replace(/_/g,"-")));return{name:t,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},m=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const o=new PerformanceObserver(t=>{queueMicrotask(()=>{e(t.getEntries())})});return o.observe({type:t,buffered:!0,...n}),o}}catch{}},g=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let p=-1;const y=new Set,v=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,b=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of y)t();isFinite(p)||(p="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",b,!0))}},M=()=>{if(p<0){const t=d(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(e=>"hidden"===e.name&&e.startTime>=t)?.startTime;p=e??v(),addEventListener("visibilitychange",b,!0),addEventListener("prerenderingchange",b,!0),u(()=>{setTimeout(()=>{p=v()})})}return{get firstHiddenTime(){return p},onHidden(t){y.add(t)}}},T=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},E=[1800,3e3],D=(t,e={})=>{T(()=>{const n=M();let o,i=h("FCP");const r=m("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(r.disconnect(),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-d(),0),i.entries.push(e),o(!0)))});r&&(o=f(t,i,E,e.reportAllChanges),u(n=>{i=h("FCP"),o=f(t,i,E,e.reportAllChanges),l(()=>{i.value=performance.now()-n.timeStamp,o(!0)})}))})},L=[.1,.25],S=t=>t.find(t=>1===t.node?.nodeType)||t[0],P=(e,o={})=>{const r=s(o=Object.assign({},o),t),a=new WeakMap;r.t=t=>{if(t?.sources?.length){const e=S(t.sources),n=e?.node;if(n){const t=o.generateTarget?.(n)??i(n);a.set(e,t)}}};((e,n={})=>{const o=M();D(g(()=>{let i,r=h("CLS",0);const a=s(n,t),c=t=>{for(const e of t)a.u(e);a.o>r.value&&(r.value=a.o,r.entries=a.i,i())},d=m("layout-shift",c);d&&(i=f(e,r,L,n.reportAllChanges),o.onHidden(()=>{c(d.takeRecords()),i(!0)}),u(()=>{a.o=0,r=h("CLS",0),i=f(e,r,L,n.reportAllChanges),l(i)}),setTimeout(i))}))})(t=>{e((t=>{let e={};if(t.entries.length){const o=t.entries.reduce((t,e)=>t.value>e.value?t:e);if(o?.sources?.length){const t=S(o.sources);t&&(e={largestShiftTarget:a.get(t),largestShiftTime:o.startTime,largestShiftValue:o.value,largestShiftSource:t,largestShiftEntry:o,loadState:n(o.startTime)})}}return Object.assign(t,{attribution:e})})(t))},o)},w=(t,o={})=>{D(o=>{t((t=>{let o={timeToFirstByte:0,firstByteToFCP:t.value,loadState:n(c())};if(t.entries.length){const i=e(),r=t.entries.at(-1);if(i){const e=i.activationStart||0,s=Math.max(0,i.responseStart-e);o={timeToFirstByte:s,firstByteToFCP:t.value-s,loadState:n(t.entries[0].startTime),navigationEntry:i,fcpEntry:r}}}return Object.assign(t,{attribution:o})})(o))},o)};let k=0,_=1/0,F=0;const B=t=>{for(const e of t)e.interactionId&&(_=Math.min(_,e.interactionId),F=Math.max(F,e.interactionId),k=F?(F-_)/7+1:0)};let C;const O=()=>C?k:performance.interactionCount??0,j=()=>{"interactionCount"in performance||C||(C=m("event",B,{durationThreshold:0}))};let I=0;class A{l=[];h=new Map;m;p;v(){I=O(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((O()-I)/50));return this.l[t]}u(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.l.at(-1);let n=this.h.get(t.interactionId);if(n||this.l.length<10||t.duration>e.T){if(n?t.duration>n.T?(n.entries=[t],n.T=t.duration):t.duration===n.T&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],T:t.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort((t,e)=>e.T-t.T),this.l.length>10){const t=this.l.splice(10);for(const e of t)this.h.delete(e.id)}this.p?.(n)}}}const W=t=>{const e=globalThis.requestIdleCallback||setTimeout,n=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)t();else{const o=g(t);let i=-1;const r=()=>{n(i),o()};addEventListener("visibilitychange",r,{once:!0,capture:!0}),i=e(()=>{removeEventListener("visibilitychange",r,{capture:!0}),o()})}},q=[200,500],x=(t,e={})=>{const o=s(e=Object.assign({},e),A);let r=[],a=[],c=0;const l=new WeakMap,d=new WeakMap;let g=!1;const p=()=>{g||(W(y),g=!0)},y=()=>{const t=new Set(o.l.map(t=>l.get(t.entries[0]))),e=a.length-10;a=a.filter((n,o)=>o>=e||t.has(n));const n=new Set;for(const t of a){const e=v(t.startTime,t.processingEnd);for(const t of e)n.add(t)}r=r.filter(t=>t.startTime>c||n.has(t)),g=!1};o.m=t=>{const n=t.startTime+t.duration;let o;c=Math.max(c,t.processingEnd);for(let i=a.length-1;i>=0;i--){const r=a[i];if(Math.abs(n-r.renderTime)<=8){o=r,o.startTime=Math.min(t.startTime,o.startTime),o.processingStart=Math.min(t.processingStart,o.processingStart),o.processingEnd=Math.max(t.processingEnd,o.processingEnd),!1!==e.includeProcessedEventEntries&&o.entries.push(t);break}}o||(o={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:!1!==e.includeProcessedEventEntries?[t]:[]},a.push(o)),(t.interactionId||"first-input"===t.entryType)&&l.set(t,o),p()},o.p=t=>{if(!d.get(t)){const n=t.entries.find(t=>t.target)?.target;if(n){const o=e.generateTarget?.(n)??i(n);d.set(t,o)}else{const e=t.entries.find(t=>t.targetSelector)?.targetSelector;e&&d.set(t,e)}}};const v=(t,e)=>{const n=[];for(const o of r)if(!(o.startTime+o.duration<t)){if(o.startTime>e)break;n.push(o)}return n},b=t=>{const e=t.entries[0],i=l.get(e),r=e.processingStart,s=Math.max(e.startTime+e.duration,r),a=Math.min(i.processingEnd,s),c=i.entries.sort((t,e)=>t.processingStart-e.processingStart),u=v(e.startTime,a),f=o.h.get(e.interactionId),h={interactionTarget:d.get(f),interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:s,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:r-e.startTime,processingDuration:a-r,presentationDelay:s-a,loadState:n(e.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{if(!t.longAnimationFrameEntries?.length)return;const e=t.interactionTime,n=t.inputDelay,o=t.processingDuration;let i,r,s=0,a=0,c=0,u=0;for(const c of t.longAnimationFrameEntries){a=a+c.startTime+c.duration-c.styleAndLayoutStart;for(const t of c.scripts){const c=t.startTime+t.duration;if(c<e)continue;const f=c-Math.max(e,t.startTime),l=t.duration?f/t.duration*t.forcedStyleAndLayoutDuration:0;s+=f-l,a+=l,f>u&&(r=t.startTime<e+n?"input-delay":t.startTime>=e+n+o?"presentation-delay":"processing-duration",i=t,u=f)}}const f=t.longAnimationFrameEntries.at(-1),l=f?f.startTime+f.duration:0;l>=e+n+o&&(c=t.nextPaintTime-l),i&&r&&(t.longestScript={entry:i,subpart:r,intersectingDuration:u}),t.totalScriptDuration=s,t.totalStyleAndLayoutDuration=a,t.totalPaintDuration=c,t.totalUnattributedDuration=t.nextPaintTime-e-s-a-c})(h),Object.assign(t,{attribution:h})};m("long-animation-frame",t=>{r=r.concat(t),p()}),((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=M();T(()=>{j();let o,i=h("INP");const r=s(e,A),a=t=>{W(()=>{for(const e of t)r.u(e);const e=r.M();e&&e.T!==i.value&&(i.value=e.T,i.entries=e.entries,o())})},c=m("event",a,{durationThreshold:e.durationThreshold??40});o=f(t,i,q,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(c.takeRecords()),o(!0)}),u(()=>{r.v(),i=h("INP"),o=f(t,i,q,e.reportAllChanges)}))})})(e=>{t(b(e))},e)};class N{m;u(t){this.m?.(t)}}const $=[2500,4e3],H=(t,n={})=>{const o=s(n=Object.assign({},n),N),r=new WeakMap;o.m=t=>{const e=t.element;if(e){const o=n.generateTarget?.(e)??i(e);r.set(t,o)}else t.id&&r.set(t,`#${t.id}`)};((t,e={})=>{T(()=>{const n=M();let o,i=h("LCP");const r=s(e,N),a=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)r.u(e),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-d(),0),i.entries=[e],o())},c=m("largest-contentful-paint",a);if(c){o=f(t,i,$,e.reportAllChanges);const n=g(()=>{a(c.takeRecords()),c.disconnect(),o(!0)}),r=t=>{t.isTrusted&&(W(n),removeEventListener(t.type,r,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])addEventListener(t,r,{capture:!0});u(n=>{i=h("LCP"),o=f(t,i,$,e.reportAllChanges),l(()=>{i.value=performance.now()-n.timeStamp,o(!0)})})}})})(n=>{t((t=>{let n={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const o=t.entries.at(-1),i=o.url&&performance.getEntriesByType("resource").find(t=>t.name===o.url);n.target=r.get(o),n.lcpEntry=o,o.url&&(n.url=o.url),i&&(n.lcpResourceEntry=i);const s=e();if(s){const e=s.activationStart||0,o=Math.max(0,s.responseStart-e),r=Math.max(o,i?(i.requestStart||i.startTime)-e:0),a=Math.min(t.value,Math.max(r,i?i.responseEnd-e:0));n={...n,timeToFirstByte:o,resourceLoadDelay:r-o,resourceLoadDuration:a-r,elementRenderDelay:t.value-a,navigationEntry:s}}}return Object.assign(t,{attribution:n})})(n))},n)},R=[800,1800],U=t=>{document.prerendering?T(()=>U(t)):"complete"!==document.readyState?addEventListener("load",()=>U(t),!0):setTimeout(t)},V=(t,n={})=>{((t,n={})=>{let o=h("TTFB"),i=f(t,o,R,n.reportAllChanges);U(()=>{const r=e();r&&(o.value=Math.max(r.responseStart-d(),0),o.entries=[r],i(!0),u(()=>{o=h("TTFB",0),i=f(t,o,R,n.reportAllChanges),i(!0)}))})})(e=>{t((t=>{let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(t.entries.length){const n=t.entries[0],o=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart)-o,0),r=Math.max(n.domainLookupStart-o,0),s=Math.max(n.connectStart-o,0),a=Math.max(n.connectEnd-o,0);e={waitingDuration:i,cacheDuration:r-i,dnsDuration:s-r,connectionDuration:a-s,requestDuration:t.value-a,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e))},n)};export{L as CLSThresholds,E as FCPThresholds,q as INPThresholds,$ as LCPThresholds,R as TTFBThresholds,P as onCLS,w as onFCP,x as onINP,H as onLCP,V as onTTFB};
class t{t;o=0;i=[];l(t){if(t.hadRecentInput)return;const n=this.i[0],e=this.i.at(-1);this.o&&n&&e&&t.startTime-e.startTime<1e3&&t.startTime-n.startTime<5e3?(this.o+=t.value,this.i.push(t)):(this.o=t.value,this.i=[t]),this.t?.(t)}}const n=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},e=t=>{if("loading"===document.readyState)return"loading";const e=n();if(e){if(t<e.domInteractive)return"loading";if(0===e.domContentLoadedEventStart||t<e.domContentLoadedEventStart)return"dom-interactive";if(0===e.domComplete||t<e.domComplete)return"dom-content-loaded"}return"complete"},o=t=>{const n=t.nodeName;return 1===t.nodeType?n.toLowerCase():n.toUpperCase().replace(/^#/,"")},i=t=>{let n="";try{for(;9!==t?.nodeType;){const e=t,i=e.id?"#"+e.id:[o(e),...Array.from(e.classList??[]).sort()].join(".");if(n.length+i.length>99)return n||i;if(n=n?i+">"+n:i,e.id)break;t=e.parentNode}}catch{}return n},a=new WeakMap;function r(t,n){let e=a.get(n);return e||(e=new WeakMap,a.set(n,e)),e.get(t)||e.set(t,new n),e.get(t)}let s=-1;const c=()=>s,f=t=>{addEventListener("pageshow",n=>{n.persisted&&(s=n.timeStamp,t(n))},!0)},l=(t,n,e,o)=>{let i,a;return r=>{n.value>=0&&(r||o)&&(a=n.value-(i??0),(a||void 0===i)&&(i=n.value,n.delta=a,n.rating=((t,n)=>t>n[1]?"poor":t>n[0]?"needs-improvement":"good")(n.value,e),t(n)))}},u=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},d=()=>n()?.activationStart??0;let h=-1;const g=new Set,v=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,p=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of g)t();isFinite(h)||(h="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",p,!0))}},m=(t=!1)=>{if(t&&(h=1/0),h<0){const t=d(),n=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(n=>"hidden"===n.name&&n.startTime>=t)?.startTime;h=n??v(),addEventListener("visibilitychange",p,!0),addEventListener("prerenderingchange",p,!0),f(()=>{setTimeout(()=>{h=v()})})}return{get firstHiddenTime(){return h},onHidden(t){g.add(t)}}},y=(t,e=-1,o,i=0,a,r,s)=>{const f=n(),l=f?.navigationId||0;let u="navigate";o?u=o:c()>=0?u="back-forward-cache":f&&(document.prerendering||d()>0?u="prerender":document.wasDiscarded?u="restore":f.type&&(u=f.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:u,navigationId:i||l,navigationInteractionId:a,navigationURL:r||f?.name,navigationStartTime:s||0}},b=(t,n,e={})=>{try{const o=t.filter(t=>PerformanceObserver.supportedEntryTypes.includes(t));if(o.length>0){const t=new PerformanceObserver(t=>{queueMicrotask(()=>{const e=t.getEntries();o.length>1&&e.sort((t,n)=>t.startTime+t.duration-(n.startTime+n.duration)),n(e)})});for(const n of o)t.observe({type:n,buffered:!0,...e});return t}}catch{}},M=t=>PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&t&&t.reportSoftNavs,T=(t,n)=>{if(t.set(n.navigationId,n),t.size>2){const n=t.keys().next().value;void 0!==n&&t.delete(n)}},E=t=>{let n=!1;return()=>{n||(t(),n=!0)}};class D{u}const w=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},P=[1800,3e3],S=(t,n={})=>{const e=M(n);w(()=>{const o=r(n,D),i=m();let a,s=y("FCP");const h=b(["paint"],t=>{for(const n of t)"first-contentful-paint"===n.name&&(h.disconnect(),n.startTime<i.firstHiddenTime&&(s.value=Math.max(n.startTime-d(),0),s.entries.push(n),s.navigationId=n.navigationId||s.navigationId,a(!0)))});if(h&&(a=l(t,s,P,n.reportAllChanges),f(e=>{s=y("FCP",-1,"back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,c()),a=l(t,s,P,n.reportAllChanges),u(()=>{s.value=performance.now()-e.timeStamp,a(!0)})})),e){b(["soft-navigation"],e=>{e.forEach(e=>{o.u&&e.navigationId&&T(o.u,e);const i=Math.max((e.presentationTime||e.paintTime||0)-e.startTime,0);s=y("FCP",i,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),a=l(t,s,P,n.reportAllChanges),a(!0)})},n)}})},k=[.1,.25],L=t=>t.find(t=>1===t.node?.nodeType)||t[0],F=(n,o={})=>{const a=r(o=Object.assign({},o),t),s=new WeakMap;a.t=t=>{if(t?.sources?.length){const n=L(t.sources),e=n?.node;if(e){const t=o.generateTarget?.(e)??i(e);s.set(n,t)}}};((n,e={})=>{const o=m();S(E(()=>{let i,a=y("CLS",0);const s=r(e,t),d=(t,o,r,c,f)=>{a=y("CLS",0,t,o,r,c,f),s.o=0,i=l(n,a,k,e.reportAllChanges)},h=(t=!1)=>{s.o>a.value&&(a.value=s.o,a.entries=s.i),i(t)},g=t=>{h(!0),d("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},v=t=>{for(const n of t)"soft-navigation"!==n.entryType?s.l(n):g(n);h()},p=["layout-shift"];M(e)&&p.push("soft-navigation");const m=b(p,v);m&&(i=l(n,a,k,e.reportAllChanges),o.onHidden(()=>{v(m.takeRecords()),i(!0)}),f(()=>{d("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,c()),u(i)}),setTimeout(i))}))})(t=>{n((t=>{let n={};if(t.entries.length){const o=t.entries.reduce((t,n)=>t.value>n.value?t:n);if(o?.sources?.length){const t=L(o.sources);t&&(n={largestShiftTarget:s.get(t),largestShiftTime:o.startTime,largestShiftValue:o.value,largestShiftSource:t,largestShiftEntry:o,loadState:e(o.startTime)})}}return Object.assign(t,{attribution:n})})(t))},o)},_=(t,o={})=>{const i=r(o=Object.assign({},o),D);M(o)&&(i.u=new Map);S(o=>{t((t=>{let o={timeToFirstByte:0,firstByteToFCP:t.value,loadState:e(c())};if("soft-navigation"!==t.navigationType){if(t.entries.length){const i=n(),a=t.entries.at(-1);if(i){const n=i.responseStart,r=i.activationStart||0,s=Math.max(0,n-r);o={timeToFirstByte:s,firstByteToFCP:t.value-s,loadState:e(t.entries[0].startTime),navigationEntry:i,fcpEntry:a}}}}else{const n=i.u?.get(t.navigationId);n&&(o={timeToFirstByte:0,firstByteToFCP:t.value,loadState:"complete",navigationEntry:n})}return Object.assign(t,{attribution:o})})(o))},o)};let B=0,C=1/0,I=0;const O=t=>{for(const n of t)n.interactionId&&(C=Math.min(C,n.interactionId),I=Math.max(I,n.interactionId),B=I?(I-C)/7+1:0)};let j;const A=()=>j?B:performance.interactionCount??0,q=()=>{"interactionCount"in performance||j||(j=b(["event"],O,{durationThreshold:0}))};let N=0;class W{h=[];v=new Map;p;m;M(){N=A(),this.h.length=0,this.v.clear()}T(t){const n=A()-N,e=Math.min(this.h.length-1,Math.floor(n/50));return!n||-1!==e||"soft-navigation"!==t&&"back-forward-cache"!==t?this.h[e]:{D:8,id:-1,entries:[]}}l(t){if(this.p?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const n=this.h.at(-1);let e=this.v.get(t.interactionId);if(e||this.h.length<10||t.duration>n.D){if(e?t.duration>e.D?(e.entries=[t],e.D=t.duration):t.duration===e.D&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(e={id:t.interactionId,entries:[t],D:t.duration},this.v.set(e.id,e),this.h.push(e)),this.h.sort((t,n)=>n.D-t.D),this.h.length>10){const t=this.h.splice(10);for(const n of t)this.v.delete(n.id)}this.m?.(e)}}}const x=t=>{const n="requestIdleCallback"in globalThis?1e3:0,e=globalThis.requestIdleCallback||setTimeout,o=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)t();else{const i=E(t);let a=-1;const r=()=>{o(a),i()};addEventListener("visibilitychange",r,{once:!0,capture:!0}),a=e(()=>{removeEventListener("visibilitychange",r,{capture:!0}),i()},{timeout:n})}},R=[200,500],U=(t,n={})=>{const o=r(n=Object.assign({},n),W);let a=[],s=[],u=0;const d=new WeakMap,h=new WeakMap;let g=!1;const v=()=>{g||(x(p),g=!0)},p=()=>{const t=new Set(o.h.map(t=>d.get(t.entries[0]))),n=s.length-10;s=s.filter((e,o)=>o>=n||t.has(e));const e=new Set;for(const t of s){const n=T(t.startTime,t.processingEnd);for(const t of n)e.add(t)}a=a.filter(t=>t.startTime>u||e.has(t)),g=!1};o.p=t=>{const e=t.startTime+t.duration;let o;u=Math.max(u,t.processingEnd);for(let i=s.length-1;i>=0;i--){const a=s[i];if(Math.abs(e-a.renderTime)<=8){o=a,o.startTime=Math.min(t.startTime,o.startTime),o.processingStart=Math.min(t.processingStart,o.processingStart),o.processingEnd=Math.max(t.processingEnd,o.processingEnd),n.includeProcessedEventEntries&&o.entries.push(t);break}}o||(o={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:e,entries:n.includeProcessedEventEntries?[t]:[]},s.push(o)),(t.interactionId||"first-input"===t.entryType)&&d.set(t,o),v()},o.m=t=>{if(!h.get(t)){const e=t.entries.find(t=>t.target)?.target;if(e){const o=n.generateTarget?.(e)??i(e);h.set(t,o)}else{const n=t.entries.find(t=>t.targetSelector)?.targetSelector;n&&h.set(t,n)}}};const T=(t,n)=>{const e=[];for(const o of a)if(!(o.startTime+o.duration<t)){if(o.startTime>n)break;e.push(o)}return e},E=t=>{if(0===t.entries.length){const n=t.navigationStartTime||0,o={processedEventEntries:[],longAnimationFrameEntries:[],inputDelay:0,processingDuration:0,presentationDelay:t.value,loadState:e(n)};return Object.assign(t,{attribution:o})}const n=t.entries[0],i=d.get(n),a=i.processingStart,r=Math.max(n.startTime+n.duration,a),s=Math.min(i.processingEnd,r),c=i.entries.sort((t,n)=>t.processingStart-n.processingStart),f=T(n.startTime,s),l=o.v.get(n.interactionId),u={interactionTarget:h.get(l),interactionType:n.name.startsWith("key")?"keyboard":"pointer",interactionTime:n.startTime,nextPaintTime:r,processedEventEntries:c,longAnimationFrameEntries:f,inputDelay:a-n.startTime,processingDuration:s-a,presentationDelay:r-s,loadState:e(n.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{const n=t.interactionTime,e=t.nextPaintTime;if(!t.longAnimationFrameEntries?.length||!n||!e)return;const o=t.inputDelay,i=t.processingDuration;let a,r,s=0,c=0,f=0,l=0;for(const e of t.longAnimationFrameEntries){c=c+e.startTime+e.duration-e.styleAndLayoutStart;for(const t of e.scripts){const e=t.startTime+t.duration;if(e<n)continue;const f=e-Math.max(n,t.startTime),u=t.duration?f/t.duration*t.forcedStyleAndLayoutDuration:0;s+=f-u,c+=u,f>l&&(r=t.startTime<n+o?"input-delay":t.startTime>=n+o+i?"presentation-delay":"processing-duration",a=t,l=f)}}const u=t.longAnimationFrameEntries.at(-1),d=u?u.startTime+u.duration:0;d>=n+o+i&&(f=e-d),a&&r&&(t.longestScript={entry:a,subpart:r,intersectingDuration:l}),t.totalScriptDuration=s,t.totalStyleAndLayoutDuration=c,t.totalPaintDuration=f,t.totalUnattributedDuration=e-n-s-c-f})(u),Object.assign(t,{attribution:u})};b(["long-animation-frame"],t=>{a=a.concat(t),v()},n),((t,n={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const e=m();w(()=>{q();let o,i=y("INP");const a=r(n,W),s=(e,r,s,c,f)=>{a.M(),i=y("INP",-1,e,r,s,c,f),o=l(t,i,R,n.reportAllChanges)},u=()=>{const t=a.T(i.navigationType);t&&t.D!==i.value&&(i.value=t.D,i.entries=t.entries,o())},d=t=>{u(),o(!0),s("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},h=(t,n=!1)=>{x(()=>{for(const n of t)"soft-navigation"!==n.entryType?a.l(n):d(n);u(),n&&o(!0)})},g=["event","first-input"];M(n)&&g.push("soft-navigation");const v=b(g,h,{...n,durationThreshold:n.durationThreshold??40});o=l(t,i,R,n.reportAllChanges),v&&(e.onHidden(()=>{h(v.takeRecords(),!0)}),f(()=>{s("back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,c())}))})})(n=>{t(E(n))},n)};class ${p;u;l(t){this.p?.(t)}}const H=[2500,4e3],V=(t,e={})=>{const o=r(e=Object.assign({},e),$),a=new WeakMap;M(e)&&(o.u=new Map),o.p=t=>{const n=t.element;if(n){const o=e.generateTarget?.(n)??i(n);a.set(t,o)}else t.id&&a.set(t,`#${t.id}`)};((t,n={})=>{let e=!1;const o=M(n);w(()=>{let i,a=m(),s=y("LCP");const h=r(n,$),g=(o,r,c,f,u)=>{s=y("LCP",-1,o,r,c,f,u),i=l(t,s,H,n.reportAllChanges),e=!1,"soft-navigation"===o&&(a=m(!0))},v=t=>{h.u&&t.navigationId&&T(h.u,t),e||i(!0),g("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime);const n=t.getLargestInteractionContentfulPaint?.();n&&p([n])},p=t=>{n.reportAllChanges||o||(t=t.slice(-1));for(const n of t){if(!n)continue;if("soft-navigation"===n.entryType){v(n);continue}let t=0,e=[],o=n.startTime;if("largest-contentful-paint"===n.entryType)t=Math.max(n.startTime-d(),0),h.l(n),e=[n];else if("interaction-contentful-paint"===n.entryType){const i=n;if(!s.navigationId)continue;if("interactionId"in i&&i.interactionId!=s.navigationInteractionId)continue;o=i.largestContentfulPaint?.renderTime||0,t=Math.max(o-n.startTime,0),i.largestContentfulPaint&&(h.l(i.largestContentfulPaint),e=[i.largestContentfulPaint])}o<a.firstHiddenTime&&(s.value=t,s.entries=e,i())}},M=["largest-contentful-paint"];o&&M.push("interaction-contentful-paint","soft-navigation");const E=b(M,p);if(E){i=l(t,s,H,n.reportAllChanges);const a=["keydown","click","visibilitychange"],r=t=>{if(t.isTrusted&&!e){const t=s.id;x(()=>{if(!e){if(!o){E.disconnect();for(const t of a)removeEventListener(t,r,{capture:!0})}t===s.id&&(e=!0,i(!0))}})}};for(const t of a)addEventListener(t,r,{capture:!0});f(o=>{g("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,c()),i=l(t,s,H,n.reportAllChanges),u(()=>{s.value=performance.now()-o.timeStamp,e=!0,i(!0)})})}})})(e=>{t((t=>{let e={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const i=t.entries.at(-1),r=i.url&&performance.getEntriesByType("resource").find(t=>t.name===i.url);let s;e.target=a.get(i),e.lcpEntry=i,i.url&&(e.url=i.url),r&&(e.lcpResourceEntry=r);let c=0,f=0;if("soft-navigation"!==t.navigationType?(s=n(),c=s?.activationStart??0,f=s?.responseStart??0):(c=t.navigationStartTime||0,s=o.u?.get(t.navigationId)),s){const n=Math.max(0,f-c),o=Math.max(n,r?(r.requestStart||r.startTime)-c:0),i=Math.min(t.value,Math.max(o,r?r.responseEnd-c:0));e={...e,timeToFirstByte:n,resourceLoadDelay:o-n,resourceLoadDuration:i-o,elementRenderDelay:t.value-i,navigationEntry:s}}}return Object.assign(t,{attribution:e})})(e))},e)},z=[800,1800],G=t=>{document.prerendering?w(()=>G(t)):"complete"!==document.readyState?addEventListener("load",()=>G(t),!0):setTimeout(t)},J=(t,e={})=>{((t,e={})=>{const o=M(e);let i=y("TTFB"),a=l(t,i,z,e.reportAllChanges);G(()=>{const r=n();if(r){const n=r.responseStart;i.value=Math.max(n-d(),0),i.entries=[r],a(!0),f(()=>{i=y("TTFB",0,"back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,c()),a=l(t,i,z,e.reportAllChanges),a(!0)}),o&&b(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(i=y("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),i.entries=[n],a=l(t,i,z,e.reportAllChanges),a(!0))})},e)}})})(n=>{t((t=>{const n=t.entries[0];let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0,navigationEntry:n};if(t.entries.length&&n instanceof PerformanceNavigationTiming){const o=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart||0)-o,0),a=Math.max(n.domainLookupStart-o,0),r=Math.max(n.connectStart-o,0),s=Math.max(n.connectEnd-o,0);e={waitingDuration:i,cacheDuration:a-i,dnsDuration:r-a,connectionDuration:s-r,requestDuration:t.value-s,navigationEntry:n}}return Object.assign(t,{attribution:e})})(n))},e)};export{k as CLSThresholds,P as FCPThresholds,R as INPThresholds,H as LCPThresholds,z as TTFBThresholds,F as onCLS,_ as onFCP,U as onINP,V as onLCP,J as onTTFB};
//# sourceMappingURL=web-vitals.attribution.js.map

@@ -1,1 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).webVitals={})}(this,function(t){"use strict";class e{t;o=0;i=[];u(t){if(t.hadRecentInput)return;const e=this.i[0],n=this.i.at(-1);this.o&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(this.o+=t.value,this.i.push(t)):(this.o=t.value,this.i=[t]),this.t?.(t)}}const n=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},o=t=>{if("loading"===document.readyState)return"loading";const e=n();if(e){if(t<e.domInteractive)return"loading";if(0===e.domContentLoadedEventStart||t<e.domContentLoadedEventStart)return"dom-interactive";if(0===e.domComplete||t<e.domComplete)return"dom-content-loaded"}return"complete"},i=t=>{const e=t.nodeName;return 1===t.nodeType?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},r=t=>{let e="";try{for(;9!==t?.nodeType;){const n=t,o=n.id?"#"+n.id:[i(n),...Array.from(n.classList).sort()].join(".");if(e.length+o.length>99)return e||o;if(e=e?o+">"+e:o,n.id)break;t=n.parentNode}}catch{}return e},s=new WeakMap;function a(t,e){let n=s.get(e);return n||(n=new WeakMap,s.set(e,n)),n.get(t)||n.set(t,new e),n.get(t)}let c=-1;const f=()=>c,u=t=>{addEventListener("pageshow",e=>{e.persisted&&(c=e.timeStamp,t(e))},!0)},d=(t,e,n,o)=>{let i,r;return s=>{e.value>=0&&(s||o)&&(r=e.value-(i??0),(r||void 0===i)&&(i=e.value,e.delta=r,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},l=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},h=()=>n()?.activationStart??0,p=(t,e=-1)=>{const o=n();let i="navigate";f()>=0?i="back-forward-cache":o&&(document.prerendering||h()>0?i="prerender":document.wasDiscarded?i="restore":o.type&&(i=o.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},g=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const o=new PerformanceObserver(t=>{queueMicrotask(()=>{e(t.getEntries())})});return o.observe({type:t,buffered:!0,...n}),o}}catch{}},m=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let y=-1;const v=new Set,b=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,M=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of v)t();isFinite(y)||(y="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",M,!0))}},T=()=>{if(y<0){const t=h(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(e=>"hidden"===e.name&&e.startTime>=t)?.startTime;y=e??b(),addEventListener("visibilitychange",M,!0),addEventListener("prerenderingchange",M,!0),u(()=>{setTimeout(()=>{y=b()})})}return{get firstHiddenTime(){return y},onHidden(t){v.add(t)}}},E=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},D=[1800,3e3],L=(t,e={})=>{E(()=>{const n=T();let o,i=p("FCP");const r=g("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(r.disconnect(),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-h(),0),i.entries.push(e),o(!0)))});r&&(o=d(t,i,D,e.reportAllChanges),u(n=>{i=p("FCP"),o=d(t,i,D,e.reportAllChanges),l(()=>{i.value=performance.now()-n.timeStamp,o(!0)})}))})},S=[.1,.25],P=t=>t.find(t=>1===t.node?.nodeType)||t[0];let w=0,k=1/0,_=0;const F=t=>{for(const e of t)e.interactionId&&(k=Math.min(k,e.interactionId),_=Math.max(_,e.interactionId),w=_?(_-k)/7+1:0)};let B;const C=()=>B?w:performance.interactionCount??0,O=()=>{"interactionCount"in performance||B||(B=g("event",F,{durationThreshold:0}))};let j=0;class I{l=[];h=new Map;p;m;v(){j=C(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((C()-j)/50));return this.l[t]}u(t){if(this.p?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.l.at(-1);let n=this.h.get(t.interactionId);if(n||this.l.length<10||t.duration>e.T){if(n?t.duration>n.T?(n.entries=[t],n.T=t.duration):t.duration===n.T&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],T:t.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort((t,e)=>e.T-t.T),this.l.length>10){const t=this.l.splice(10);for(const e of t)this.h.delete(e.id)}this.m?.(n)}}}const A=t=>{const e=globalThis.requestIdleCallback||setTimeout,n=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)t();else{const o=m(t);let i=-1;const r=()=>{n(i),o()};addEventListener("visibilitychange",r,{once:!0,capture:!0}),i=e(()=>{removeEventListener("visibilitychange",r,{capture:!0}),o()})}},W=[200,500];class q{p;u(t){this.p?.(t)}}const x=[2500,4e3],N=[800,1800],$=t=>{document.prerendering?E(()=>$(t)):"complete"!==document.readyState?addEventListener("load",()=>$(t),!0):setTimeout(t)};t.CLSThresholds=S,t.FCPThresholds=D,t.INPThresholds=W,t.LCPThresholds=x,t.TTFBThresholds=N,t.onCLS=(t,n={})=>{const i=a(n=Object.assign({},n),e),s=new WeakMap;i.t=t=>{if(t?.sources?.length){const e=P(t.sources),o=e?.node;if(o){const t=n.generateTarget?.(o)??r(o);s.set(e,t)}}};((t,n={})=>{const o=T();L(m(()=>{let i,r=p("CLS",0);const s=a(n,e),c=t=>{for(const e of t)s.u(e);s.o>r.value&&(r.value=s.o,r.entries=s.i,i())},f=g("layout-shift",c);f&&(i=d(t,r,S,n.reportAllChanges),o.onHidden(()=>{c(f.takeRecords()),i(!0)}),u(()=>{s.o=0,r=p("CLS",0),i=d(t,r,S,n.reportAllChanges),l(i)}),setTimeout(i))}))})(e=>{t((t=>{let e={};if(t.entries.length){const n=t.entries.reduce((t,e)=>t.value>e.value?t:e);if(n?.sources?.length){const t=P(n.sources);t&&(e={largestShiftTarget:s.get(t),largestShiftTime:n.startTime,largestShiftValue:n.value,largestShiftSource:t,largestShiftEntry:n,loadState:o(n.startTime)})}}return Object.assign(t,{attribution:e})})(e))},n)},t.onFCP=(t,e={})=>{L(e=>{t((t=>{let e={timeToFirstByte:0,firstByteToFCP:t.value,loadState:o(f())};if(t.entries.length){const i=n(),r=t.entries.at(-1);if(i){const n=i.activationStart||0,s=Math.max(0,i.responseStart-n);e={timeToFirstByte:s,firstByteToFCP:t.value-s,loadState:o(t.entries[0].startTime),navigationEntry:i,fcpEntry:r}}}return Object.assign(t,{attribution:e})})(e))},e)},t.onINP=(t,e={})=>{const n=a(e=Object.assign({},e),I);let i=[],s=[],c=0;const f=new WeakMap,l=new WeakMap;let h=!1;const m=()=>{h||(A(y),h=!0)},y=()=>{const t=new Set(n.l.map(t=>f.get(t.entries[0]))),e=s.length-10;s=s.filter((n,o)=>o>=e||t.has(n));const o=new Set;for(const t of s){const e=v(t.startTime,t.processingEnd);for(const t of e)o.add(t)}i=i.filter(t=>t.startTime>c||o.has(t)),h=!1};n.p=t=>{const n=t.startTime+t.duration;let o;c=Math.max(c,t.processingEnd);for(let i=s.length-1;i>=0;i--){const r=s[i];if(Math.abs(n-r.renderTime)<=8){o=r,o.startTime=Math.min(t.startTime,o.startTime),o.processingStart=Math.min(t.processingStart,o.processingStart),o.processingEnd=Math.max(t.processingEnd,o.processingEnd),!1!==e.includeProcessedEventEntries&&o.entries.push(t);break}}o||(o={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:!1!==e.includeProcessedEventEntries?[t]:[]},s.push(o)),(t.interactionId||"first-input"===t.entryType)&&f.set(t,o),m()},n.m=t=>{if(!l.get(t)){const n=t.entries.find(t=>t.target)?.target;if(n){const o=e.generateTarget?.(n)??r(n);l.set(t,o)}else{const e=t.entries.find(t=>t.targetSelector)?.targetSelector;e&&l.set(t,e)}}};const v=(t,e)=>{const n=[];for(const o of i)if(!(o.startTime+o.duration<t)){if(o.startTime>e)break;n.push(o)}return n},b=t=>{const e=t.entries[0],i=f.get(e),r=e.processingStart,s=Math.max(e.startTime+e.duration,r),a=Math.min(i.processingEnd,s),c=i.entries.sort((t,e)=>t.processingStart-e.processingStart),u=v(e.startTime,a),d=n.h.get(e.interactionId),h={interactionTarget:l.get(d),interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:s,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:r-e.startTime,processingDuration:a-r,presentationDelay:s-a,loadState:o(e.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{if(!t.longAnimationFrameEntries?.length)return;const e=t.interactionTime,n=t.inputDelay,o=t.processingDuration;let i,r,s=0,a=0,c=0,f=0;for(const c of t.longAnimationFrameEntries){a=a+c.startTime+c.duration-c.styleAndLayoutStart;for(const t of c.scripts){const c=t.startTime+t.duration;if(c<e)continue;const u=c-Math.max(e,t.startTime),d=t.duration?u/t.duration*t.forcedStyleAndLayoutDuration:0;s+=u-d,a+=d,u>f&&(r=t.startTime<e+n?"input-delay":t.startTime>=e+n+o?"presentation-delay":"processing-duration",i=t,f=u)}}const u=t.longAnimationFrameEntries.at(-1),d=u?u.startTime+u.duration:0;d>=e+n+o&&(c=t.nextPaintTime-d),i&&r&&(t.longestScript={entry:i,subpart:r,intersectingDuration:f}),t.totalScriptDuration=s,t.totalStyleAndLayoutDuration=a,t.totalPaintDuration=c,t.totalUnattributedDuration=t.nextPaintTime-e-s-a-c})(h),Object.assign(t,{attribution:h})};g("long-animation-frame",t=>{i=i.concat(t),m()}),((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=T();E(()=>{O();let o,i=p("INP");const r=a(e,I),s=t=>{A(()=>{for(const e of t)r.u(e);const e=r.M();e&&e.T!==i.value&&(i.value=e.T,i.entries=e.entries,o())})},c=g("event",s,{durationThreshold:e.durationThreshold??40});o=d(t,i,W,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(c.takeRecords()),o(!0)}),u(()=>{r.v(),i=p("INP"),o=d(t,i,W,e.reportAllChanges)}))})})(e=>{t(b(e))},e)},t.onLCP=(t,e={})=>{const o=a(e=Object.assign({},e),q),i=new WeakMap;o.p=t=>{const n=t.element;if(n){const o=e.generateTarget?.(n)??r(n);i.set(t,o)}else t.id&&i.set(t,`#${t.id}`)};((t,e={})=>{E(()=>{const n=T();let o,i=p("LCP");const r=a(e,q),s=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)r.u(e),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-h(),0),i.entries=[e],o())},c=g("largest-contentful-paint",s);if(c){o=d(t,i,x,e.reportAllChanges);const n=m(()=>{s(c.takeRecords()),c.disconnect(),o(!0)}),r=t=>{t.isTrusted&&(A(n),removeEventListener(t.type,r,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])addEventListener(t,r,{capture:!0});u(n=>{i=p("LCP"),o=d(t,i,x,e.reportAllChanges),l(()=>{i.value=performance.now()-n.timeStamp,o(!0)})})}})})(e=>{t((t=>{let e={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const o=t.entries.at(-1),r=o.url&&performance.getEntriesByType("resource").find(t=>t.name===o.url);e.target=i.get(o),e.lcpEntry=o,o.url&&(e.url=o.url),r&&(e.lcpResourceEntry=r);const s=n();if(s){const n=s.activationStart||0,o=Math.max(0,s.responseStart-n),i=Math.max(o,r?(r.requestStart||r.startTime)-n:0),a=Math.min(t.value,Math.max(i,r?r.responseEnd-n:0));e={...e,timeToFirstByte:o,resourceLoadDelay:i-o,resourceLoadDuration:a-i,elementRenderDelay:t.value-a,navigationEntry:s}}}return Object.assign(t,{attribution:e})})(e))},e)},t.onTTFB=(t,e={})=>{((t,e={})=>{let o=p("TTFB"),i=d(t,o,N,e.reportAllChanges);$(()=>{const r=n();r&&(o.value=Math.max(r.responseStart-h(),0),o.entries=[r],i(!0),u(()=>{o=p("TTFB",0),i=d(t,o,N,e.reportAllChanges),i(!0)}))})})(e=>{t((t=>{let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(t.entries.length){const n=t.entries[0],o=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart)-o,0),r=Math.max(n.domainLookupStart-o,0),s=Math.max(n.connectStart-o,0),a=Math.max(n.connectEnd-o,0);e={waitingDuration:i,cacheDuration:r-i,dnsDuration:s-r,connectionDuration:a-s,requestDuration:t.value-a,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e))},e)}});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).webVitals={})}(this,function(t){"use strict";class n{t;o=0;i=[];l(t){if(t.hadRecentInput)return;const n=this.i[0],e=this.i.at(-1);this.o&&n&&e&&t.startTime-e.startTime<1e3&&t.startTime-n.startTime<5e3?(this.o+=t.value,this.i.push(t)):(this.o=t.value,this.i=[t]),this.t?.(t)}}const e=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},o=t=>{if("loading"===document.readyState)return"loading";const n=e();if(n){if(t<n.domInteractive)return"loading";if(0===n.domContentLoadedEventStart||t<n.domContentLoadedEventStart)return"dom-interactive";if(0===n.domComplete||t<n.domComplete)return"dom-content-loaded"}return"complete"},i=t=>{const n=t.nodeName;return 1===t.nodeType?n.toLowerCase():n.toUpperCase().replace(/^#/,"")},a=t=>{let n="";try{for(;9!==t?.nodeType;){const e=t,o=e.id?"#"+e.id:[i(e),...Array.from(e.classList??[]).sort()].join(".");if(n.length+o.length>99)return n||o;if(n=n?o+">"+n:o,e.id)break;t=e.parentNode}}catch{}return n},r=new WeakMap;function s(t,n){let e=r.get(n);return e||(e=new WeakMap,r.set(n,e)),e.get(t)||e.set(t,new n),e.get(t)}let c=-1;const f=()=>c,l=t=>{addEventListener("pageshow",n=>{n.persisted&&(c=n.timeStamp,t(n))},!0)},u=(t,n,e,o)=>{let i,a;return r=>{n.value>=0&&(r||o)&&(a=n.value-(i??0),(a||void 0===i)&&(i=n.value,n.delta=a,n.rating=((t,n)=>t>n[1]?"poor":t>n[0]?"needs-improvement":"good")(n.value,e),t(n)))}},d=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},h=()=>e()?.activationStart??0;let g=-1;const p=new Set,v=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,m=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of p)t();isFinite(g)||(g="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",m,!0))}},y=(t=!1)=>{if(t&&(g=1/0),g<0){const t=h(),n=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(n=>"hidden"===n.name&&n.startTime>=t)?.startTime;g=n??v(),addEventListener("visibilitychange",m,!0),addEventListener("prerenderingchange",m,!0),l(()=>{setTimeout(()=>{g=v()})})}return{get firstHiddenTime(){return g},onHidden(t){p.add(t)}}},b=(t,n=-1,o,i=0,a,r,s)=>{const c=e(),l=c?.navigationId||0;let u="navigate";o?u=o:f()>=0?u="back-forward-cache":c&&(document.prerendering||h()>0?u="prerender":document.wasDiscarded?u="restore":c.type&&(u=c.type.replace(/_/g,"-")));return{name:t,value:n,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:u,navigationId:i||l,navigationInteractionId:a,navigationURL:r||c?.name,navigationStartTime:s||0}},T=(t,n,e={})=>{try{const o=t.filter(t=>PerformanceObserver.supportedEntryTypes.includes(t));if(o.length>0){const t=new PerformanceObserver(t=>{queueMicrotask(()=>{const e=t.getEntries();o.length>1&&e.sort((t,n)=>t.startTime+t.duration-(n.startTime+n.duration)),n(e)})});for(const n of o)t.observe({type:n,buffered:!0,...e});return t}}catch{}},M=t=>PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&t&&t.reportSoftNavs,E=(t,n)=>{if(t.set(n.navigationId,n),t.size>2){const n=t.keys().next().value;void 0!==n&&t.delete(n)}},D=t=>{let n=!1;return()=>{n||(t(),n=!0)}};class w{u}const P=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},S=[1800,3e3],k=(t,n={})=>{const e=M(n);P(()=>{const o=s(n,w),i=y();let a,r=b("FCP");const c=T(["paint"],t=>{for(const n of t)"first-contentful-paint"===n.name&&(c.disconnect(),n.startTime<i.firstHiddenTime&&(r.value=Math.max(n.startTime-h(),0),r.entries.push(n),r.navigationId=n.navigationId||r.navigationId,a(!0)))});if(c&&(a=u(t,r,S,n.reportAllChanges),l(e=>{r=b("FCP",-1,"back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,f()),a=u(t,r,S,n.reportAllChanges),d(()=>{r.value=performance.now()-e.timeStamp,a(!0)})})),e){T(["soft-navigation"],e=>{e.forEach(e=>{o.u&&e.navigationId&&E(o.u,e);const i=Math.max((e.presentationTime||e.paintTime||0)-e.startTime,0);r=b("FCP",i,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),a=u(t,r,S,n.reportAllChanges),a(!0)})},n)}})},L=[.1,.25],F=t=>t.find(t=>1===t.node?.nodeType)||t[0];let _=0,B=1/0,C=0;const I=t=>{for(const n of t)n.interactionId&&(B=Math.min(B,n.interactionId),C=Math.max(C,n.interactionId),_=C?(C-B)/7+1:0)};let O;const j=()=>O?_:performance.interactionCount??0,A=()=>{"interactionCount"in performance||O||(O=T(["event"],I,{durationThreshold:0}))};let q=0;class N{h=[];p=new Map;v;m;T(){q=j(),this.h.length=0,this.p.clear()}M(t){const n=j()-q,e=Math.min(this.h.length-1,Math.floor(n/50));return!n||-1!==e||"soft-navigation"!==t&&"back-forward-cache"!==t?this.h[e]:{D:8,id:-1,entries:[]}}l(t){if(this.v?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const n=this.h.at(-1);let e=this.p.get(t.interactionId);if(e||this.h.length<10||t.duration>n.D){if(e?t.duration>e.D?(e.entries=[t],e.D=t.duration):t.duration===e.D&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(e={id:t.interactionId,entries:[t],D:t.duration},this.p.set(e.id,e),this.h.push(e)),this.h.sort((t,n)=>n.D-t.D),this.h.length>10){const t=this.h.splice(10);for(const n of t)this.p.delete(n.id)}this.m?.(e)}}}const W=t=>{const n="requestIdleCallback"in globalThis?1e3:0,e=globalThis.requestIdleCallback||setTimeout,o=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)t();else{const i=D(t);let a=-1;const r=()=>{o(a),i()};addEventListener("visibilitychange",r,{once:!0,capture:!0}),a=e(()=>{removeEventListener("visibilitychange",r,{capture:!0}),i()},{timeout:n})}},x=[200,500];class R{v;u;l(t){this.v?.(t)}}const U=[2500,4e3],$=[800,1800],H=t=>{document.prerendering?P(()=>H(t)):"complete"!==document.readyState?addEventListener("load",()=>H(t),!0):setTimeout(t)};t.CLSThresholds=L,t.FCPThresholds=S,t.INPThresholds=x,t.LCPThresholds=U,t.TTFBThresholds=$,t.onCLS=(t,e={})=>{const i=s(e=Object.assign({},e),n),r=new WeakMap;i.t=t=>{if(t?.sources?.length){const n=F(t.sources),o=n?.node;if(o){const t=e.generateTarget?.(o)??a(o);r.set(n,t)}}};((t,e={})=>{const o=y();k(D(()=>{let i,a=b("CLS",0);const r=s(e,n),c=(n,o,s,c,f)=>{a=b("CLS",0,n,o,s,c,f),r.o=0,i=u(t,a,L,e.reportAllChanges)},h=(t=!1)=>{r.o>a.value&&(a.value=r.o,a.entries=r.i),i(t)},g=t=>{h(!0),c("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},p=t=>{for(const n of t)"soft-navigation"!==n.entryType?r.l(n):g(n);h()},v=["layout-shift"];M(e)&&v.push("soft-navigation");const m=T(v,p);m&&(i=u(t,a,L,e.reportAllChanges),o.onHidden(()=>{p(m.takeRecords()),i(!0)}),l(()=>{c("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,f()),d(i)}),setTimeout(i))}))})(n=>{t((t=>{let n={};if(t.entries.length){const e=t.entries.reduce((t,n)=>t.value>n.value?t:n);if(e?.sources?.length){const t=F(e.sources);t&&(n={largestShiftTarget:r.get(t),largestShiftTime:e.startTime,largestShiftValue:e.value,largestShiftSource:t,largestShiftEntry:e,loadState:o(e.startTime)})}}return Object.assign(t,{attribution:n})})(n))},e)},t.onFCP=(t,n={})=>{const i=s(n=Object.assign({},n),w);M(n)&&(i.u=new Map);k(n=>{t((t=>{let n={timeToFirstByte:0,firstByteToFCP:t.value,loadState:o(f())};if("soft-navigation"!==t.navigationType){if(t.entries.length){const i=e(),a=t.entries.at(-1);if(i){const e=i.responseStart,r=i.activationStart||0,s=Math.max(0,e-r);n={timeToFirstByte:s,firstByteToFCP:t.value-s,loadState:o(t.entries[0].startTime),navigationEntry:i,fcpEntry:a}}}}else{const e=i.u?.get(t.navigationId);e&&(n={timeToFirstByte:0,firstByteToFCP:t.value,loadState:"complete",navigationEntry:e})}return Object.assign(t,{attribution:n})})(n))},n)},t.onINP=(t,n={})=>{const e=s(n=Object.assign({},n),N);let i=[],r=[],c=0;const d=new WeakMap,h=new WeakMap;let g=!1;const p=()=>{g||(W(v),g=!0)},v=()=>{const t=new Set(e.h.map(t=>d.get(t.entries[0]))),n=r.length-10;r=r.filter((e,o)=>o>=n||t.has(e));const o=new Set;for(const t of r){const n=m(t.startTime,t.processingEnd);for(const t of n)o.add(t)}i=i.filter(t=>t.startTime>c||o.has(t)),g=!1};e.v=t=>{const e=t.startTime+t.duration;let o;c=Math.max(c,t.processingEnd);for(let i=r.length-1;i>=0;i--){const a=r[i];if(Math.abs(e-a.renderTime)<=8){o=a,o.startTime=Math.min(t.startTime,o.startTime),o.processingStart=Math.min(t.processingStart,o.processingStart),o.processingEnd=Math.max(t.processingEnd,o.processingEnd),n.includeProcessedEventEntries&&o.entries.push(t);break}}o||(o={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:e,entries:n.includeProcessedEventEntries?[t]:[]},r.push(o)),(t.interactionId||"first-input"===t.entryType)&&d.set(t,o),p()},e.m=t=>{if(!h.get(t)){const e=t.entries.find(t=>t.target)?.target;if(e){const o=n.generateTarget?.(e)??a(e);h.set(t,o)}else{const n=t.entries.find(t=>t.targetSelector)?.targetSelector;n&&h.set(t,n)}}};const m=(t,n)=>{const e=[];for(const o of i)if(!(o.startTime+o.duration<t)){if(o.startTime>n)break;e.push(o)}return e},E=t=>{if(0===t.entries.length){const n=t.navigationStartTime||0,e={processedEventEntries:[],longAnimationFrameEntries:[],inputDelay:0,processingDuration:0,presentationDelay:t.value,loadState:o(n)};return Object.assign(t,{attribution:e})}const n=t.entries[0],i=d.get(n),a=i.processingStart,r=Math.max(n.startTime+n.duration,a),s=Math.min(i.processingEnd,r),c=i.entries.sort((t,n)=>t.processingStart-n.processingStart),f=m(n.startTime,s),l=e.p.get(n.interactionId),u={interactionTarget:h.get(l),interactionType:n.name.startsWith("key")?"keyboard":"pointer",interactionTime:n.startTime,nextPaintTime:r,processedEventEntries:c,longAnimationFrameEntries:f,inputDelay:a-n.startTime,processingDuration:s-a,presentationDelay:r-s,loadState:o(n.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{const n=t.interactionTime,e=t.nextPaintTime;if(!t.longAnimationFrameEntries?.length||!n||!e)return;const o=t.inputDelay,i=t.processingDuration;let a,r,s=0,c=0,f=0,l=0;for(const e of t.longAnimationFrameEntries){c=c+e.startTime+e.duration-e.styleAndLayoutStart;for(const t of e.scripts){const e=t.startTime+t.duration;if(e<n)continue;const f=e-Math.max(n,t.startTime),u=t.duration?f/t.duration*t.forcedStyleAndLayoutDuration:0;s+=f-u,c+=u,f>l&&(r=t.startTime<n+o?"input-delay":t.startTime>=n+o+i?"presentation-delay":"processing-duration",a=t,l=f)}}const u=t.longAnimationFrameEntries.at(-1),d=u?u.startTime+u.duration:0;d>=n+o+i&&(f=e-d),a&&r&&(t.longestScript={entry:a,subpart:r,intersectingDuration:l}),t.totalScriptDuration=s,t.totalStyleAndLayoutDuration=c,t.totalPaintDuration=f,t.totalUnattributedDuration=e-n-s-c-f})(u),Object.assign(t,{attribution:u})};T(["long-animation-frame"],t=>{i=i.concat(t),p()},n),((t,n={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const e=y();P(()=>{A();let o,i=b("INP");const a=s(n,N),r=(e,r,s,c,f)=>{a.T(),i=b("INP",-1,e,r,s,c,f),o=u(t,i,x,n.reportAllChanges)},c=()=>{const t=a.M(i.navigationType);t&&t.D!==i.value&&(i.value=t.D,i.entries=t.entries,o())},d=t=>{c(),o(!0),r("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},h=(t,n=!1)=>{W(()=>{for(const n of t)"soft-navigation"!==n.entryType?a.l(n):d(n);c(),n&&o(!0)})},g=["event","first-input"];M(n)&&g.push("soft-navigation");const p=T(g,h,{...n,durationThreshold:n.durationThreshold??40});o=u(t,i,x,n.reportAllChanges),p&&(e.onHidden(()=>{h(p.takeRecords(),!0)}),l(()=>{r("back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,f())}))})})(n=>{t(E(n))},n)},t.onLCP=(t,n={})=>{const o=s(n=Object.assign({},n),R),i=new WeakMap;M(n)&&(o.u=new Map),o.v=t=>{const e=t.element;if(e){const o=n.generateTarget?.(e)??a(e);i.set(t,o)}else t.id&&i.set(t,`#${t.id}`)};((t,n={})=>{let e=!1;const o=M(n);P(()=>{let i,a=y(),r=b("LCP");const c=s(n,R),g=(o,s,c,f,l)=>{r=b("LCP",-1,o,s,c,f,l),i=u(t,r,U,n.reportAllChanges),e=!1,"soft-navigation"===o&&(a=y(!0))},p=t=>{c.u&&t.navigationId&&E(c.u,t),e||i(!0),g("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime);const n=t.getLargestInteractionContentfulPaint?.();n&&v([n])},v=t=>{n.reportAllChanges||o||(t=t.slice(-1));for(const n of t){if(!n)continue;if("soft-navigation"===n.entryType){p(n);continue}let t=0,e=[],o=n.startTime;if("largest-contentful-paint"===n.entryType)t=Math.max(n.startTime-h(),0),c.l(n),e=[n];else if("interaction-contentful-paint"===n.entryType){const i=n;if(!r.navigationId)continue;if("interactionId"in i&&i.interactionId!=r.navigationInteractionId)continue;o=i.largestContentfulPaint?.renderTime||0,t=Math.max(o-n.startTime,0),i.largestContentfulPaint&&(c.l(i.largestContentfulPaint),e=[i.largestContentfulPaint])}o<a.firstHiddenTime&&(r.value=t,r.entries=e,i())}},m=["largest-contentful-paint"];o&&m.push("interaction-contentful-paint","soft-navigation");const M=T(m,v);if(M){i=u(t,r,U,n.reportAllChanges);const a=["keydown","click","visibilitychange"],s=t=>{if(t.isTrusted&&!e){const t=r.id;W(()=>{if(!e){if(!o){M.disconnect();for(const t of a)removeEventListener(t,s,{capture:!0})}t===r.id&&(e=!0,i(!0))}})}};for(const t of a)addEventListener(t,s,{capture:!0});l(o=>{g("back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,f()),i=u(t,r,U,n.reportAllChanges),d(()=>{r.value=performance.now()-o.timeStamp,e=!0,i(!0)})})}})})(n=>{t((t=>{let n={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const a=t.entries.at(-1),r=a.url&&performance.getEntriesByType("resource").find(t=>t.name===a.url);let s;n.target=i.get(a),n.lcpEntry=a,a.url&&(n.url=a.url),r&&(n.lcpResourceEntry=r);let c=0,f=0;if("soft-navigation"!==t.navigationType?(s=e(),c=s?.activationStart??0,f=s?.responseStart??0):(c=t.navigationStartTime||0,s=o.u?.get(t.navigationId)),s){const e=Math.max(0,f-c),o=Math.max(e,r?(r.requestStart||r.startTime)-c:0),i=Math.min(t.value,Math.max(o,r?r.responseEnd-c:0));n={...n,timeToFirstByte:e,resourceLoadDelay:o-e,resourceLoadDuration:i-o,elementRenderDelay:t.value-i,navigationEntry:s}}}return Object.assign(t,{attribution:n})})(n))},n)},t.onTTFB=(t,n={})=>{((t,n={})=>{const o=M(n);let i=b("TTFB"),a=u(t,i,$,n.reportAllChanges);H(()=>{const r=e();if(r){const e=r.responseStart;i.value=Math.max(e-h(),0),i.entries=[r],a(!0),l(()=>{i=b("TTFB",0,"back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,f()),a=u(t,i,$,n.reportAllChanges),a(!0)}),o&&T(["soft-navigation"],e=>{e.forEach(e=>{e.navigationId&&(i=b("TTFB",0,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),i.entries=[e],a=u(t,i,$,n.reportAllChanges),a(!0))})},n)}})})(n=>{t((t=>{const n=t.entries[0];let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0,navigationEntry:n};if(t.entries.length&&n instanceof PerformanceNavigationTiming){const o=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart||0)-o,0),a=Math.max(n.domainLookupStart-o,0),r=Math.max(n.connectStart-o,0),s=Math.max(n.connectEnd-o,0);e={waitingDuration:i,cacheDuration:a-i,dnsDuration:r-a,connectionDuration:s-r,requestDuration:t.value-s,navigationEntry:n}}return Object.assign(t,{attribution:e})})(n))},n)}});
//# sourceMappingURL=web-vitals.attribution.umd.cjs.map

@@ -1,1 +0,2 @@

var webVitals=function(e){"use strict";let t=-1;const n=e=>{addEventListener("pageshow",n=>{n.persisted&&(t=n.timeStamp,e(n))},!0)},i=(e,t,n,i)=>{let s,o;return r=>{t.value>=0&&(r||i)&&(o=t.value-(s??0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},s=e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},o=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},r=()=>o()?.activationStart??0,c=(e,n=-1)=>{const i=o();let s="navigate";t>=0?s="back-forward-cache":i&&(document.prerendering||r()>0?s="prerender":document.wasDiscarded?s="restore":i.type&&(s=i.type.replace(/_/g,"-")));return{name:e,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:s}},a=new WeakMap;function d(e,t){let n=a.get(t);return n||(n=new WeakMap,a.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}class h{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const f=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver(e=>{queueMicrotask(()=>{t(e.getEntries())})});return i.observe({type:e,buffered:!0,...n}),i}}catch{}},l=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let u=-1;const m=new Set,g=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,p=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of m)e();isFinite(u)||(u="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",p,!0))}},v=()=>{if(u<0){const e=r(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;u=t??g(),addEventListener("visibilitychange",p,!0),addEventListener("prerenderingchange",p,!0),n(()=>{setTimeout(()=>{u=g()})})}return{get firstHiddenTime(){return u},onHidden(e){m.add(e)}}},y=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},T=[1800,3e3],b=(e,t={})=>{y(()=>{const o=v();let a,d=c("FCP");const h=f("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(h.disconnect(),t.startTime<o.firstHiddenTime&&(d.value=Math.max(t.startTime-r(),0),d.entries.push(t),a(!0)))});h&&(a=i(e,d,T,t.reportAllChanges),n(n=>{d=c("FCP"),a=i(e,d,T,t.reportAllChanges),s(()=>{d.value=performance.now()-n.timeStamp,a(!0)})}))})},E=[.1,.25];let L=0,P=1/0,_=0;const M=e=>{for(const t of e)t.interactionId&&(P=Math.min(P,t.interactionId),_=Math.max(_,t.interactionId),L=_?(_-P)/7+1:0)};let w;const C=()=>w?L:performance.interactionCount??0,I=()=>{"interactionCount"in performance||w||(w=f("event",M,{durationThreshold:0}))};let F=0;class k{l=[];u=new Map;m;p;v(){F=C(),this.l.length=0,this.u.clear()}T(){const e=Math.min(this.l.length-1,Math.floor((C()-F)/50));return this.l[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.l.at(-1);let n=this.u.get(e.interactionId);if(n||this.l.length<10||e.duration>t.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((e,t)=>t.L-e.L),this.l.length>10){const e=this.l.splice(10);for(const t of e)this.u.delete(t.id)}this.p?.(n)}}}const A=e=>{const t=globalThis.requestIdleCallback||setTimeout,n=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const i=l(e);let s=-1;const o=()=>{n(s),i()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),s=t(()=>{removeEventListener("visibilitychange",o,{capture:!0}),i()})}},B=[200,500];class S{m;h(e){this.m?.(e)}}const q=[2500,4e3],N=[800,1800],H=e=>{document.prerendering?y(()=>H(e)):"complete"!==document.readyState?addEventListener("load",()=>H(e),!0):setTimeout(e)};return e.CLSThresholds=E,e.FCPThresholds=T,e.INPThresholds=B,e.LCPThresholds=q,e.TTFBThresholds=N,e.onCLS=(e,t={})=>{const o=v();b(l(()=>{let r,a=c("CLS",0);const l=d(t,h),u=e=>{for(const t of e)l.h(t);l.i>a.value&&(a.value=l.i,a.entries=l.o,r())},m=f("layout-shift",u);m&&(r=i(e,a,E,t.reportAllChanges),o.onHidden(()=>{u(m.takeRecords()),r(!0)}),n(()=>{l.i=0,a=c("CLS",0),r=i(e,a,E,t.reportAllChanges),s(r)}),setTimeout(r))}))},e.onFCP=b,e.onINP=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const s=v();y(()=>{I();let o,r=c("INP");const a=d(t,k),h=e=>{A(()=>{for(const t of e)a.h(t);const t=a.T();t&&t.L!==r.value&&(r.value=t.L,r.entries=t.entries,o())})},l=f("event",h,{durationThreshold:t.durationThreshold??40});o=i(e,r,B,t.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),s.onHidden(()=>{h(l.takeRecords()),o(!0)}),n(()=>{a.v(),r=c("INP"),o=i(e,r,B,t.reportAllChanges)}))})},e.onLCP=(e,t={})=>{y(()=>{const o=v();let a,h=c("LCP");const u=d(t,S),m=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)u.h(t),t.startTime<o.firstHiddenTime&&(h.value=Math.max(t.startTime-r(),0),h.entries=[t],a())},g=f("largest-contentful-paint",m);if(g){a=i(e,h,q,t.reportAllChanges);const o=l(()=>{m(g.takeRecords()),g.disconnect(),a(!0)}),r=e=>{e.isTrusted&&(A(o),removeEventListener(e.type,r,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,r,{capture:!0});n(n=>{h=c("LCP"),a=i(e,h,q,t.reportAllChanges),s(()=>{h.value=performance.now()-n.timeStamp,a(!0)})})}})},e.onTTFB=(e,t={})=>{let s=c("TTFB"),a=i(e,s,N,t.reportAllChanges);H(()=>{const d=o();d&&(s.value=Math.max(d.responseStart-r(),0),s.entries=[d],a(!0),n(()=>{s=c("TTFB",0),a=i(e,s,N,t.reportAllChanges),a(!0)}))})},e}({});
var webVitals=function(t){"use strict";let n=-1;const e=()=>n,i=t=>{addEventListener("pageshow",e=>{e.persisted&&(n=e.timeStamp,t(e))},!0)},o=(t,n,e,i)=>{let o,s;return a=>{n.value>=0&&(a||i)&&(s=n.value-(o??0),(s||void 0===o)&&(o=n.value,n.delta=s,n.rating=((t,n)=>t>n[1]?"poor":t>n[0]?"needs-improvement":"good")(n.value,e),t(n)))}},s=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},a=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},r=()=>a()?.activationStart??0;let c=-1;const f=new Set,d=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,h=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of f)t();isFinite(c)||(c="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",h,!0))}},l=(t=!1)=>{if(t&&(c=1/0),c<0){const t=r(),n=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(n=>"hidden"===n.name&&n.startTime>=t)?.startTime;c=n??d(),addEventListener("visibilitychange",h,!0),addEventListener("prerenderingchange",h,!0),i(()=>{setTimeout(()=>{c=d()})})}return{get firstHiddenTime(){return c},onHidden(t){f.add(t)}}},u=(t,n=-1,i,o=0,s,c,f)=>{const d=a(),h=d?.navigationId||0;let l="navigate";i?l=i:e()>=0?l="back-forward-cache":d&&(document.prerendering||r()>0?l="prerender":document.wasDiscarded?l="restore":d.type&&(l=d.type.replace(/_/g,"-")));return{name:t,value:n,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:l,navigationId:o||h,navigationInteractionId:s,navigationURL:c||d?.name,navigationStartTime:f||0}},g=new WeakMap;function v(t,n){let e=g.get(n);return e||(e=new WeakMap,g.set(n,e)),e.get(t)||e.set(t,new n),e.get(t)}class m{t;i=0;o=[];h(t){if(t.hadRecentInput)return;const n=this.o[0],e=this.o.at(-1);this.i&&n&&e&&t.startTime-e.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}}const p=(t,n,e={})=>{try{const i=t.filter(t=>PerformanceObserver.supportedEntryTypes.includes(t));if(i.length>0){const t=new PerformanceObserver(t=>{queueMicrotask(()=>{const e=t.getEntries();i.length>1&&e.sort((t,n)=>t.startTime+t.duration-(n.startTime+n.duration)),n(e)})});for(const n of i)t.observe({type:n,buffered:!0,...e});return t}}catch{}},b=t=>PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&t&&t.reportSoftNavs,T=(t,n)=>{if(t.set(n.navigationId,n),t.size>2){const n=t.keys().next().value;void 0!==n&&t.delete(n)}},y=t=>{let n=!1;return()=>{n||(t(),n=!0)}};class E{l}const M=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},_=[1800,3e3],L=(t,n={})=>{const a=b(n);M(()=>{const c=v(n,E),f=l();let d,h=u("FCP");const g=p(["paint"],t=>{for(const n of t)"first-contentful-paint"===n.name&&(g.disconnect(),n.startTime<f.firstHiddenTime&&(h.value=Math.max(n.startTime-r(),0),h.entries.push(n),h.navigationId=n.navigationId||h.navigationId,d(!0)))});if(g&&(d=o(t,h,_,n.reportAllChanges),i(i=>{h=u("FCP",-1,"back-forward-cache",h.navigationId,h.navigationInteractionId,h.navigationURL,e()),d=o(t,h,_,n.reportAllChanges),s(()=>{h.value=performance.now()-i.timeStamp,d(!0)})})),a){p(["soft-navigation"],e=>{e.forEach(e=>{c.l&&e.navigationId&&T(c.l,e);const i=Math.max((e.presentationTime||e.paintTime||0)-e.startTime,0);h=u("FCP",i,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),d=o(t,h,_,n.reportAllChanges),d(!0)})},n)}})},P=[.1,.25];let w=0,k=1/0,I=0;const C=t=>{for(const n of t)n.interactionId&&(k=Math.min(k,n.interactionId),I=Math.max(I,n.interactionId),w=I?(I-k)/7+1:0)};let F;const B=()=>F?w:performance.interactionCount??0,N=()=>{"interactionCount"in performance||F||(F=p(["event"],C,{durationThreshold:0}))};let S=0;class q{u=[];v=new Map;m;p;T(){S=B(),this.u.length=0,this.v.clear()}M(t){const n=B()-S,e=Math.min(this.u.length-1,Math.floor(n/50));return!n||-1!==e||"soft-navigation"!==t&&"back-forward-cache"!==t?this.u[e]:{_:8,id:-1,entries:[]}}h(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const n=this.u.at(-1);let e=this.v.get(t.interactionId);if(e||this.u.length<10||t.duration>n._){if(e?t.duration>e._?(e.entries=[t],e._=t.duration):t.duration===e._&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(e={id:t.interactionId,entries:[t],_:t.duration},this.v.set(e.id,e),this.u.push(e)),this.u.sort((t,n)=>n._-t._),this.u.length>10){const t=this.u.splice(10);for(const n of t)this.v.delete(n.id)}this.p?.(e)}}}const A=t=>{const n="requestIdleCallback"in globalThis?1e3:0,e=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)t();else{const o=y(t);let s=-1;const a=()=>{i(s),o()};addEventListener("visibilitychange",a,{once:!0,capture:!0}),s=e(()=>{removeEventListener("visibilitychange",a,{capture:!0}),o()},{timeout:n})}},O=[200,500];class H{m;l;h(t){this.m?.(t)}}const U=[2500,4e3],V=[800,1800],W=t=>{document.prerendering?M(()=>W(t)):"complete"!==document.readyState?addEventListener("load",()=>W(t),!0):setTimeout(t)};return t.CLSThresholds=P,t.FCPThresholds=_,t.INPThresholds=O,t.LCPThresholds=U,t.TTFBThresholds=V,t.onCLS=(t,n={})=>{const a=l();L(y(()=>{let r,c=u("CLS",0);const f=v(n,m),d=(e,i,s,a,d)=>{c=u("CLS",0,e,i,s,a,d),f.i=0,r=o(t,c,P,n.reportAllChanges)},h=(t=!1)=>{f.i>c.value&&(c.value=f.i,c.entries=f.o),r(t)},l=t=>{h(!0),d("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},g=t=>{for(const n of t)"soft-navigation"!==n.entryType?f.h(n):l(n);h()},T=["layout-shift"];b(n)&&T.push("soft-navigation");const y=p(T,g);y&&(r=o(t,c,P,n.reportAllChanges),a.onHidden(()=>{g(y.takeRecords()),r(!0)}),i(()=>{d("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,e()),s(r)}),setTimeout(r))}))},t.onFCP=L,t.onINP=(t,n={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const s=l();M(()=>{N();let a,r=u("INP");const c=v(n,q),f=(e,i,s,f,d)=>{c.T(),r=u("INP",-1,e,i,s,f,d),a=o(t,r,O,n.reportAllChanges)},d=()=>{const t=c.M(r.navigationType);t&&t._!==r.value&&(r.value=t._,r.entries=t.entries,a())},h=t=>{d(),a(!0),f("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},l=(t,n=!1)=>{A(()=>{for(const n of t)"soft-navigation"!==n.entryType?c.h(n):h(n);d(),n&&a(!0)})},g=["event","first-input"];b(n)&&g.push("soft-navigation");const m=p(g,l,{...n,durationThreshold:n.durationThreshold??40});a=o(t,r,O,n.reportAllChanges),m&&(s.onHidden(()=>{l(m.takeRecords(),!0)}),i(()=>{f("back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,e())}))})},t.onLCP=(t,n={})=>{let a=!1;const c=b(n);M(()=>{let f,d=l(),h=u("LCP");const g=v(n,H),m=(e,i,s,r,c)=>{h=u("LCP",-1,e,i,s,r,c),f=o(t,h,U,n.reportAllChanges),a=!1,"soft-navigation"===e&&(d=l(!0))},b=t=>{g.l&&t.navigationId&&T(g.l,t),a||f(!0),m("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime);const n=t.getLargestInteractionContentfulPaint?.();n&&y([n])},y=t=>{n.reportAllChanges||c||(t=t.slice(-1));for(const n of t){if(!n)continue;if("soft-navigation"===n.entryType){b(n);continue}let t=0,e=[],i=n.startTime;if("largest-contentful-paint"===n.entryType)t=Math.max(n.startTime-r(),0),g.h(n),e=[n];else if("interaction-contentful-paint"===n.entryType){const o=n;if(!h.navigationId)continue;if("interactionId"in o&&o.interactionId!=h.navigationInteractionId)continue;i=o.largestContentfulPaint?.renderTime||0,t=Math.max(i-n.startTime,0),o.largestContentfulPaint&&(g.h(o.largestContentfulPaint),e=[o.largestContentfulPaint])}i<d.firstHiddenTime&&(h.value=t,h.entries=e,f())}},E=["largest-contentful-paint"];c&&E.push("interaction-contentful-paint","soft-navigation");const M=p(E,y);if(M){f=o(t,h,U,n.reportAllChanges);const r=["keydown","click","visibilitychange"],d=t=>{if(t.isTrusted&&!a){const t=h.id;A(()=>{if(!a){if(!c){M.disconnect();for(const t of r)removeEventListener(t,d,{capture:!0})}t===h.id&&(a=!0,f(!0))}})}};for(const t of r)addEventListener(t,d,{capture:!0});i(i=>{m("back-forward-cache",h.navigationId,h.navigationInteractionId,h.navigationURL,e()),f=o(t,h,U,n.reportAllChanges),s(()=>{h.value=performance.now()-i.timeStamp,a=!0,f(!0)})})}})},t.onTTFB=(t,n={})=>{const s=b(n);let c=u("TTFB"),f=o(t,c,V,n.reportAllChanges);W(()=>{const d=a();if(d){const a=d.responseStart;if(c.value=Math.max(a-r(),0),c.entries=[d],f(!0),i(()=>{c=u("TTFB",0,"back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,e()),f=o(t,c,V,n.reportAllChanges),f(!0)}),s){p(["soft-navigation"],e=>{e.forEach(e=>{e.navigationId&&(c=u("TTFB",0,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),c.entries=[e],f=o(t,c,V,n.reportAllChanges),f(!0))})},n)}}})},t}({});
//# sourceMappingURL=web-vitals.iife.js.map

@@ -1,1 +0,2 @@

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

@@ -1,1 +0,2 @@

!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={})}(this,function(e){"use strict";let t=-1;const n=e=>{addEventListener("pageshow",n=>{n.persisted&&(t=n.timeStamp,e(n))},!0)},i=(e,t,n,i)=>{let o,s;return r=>{t.value>=0&&(r||i)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},r=()=>s()?.activationStart??0,c=(e,n=-1)=>{const i=s();let o="navigate";t>=0?o="back-forward-cache":i&&(document.prerendering||r()>0?o="prerender":document.wasDiscarded?o="restore":i.type&&(o=i.type.replace(/_/g,"-")));return{name:e,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},a=new WeakMap;function d(e,t){let n=a.get(t);return n||(n=new WeakMap,a.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}class f{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const h=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver(e=>{queueMicrotask(()=>{t(e.getEntries())})});return i.observe({type:e,buffered:!0,...n}),i}}catch{}},l=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let u=-1;const p=new Set,m=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,g=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of p)e();isFinite(u)||(u="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",g,!0))}},v=()=>{if(u<0){const e=r(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;u=t??m(),addEventListener("visibilitychange",g,!0),addEventListener("prerenderingchange",g,!0),n(()=>{setTimeout(()=>{u=m()})})}return{get firstHiddenTime(){return u},onHidden(e){p.add(e)}}},y=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},T=[1800,3e3],b=(e,t={})=>{y(()=>{const s=v();let a,d=c("FCP");const f=h("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<s.firstHiddenTime&&(d.value=Math.max(t.startTime-r(),0),d.entries.push(t),a(!0)))});f&&(a=i(e,d,T,t.reportAllChanges),n(n=>{d=c("FCP"),a=i(e,d,T,t.reportAllChanges),o(()=>{d.value=performance.now()-n.timeStamp,a(!0)})}))})},E=[.1,.25];let L=0,P=1/0,_=0;const M=e=>{for(const t of e)t.interactionId&&(P=Math.min(P,t.interactionId),_=Math.max(_,t.interactionId),L=_?(_-P)/7+1:0)};let w;const C=()=>w?L:performance.interactionCount??0,I=()=>{"interactionCount"in performance||w||(w=h("event",M,{durationThreshold:0}))};let F=0;class k{l=[];u=new Map;p;m;v(){F=C(),this.l.length=0,this.u.clear()}T(){const e=Math.min(this.l.length-1,Math.floor((C()-F)/50));return this.l[e]}h(e){if(this.p?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.l.at(-1);let n=this.u.get(e.interactionId);if(n||this.l.length<10||e.duration>t.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((e,t)=>t.L-e.L),this.l.length>10){const e=this.l.splice(10);for(const t of e)this.u.delete(t.id)}this.m?.(n)}}}const x=e=>{const t=globalThis.requestIdleCallback||setTimeout,n=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const i=l(e);let o=-1;const s=()=>{n(o),i()};addEventListener("visibilitychange",s,{once:!0,capture:!0}),o=t(()=>{removeEventListener("visibilitychange",s,{capture:!0}),i()})}},A=[200,500];class B{p;h(e){this.p?.(e)}}const S=[2500,4e3],q=[800,1800],N=e=>{document.prerendering?y(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};e.CLSThresholds=E,e.FCPThresholds=T,e.INPThresholds=A,e.LCPThresholds=S,e.TTFBThresholds=q,e.onCLS=(e,t={})=>{const s=v();b(l(()=>{let r,a=c("CLS",0);const l=d(t,f),u=e=>{for(const t of e)l.h(t);l.i>a.value&&(a.value=l.i,a.entries=l.o,r())},p=h("layout-shift",u);p&&(r=i(e,a,E,t.reportAllChanges),s.onHidden(()=>{u(p.takeRecords()),r(!0)}),n(()=>{l.i=0,a=c("CLS",0),r=i(e,a,E,t.reportAllChanges),o(r)}),setTimeout(r))}))},e.onFCP=b,e.onINP=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const o=v();y(()=>{I();let s,r=c("INP");const a=d(t,k),f=e=>{x(()=>{for(const t of e)a.h(t);const t=a.T();t&&t.L!==r.value&&(r.value=t.L,r.entries=t.entries,s())})},l=h("event",f,{durationThreshold:t.durationThreshold??40});s=i(e,r,A,t.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),o.onHidden(()=>{f(l.takeRecords()),s(!0)}),n(()=>{a.v(),r=c("INP"),s=i(e,r,A,t.reportAllChanges)}))})},e.onLCP=(e,t={})=>{y(()=>{const s=v();let a,f=c("LCP");const u=d(t,B),p=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)u.h(t),t.startTime<s.firstHiddenTime&&(f.value=Math.max(t.startTime-r(),0),f.entries=[t],a())},m=h("largest-contentful-paint",p);if(m){a=i(e,f,S,t.reportAllChanges);const s=l(()=>{p(m.takeRecords()),m.disconnect(),a(!0)}),r=e=>{e.isTrusted&&(x(s),removeEventListener(e.type,r,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,r,{capture:!0});n(n=>{f=c("LCP"),a=i(e,f,S,t.reportAllChanges),o(()=>{f.value=performance.now()-n.timeStamp,a(!0)})})}})},e.onTTFB=(e,t={})=>{let o=c("TTFB"),a=i(e,o,q,t.reportAllChanges);N(()=>{const d=s();d&&(o.value=Math.max(d.responseStart-r(),0),o.entries=[d],a(!0),n(()=>{o=c("TTFB",0),a=i(e,o,q,t.reportAllChanges),a(!0)}))})}});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).webVitals={})}(this,function(t){"use strict";let n=-1;const e=()=>n,i=t=>{addEventListener("pageshow",e=>{e.persisted&&(n=e.timeStamp,t(e))},!0)},o=(t,n,e,i)=>{let o,s;return a=>{n.value>=0&&(a||i)&&(s=n.value-(o??0),(s||void 0===o)&&(o=n.value,n.delta=s,n.rating=((t,n)=>t>n[1]?"poor":t>n[0]?"needs-improvement":"good")(n.value,e),t(n)))}},s=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},a=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},r=()=>a()?.activationStart??0;let c=-1;const f=new Set,d=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,l=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of f)t();isFinite(c)||(c="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",l,!0))}},h=(t=!1)=>{if(t&&(c=1/0),c<0){const t=r(),n=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(n=>"hidden"===n.name&&n.startTime>=t)?.startTime;c=n??d(),addEventListener("visibilitychange",l,!0),addEventListener("prerenderingchange",l,!0),i(()=>{setTimeout(()=>{c=d()})})}return{get firstHiddenTime(){return c},onHidden(t){f.add(t)}}},u=(t,n=-1,i,o=0,s,c,f)=>{const d=a(),l=d?.navigationId||0;let h="navigate";i?h=i:e()>=0?h="back-forward-cache":d&&(document.prerendering||r()>0?h="prerender":document.wasDiscarded?h="restore":d.type&&(h=d.type.replace(/_/g,"-")));return{name:t,value:n,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:h,navigationId:o||l,navigationInteractionId:s,navigationURL:c||d?.name,navigationStartTime:f||0}},g=new WeakMap;function v(t,n){let e=g.get(n);return e||(e=new WeakMap,g.set(n,e)),e.get(t)||e.set(t,new n),e.get(t)}class p{t;i=0;o=[];l(t){if(t.hadRecentInput)return;const n=this.o[0],e=this.o.at(-1);this.i&&n&&e&&t.startTime-e.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}}const m=(t,n,e={})=>{try{const i=t.filter(t=>PerformanceObserver.supportedEntryTypes.includes(t));if(i.length>0){const t=new PerformanceObserver(t=>{queueMicrotask(()=>{const e=t.getEntries();i.length>1&&e.sort((t,n)=>t.startTime+t.duration-(n.startTime+n.duration)),n(e)})});for(const n of i)t.observe({type:n,buffered:!0,...e});return t}}catch{}},b=t=>PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&t&&t.reportSoftNavs,y=(t,n)=>{if(t.set(n.navigationId,n),t.size>2){const n=t.keys().next().value;void 0!==n&&t.delete(n)}},T=t=>{let n=!1;return()=>{n||(t(),n=!0)}};class E{h}const M=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},_=[1800,3e3],L=(t,n={})=>{const a=b(n);M(()=>{const c=v(n,E),f=h();let d,l=u("FCP");const g=m(["paint"],t=>{for(const n of t)"first-contentful-paint"===n.name&&(g.disconnect(),n.startTime<f.firstHiddenTime&&(l.value=Math.max(n.startTime-r(),0),l.entries.push(n),l.navigationId=n.navigationId||l.navigationId,d(!0)))});if(g&&(d=o(t,l,_,n.reportAllChanges),i(i=>{l=u("FCP",-1,"back-forward-cache",l.navigationId,l.navigationInteractionId,l.navigationURL,e()),d=o(t,l,_,n.reportAllChanges),s(()=>{l.value=performance.now()-i.timeStamp,d(!0)})})),a){m(["soft-navigation"],e=>{e.forEach(e=>{c.h&&e.navigationId&&y(c.h,e);const i=Math.max((e.presentationTime||e.paintTime||0)-e.startTime,0);l=u("FCP",i,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),d=o(t,l,_,n.reportAllChanges),d(!0)})},n)}})},P=[.1,.25];let w=0,k=1/0,I=0;const C=t=>{for(const n of t)n.interactionId&&(k=Math.min(k,n.interactionId),I=Math.max(I,n.interactionId),w=I?(I-k)/7+1:0)};let F;const B=()=>F?w:performance.interactionCount??0,N=()=>{"interactionCount"in performance||F||(F=m(["event"],C,{durationThreshold:0}))};let S=0;class q{u=[];v=new Map;p;m;T(){S=B(),this.u.length=0,this.v.clear()}M(t){const n=B()-S,e=Math.min(this.u.length-1,Math.floor(n/50));return!n||-1!==e||"soft-navigation"!==t&&"back-forward-cache"!==t?this.u[e]:{_:8,id:-1,entries:[]}}l(t){if(this.p?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const n=this.u.at(-1);let e=this.v.get(t.interactionId);if(e||this.u.length<10||t.duration>n._){if(e?t.duration>e._?(e.entries=[t],e._=t.duration):t.duration===e._&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(e={id:t.interactionId,entries:[t],_:t.duration},this.v.set(e.id,e),this.u.push(e)),this.u.sort((t,n)=>n._-t._),this.u.length>10){const t=this.u.splice(10);for(const n of t)this.v.delete(n.id)}this.m?.(e)}}}const x=t=>{const n="requestIdleCallback"in globalThis?1e3:0,e=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)t();else{const o=T(t);let s=-1;const a=()=>{i(s),o()};addEventListener("visibilitychange",a,{once:!0,capture:!0}),s=e(()=>{removeEventListener("visibilitychange",a,{capture:!0}),o()},{timeout:n})}},A=[200,500];class O{p;h;l(t){this.p?.(t)}}const H=[2500,4e3],U=[800,1800],W=t=>{document.prerendering?M(()=>W(t)):"complete"!==document.readyState?addEventListener("load",()=>W(t),!0):setTimeout(t)};t.CLSThresholds=P,t.FCPThresholds=_,t.INPThresholds=A,t.LCPThresholds=H,t.TTFBThresholds=U,t.onCLS=(t,n={})=>{const a=h();L(T(()=>{let r,c=u("CLS",0);const f=v(n,p),d=(e,i,s,a,d)=>{c=u("CLS",0,e,i,s,a,d),f.i=0,r=o(t,c,P,n.reportAllChanges)},l=(t=!1)=>{f.i>c.value&&(c.value=f.i,c.entries=f.o),r(t)},h=t=>{l(!0),d("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},g=t=>{for(const n of t)"soft-navigation"!==n.entryType?f.l(n):h(n);l()},y=["layout-shift"];b(n)&&y.push("soft-navigation");const T=m(y,g);T&&(r=o(t,c,P,n.reportAllChanges),a.onHidden(()=>{g(T.takeRecords()),r(!0)}),i(()=>{d("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,e()),s(r)}),setTimeout(r))}))},t.onFCP=L,t.onINP=(t,n={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const s=h();M(()=>{N();let a,r=u("INP");const c=v(n,q),f=(e,i,s,f,d)=>{c.T(),r=u("INP",-1,e,i,s,f,d),a=o(t,r,A,n.reportAllChanges)},d=()=>{const t=c.M(r.navigationType);t&&t._!==r.value&&(r.value=t._,r.entries=t.entries,a())},l=t=>{d(),a(!0),f("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime)},h=(t,n=!1)=>{x(()=>{for(const n of t)"soft-navigation"!==n.entryType?c.l(n):l(n);d(),n&&a(!0)})},g=["event","first-input"];b(n)&&g.push("soft-navigation");const p=m(g,h,{...n,durationThreshold:n.durationThreshold??40});a=o(t,r,A,n.reportAllChanges),p&&(s.onHidden(()=>{h(p.takeRecords(),!0)}),i(()=>{f("back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,e())}))})},t.onLCP=(t,n={})=>{let a=!1;const c=b(n);M(()=>{let f,d=h(),l=u("LCP");const g=v(n,O),p=(e,i,s,r,c)=>{l=u("LCP",-1,e,i,s,r,c),f=o(t,l,H,n.reportAllChanges),a=!1,"soft-navigation"===e&&(d=h(!0))},b=t=>{g.h&&t.navigationId&&y(g.h,t),a||f(!0),p("soft-navigation",t.navigationId,t.interactionId,t.name,t.startTime);const n=t.getLargestInteractionContentfulPaint?.();n&&T([n])},T=t=>{n.reportAllChanges||c||(t=t.slice(-1));for(const n of t){if(!n)continue;if("soft-navigation"===n.entryType){b(n);continue}let t=0,e=[],i=n.startTime;if("largest-contentful-paint"===n.entryType)t=Math.max(n.startTime-r(),0),g.l(n),e=[n];else if("interaction-contentful-paint"===n.entryType){const o=n;if(!l.navigationId)continue;if("interactionId"in o&&o.interactionId!=l.navigationInteractionId)continue;i=o.largestContentfulPaint?.renderTime||0,t=Math.max(i-n.startTime,0),o.largestContentfulPaint&&(g.l(o.largestContentfulPaint),e=[o.largestContentfulPaint])}i<d.firstHiddenTime&&(l.value=t,l.entries=e,f())}},E=["largest-contentful-paint"];c&&E.push("interaction-contentful-paint","soft-navigation");const M=m(E,T);if(M){f=o(t,l,H,n.reportAllChanges);const r=["keydown","click","visibilitychange"],d=t=>{if(t.isTrusted&&!a){const t=l.id;x(()=>{if(!a){if(!c){M.disconnect();for(const t of r)removeEventListener(t,d,{capture:!0})}t===l.id&&(a=!0,f(!0))}})}};for(const t of r)addEventListener(t,d,{capture:!0});i(i=>{p("back-forward-cache",l.navigationId,l.navigationInteractionId,l.navigationURL,e()),f=o(t,l,H,n.reportAllChanges),s(()=>{l.value=performance.now()-i.timeStamp,a=!0,f(!0)})})}})},t.onTTFB=(t,n={})=>{const s=b(n);let c=u("TTFB"),f=o(t,c,U,n.reportAllChanges);W(()=>{const d=a();if(d){const a=d.responseStart;if(c.value=Math.max(a-r(),0),c.entries=[d],f(!0),i(()=>{c=u("TTFB",0,"back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,e()),f=o(t,c,U,n.reportAllChanges),f(!0)}),s){m(["soft-navigation"],e=>{e.forEach(e=>{e.navigationId&&(c=u("TTFB",0,"soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime),c.entries=[e],f=o(t,c,U,n.reportAllChanges),f(!0))})},n)}}})}});
//# sourceMappingURL=web-vitals.umd.cjs.map
{
"name": "web-vitals",
"version": "5.3.0",
"version": "6.0.0",
"description": "Easily measure performance metrics in JavaScript",

@@ -93,2 +93,3 @@ "publishConfig": {

"release:rc": "npm version prerelease --preid=rc -m 'Release v%s' && npm publish --tag next",
"release:soft-navs": "npm run build && npm publish --tag soft-navs",
"test": "npm-run-all build test:unit -p -r test:e2e test:server",

@@ -136,21 +137,24 @@ "test:e2e": "wdio",

"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-env": "^7.28.5",
"@rollup/plugin-babel": "^6.1.0",
"@rollup/plugin-terser": "^0.4.4",
"@typescript-eslint/eslint-plugin": "^8.52.0",
"@typescript-eslint/parser": "^8.52.0",
"@wdio/cli": "^9.23.0",
"@wdio/local-runner": "^9.25.0",
"@wdio/mocha-framework": "^9.25.0",
"@wdio/spec-reporter": "^9.25.0",
"eslint": "^9.39.2",
"fs-extra": "^11.3.3",
"@babel/core": "^7.29.7",
"@babel/preset-env": "^7.29.7",
"@eslint/eslintrc": "^3.3.6",
"@eslint/js": "^10.0.1",
"@rollup/plugin-babel": "^7.1.0",
"@rollup/plugin-terser": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^8.64.0",
"@typescript-eslint/parser": "^8.64.0",
"@wdio/cli": "^9.29.1",
"@wdio/local-runner": "^9.29.1",
"@wdio/mocha-framework": "^9.29.1",
"@wdio/spec-reporter": "^9.29.1",
"eslint": "^10.7.0",
"fs-extra": "^11.3.6",
"globals": "^17.7.0",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"lint-staged": "^17.0.8",
"npm-run-all": "^4.1.5",
"nunjucks": "^3.2.4",
"prettier": "^3.7.4",
"rollup": "^4.55.1",
"typescript": "^5.9.3",
"prettier": "^3.9.5",
"rollup": "^4.62.2",
"typescript": "^6.0.3",
"yargs": "^18.0.0"

@@ -157,0 +161,0 @@ },

+120
-19

@@ -31,3 +31,3 @@ # `web-vitals`

The `web-vitals` library is a tiny (~2K, brotli'd), modular library for measuring all the [Web Vitals](https://web.dev/articles/vitals) metrics on real users, in a way that accurately matches how they're measured by Chrome and reported to other Google tools (e.g. [Chrome User Experience Report](https://developers.google.com/web/tools/chrome-user-experience-report), [Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/), [Search Console's Speed Report](https://webmasters.googleblog.com/2019/11/search-console-speed-report.html)).
The `web-vitals` library is a tiny (~3K, brotli'd), modular library for measuring all the [Web Vitals](https://web.dev/articles/vitals) metrics on real users, in a way that accurately matches how they're measured by Chrome and reported to other Google tools (e.g. [Chrome User Experience Report](https://developers.google.com/web/tools/chrome-user-experience-report), [Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/), [Search Console's Speed Report](https://webmasters.googleblog.com/2019/11/search-console-speed-report.html)).

@@ -214,3 +214,3 @@ The library supports all of the [Core Web Vitals](https://web.dev/articles/vitals#core_web_vitals) as well as a number of other metrics that are useful in diagnosing [real-user](https://web.dev/articles/user-centric-performance-metrics) performance issues.

> [!WARNING]
> Do not call any of the Web Vitals functions (e.g. `onCLS()`, `onINP()`, `onLCP()`) more than once per page load. Each of these functions creates a `PerformanceObserver` instance and registers event listeners for the lifetime of the page. While the overhead of calling these functions once is negligible, calling them repeatedly on the same page may eventually result in a memory leak.
> Avoid calling the Web Vitals functions (e.g. `onCLS()`, `onINP()`, `onLCP()`) repeatedly per page load without a good reason. Each of these functions creates a `PerformanceObserver` instance and registers event listeners for the lifetime of the page. While the overhead of calling these functions once is negligible, calling them repeatedly on the same page may eventually result increased memory overhead.

@@ -257,2 +257,61 @@ ### Report the value on every change

### Report metrics for soft navigations
When originally launched, Core Web Vitals are only tracked for full page navigations, which can affect how [Single Page Applications](https://web.dev/vitals-spa-faq/) that use so called "soft navigations" to update the browser URL and history outside of the normal browser's handling of this.
The Chrome team have added a feature from Chrome 151 to enable [measuring these soft navigations](https://github.com/WICG/soft-navigations) and report on Core Web Vitals separately for them.
A "soft navigation" is tracked automatically when the following three things happen:
- A user interaction occurs
- The URL changes
- Something is painted to screen.
For some sites, this definition may lead to false positives (that users would not really consider a "navigation"), or false negatives (where the user does consider a navigation to have happened despite not missing the above criteria). However, by having the browser define the soft navigation, rather than depending on SPA frameworks to call an API when happens, allows for soft navigations to be measured for existing SPA applications and also provides a more consistent experience across frameworks.
Some important points to note:
- TTFB is reported as 0, and not the time of the first network call (if any) after the soft navigation.
- FCP and LCP are the first and largest contentful paints after the soft navigation. Elements that remain between soft navigations will not count since they are not repainted. This can lead to differences between measuring performance for a page from a soft navigation and a hard navigation.
- INP is reset to measure only interactions after the the soft navigation.
- CLS is reset to measure again separate to the first page.
The metrics can be reported for Soft Navigations using the `reportSoftNavs: true` reporting option:
```js
import {
onCLS,
onINP,
onLCP,
} from 'https://unpkg.com/web-vitals@soft-navs/dist/web-vitals.js?module';
onCLS(console.log, {reportSoftNavs: true});
onINP(console.log, {reportSoftNavs: true});
onLCP(console.log, {reportSoftNavs: true});
```
Note that this will change the way the first page loads are measured as the metrics for the initial URL will be finalized once the first soft nav occurs.
This will also lead to differences with browsers that support soft navigations (Chromium-based browsers on version 151+) and other browsers (that will not change reporting even with the `reportSoftNavs` flag).
To measure both you need to register two callbacks:
```js
import {
onCLS,
onINP,
onLCP,
} from 'https://unpkg.com/web-vitals@soft-navs/dist/web-vitals.js?module';
onCLS(doTraditionalProcessing);
onINP(doTraditionalProcessing);
onLCP(doTraditionalProcessing);
onCLS(doSoftNavProcessing, {reportSoftNavs: true});
onINP(doSoftNavProcessing, {reportSoftNavs: true});
onLCP(doSoftNavProcessing, {reportSoftNavs: true});
```
In both cases the `navigationURL` property will provide the URL the metrics are for. This should be used rather than assuming the current URL is the page URL, since metrics may be reported after the fact.
### Send the results to an analytics endpoint

@@ -273,2 +332,5 @@

// Override the page location for soft nav support
page_location: navigationURL,
// Include additional data as needed...

@@ -307,2 +369,5 @@ });

// Override the page location as metrics can be reported late for soft navs
page_location: navigationURL,
// OPTIONAL: any additional params or debug info here.

@@ -347,2 +412,5 @@ // See: https://web.dev/articles/debug-performance-in-the-field

metric_delta: delta, // Optional.
// Override the page location for soft nav support
page_location: navigationURL,
};

@@ -555,2 +623,3 @@

* restored by the user.
* - 'soft-navigation': for soft navigations.
*/

@@ -563,3 +632,28 @@ navigationType:

| 'prerender'
| 'restore';
| 'restore'
| 'soft-navigation';
/**
* The navigationId the metric happened for. This is particularly relevant for soft navigations where
* the metric may be reported for a previous URL.
*/
navigationId: number;
/**
* For metrics specific to a soft navigation, the interactionId of the
* interaction that triggered that soft navigation.
*/
navigationInteractionId?: number;
/**
* The navigation startTime the metric is based from. This is particularly
* relevant for soft navigations where time origin is not 0.
*/
navigationStartTime?: number;
/**
* The navigation URL the metric happened for. This is particularly relevant for soft navigations where
* the metric may be reported for a previous URL.
*/
navigationURL?: string;
}

@@ -611,3 +705,3 @@ ```

name: 'TTFB';
entries: PerformanceNavigationTiming[];
entries: (PerformanceNavigationTiming | PeformanceSoftNavigation)[];
}

@@ -672,2 +766,3 @@ ```

includeProcessedEventEntries?: boolean;
reportSoftNavs?: boolean;
}

@@ -697,6 +792,3 @@ ```

type LoadState =
| 'loading'
| 'dom-interactive'
| 'dom-content-loaded'
| 'complete';
'loading' | 'dom-interactive' | 'dom-content-loaded' | 'complete';
```

@@ -829,3 +921,3 @@

3. The `onINP` `AttributionReportOpts` supports an additional, optional, `includeProcessedEventEntries` configuration option. When set to `false`, the `event` performance entries will not be included in the `attribution` object to conserve memory if these entries are not needed. The default value is `true`.
3. The `onINP` `AttributionReportOpts` supports an additional, optional, `includeProcessedEventEntries` configuration option. When set to `true`, _all_ the `event` performance entries processed during the INP duration will be included in the `attribution.processedEventEntries` object. This can include a lot of events and increased memory on very interactive or event-heavy pages. The default value is `false`. Regardless of this setting, the `entries` object will include the entries with an `interactionId` (which are the entries relevant for INP), but use this setting to include all entries (whether they have an `interactionId` or not) in `attribution.processedEventEntries` if you need more attribution information to identify delays to INP events.

@@ -912,3 +1004,3 @@ ```ts

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
}

@@ -929,4 +1021,6 @@ ```

* returns null or undefined.
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionTarget: string;
interactionTarget?: string;
/**

@@ -936,4 +1030,6 @@ * The time when the user first interacted during the frame where the INP

* within the frame, only the first time is reported).
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionTime: DOMHighResTimeStamp;
interactionTime?: DOMHighResTimeStamp;
/**

@@ -945,4 +1041,6 @@ * The type of interaction, based on the event type of the `event` entry

* and for "keydown" or "keyup" events this will be "keyboard".
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionType: 'pointer' | 'keyboard';
interactionType?: 'pointer' | 'keyboard';
/**

@@ -954,9 +1052,11 @@ * The best-guess timestamp of the next paint after the interaction.

* reported after the processing times.
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
nextPaintTime: DOMHighResTimeStamp;
nextPaintTime?: DOMHighResTimeStamp;
/**
* An array of Event Timing entries that were processed within the same
* animation frame as the INP candidate interaction.
* This array can be quite large so it will be empty if the
* `includeProcessedEventEntries` configuration option is set to `false` to
* This array can be quite large so it will be empty unless the
* `includeProcessedEventEntries` configuration option is set to `true` to
* conserve memory if these entries are not required.

@@ -1104,3 +1204,3 @@ */

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
/**

@@ -1155,3 +1255,3 @@ * The `resource` entry for the LCP resource (if applicable), which is useful

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
}

@@ -1164,3 +1264,3 @@ ```

However, some of the APIs required to capture these metrics (notable CLS) are currently only available in some browsers. The latest browser support for each function is as follows:
However, some of the APIs required to capture these metrics (notable CLS and soft navigations) are currently only available in some browsers. The latest browser support for each function is as follows:

@@ -1172,2 +1272,3 @@ - `onCLS()`: Chromium

- `onTTFB()`: Chromium, Firefox, Safari
- Core Web Vitals for soft navigations: Chromium 151+

@@ -1174,0 +1275,0 @@ ## Limitations

@@ -22,3 +22,3 @@ /*

import {onCLS as unattributedOnCLS} from '../onCLS.js';
import {
import type {
CLSAttribution,

@@ -25,0 +25,0 @@ CLSMetric,

@@ -20,4 +20,7 @@ /*

import {getNavigationEntry} from '../lib/getNavigationEntry.js';
import {initUnique} from '../lib/initUnique.js';
import {FCPEntryManager} from '../lib/FCPEntryManager.js';
import {checkSoftNavsEnabled} from '../lib/softNavs.js';
import {onFCP as unattributedOnFCP} from '../onFCP.js';
import {
import type {
FCPAttribution,

@@ -29,46 +32,66 @@ FCPMetric,

const attributeFCP = (metric: FCPMetric): FCPMetricWithAttribution => {
// Use a default object if no other attribution has been set.
let attribution: FCPAttribution = {
timeToFirstByte: 0,
firstByteToFCP: metric.value,
loadState: getLoadState(getBFCacheRestoreTime()),
};
export const onFCP = (
onReport: (metric: FCPMetricWithAttribution) => void,
opts: AttributionReportOpts = {},
) => {
opts = Object.assign({}, opts);
if (metric.entries.length) {
const navigationEntry = getNavigationEntry();
const fcpEntry = metric.entries.at(-1);
// Init the fcpEntryManager (which will already be initialised in the
// unattributed onFCP method if soft navigation reporting is enabled
// and so will return that fcpEntryManager, rather than a new one)
const fcpEntryManager = initUnique(opts, FCPEntryManager);
if (checkSoftNavsEnabled(opts)) {
fcpEntryManager._softNavigationEntryMap = new Map();
}
if (navigationEntry) {
const activationStart = navigationEntry.activationStart || 0;
const ttfb = Math.max(0, navigationEntry.responseStart - activationStart);
const attributeFCP = (metric: FCPMetric): FCPMetricWithAttribution => {
// Use a default object if no other attribution has been set.
let attribution: FCPAttribution = {
timeToFirstByte: 0,
firstByteToFCP: metric.value,
loadState: getLoadState(getBFCacheRestoreTime()),
};
attribution = {
timeToFirstByte: ttfb,
firstByteToFCP: metric.value - ttfb,
loadState: getLoadState(metric.entries[0].startTime),
navigationEntry,
fcpEntry,
};
if (metric.navigationType !== 'soft-navigation') {
if (metric.entries.length) {
const navigationEntry = getNavigationEntry();
const fcpEntry = metric.entries.at(-1);
if (navigationEntry) {
const responseStart = navigationEntry.responseStart;
const activationStart = navigationEntry.activationStart || 0;
const ttfb = Math.max(0, responseStart - activationStart);
attribution = {
timeToFirstByte: ttfb,
firstByteToFCP: metric.value - ttfb,
loadState: getLoadState(metric.entries[0].startTime),
navigationEntry,
fcpEntry,
};
}
}
} else {
// Lookup the soft navigation entry. Do not use getEntriesByType since
// that is limited to the first 50 navigation entries due to buffer size.
const navigationEntry = fcpEntryManager._softNavigationEntryMap?.get(
metric.navigationId,
);
if (navigationEntry) {
attribution = {
timeToFirstByte: 0,
firstByteToFCP: metric.value,
loadState: 'complete',
navigationEntry,
};
}
}
}
// Use `Object.assign()` to ensure the original metric object is returned.
const metricWithAttribution: FCPMetricWithAttribution = Object.assign(
metric,
{attribution},
);
return metricWithAttribution;
};
// Use `Object.assign()` to ensure the original metric object is returned.
const metricWithAttribution: FCPMetricWithAttribution = Object.assign(
metric,
{attribution},
);
return metricWithAttribution;
};
/**
* Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and
* calls the `callback` function once the value is ready, along with the
* relevant `paint` performance entry used to determine the value. The reported
* value is a `DOMHighResTimeStamp`.
*/
export const onFCP = (
onReport: (metric: FCPMetricWithAttribution) => void,
opts: AttributionReportOpts = {},
) => {
unattributedOnFCP((metric: FCPMetric) => {

@@ -75,0 +98,0 @@ onReport(attributeFCP(metric));

@@ -20,7 +20,10 @@ /*

import {initUnique} from '../lib/initUnique.js';
import {InteractionManager, Interaction} from '../lib/InteractionManager.js';
import {
InteractionManager,
type Interaction,
} from '../lib/InteractionManager.js';
import {observe} from '../lib/observe.js';
import {whenIdleOrHidden} from '../lib/whenIdleOrHidden.js';
import {onINP as unattributedOnINP} from '../onINP.js';
import {
import type {
INPAttribution,

@@ -67,3 +70,3 @@ INPAttributionReportOpts,

* be passed to control whether the `processedEventEntries` array in the
* attribution object is populated. The default value is `true`.
* attribution object is populated. The default value is `false`.
*

@@ -188,3 +191,3 @@ * If the `reportAllChanges` configuration option is set to `true`, the

// the user explicitly requests them (default is to include).
if (opts.includeProcessedEventEntries !== false) {
if (opts.includeProcessedEventEntries) {
group.entries.push(entry);

@@ -206,3 +209,3 @@ }

// the user explicitly requests them (default is to include).
entries: opts.includeProcessedEventEntries !== false ? [entry] : [],
entries: opts.includeProcessedEventEntries ? [entry] : [],
};

@@ -300,8 +303,14 @@

const attributeLoAFDetails = (attribution: INPAttribution) => {
// If there is no LoAF data then nothing further to attribute
if (!attribution.longAnimationFrameEntries?.length) {
const interactionTime = attribution.interactionTime;
const nextPaintTime = attribution.nextPaintTime;
// If there is no LoAF data, interactionTime or paintTime
// then nothing further to attribute here.
if (
!attribution.longAnimationFrameEntries?.length ||
!interactionTime ||
!nextPaintTime
) {
return;
}
const interactionTime = attribution.interactionTime;
const inputDelay = attribution.inputDelay;

@@ -369,3 +378,3 @@ const processingDuration = attribution.processingDuration;

if (lastLoAFEndTime >= interactionTime + inputDelay + processingDuration) {
totalPaintDuration = attribution.nextPaintTime - lastLoAFEndTime;
totalPaintDuration = nextPaintTime - lastLoAFEndTime;
}

@@ -384,3 +393,3 @@

attribution.totalUnattributedDuration =
attribution.nextPaintTime -
nextPaintTime -
interactionTime -

@@ -393,6 +402,25 @@ totalScriptDuration -

const attributeINP = (metric: INPMetric): INPMetricWithAttribution => {
// Soft navs and bfcache can have a dummy INP as no first-input entry to
// fall back on so we report dummy values when the interactionCount has
// gone up, even if no entry was emitted.
// See https://github.com/GoogleChrome/web-vitals/issues/724
// All other INPs should have at least one entry, but we'll do same dummy
// processing if they don't for some reason.
if (metric.entries.length === 0) {
const navStartTime = metric.navigationStartTime || 0;
const attribution: INPAttribution = {
processedEventEntries: [],
longAnimationFrameEntries: [],
inputDelay: 0,
processingDuration: 0,
presentationDelay: metric.value,
loadState: getLoadState(navStartTime),
};
return Object.assign(metric, {attribution});
}
const firstEntry = metric.entries[0];
const group = entryToEntriesGroupMap.get(firstEntry)!;
const processingStart = firstEntry.processingStart;
const processingStart = group.processingStart;

@@ -407,3 +435,2 @@ // Due to the fact that durations can be rounded down to the nearest 8ms,

);
// For the purposes of attribution, clamp `processingEnd` to `nextPaintTime`,

@@ -457,3 +484,3 @@ // so processing is never reported as taking longer than INP (which can

// Start observing LoAF entries for attribution.
observe('long-animation-frame', handleLoAFEntries);
observe(['long-animation-frame'], handleLoAFEntries, opts);

@@ -460,0 +487,0 @@ unattributedOnINP((metric: INPMetric) => {

@@ -21,4 +21,5 @@ /*

import {LCPEntryManager} from '../lib/LCPEntryManager.js';
import {checkSoftNavsEnabled} from '../lib/softNavs.js';
import {onLCP as unattributedOnLCP} from '../onLCP.js';
import {
import type {
LCPAttribution,

@@ -54,2 +55,6 @@ LCPMetric,

if (checkSoftNavsEnabled(opts)) {
lcpEntryManager._softNavigationEntryMap = new Map();
}
lcpEntryManager._onBeforeProcessingEntry = (

@@ -99,11 +104,24 @@ entry: LargestContentfulPaint,

// Safari seems to fail to find a navigation entry.
const navigationEntry = getNavigationEntry();
if (navigationEntry) {
const activationStart = navigationEntry.activationStart || 0;
let navigationEntry;
let activationStart = 0;
let responseStart = 0;
const ttfb = Math.max(
0,
navigationEntry.responseStart - activationStart,
if (metric.navigationType !== 'soft-navigation') {
navigationEntry = getNavigationEntry();
activationStart = navigationEntry?.activationStart ?? 0;
responseStart = navigationEntry?.responseStart ?? 0;
} else {
// Set activationStart to the navigation start time
activationStart = metric.navigationStartTime || 0;
// Lookup the soft navigation entry. Do not use getEntriesByType since
// that is limited to the first 50 navigation entries due to buffer
// size.
navigationEntry = lcpEntryManager._softNavigationEntryMap?.get(
metric.navigationId,
);
}
if (navigationEntry) {
const ttfb = Math.max(0, responseStart - activationStart);
const lcpRequestStart = Math.max(

@@ -110,0 +128,0 @@ ttfb,

@@ -18,3 +18,3 @@ /*

import {onTTFB as unattributedOnTTFB} from '../onTTFB.js';
import {
import type {
TTFBMetric,

@@ -27,2 +27,3 @@ TTFBMetricWithAttribution,

const attributeTTFB = (metric: TTFBMetric): TTFBMetricWithAttribution => {
const navigationEntry = metric.entries[0];
// Use a default object if no other attribution has been set.

@@ -35,43 +36,48 @@ let attribution: TTFBAttribution = {

requestDuration: 0,
// There should only be one instance per TTFB metric
navigationEntry: navigationEntry,
};
if (metric.entries.length) {
const navigationEntry = metric.entries[0];
const activationStart = navigationEntry.activationStart || 0;
// If it's the hard nav, then can give attribution.
// Otherwise it's 0 so the defaults are fine.
if (navigationEntry instanceof PerformanceNavigationTiming) {
const activationStart = navigationEntry.activationStart || 0;
// Measure from workerStart or fetchStart so any service worker startup
// time is included in cacheDuration (which also includes other sw time
// anyway, that cannot be accurately split out cross-browser).
const waitEnd = Math.max(
(navigationEntry.workerStart || navigationEntry.fetchStart) -
activationStart,
0,
);
const dnsStart = Math.max(
navigationEntry.domainLookupStart - activationStart,
0,
);
const connectStart = Math.max(
navigationEntry.connectStart - activationStart,
0,
);
const connectEnd = Math.max(
navigationEntry.connectEnd - activationStart,
0,
);
// Measure from workerStart or fetchStart so any service worker startup
// time is included in cacheDuration (which also includes other sw time
// anyway, that cannot be accurately split out cross-browser).
const waitEnd = Math.max(
(navigationEntry.workerStart || navigationEntry.fetchStart || 0) -
activationStart,
0,
);
const dnsStart = Math.max(
navigationEntry.domainLookupStart - activationStart,
0,
);
const connectStart = Math.max(
navigationEntry.connectStart - activationStart,
0,
);
const connectEnd = Math.max(
navigationEntry.connectEnd - activationStart,
0,
);
attribution = {
waitingDuration: waitEnd,
cacheDuration: dnsStart - waitEnd,
// dnsEnd usually equals connectStart but use connectStart over dnsEnd
// for dnsDuration in case there ever is a gap.
dnsDuration: connectStart - dnsStart,
connectionDuration: connectEnd - connectStart,
// There is often a gap between connectEnd and requestStart. Attribute
// that to requestDuration so connectionDuration remains 0 for
// service worker controlled requests were connectStart and connectEnd
// are the same.
requestDuration: metric.value - connectEnd,
navigationEntry: navigationEntry,
};
attribution = {
waitingDuration: waitEnd,
cacheDuration: dnsStart - waitEnd,
// dnsEnd usually equals connectStart but use connectStart over dnsEnd
// for dnsDuration in case there ever is a gap.
dnsDuration: connectStart - dnsStart,
connectionDuration: connectEnd - connectStart,
// There is often a gap between connectEnd and requestStart. Attribute
// that to requestDuration so connectionDuration remains 0 for
// service worker controlled requests were connectStart and connectEnd
// are the same.
requestDuration: metric.value - connectEnd,
navigationEntry: navigationEntry,
};
}
}

@@ -78,0 +84,0 @@

@@ -17,3 +17,3 @@ /*

import {MetricType, MetricRatingThresholds} from '../types.js';
import type {MetricType, MetricRatingThresholds} from '../types.js';

@@ -20,0 +20,0 @@ const getRating = (

@@ -23,3 +23,3 @@ /*

export const generateUniqueID = () => {
return `v5-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;
return `v6-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;
};

@@ -18,3 +18,3 @@ /*

import {getNavigationEntry} from './getNavigationEntry.js';
import {LoadState} from '../types.js';
import type {LoadState} from '../types.js';

@@ -27,10 +27,10 @@ export const getLoadState = (timestamp: number): LoadState => {

}
const navigationEntry = getNavigationEntry();
if (navigationEntry) {
if (timestamp < navigationEntry.domInteractive) {
const hardNavEntry = getNavigationEntry();
if (hardNavEntry) {
if (timestamp < hardNavEntry.domInteractive) {
return 'loading';
}
if (
navigationEntry.domContentLoadedEventStart === 0 ||
timestamp < navigationEntry.domContentLoadedEventStart
} else if (
hardNavEntry.domContentLoadedEventStart === 0 ||
timestamp < hardNavEntry.domContentLoadedEventStart
) {

@@ -40,6 +40,5 @@ // If the `domContentLoadedEventStart` timestamp has not yet been

return 'dom-interactive';
}
if (
navigationEntry.domComplete === 0 ||
timestamp < navigationEntry.domComplete
} else if (
hardNavEntry.domComplete === 0 ||
timestamp < hardNavEntry.domComplete
) {

@@ -46,0 +45,0 @@ // If the `domComplete` timestamp has not yet been

@@ -34,3 +34,3 @@ /*

? '#' + el.id
: [getName(el), ...Array.from(el.classList).sort()].join('.');
: [getName(el), ...Array.from(el.classList ?? []).sort()].join('.');
if (sel.length + part.length > MAX_LEN - 1) {

@@ -37,0 +37,0 @@ return sel || part;

@@ -63,3 +63,6 @@ /*

export const getVisibilityWatcher = () => {
export const getVisibilityWatcher = (reset = false) => {
if (reset) {
firstHiddenTime = Infinity;
}
if (firstHiddenTime < 0) {

@@ -66,0 +69,0 @@ // Check if we have a previous hidden `visibility-state` performance entry.

@@ -21,3 +21,3 @@ /*

import {getNavigationEntry} from './getNavigationEntry.js';
import {MetricType} from '../types.js';
import type {MetricType} from '../types.js';

@@ -27,15 +27,24 @@ export const initMetric = <MetricName extends MetricType['name']>(

value: number = -1,
navigationType?: MetricType['navigationType'],
navigationId: number = 0,
navigationInteractionId?: number,
navigationURL?: string,
navigationStartTime?: number,
) => {
const navEntry = getNavigationEntry();
let navigationType: MetricType['navigationType'] = 'navigate';
const hardNavEntry = getNavigationEntry();
const hardNavId = hardNavEntry?.navigationId || 0;
let _navigationType: MetricType['navigationType'] = 'navigate';
if (getBFCacheRestoreTime() >= 0) {
navigationType = 'back-forward-cache';
} else if (navEntry) {
if (navigationType) {
// If it was passed in, then use that
_navigationType = navigationType;
} else if (getBFCacheRestoreTime() >= 0) {
_navigationType = 'back-forward-cache';
} else if (hardNavEntry) {
if (document.prerendering || getActivationStart() > 0) {
navigationType = 'prerender';
_navigationType = 'prerender';
} else if (document.wasDiscarded) {
navigationType = 'restore';
} else if (navEntry.type) {
navigationType = navEntry.type.replace(
_navigationType = 'restore';
} else if (hardNavEntry.type) {
_navigationType = hardNavEntry.type.replace(
/_/g,

@@ -57,4 +66,8 @@ '-',

id: generateUniqueID(),
navigationType,
navigationType: _navigationType,
navigationId: navigationId || hardNavId,
navigationInteractionId: navigationInteractionId,
navigationURL: navigationURL || hardNavEntry?.name,
navigationStartTime: navigationStartTime || 0,
};
};

@@ -18,2 +18,3 @@ /*

import {getInteractionCount} from './polyfills/interactionCountPolyfill.js';
import type {Metric} from '../types.js';

@@ -74,8 +75,27 @@ export interface Interaction {

*/
_estimateP98LongestInteraction() {
_estimateP98LongestInteraction(navigationType: Metric['navigationType']) {
const interactionCountForNavigation = getInteractionCountForNavigation();
const candidateInteractionIndex = Math.min(
this._longestInteractionList.length - 1,
Math.floor(getInteractionCountForNavigation() / 50),
Math.floor(interactionCountForNavigation / 50),
);
// If we have a non-zero interactionCountForNavigation but no
// candidateInteractionIndex, then it's below the 16ms limit
// so report a dummy 8ms interaction. This is only needed for
// soft-navs and bfcache restores as `first-input` handles the
// rest.
if (
interactionCountForNavigation &&
candidateInteractionIndex === -1 &&
(navigationType === 'soft-navigation' ||
navigationType === 'back-forward-cache')
) {
return {
_latency: 8,
id: -1,
entries: [],
};
}
return this._longestInteractionList[candidateInteractionIndex];

@@ -82,0 +102,0 @@ }

@@ -19,2 +19,3 @@ /*

_onBeforeProcessingEntry?: (entry: LargestContentfulPaint) => void;
_softNavigationEntryMap?: Map<number, PerformanceSoftNavigation>;

@@ -21,0 +22,0 @@ _processEntry(entry: LargestContentfulPaint) {

@@ -20,2 +20,3 @@ /*

'first-input': PerformanceEventTiming[];
'interaction-contentful-paint': InteractionContentfulPaint[];
'layout-shift': LayoutShift[];

@@ -27,2 +28,3 @@ 'largest-contentful-paint': LargestContentfulPaint[];

'resource': PerformanceResourceTiming[];
'soft-navigation': PerformanceSoftNavigation[];
}

@@ -39,8 +41,11 @@

export const observe = <K extends keyof PerformanceEntryMap>(
type: K,
callback: (entries: PerformanceEntryMap[K]) => void,
types: K[],
callback: (entries: Array<PerformanceEntryMap[K][number]>) => void,
opts: PerformanceObserverInit = {},
): PerformanceObserver | undefined => {
try {
if (PerformanceObserver.supportedEntryTypes.includes(type)) {
const supportedTypes = types.filter((t) =>
PerformanceObserver.supportedEntryTypes.includes(t),
);
if (supportedTypes.length > 0) {
const po = new PerformanceObserver((list) => {

@@ -51,6 +56,22 @@ // Delay by a microtask to workaround a bug in Safari where the

queueMicrotask(() => {
callback(list.getEntries() as PerformanceEntryMap[K]);
const entries = list.getEntries();
// When observing more than one entry type, entries from different
// types can be delivered out of order, so sort by end time
// (startTime + duration) to ensure they're in the right order.
// See: https://github.com/w3c/performance-timeline/issues/224
if (supportedTypes.length > 1) {
entries.sort((a, b) => {
const scoreA = a.startTime + a.duration;
const scoreB = b.startTime + b.duration;
return scoreA - scoreB;
});
}
callback(entries as Array<PerformanceEntryMap[K][number]>);
});
});
po.observe({type, buffered: true, ...opts});
for (const t of supportedTypes) {
po.observe({type: t, buffered: true, ...opts});
}
return po;

@@ -57,0 +78,0 @@ }

@@ -64,5 +64,5 @@ /*

po = observe('event', updateEstimate, {
po = observe(['event'], updateEstimate, {
durationThreshold: 0,
} as PerformanceObserverInit);
};

@@ -24,2 +24,7 @@ /*

export const whenIdleOrHidden = (cb: () => void) => {
// Cap the requestIdleCallback to 1 sec for very busy apps
// https://github.com/GoogleChrome/web-vitals/issues/754
// If not using rIC, then the setTimeout timeout should be 0
const timeout = 'requestIdleCallback' in globalThis ? 1000 : 0;
const rIC = globalThis.requestIdleCallback || setTimeout;

@@ -42,7 +47,10 @@ const cIC = globalThis.cancelIdleCallback || clearTimeout;

addEventListener('visibilitychange', onHidden, {once: true, capture: true});
idleHandle = rIC(() => {
removeEventListener('visibilitychange', onHidden, {capture: true});
wrappedCb();
});
idleHandle = rIC(
() => {
removeEventListener('visibilitychange', onHidden, {capture: true});
wrappedCb();
},
{timeout: timeout},
);
}
};

@@ -17,5 +17,6 @@ /*

import {onBFCacheRestore} from './lib/bfcache.js';
import {getBFCacheRestoreTime, onBFCacheRestore} from './lib/bfcache.js';
import {bindReporter} from './lib/bindReporter.js';
import {doubleRAF} from './lib/doubleRAF.js';
import {getVisibilityWatcher} from './lib/getVisibilityWatcher.js';
import {initMetric} from './lib/initMetric.js';

@@ -25,6 +26,11 @@ import {initUnique} from './lib/initUnique.js';

import {observe} from './lib/observe.js';
import {checkSoftNavsEnabled} from './lib/softNavs.js';
import {runOnce} from './lib/runOnce.js';
import {onFCP} from './onFCP.js';
import {getVisibilityWatcher} from './lib/getVisibilityWatcher.js';
import {CLSMetric, MetricRatingThresholds, ReportOpts} from './types.js';
import type {
CLSMetric,
Metric,
MetricRatingThresholds,
ReportOpts,
} from './types.js';

@@ -69,7 +75,28 @@ /** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */

const handleEntries = (entries: LayoutShift[]) => {
for (const entry of entries) {
layoutShiftManager._processEntry(entry);
}
const initNewCLSMetric = (
navigationType?: Metric['navigationType'],
navigationId?: number,
navigationInteractionId?: number,
navigationURL?: string,
navigationStartTime?: number,
) => {
metric = initMetric(
'CLS',
0,
navigationType,
navigationId,
navigationInteractionId,
navigationURL,
navigationStartTime,
);
layoutShiftManager._sessionValue = 0;
report = bindReporter(
onReport,
metric,
CLSThresholds,
opts.reportAllChanges,
);
};
const updateAndReportMetric = (forceReport: boolean = false) => {
// If the current session value is larger than the current CLS value,

@@ -80,7 +107,36 @@ // update CLS and the entries contributing to it.

metric.entries = layoutShiftManager._sessionEntries;
report();
}
report(forceReport);
};
const po = observe('layout-shift', handleEntries);
const handleSoftNavEntry = (entry: PerformanceSoftNavigation) => {
updateAndReportMetric(true);
initNewCLSMetric(
'soft-navigation',
entry.navigationId,
entry.interactionId,
entry.name,
entry.startTime,
);
};
const handleEntries = (
entries: (LayoutShift | PerformanceSoftNavigation)[],
) => {
for (const entry of entries) {
if (entry.entryType === 'soft-navigation') {
handleSoftNavEntry(entry as PerformanceSoftNavigation);
continue;
}
layoutShiftManager._processEntry(entry as LayoutShift);
}
updateAndReportMetric();
};
const types = ['layout-shift'] as ('layout-shift' | 'soft-navigation')[];
if (checkSoftNavsEnabled(opts)) {
types.push('soft-navigation');
}
const po = observe(types, handleEntries);
if (po) {

@@ -91,7 +147,9 @@ report = bindReporter(

CLSThresholds,
opts!.reportAllChanges,
opts.reportAllChanges,
);
visibilityWatcher.onHidden(() => {
handleEntries(po.takeRecords() as CLSMetric['entries']);
handleEntries(
po.takeRecords() as [LayoutShift | PerformanceSoftNavigation],
);
report(true);

@@ -103,9 +161,8 @@ });

onBFCacheRestore(() => {
layoutShiftManager._sessionValue = 0;
metric = initMetric('CLS', 0);
report = bindReporter(
onReport,
metric,
CLSThresholds,
opts!.reportAllChanges,
initNewCLSMetric(
'back-forward-cache',
metric.navigationId,
metric.navigationInteractionId,
metric.navigationURL,
getBFCacheRestoreTime(),
);

@@ -112,0 +169,0 @@

@@ -17,4 +17,4 @@ /*

import {onBFCacheRestore} from './lib/bfcache.js';
import {bindReporter} from './lib/bindReporter.js';
import {checkSoftNavsEnabled, storeSoftNavEntry} from './lib/softNavs.js';
import {doubleRAF} from './lib/doubleRAF.js';

@@ -24,5 +24,8 @@ import {getActivationStart} from './lib/getActivationStart.js';

import {initMetric} from './lib/initMetric.js';
import {initUnique} from './lib/initUnique.js';
import {FCPEntryManager} from './lib/FCPEntryManager.js';
import {observe} from './lib/observe.js';
import {getBFCacheRestoreTime, onBFCacheRestore} from './lib/bfcache.js';
import {whenActivated} from './lib/whenActivated.js';
import {FCPMetric, MetricRatingThresholds, ReportOpts} from './types.js';
import type {FCPMetric, MetricRatingThresholds, ReportOpts} from './types.js';

@@ -42,3 +45,9 @@ /** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */

) => {
const softNavsEnabled = checkSoftNavsEnabled(opts);
whenActivated(() => {
// Create a new FCP entry manager for each page activation
// This allows us to track soft navigations separately
// needed when attribution is enabled.
const fcpEntryManager = initUnique(opts, FCPEntryManager);
const visibilityWatcher = getVisibilityWatcher();

@@ -53,3 +62,3 @@ let metric = initMetric('FCP');

// Only report if the page wasn't hidden prior to the first paint.
// Only report if the page wasn't hidden prior to FCP.
if (entry.startTime < visibilityWatcher.firstHiddenTime) {

@@ -62,2 +71,4 @@ // The activationStart reference is used because FCP should be

metric.entries.push(entry);
metric.navigationId = entry.navigationId || metric.navigationId;
// FCP should only be reported once so can report right away
report(true);

@@ -69,3 +80,3 @@ }

const po = observe('paint', handleEntries);
const po = observe(['paint'], handleEntries);

@@ -77,3 +88,3 @@ if (po) {

FCPThresholds,
opts!.reportAllChanges,
opts.reportAllChanges,
);

@@ -84,3 +95,11 @@

onBFCacheRestore((event) => {
metric = initMetric('FCP');
metric = initMetric(
'FCP',
-1,
'back-forward-cache',
metric.navigationId,
metric.navigationInteractionId,
metric.navigationURL,
getBFCacheRestoreTime(),
);
report = bindReporter(

@@ -90,3 +109,3 @@ onReport,

FCPThresholds,
opts!.reportAllChanges,
opts.reportAllChanges,
);

@@ -100,3 +119,43 @@

}
if (softNavsEnabled) {
// As first-contentful-paint is only reported once, we can handle soft
// navigations afterwards on their own for simplicity, as no need to
// observe both and sort the entries like for the other metrics
const handleSoftNavEntries = (entries: PerformanceSoftNavigation[]) => {
entries.forEach((entry) => {
// Store the soft navigation entries in the entry manager so that
// they can be retrieved for attribution if necessary. This code
// is only used when attribution is enabled which sets the
// _softNavigationEntryMap.
if (fcpEntryManager._softNavigationEntryMap && entry.navigationId) {
storeSoftNavEntry(fcpEntryManager._softNavigationEntryMap, entry);
}
// Clamp FCP at 0. It should never be less, but better safe than sorry.
const FCPTime = Math.max(
(entry.presentationTime || entry.paintTime || 0) - entry.startTime,
0,
);
metric = initMetric(
'FCP',
FCPTime,
'soft-navigation',
entry.navigationId,
entry.interactionId,
entry.name,
entry.startTime,
);
report = bindReporter(
onReport,
metric,
FCPThresholds,
opts.reportAllChanges,
);
report(true);
});
};
observe(['soft-navigation'], handleSoftNavEntries, opts);
}
});
};

@@ -17,3 +17,3 @@ /*

import {onBFCacheRestore} from './lib/bfcache.js';
import {getBFCacheRestoreTime, onBFCacheRestore} from './lib/bfcache.js';
import {bindReporter} from './lib/bindReporter.js';

@@ -24,2 +24,3 @@ import {initMetric} from './lib/initMetric.js';

import {observe} from './lib/observe.js';
import {checkSoftNavsEnabled} from './lib/softNavs.js';
import {initInteractionCountPolyfill} from './lib/polyfills/interactionCountPolyfill.js';

@@ -30,3 +31,8 @@ import {whenActivated} from './lib/whenActivated.js';

import {INPMetric, MetricRatingThresholds, INPReportOpts} from './types.js';
import type {
INPMetric,
Metric,
MetricRatingThresholds,
INPReportOpts,
} from './types.js';

@@ -38,2 +44,8 @@ /** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */

// `event` entries via PerformanceObserver.
// Event Timing entries have their durations rounded to the nearest 8ms,
// so a duration of 40ms would be any event that spans 2.5 or more frames
// at 60Hz. This threshold is chosen to strike a balance between usefulness
// and performance. Running this callback for any interaction that spans
// just one or two frames is likely not worth the insight that could be
// gained.
const DEFAULT_DURATION_THRESHOLD = 40;

@@ -75,8 +87,6 @@

// Return if the browser doesn't support all APIs needed to measure INP.
if (
!(
globalThis.PerformanceEventTiming &&
'interactionId' in PerformanceEventTiming.prototype
)
) {
if (!(
globalThis.PerformanceEventTiming &&
'interactionId' in PerformanceEventTiming.prototype
)) {
return;

@@ -96,3 +106,55 @@ }

const handleEntries = (entries: INPMetric['entries']) => {
const initNewINPMetric = (
navigationType?: Metric['navigationType'],
navigationId?: number,
navigationInteractionId?: number,
navigationURL?: string,
navigationStartTime?: number,
) => {
interactionManager._resetInteractions();
metric = initMetric(
'INP',
-1,
navigationType,
navigationId,
navigationInteractionId,
navigationURL,
navigationStartTime,
);
report = bindReporter(
onReport,
metric,
INPThresholds,
opts.reportAllChanges,
);
};
const updateINPMetric = () => {
const inp = interactionManager._estimateP98LongestInteraction(
metric.navigationType,
);
if (inp && inp._latency !== metric.value) {
metric.value = inp._latency;
metric.entries = inp.entries;
report();
}
};
const handleSoftNavEntry = (entry: PerformanceSoftNavigation) => {
updateINPMetric();
report(true);
initNewINPMetric(
'soft-navigation',
entry.navigationId,
entry.interactionId,
entry.name,
entry.startTime,
);
};
const handleEntries = (
entries: (PerformanceEventTiming | PerformanceSoftNavigation)[],
forceReport: boolean = false,
) => {
// Queue the `handleEntries()` callback in the next idle task.

@@ -106,11 +168,11 @@ // This is needed to increase the chances that all event entries that

for (const entry of entries) {
interactionManager._processEntry(entry);
if (entry.entryType === 'soft-navigation') {
handleSoftNavEntry(entry as PerformanceSoftNavigation);
continue;
}
interactionManager._processEntry(entry as PerformanceEventTiming);
}
const inp = interactionManager._estimateP98LongestInteraction();
if (inp && inp._latency !== metric.value) {
metric.value = inp._latency;
metric.entries = inp.entries;
report();
updateINPMetric();
if (forceReport) {
report(true);
}

@@ -120,11 +182,12 @@ });

const po = observe('event', handleEntries, {
// Event Timing entries have their durations rounded to the nearest 8ms,
// so a duration of 40ms would be any event that spans 2.5 or more frames
// at 60Hz. This threshold is chosen to strike a balance between usefulness
// and performance. Running this callback for any interaction that spans
// just one or two frames is likely not worth the insight that could be
// gained.
const types = ['event', 'first-input'] as (
'event' | 'first-input' | 'soft-navigation'
)[];
if (checkSoftNavsEnabled(opts)) {
types.push('soft-navigation');
}
const po = observe(types, handleEntries, {
...opts,
durationThreshold: opts.durationThreshold ?? DEFAULT_DURATION_THRESHOLD,
});
} as PerformanceObserverInit);

@@ -139,9 +202,9 @@ report = bindReporter(

if (po) {
// Also observe entries of type `first-input`. This is useful in cases
// where the first interaction is less than the `durationThreshold`.
po.observe({type: 'first-input', buffered: true});
visibilityWatcher.onHidden(() => {
handleEntries(po.takeRecords() as INPMetric['entries']);
report(true);
handleEntries(
po.takeRecords() as [
PerformanceEventTiming | PerformanceSoftNavigation,
],
true, // forceReport after processing all entries
);
});

@@ -152,10 +215,8 @@

onBFCacheRestore(() => {
interactionManager._resetInteractions();
metric = initMetric('INP');
report = bindReporter(
onReport,
metric,
INPThresholds,
opts.reportAllChanges,
initNewINPMetric(
'back-forward-cache',
metric.navigationId,
metric.navigationInteractionId,
metric.navigationURL,
getBFCacheRestoreTime(),
);

@@ -162,0 +223,0 @@ });

@@ -18,6 +18,7 @@ /*

import {LCPEntryManager} from './lib/LCPEntryManager.js';
import {onBFCacheRestore} from './lib/bfcache.js';
import {getBFCacheRestoreTime, onBFCacheRestore} from './lib/bfcache.js';
import {bindReporter} from './lib/bindReporter.js';
import {doubleRAF} from './lib/doubleRAF.js';
import {getActivationStart} from './lib/getActivationStart.js';
import {checkSoftNavsEnabled, storeSoftNavEntry} from './lib/softNavs.js';
import {getVisibilityWatcher} from './lib/getVisibilityWatcher.js';

@@ -27,6 +28,10 @@ import {initMetric} from './lib/initMetric.js';

import {observe} from './lib/observe.js';
import {runOnce} from './lib/runOnce.js';
import {whenActivated} from './lib/whenActivated.js';
import {whenIdleOrHidden} from './lib/whenIdleOrHidden.js';
import {LCPMetric, MetricRatingThresholds, ReportOpts} from './types.js';
import type {
LCPMetric,
Metric,
MetricRatingThresholds,
ReportOpts,
} from './types.js';

@@ -51,4 +56,9 @@ /** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */

) => {
// As InteractionContentfulPaint entries used by soft navs can emit after
// LCP is finalized, we need a flag to know to ignore them.
let isFinalized = false;
const softNavsEnabled = checkSoftNavsEnabled(opts);
whenActivated(() => {
const visibilityWatcher = getVisibilityWatcher();
let visibilityWatcher = getVisibilityWatcher();
let metric = initMetric('LCP');

@@ -59,6 +69,66 @@ let report: ReturnType<typeof bindReporter>;

const handleEntries = (entries: LCPMetric['entries']) => {
// If reportAllChanges is set then call this function for each entry,
// otherwise only consider the last one.
if (!opts!.reportAllChanges) {
const initNewLCPMetric = (
navigation?: Metric['navigationType'],
navigationId?: number,
navigationInteractionId?: number,
navigationURL?: string,
navigationStartTime?: number,
) => {
metric = initMetric(
'LCP',
-1,
navigation,
navigationId,
navigationInteractionId,
navigationURL,
navigationStartTime,
);
report = bindReporter(
onReport,
metric,
LCPThresholds,
opts.reportAllChanges,
);
// Reset the finalized flag
isFinalized = false;
// If it's a soft nav, then need to reset the visibilityWatcher
if (navigation === 'soft-navigation') {
visibilityWatcher = getVisibilityWatcher(true);
}
};
const handleSoftNavEntry = (entry: PerformanceSoftNavigation) => {
if (lcpEntryManager._softNavigationEntryMap && entry.navigationId) {
storeSoftNavEntry(lcpEntryManager._softNavigationEntryMap, entry);
}
if (!isFinalized) report(true);
initNewLCPMetric(
'soft-navigation',
entry.navigationId,
entry.interactionId,
entry.name,
entry.startTime,
);
// Soft Navs should contain the largest paint until now, so handle that
// as if it just happened, then listen for more.
// It can however be null in rare circumstances
// (see https://github.com/GoogleChrome/web-vitals/issues/725)
const largestInteractionContentfulPaint =
entry.getLargestInteractionContentfulPaint?.();
if (largestInteractionContentfulPaint) {
handleEntries([largestInteractionContentfulPaint]);
}
};
const handleEntries = (
entries: (
| LargestContentfulPaint
| InteractionContentfulPaint
| PerformanceSoftNavigation
)[],
) => {
// If reportAllChanges is set or soft navs is enabled then call this
// function for each entry, otherwise only consider the last one.
if (!opts.reportAllChanges && !softNavsEnabled) {
entries = entries.slice(-1);

@@ -68,6 +138,13 @@ }

for (const entry of entries) {
lcpEntryManager._processEntry(entry);
if (!entry) continue;
// Only report if the page wasn't hidden prior to LCP.
if (entry.startTime < visibilityWatcher.firstHiddenTime) {
if (entry.entryType === 'soft-navigation') {
handleSoftNavEntry(entry as PerformanceSoftNavigation);
continue;
}
let value = 0;
let metricEntries: LargestContentfulPaint[] = [];
let renderTime = entry.startTime;
if (entry.entryType === 'largest-contentful-paint') {
// The startTime attribute returns the value of the renderTime if it is

@@ -79,4 +156,38 @@ // not 0, and the value of the loadTime otherwise. The activationStart

// clamped at 0.
metric.value = Math.max(entry.startTime - getActivationStart(), 0);
metric.entries = [entry];
value = Math.max(entry.startTime - getActivationStart(), 0);
lcpEntryManager._processEntry(entry as LargestContentfulPaint);
metricEntries = [entry as LargestContentfulPaint];
} else if (entry.entryType === 'interaction-contentful-paint') {
const ICPEntry = entry as InteractionContentfulPaint;
// InteractionContentfulPaints should only happen after a
// PerformanceSoftNavigation so the metric should have been set
// with a non-zero navigationId mapping to a soft nav.
if (!metric.navigationId) continue;
// Ignore interactions not for this soft nav
// (either paints that have bled into this interaction or paints when
// we should have already finalized)
if (
'interactionId' in ICPEntry &&
ICPEntry.interactionId != metric.navigationInteractionId
) {
continue;
}
renderTime = ICPEntry.largestContentfulPaint?.renderTime || 0;
// Paints should never be less than 0 but add cap just in case
value = Math.max(renderTime - entry.startTime, 0);
if (ICPEntry.largestContentfulPaint) {
lcpEntryManager._processEntry(ICPEntry.largestContentfulPaint);
metricEntries = [ICPEntry.largestContentfulPaint];
}
}
// Only report if the page wasn't hidden prior to LCP.
if (renderTime < visibilityWatcher.firstHiddenTime) {
metric.value = value;
metric.entries = metricEntries;
report();

@@ -87,3 +198,11 @@ }

const po = observe('largest-contentful-paint', handleEntries);
const types = ['largest-contentful-paint'] as (
| 'largest-contentful-paint'
| 'interaction-contentful-paint'
| 'soft-navigation'
)[];
if (softNavsEnabled) {
types.push('interaction-contentful-paint', 'soft-navigation');
}
const po = observe(types, handleEntries);

@@ -95,23 +214,30 @@ if (po) {

LCPThresholds,
opts!.reportAllChanges,
opts.reportAllChanges,
);
// Ensure this logic only runs once, since it can be triggered from
// any of three different event listeners below.
const stopListening = runOnce(() => {
handleEntries(po!.takeRecords() as LCPMetric['entries']);
po!.disconnect();
report(true);
});
const finalizeEventTypes = ['keydown', 'click', 'visibilitychange'];
// Need a separate wrapper to ensure the `runOnce` function above is
// common for all three functions
const stopListeningWrapper = (event: Event) => {
if (event.isTrusted) {
const finalizeLCP = (event: Event) => {
if (event.isTrusted && !isFinalized) {
// Wrap the listener in an idle callback so it's run in a separate
// task to reduce potential INP impact.
// https://github.com/GoogleChrome/web-vitals/issues/383
whenIdleOrHidden(stopListening);
removeEventListener(event.type, stopListeningWrapper, {
capture: true,
const metricIdToFinalize = metric.id;
whenIdleOrHidden(() => {
if (!isFinalized) {
if (!softNavsEnabled) {
// Do some clean up since these won't be needed anymore.
po!.disconnect();
for (const type of finalizeEventTypes) {
removeEventListener(type, finalizeLCP, {capture: true});
}
}
// As this is in a whenIdleOrHidden check, whether we're still
// on the metric you meant to finalize, and ignore if we've moved
// on in the meantime.
if (metricIdToFinalize === metric.id) {
isFinalized = true;
report(true);
}
}
});

@@ -121,8 +247,10 @@ }

// Stop listening after input or visibilitychange.
// Finalize the current LCP after input or visibilitychange.
// Although the browser will automatically stop emitting entries in these
// cases, we don't know it's finalized, so we track to allow early report.
// Note: while scrolling is an input that stops LCP observation, it's
// unreliable since it can be programmatically generated.
// See: https://github.com/GoogleChrome/web-vitals/issues/75
for (const type of ['keydown', 'click', 'visibilitychange']) {
addEventListener(type, stopListeningWrapper, {
for (const type of finalizeEventTypes) {
addEventListener(type, finalizeLCP, {
capture: true,

@@ -135,3 +263,9 @@ });

onBFCacheRestore((event) => {
metric = initMetric('LCP');
initNewLCPMetric(
'back-forward-cache',
metric.navigationId,
metric.navigationInteractionId,
metric.navigationURL,
getBFCacheRestoreTime(),
);
report = bindReporter(

@@ -141,3 +275,3 @@ onReport,

LCPThresholds,
opts!.reportAllChanges,
opts.reportAllChanges,
);

@@ -147,2 +281,3 @@

metric.value = performance.now() - event.timeStamp;
isFinalized = true;
report(true);

@@ -149,0 +284,0 @@ });

@@ -18,8 +18,10 @@ /*

import {bindReporter} from './lib/bindReporter.js';
import {initMetric} from './lib/initMetric.js';
import {onBFCacheRestore} from './lib/bfcache.js';
import {checkSoftNavsEnabled} from './lib/softNavs.js';
import {getNavigationEntry} from './lib/getNavigationEntry.js';
import {MetricRatingThresholds, ReportOpts, TTFBMetric} from './types.js';
import {getActivationStart} from './lib/getActivationStart.js';
import {initMetric} from './lib/initMetric.js';
import {observe} from './lib/observe.js';
import {getBFCacheRestoreTime, onBFCacheRestore} from './lib/bfcache.js';
import {whenActivated} from './lib/whenActivated.js';
import type {MetricRatingThresholds, ReportOpts, TTFBMetric} from './types.js';

@@ -63,2 +65,4 @@ /** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */

) => {
const softNavsEnabled = checkSoftNavsEnabled(opts);
let metric = initMetric('TTFB');

@@ -73,5 +77,5 @@ let report = bindReporter(

whenReady(() => {
const navigationEntry = getNavigationEntry();
if (navigationEntry) {
const hardNavEntry = getNavigationEntry();
if (hardNavEntry) {
const responseStart = hardNavEntry.responseStart;
// The activationStart reference is used because TTFB should be

@@ -81,8 +85,5 @@ // relative to page activation rather than navigation start if the

// after the first byte is received, this time should be clamped at 0.
metric.value = Math.max(
navigationEntry.responseStart - getActivationStart(),
0,
);
metric.value = Math.max(responseStart - getActivationStart(), 0);
metric.entries = [navigationEntry];
metric.entries = [hardNavEntry];
report(true);

@@ -93,3 +94,11 @@

onBFCacheRestore(() => {
metric = initMetric('TTFB', 0);
metric = initMetric(
'TTFB',
0,
'back-forward-cache',
metric.navigationId,
metric.navigationInteractionId,
metric.navigationURL,
getBFCacheRestoreTime(),
);
report = bindReporter(

@@ -99,3 +108,3 @@ onReport,

TTFBThresholds,
opts!.reportAllChanges,
opts.reportAllChanges,
);

@@ -105,4 +114,32 @@

});
// Listen for soft-navigation entries and emit a dummy 0 TTFB entry
if (softNavsEnabled) {
const reportSoftNavTTFBs = (entries: PerformanceSoftNavigation[]) => {
entries.forEach((entry) => {
if (entry.navigationId) {
metric = initMetric(
'TTFB',
0,
'soft-navigation',
entry.navigationId,
entry.interactionId,
entry.name,
entry.startTime,
);
metric.entries = [entry];
report = bindReporter(
onReport,
metric,
TTFBThresholds,
opts.reportAllChanges,
);
report(true);
}
});
};
observe(['soft-navigation'], reportSoftNavTTFBs, opts);
}
}
});
};

@@ -30,5 +30,9 @@ /*

interface PerformanceEntryMap {
navigation: PerformanceNavigationTiming;
resource: PerformanceResourceTiming;
paint: PerformancePaintTiming;
'event': PerformanceEventTiming;
'interaction-contentful-paint': InteractionContentfulPaint;
'layout-shift': LayoutShift;
'navigation': PerformanceNavigationTiming;
'paint': PerformancePaintTiming;
'resource': PerformanceResourceTiming;
'soft-navigation': PerformanceSoftNavigation;
}

@@ -52,2 +56,7 @@

// https://w3c.github.io/event-timing/#sec-modifications-perf-timeline
interface PerformanceEntry {
navigationId?: number;
}
// https://w3c.github.io/event-timing/#sec-modifications-perf-timeline
interface PerformanceObserverInit {

@@ -58,3 +67,3 @@ durationThreshold?: number;

// https://wicg.github.io/nav-speculation/prerendering.html#performance-navigation-timing-extension
interface PerformanceNavigationTiming {
interface PerformanceNavigationTiming extends PerformanceEntry {
activationStart?: number;

@@ -94,2 +103,19 @@ }

// https://github.com/WICG/soft-navigations
interface InteractionContentfulPaint extends PerformanceEntry {
readonly interactionId: number;
readonly largestContentfulPaint?: LargestContentfulPaint;
}
interface PerformanceSoftNavigation extends PerformanceEntry {
readonly interactionId: number;
readonly navigationType?: NavigationType;
readonly paintTime?: number;
readonly presentationTime?: number;
readonly getLargestInteractionContentfulPaint?: () => InteractionContentfulPaint | null;
}
var PerformanceSoftNavigation: {
prototype: PerformanceSoftNavigation;
};
// https://w3c.github.io/long-animation-frame/#sec-PerformanceLongAnimationFrameTiming

@@ -106,7 +132,3 @@ export type ScriptInvokerType =

export type ScriptWindowAttribution =
| 'self'
| 'descendant'
| 'ancestor'
| 'same-page'
| 'other';
'self' | 'descendant' | 'ancestor' | 'same-page' | 'other';

@@ -113,0 +135,0 @@ // https://w3c.github.io/long-animation-frame/#sec-PerformanceLongAnimationFrameTiming

@@ -75,2 +75,3 @@ /*

* restored by the user.
* - 'soft-navigation': for soft navigations.
*/

@@ -83,3 +84,28 @@ navigationType:

| 'prerender'
| 'restore';
| 'restore'
| 'soft-navigation';
/**
* The navigationId the metric happened for. This is particularly relevant for soft navigations where
* the metric may be reported for a previous URL.
*/
navigationId: number;
/**
* For metrics specific to a soft navigation, the interactionId of the
* interaction that triggered that soft navigation.
*/
navigationInteractionId?: number;
/**
* The navigation startTime the metric is based from. This is particularly
* relevant for soft navigations where time origin is not 0.
*/
navigationStartTime?: number;
/**
* The navigation URL the metric happened for. This is particularly relevant for soft navigations where
* the metric may be reported for a previous URL.
*/
navigationURL?: string;
}

@@ -89,7 +115,3 @@

export type MetricType =
| CLSMetric
| FCPMetric
| INPMetric
| LCPMetric
| TTFBMetric;
CLSMetric | FCPMetric | INPMetric | LCPMetric | TTFBMetric;

@@ -130,2 +152,4 @@ /** The union of supported metric attribution types. */

reportAllChanges?: boolean;
durationThreshold?: number;
reportSoftNavs?: boolean;
}

@@ -153,5 +177,2 @@

export type LoadState =
| 'loading'
| 'dom-interactive'
| 'dom-content-loaded'
| 'complete';
'loading' | 'dom-interactive' | 'dom-content-loaded' | 'complete';

@@ -57,3 +57,3 @@ /*

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
}

@@ -60,0 +60,0 @@

@@ -71,4 +71,6 @@ /*

* returns null or undefined.
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionTarget: string;
interactionTarget?: string;
/**

@@ -78,4 +80,6 @@ * The time when the user first interacted during the frame where the INP

* within the frame, only the first time is reported).
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionTime: DOMHighResTimeStamp;
interactionTime?: DOMHighResTimeStamp;
/**

@@ -87,4 +91,6 @@ * The type of interaction, based on the event type of the `event` entry

* and for "keydown" or "keyup" events this will be "keyboard".
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
interactionType: 'pointer' | 'keyboard';
interactionType?: 'pointer' | 'keyboard';
/**

@@ -96,9 +102,11 @@ * The best-guess timestamp of the next paint after the interaction.

* reported after the processing times.
* This value may not be set in cases where the event duration was less than
* the browser minimum reporting threshold, and thus no entry was dispatched.
*/
nextPaintTime: DOMHighResTimeStamp;
nextPaintTime?: DOMHighResTimeStamp;
/**
* An array of Event Timing entries that were processed within the same
* animation frame as the INP candidate interaction.
* This array can be quite large so it will be empty if the
* `includeProcessedEventEntries` configuration option is set to `false` to
* This array can be quite large so it will be empty unless the
* `includeProcessedEventEntries` configuration option is set to `true` to
* conserve memory if these entries are not required.

@@ -105,0 +113,0 @@ */

@@ -75,3 +75,3 @@ /*

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
/**

@@ -78,0 +78,0 @@ * The `resource` entry for the LCP resource (if applicable), which is useful

@@ -24,3 +24,3 @@ /*

name: 'TTFB';
entries: PerformanceNavigationTiming[];
entries: PerformanceNavigationTiming[] | PerformanceSoftNavigation[];
}

@@ -71,3 +71,3 @@

*/
navigationEntry?: PerformanceNavigationTiming;
navigationEntry?: PerformanceNavigationTiming | PerformanceSoftNavigation;
}

@@ -74,0 +74,0 @@