diff --git a/package-lock.json b/package-lock.json index 668343371..29198df82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3302,9 +3302,9 @@ "license": "MIT" }, "node_modules/basic-ftp": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.2.2.tgz", - "integrity": "sha512-1tDrzKsdCg70WGvbFss/ulVAxupNauGnOlgpyjKzeQxzyllBLS0CGLV7tjIXTK3ZQA9/FBEm9qyFFN1bciA6pw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.0.tgz", + "integrity": "sha512-5K9eNNn7ywHPsYnFwjKgYH8Hf8B5emh7JKcPaVjjrMJFQQwGpwowEnZNEtHs7DfR7hCZsmaK3VA4HUK0YarT+w==", "dev": true, "license": "MIT", "engines": { diff --git a/src/third_party/LIGHTHOUSE_MCP_BUNDLE_THIRD_PARTY_NOTICES b/src/third_party/LIGHTHOUSE_MCP_BUNDLE_THIRD_PARTY_NOTICES index 95a3a976c..6a4b11072 100644 --- a/src/third_party/LIGHTHOUSE_MCP_BUNDLE_THIRD_PARTY_NOTICES +++ b/src/third_party/LIGHTHOUSE_MCP_BUNDLE_THIRD_PARTY_NOTICES @@ -54,7 +54,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI Name: @paulirish/trace_engine URL: N/A -Version: 0.0.61 +Version: 0.0.64 License: BSD-3-Clause // Copyright 2014 The Chromium Authors diff --git a/src/third_party/lighthouse-devtools-mcp-bundle.js b/src/third_party/lighthouse-devtools-mcp-bundle.js index e4c5f05b9..c8fc25734 100644 --- a/src/third_party/lighthouse-devtools-mcp-bundle.js +++ b/src/third_party/lighthouse-devtools-mcp-bundle.js @@ -1,5 +1,5 @@ /** - * Lighthouse v13.0.3-24-g0248afea9 (Apr 07 2026) + * Lighthouse v13.0.3-36-gb32848263 (Apr 20 2026) * * Automated auditing, performance metrics, and best practices for the web. * @@ -1375,9 +1375,10 @@ var init_trace_processor = __esm({ * * @param {LH.TraceEvent[]} events * @param {LH.TraceEvent} timeOriginEvent + * @param {string|undefined} mainFrameId * @return {{lcp: LCPEvent | undefined, invalidated: boolean}} */ - static computeValidLCPAllFrames(events, timeOriginEvent) { + static computeValidLCPAllFrames(events, timeOriginEvent, mainFrameId2) { const lcpEvents = events.filter(this.isLCPEvent).reverse(); const finalLcpEventsByFrame = /* @__PURE__ */ new Map(); for (const e of lcpEvents) { @@ -1393,6 +1394,41 @@ var init_trace_processor = __esm({ maxLcpAcrossFrames = lcp; } } + if (!maxLcpAcrossFrames) { + const ukmEvents = events.filter( + (e) => e.name.includes("LargestContentfulPaint") && e.name.includes("UKM") + ); + const targetEventName = "NavStartToLargestContentfulPaint::Invalidate::AllFrames::UKM"; + const ukmInvalidates = ukmEvents.filter((e) => e.name === targetEventName); + if (ukmInvalidates.length > 0) { + ukmInvalidates.sort((a, b) => a.ts - b.ts); + const lastInvalidate = ukmInvalidates[ukmInvalidates.length - 1]; + lighthouse_logger_default.warn( + "TraceProcessor", + "LCP candidate missing, falling back to UKM Invalidate event." + ); + maxLcpAcrossFrames = /** @type {LCPCandidateEvent} */ + /** @type {unknown} */ + { + name: "largestContentfulPaint::Candidate", + cat: "loading", + ph: lastInvalidate.ph, + ts: lastInvalidate.ts, + pid: lastInvalidate.pid, + tid: lastInvalidate.tid, + args: { + frame: mainFrameId2 || "main_frame", + // Mocked frame ID + data: { + size: 1, + // Don't know the actuall size so we assign it 1 + isMainFrame: true, + isOutermostMainFrame: true + } + } + }; + } + } return { lcp: maxLcpAcrossFrames, // LCP events were found, but final LCP event of every frame was an invalidate event. @@ -1429,7 +1465,7 @@ var init_trace_processor = __esm({ * @param {LH.Trace} trace * @param {{timeOriginDeterminationMethod?: TimeOriginDeterminationMethod}} [options] * @return {LH.Artifacts.ProcessedTrace} - */ + */ static processTrace(trace, options) { const { timeOriginDeterminationMethod = "auto" } = options || {}; const keyEvents = this.filteredTraceSort(trace.traceEvents, (e) => { @@ -1467,11 +1503,17 @@ var init_trace_processor = __esm({ const frameIdToRootFrameId = this.resolveRootFrames(frames2); const inspectedTreeFrameIds = [...frameIdToRootFrameId.entries()].filter(([, rootFrameId]) => rootFrameId === mainFrameInfo.frameId).map(([child]) => child); function associatedToMainFrame(e) { + if (e.name === "NavStartToLargestContentfulPaint::Invalidate::AllFrames::UKM") { + return true; + } const frameId = _TraceProcessor.getFrameId(e); return frameId === mainFrameInfo.frameId; } __name(associatedToMainFrame, "associatedToMainFrame"); function associatedToAllFrames(e) { + if (e.name.includes("LargestContentfulPaint") && e.name.includes("UKM")) { + return true; + } const frameId = _TraceProcessor.getFrameId(e); return frameId ? inspectedTreeFrameIds.includes(frameId) : false; } @@ -1519,9 +1561,16 @@ var init_trace_processor = __esm({ * origin in addition to the standard microsecond monotonic timestamps. * @param {LH.Artifacts.ProcessedTrace} processedTrace * @return {LH.Artifacts.ProcessedNavigation} - */ + */ static processNavigation(processedTrace) { - const { frameEvents, frameTreeEvents, timeOriginEvt, timings, timestamps } = processedTrace; + const { + frameEvents, + frameTreeEvents, + timeOriginEvt, + timings, + timestamps, + mainFrameInfo + } = processedTrace; const frameTimings = this.computeNavigationTimingsForFrame(frameEvents, { timeOriginEvt }); const fcpAllFramesEvt = frameTreeEvents.find( (e) => e.name === "firstContentfulPaint" && e.ts > timeOriginEvt.ts @@ -1529,7 +1578,11 @@ var init_trace_processor = __esm({ if (!fcpAllFramesEvt) { throw this.createNoFirstContentfulPaintError(); } - const lcpAllFramesEvt = this.computeValidLCPAllFrames(frameTreeEvents, timeOriginEvt).lcp; + const lcpAllFramesEvt = this.computeValidLCPAllFrames( + frameTreeEvents, + timeOriginEvt, + mainFrameInfo.frameId + ).lcp; const getTiming = /* @__PURE__ */ __name((ts) => (ts - timeOriginEvt.ts) / 1e3, "getTiming"); const maybeGetTiming = /* @__PURE__ */ __name((ts) => ts === void 0 ? void 0 : getTiming(ts), "maybeGetTiming"); return { @@ -1643,7 +1696,7 @@ var init_trace_processor = __esm({ * in addition to the standard microsecond monotonic timestamps. * @param {Array} frameEvents * @param {{timeOriginEvt: LH.TraceEvent}} options - */ + */ static computeNavigationTimingsForFrame(frameEvents, options) { const { timeOriginEvt } = options; const firstPaint = frameEvents.find((e) => e.name === "firstPaint" && e.ts > timeOriginEvt.ts); @@ -1653,7 +1706,8 @@ var init_trace_processor = __esm({ if (!firstContentfulPaint) { throw this.createNoFirstContentfulPaintError(); } - const lcpResult = this.computeValidLCPAllFrames(frameEvents, timeOriginEvt); + const frameId = frameEvents.map((e) => _TraceProcessor.getFrameId(e)).find(Boolean); + const lcpResult = this.computeValidLCPAllFrames(frameEvents, timeOriginEvt, frameId); const load = frameEvents.find((e) => e.name === "loadEventEnd" && e.ts > timeOriginEvt.ts); const domContentLoaded = frameEvents.find( (e) => e.name === "domContentLoadedEventEnd" && e.ts > timeOriginEvt.ts @@ -9833,7 +9887,7 @@ var require_amp = __commonJS({ "node_modules/lighthouse-stack-packs/packs/amp.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using WebP in the context of AMP. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ "modern-image-formats": "Consider displaying all [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) components in WebP formats while specifying an appropriate fallback for other browsers. [Learn more](https://amp.dev/documentation/components/amp-img/#example:-specifying-a-fallback-image).", /** Additional description of a Lighthouse audit that tells the user how images are automatically lazy loaded for the AMP framewok. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ @@ -9851,7 +9905,7 @@ var require_amp = __commonJS({ id: "amp", title: "AMP", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -9861,7 +9915,7 @@ var require_angular = __commonJS({ "node_modules/lighthouse-stack-packs/packs/angular.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can improve site loading performance by reducing the total bytes delivered by their page in the context of the Angular framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ "total-byte-weight": "Apply [route-level code splitting](https://web.dev/route-level-code-splitting-in-angular/) to minimize the size of your JavaScript bundles. Also, consider precaching assets with the [Angular service worker](https://web.dev/precaching-with-the-angular-service-worker/).", /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS and JS files in the context of the Angular framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ @@ -9879,7 +9933,7 @@ var require_angular = __commonJS({ id: "angular", title: "Angular", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -9889,7 +9943,7 @@ var require_drupal = __commonJS({ "node_modules/lighthouse-stack-packs/packs/drupal.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused CSS, in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ "unused-css-rules": "Consider removing unused CSS rules and only attach the needed `Drupal` libraries to the relevant page or component in a page. See the [`Drupal` documentation](https://www.drupal.org/docs/develop/theming-drupal/adding-assets-css-js-to-a-drupal-theme-via-librariesyml#define) for details. To identify attached libraries that are adding extraneous CSS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the stylesheet when CSS aggregation is disabled in your `Drupal` site. Look out for themes/modules that have many stylesheets in the list which have a lot of red in code coverage. A theme/module should only attach a stylesheet library if it is actually used on the page.", /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ @@ -9929,7 +9983,7 @@ var require_drupal = __commonJS({ id: "drupal", title: "Drupal", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -9939,7 +9993,7 @@ var require_ezoic = __commonJS({ "node_modules/lighthouse-stack-packs/packs/ezoic.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Remove Unused CSS is a setting name. */ "unused-css-rules": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Remove Unused CSS` to help with this issue. It will identify the CSS classes that are actually used on each page of your site, and remove any others to keep the file size small.", /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Next-Gen Formats is a setting name.*/ @@ -9971,7 +10025,7 @@ var require_ezoic = __commonJS({ id: "ezoic", title: "Ezoic", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -9981,7 +10035,7 @@ var require_gatsby = __commonJS({ "node_modules/lighthouse-stack-packs/packs/gatsby.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can remove unused CSS rules by configuring the Gatsby plugin `gatsby-plugin-purgecss` which sets up PurgeCSS */ "unused-css-rules": "Use the `PurgeCSS` `Gatsby` plugin to remove unused rules from stylesheets. [Learn more](https://purgecss.com/plugins/gatsby.html).", /** Additional description of a Lighthouse audit that tells the user to use the gatsby-plugin-image component to automatically optimize image format */ @@ -10005,7 +10059,7 @@ var require_gatsby = __commonJS({ id: "gatsby", title: "Gatsby", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10022,7 +10076,7 @@ var require_joomla = __commonJS({ */ var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused CSS, in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ "unused-css-rules": "Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused CSS in your page. To identify extensions that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.", /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ @@ -10056,7 +10110,7 @@ var require_joomla = __commonJS({ id: "joomla", title: "Joomla", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10066,7 +10120,7 @@ var require_magento = __commonJS({ "node_modules/lighthouse-stack-packs/packs/magento.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ "modern-image-formats": "Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=webp) for a variety of third-party extensions to leverage newer image formats.", /** Additional description of a Lighthouse audit that tells the user how they can improve performance by lazy loading images that are initially offscreen in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ @@ -10096,7 +10150,7 @@ var require_magento = __commonJS({ id: "magento", title: "Magento", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10107,7 +10161,7 @@ var require_next = __commonJS({ init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can remove unusused CSS rules by configuring a plugin named PurgeCSS. */ "unused-css-rules": "Consider setting up `PurgeCSS` in `Next.js` configuration to remove unused rules from stylesheets. [Learn more](https://purgecss.com/guides/next.html).", /** Additional description of a Lighthouse audit that tells the user to use the next/image component to automatically optimize image format. */ @@ -10137,7 +10191,7 @@ var require_next = __commonJS({ id: "next.js", title: "Next.js", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10149,7 +10203,7 @@ var require_nitropack = __commonJS({ var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Reduce Unused CSS` is the name of a feature and becomes link text to additional documentation.*/ "unused-css-rules": "Enable [`Reduce Unused CSS`](https://support.nitropack.io/hc/en-us/articles/360020418457-Reduce-Unused-CSS) to remove CSS rules that are not applicable to this page.", /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Image Optimization` is the name of a feature and becomes link text to additional documentation. `WebP` is the name of a standardized image format for the web.*/ @@ -10179,7 +10233,7 @@ var require_nitropack = __commonJS({ id: "nitropack", title: "NitroPack", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10189,7 +10243,7 @@ var require_nuxt = __commonJS({ "node_modules/lighthouse-stack-packs/packs/nuxt.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user to use the nuxt/image component to serve modern formats like WebP. */ "modern-image-formats": 'Use the `nuxt/image` component and set `format="webp"`. [Learn more](https://image.nuxt.com/usage/nuxt-img#format).', /** Additional description of a Lighthouse audit that tells the user to use the nuxt/image component to defer loading images which are not shown on screen. */ @@ -10207,7 +10261,7 @@ var require_nuxt = __commonJS({ id: "nuxt", title: "Nuxt", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10217,7 +10271,7 @@ var require_octobercms = __commonJS({ "node_modules/lighthouse-stack-packs/packs/octobercms.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused CSS, in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ "unused-css-rules": "Consider reviewing the [plugins](https://octobercms.com/plugins) loading unused CSS on the website. To identify plugins that add unnecessary CSS, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the stylesheet URL. Look for plugins with many stylesheets with lots of red in code coverage. A plugin should only add a stylesheet if it is actually used on the web page.", /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ @@ -10251,7 +10305,7 @@ var require_octobercms = __commonJS({ id: "octobercms", title: "October CMS", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10263,7 +10317,7 @@ var require_react = __commonJS({ var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS files in the context of the React library. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ "unminified-css": "If your build system minifies CSS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).", /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their Javascript files in the context of the React library. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ @@ -10283,7 +10337,7 @@ var require_react = __commonJS({ id: "react", title: "React", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10294,7 +10348,7 @@ var require_wix = __commonJS({ init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user to optimize image formats, in the context of the Wix CMS platform. */ "modern-image-formats": "Upload images using `Wix Media Manager` to ensure they are automatically served as WebP. Find [more ways to optimize](https://support.wix.com/en/article/site-performance-optimizing-your-media) your site's media.", /** Additional description of a Lighthouse audit that tells the user to defer loading of non-critical third-party libraries, in the context of the Wix CMS platform. */ @@ -10310,7 +10364,7 @@ var require_wix = __commonJS({ id: "wix", title: "Wix", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10320,7 +10374,7 @@ var require_wordpress = __commonJS({ "node_modules/lighthouse-stack-packs/packs/wordpress.js"(exports2, module2) { init_process_global(); var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused CSS, in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */ "unused-css-rules": "Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused CSS in your page. To identify plugins that are adding extraneous CSS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage/) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.", /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. */ @@ -10354,7 +10408,7 @@ var require_wordpress = __commonJS({ id: "wordpress", title: "WordPress", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10366,7 +10420,7 @@ var require_wp_rocket = __commonJS({ var icon = `data:image/svg+xml,`; - var UIStrings126 = { + var UIStrings130 = { /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. Remove Unused CSS is a name of the feature */ "unused-css-rules": `Enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) in 'WP Rocket' to fix this issue. It reduces page size by removing all CSS and stylesheets that are not used while keeping only the used CSS for each page.`, /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. `Imagify` is an image optimization add-on */ @@ -10392,7 +10446,7 @@ var require_wp_rocket = __commonJS({ id: "wp-rocket", title: "WP Rocket", icon, - UIStrings: UIStrings126 + UIStrings: UIStrings130 }; } }); @@ -10639,7 +10693,7 @@ var init_root2 = __esm({ "webtreemap-cdt": "^3.2.1" }, "dependencies": { - "@paulirish/trace_engine": "0.0.61", + "@paulirish/trace_engine": "0.0.64", "@sentry/node": "^9.28.1", "axe-core": "^4.11.2", "chrome-launcher": "^1.2.1", @@ -12398,7 +12452,7 @@ var init_FirstContentfulPaint = __esm({ static getOptimisticGraph(dependencyGraph, processedNavigation) { return this.getFirstPaintBasedGraph(dependencyGraph, { cutoffTimestamp: processedNavigation.timestamps.firstContentfulPaint, - // In the optimistic graph we exclude resources that appeared to be render blocking but were + // In the optimistic graph we exclude resources that appeared to be render-blocking but were // initiated by a script. While they typically have a very high importance and tend to have a // significant impact on the page's content, these resources don't technically block rendering. treatNodeAsRenderBlocking: /* @__PURE__ */ __name((node) => node.hasRenderBlockingPriority() && node.initiatorType !== "script", "treatNodeAsRenderBlocking") @@ -14275,15 +14329,14 @@ __export(Configuration_exports, { configToCacheKey: () => configToCacheKey, defaults: () => defaults }); -function configToCacheKey(config3) { - return JSON.stringify(config3); +function configToCacheKey(config4) { + return JSON.stringify(config4); } var defaults; var init_Configuration = __esm({ "node_modules/@paulirish/trace_engine/models/trace/types/Configuration.js"() { init_process_global(); defaults = /* @__PURE__ */ __name(() => ({ - includeRuntimeCallStats: false, showAllEvents: false, debugMode: false, maxInvalidationEventsPerEvent: 20, @@ -14486,6 +14539,7 @@ __export(TraceEvents_exports, { SelectorTimingsKey: () => SelectorTimingsKey, StyleRecalcInvalidationReason: () => StyleRecalcInvalidationReason, ThreadID: () => ThreadID, + VALID_PROFILE_SOURCES: () => VALID_PROFILE_SOURCES, WorkerId: () => WorkerId, eventIsPageLoadEvent: () => eventIsPageLoadEvent, isAbortPostTaskCallback: () => isAbortPostTaskCallback, @@ -14494,6 +14548,7 @@ __export(TraceEvents_exports, { isAnimationFrameAsyncEnd: () => isAnimationFrameAsyncEnd, isAnimationFrameAsyncStart: () => isAnimationFrameAsyncStart, isAnimationFramePresentation: () => isAnimationFramePresentation, + isAnyLargestContentfulPaintCandidate: () => isAnyLargestContentfulPaintCandidate, isAnyScriptSourceEvent: () => isAnyScriptSourceEvent, isAuctionWorkletDoneWithProcess: () => isAuctionWorkletDoneWithProcess, isAuctionWorkletRunningInProcess: () => isAuctionWorkletRunningInProcess, @@ -14540,7 +14595,7 @@ __export(TraceEvents_exports, { isInvalidateLayout: () => isInvalidateLayout, isInvalidationTracking: () => isInvalidationTracking, isJSInvocationEvent: () => isJSInvocationEvent, - isLargestContentfulPaintCandidate: () => isLargestContentfulPaintCandidate, + isJSSample: () => isJSSample, isLargestImagePaintCandidate: () => isLargestImagePaintCandidate, isLargestTextPaintCandidate: () => isLargestTextPaintCandidate, isLayerTreeHostImplSnapshot: () => isLayerTreeHostImplSnapshot, @@ -14556,6 +14611,7 @@ __export(TraceEvents_exports, { isMarkDOMContent: () => isMarkDOMContent, isMarkLoad: () => isMarkLoad, isMarkerEvent: () => isMarkerEvent, + isMetaCharsetCheck: () => isMetaCharsetCheck, isNavigationStart: () => isNavigationStart, isNeedsBeginFrameChanged: () => isNeedsBeginFrameChanged, isNestableAsyncPhase: () => isNestableAsyncPhase, @@ -14574,6 +14630,7 @@ __export(TraceEvents_exports, { isPhaseAsync: () => isPhaseAsync, isPipelineReporter: () => isPipelineReporter, isPrePaint: () => isPrePaint, + isPreloadRenderBlockingStatusChangeEvent: () => isPreloadRenderBlockingStatusChangeEvent, isProcessName: () => isProcessName, isProfile: () => isProfile, isProfileCall: () => isProfileCall, @@ -14607,6 +14664,8 @@ __export(TraceEvents_exports, { isScrollLayer: () => isScrollLayer, isSelectorStats: () => isSelectorStats, isSetLayerId: () => isSetLayerId, + isSoftLargestContentfulPaintCandidate: () => isSoftLargestContentfulPaintCandidate, + isSoftNavigationStart: () => isSoftNavigationStart, isStyleInvalidatorInvalidationTracking: () => isStyleInvalidatorInvalidationTracking, isStyleRecalcInvalidationTracking: () => isStyleRecalcInvalidationTracking, isSyntheticAnimation: () => isSyntheticAnimation, @@ -14637,7 +14696,8 @@ __export(TraceEvents_exports, { isWebSocketSendHandshakeRequest: () => isWebSocketSendHandshakeRequest, isWebSocketTraceEvent: () => isWebSocketTraceEvent, isWebSocketTransfer: () => isWebSocketTransfer, - objectIsCallFrame: () => objectIsCallFrame + objectIsCallFrame: () => objectIsCallFrame, + objectIsEvent: () => objectIsEvent }); function isNestableAsyncPhase(phase) { return phase === Phase.ASYNC_NESTABLE_START || phase === Phase.ASYNC_NESTABLE_END || phase === Phase.ASYNC_NESTABLE_INSTANT; @@ -14648,6 +14708,9 @@ function isPhaseAsync(phase) { function isFlowPhase(phase) { return phase === Phase.FLOW_START || phase === Phase.FLOW_STEP || phase === Phase.FLOW_END; } +function objectIsEvent(obj) { + return "cat" in obj && "name" in obj && "ts" in obj; +} function objectIsCallFrame(object) { return "functionName" in object && typeof object.functionName === "string" && ("scriptId" in object && (typeof object.scriptId === "string" || typeof object.scriptId === "number")) && ("columnNumber" in object && typeof object.columnNumber === "number") && ("lineNumber" in object && typeof object.lineNumber === "number") && ("url" in object && typeof object.url === "string"); } @@ -14669,14 +14732,17 @@ function isLegacySyntheticScreenshot(event) { function isScreenshot(event) { return event.name === Name.SCREENSHOT && "source_id" in (event.args ?? {}); } +function isSoftNavigationStart(event) { + return event.name === Name.SOFT_NAVIGATION_START; +} function isMarkerEvent(event) { - if (event.ph === Phase.INSTANT || event.ph === Phase.MARK) { + if (event.ph === Phase.INSTANT || Phase.ASYNC_NESTABLE_INSTANT || event.ph === Phase.MARK) { return markerTypeGuards.some((fn) => fn(event)); } return false; } function eventIsPageLoadEvent(event) { - if (event.ph === Phase.INSTANT || event.ph === Phase.MARK) { + if (event.ph === Phase.INSTANT || Phase.ASYNC_NESTABLE_INSTANT || event.ph === Phase.MARK) { return pageLoadEventTypeGuards.some((fn) => fn(event)); } return false; @@ -14699,6 +14765,9 @@ function isBeginCommitCompositorFrame(event) { function isParseMetaViewport(event) { return event.name === Name.PARSE_META_VIEWPORT; } +function isMetaCharsetCheck(event) { + return event.name === Name.META_CHARSET_CHECK; +} function isLinkPreconnect(event) { return event.name === Name.LINK_PRECONNECT; } @@ -14735,6 +14804,9 @@ function isPipelineReporter(event) { function isSyntheticBased(event) { return "rawSourceEvent" in event; } +function isJSSample(event) { + return event.name === Name.JS_SAMPLE; +} function isSyntheticInteraction(event) { return Boolean("interactionId" in event && event.args?.data && "beginEvent" in event.args.data && "endEvent" in event.args.data); } @@ -14884,10 +14956,13 @@ function isLayoutInvalidationTracking(event) { return event.name === Name.LAYOUT_INVALIDATION_TRACKING; } function isFirstContentfulPaint(event) { - return event.name === "firstContentfulPaint"; + return event.name === Name.MARK_FCP; +} +function isAnyLargestContentfulPaintCandidate(event) { + return event.name === Name.MARK_LCP_CANDIDATE || event.name === Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION; } -function isLargestContentfulPaintCandidate(event) { - return event.name === Name.MARK_LCP_CANDIDATE; +function isSoftLargestContentfulPaintCandidate(event) { + return event.name === Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION; } function isLargestImagePaintCandidate(event) { return event.name === "LargestImagePaint::Candidate"; @@ -14896,13 +14971,13 @@ function isLargestTextPaintCandidate(event) { return event.name === "LargestTextPaint::Candidate"; } function isMarkLoad(event) { - return event.name === "MarkLoad"; + return event.name === Name.MARK_LOAD; } function isFirstPaint(event) { - return event.name === "firstPaint"; + return event.name === Name.MARK_FIRST_PAINT; } function isMarkDOMContent(event) { - return event.name === "MarkDOMContent"; + return event.name === Name.MARK_DOM_CONTENT; } function isInteractiveTime(event) { return event.name === "InteractiveTime"; @@ -14965,7 +15040,7 @@ function isPrePaint(event) { return event.name === "PrePaint"; } function isNavigationStart(event) { - return event.name === "navigationStart" && event.args?.data?.documentLoaderURL !== ""; + return event.name === Name.NAVIGATION_START && event.args?.data?.documentLoaderURL !== ""; } function isDidCommitSameDocumentNavigation(event) { return event.name === "RenderFrameHostImpl::DidCommitSameDocumentNavigation" && event.ph === Phase.COMPLETE; @@ -15154,7 +15229,10 @@ function isRundownScriptSourceLarge(event) { function isAnyScriptSourceEvent(event) { return event.cat === "disabled-by-default-devtools.v8-source-rundown-sources"; } -var Phase, Scope, AuctionWorkletType, markerTypeGuards, MarkerName, pageLoadEventTypeGuards, NO_NAVIGATION, LayoutInvalidationReason, StyleRecalcInvalidationReason, InvalidationEventType, SelectorTimingsKey, Name, Categories; +function isPreloadRenderBlockingStatusChangeEvent(event) { + return event.name === Name.PRELOAD_RENDER_BLOCKING_STATUS_CHANGE; +} +var Phase, Scope, VALID_PROFILE_SOURCES, AuctionWorkletType, markerTypeGuards, pageLoadEventTypeGuards, NO_NAVIGATION, LayoutInvalidationReason, StyleRecalcInvalidationReason, InvalidationEventType, SelectorTimingsKey, Name, MarkerName, Categories; var init_TraceEvents = __esm({ "node_modules/@paulirish/trace_engine/models/trace/types/TraceEvents.js"() { init_process_global(); @@ -15192,7 +15270,9 @@ var init_TraceEvents = __esm({ Scope2["PROCESS"] = "p"; Scope2["GLOBAL"] = "g"; })(Scope || (Scope = {})); + __name(objectIsEvent, "objectIsEvent"); __name(objectIsCallFrame, "objectIsCallFrame"); + VALID_PROFILE_SOURCES = ["Inspector", "SelfProfiling", "Internal"]; __name(isRunTask, "isRunTask"); (function(AuctionWorkletType2) { AuctionWorkletType2["BIDDER"] = "bidder"; @@ -15204,15 +15284,16 @@ var init_TraceEvents = __esm({ __name(isLegacyScreenshot, "isLegacyScreenshot"); __name(isLegacySyntheticScreenshot, "isLegacySyntheticScreenshot"); __name(isScreenshot, "isScreenshot"); + __name(isSoftNavigationStart, "isSoftNavigationStart"); markerTypeGuards = [ isMarkDOMContent, isMarkLoad, isFirstPaint, isFirstContentfulPaint, - isLargestContentfulPaintCandidate, - isNavigationStart + isAnyLargestContentfulPaintCandidate, + isNavigationStart, + isSoftNavigationStart ]; - MarkerName = ["MarkDOMContent", "MarkLoad", "firstPaint", "firstContentfulPaint", "largestContentfulPaint::Candidate"]; __name(isMarkerEvent, "isMarkerEvent"); pageLoadEventTypeGuards = [ ...markerTypeGuards, @@ -15240,6 +15321,7 @@ var init_TraceEvents = __esm({ __name(isStyleInvalidatorInvalidationTracking, "isStyleInvalidatorInvalidationTracking"); __name(isBeginCommitCompositorFrame, "isBeginCommitCompositorFrame"); __name(isParseMetaViewport, "isParseMetaViewport"); + __name(isMetaCharsetCheck, "isMetaCharsetCheck"); __name(isLinkPreconnect, "isLinkPreconnect"); __name(isScheduleStyleRecalculation, "isScheduleStyleRecalculation"); __name(isRenderFrameImplCreateChildFrame, "isRenderFrameImplCreateChildFrame"); @@ -15252,6 +15334,7 @@ var init_TraceEvents = __esm({ __name(isAnimationFramePresentation, "isAnimationFramePresentation"); __name(isPipelineReporter, "isPipelineReporter"); __name(isSyntheticBased, "isSyntheticBased"); + __name(isJSSample, "isJSSample"); __name(isSyntheticInteraction, "isSyntheticInteraction"); __name(isDrawFrame, "isDrawFrame"); __name(isBeginFrame, "isBeginFrame"); @@ -15314,7 +15397,8 @@ var init_TraceEvents = __esm({ __name(isLayoutShift, "isLayoutShift"); __name(isLayoutInvalidationTracking, "isLayoutInvalidationTracking"); __name(isFirstContentfulPaint, "isFirstContentfulPaint"); - __name(isLargestContentfulPaintCandidate, "isLargestContentfulPaintCandidate"); + __name(isAnyLargestContentfulPaintCandidate, "isAnyLargestContentfulPaintCandidate"); + __name(isSoftLargestContentfulPaintCandidate, "isSoftLargestContentfulPaintCandidate"); __name(isLargestImagePaintCandidate, "isLargestImagePaintCandidate"); __name(isLargestTextPaintCandidate, "isLargestTextPaintCandidate"); __name(isMarkLoad, "isMarkLoad"); @@ -15470,6 +15554,7 @@ var init_TraceEvents = __esm({ Name2["SELECTOR_STATS"] = "SelectorStats"; Name2["BEGIN_COMMIT_COMPOSITOR_FRAME"] = "BeginCommitCompositorFrame"; Name2["PARSE_META_VIEWPORT"] = "ParseMetaViewport"; + Name2["META_CHARSET_CHECK"] = "MetaCharsetCheck"; Name2["SCROLL_LAYER"] = "ScrollLayer"; Name2["UPDATE_LAYER"] = "UpdateLayer"; Name2["PAINT_SETUP"] = "PaintSetup"; @@ -15503,8 +15588,10 @@ var init_TraceEvents = __esm({ Name2["MARK_FIRST_PAINT"] = "firstPaint"; Name2["MARK_FCP"] = "firstContentfulPaint"; Name2["MARK_LCP_CANDIDATE"] = "largestContentfulPaint::Candidate"; + Name2["MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION"] = "largestContentfulPaint::CandidateForSoftNavigation"; Name2["MARK_LCP_INVALIDATE"] = "largestContentfulPaint::Invalidate"; Name2["NAVIGATION_START"] = "navigationStart"; + Name2["SOFT_NAVIGATION_START"] = "SoftNavigationStart"; Name2["CONSOLE_TIME"] = "ConsoleTime"; Name2["USER_TIMING"] = "UserTiming"; Name2["INTERACTIVE_TIME"] = "InteractiveTime"; @@ -15558,7 +15645,18 @@ var init_TraceEvents = __esm({ Name2["SYNTHETIC_NETWORK_REQUEST"] = "SyntheticNetworkRequest"; Name2["USER_TIMING_MEASURE"] = "UserTiming::Measure"; Name2["LINK_PRECONNECT"] = "LinkPreconnect"; + Name2["PRELOAD_RENDER_BLOCKING_STATUS_CHANGE"] = "PreloadRenderBlockingStatusChange"; })(Name || (Name = {})); + MarkerName = [ + Name.MARK_DOM_CONTENT, + Name.MARK_LOAD, + Name.MARK_FIRST_PAINT, + Name.MARK_FCP, + Name.MARK_LCP_CANDIDATE, + Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION, + Name.NAVIGATION_START, + Name.SOFT_NAVIGATION_START + ]; Categories = { Console: "blink.console", UserTiming: "blink.user_timing", @@ -15570,6 +15668,7 @@ var init_TraceEvents = __esm({ __name(isRundownScriptSource, "isRundownScriptSource"); __name(isRundownScriptSourceLarge, "isRundownScriptSourceLarge"); __name(isAnyScriptSourceEvent, "isAnyScriptSourceEvent"); + __name(isPreloadRenderBlockingStatusChangeEvent, "isPreloadRenderBlockingStatusChangeEvent"); } }); @@ -15759,6 +15858,7 @@ var ArrayUtilities_exports = {}; __export(ArrayUtilities_exports, { DEFAULT_COMPARATOR: () => DEFAULT_COMPARATOR, arrayDoesNotContainNullOrUndefined: () => arrayDoesNotContainNullOrUndefined, + assertArrayIsSorted: () => assertArrayIsSorted, binaryIndexOf: () => binaryIndexOf, intersectOrdered: () => intersectOrdered, lowerBound: () => lowerBound, @@ -15767,6 +15867,7 @@ __export(ArrayUtilities_exports, { nearestIndexFromEnd: () => nearestIndexFromEnd, removeElement: () => removeElement, sortRange: () => sortRange, + swap: () => swap, upperBound: () => upperBound }); function swap(array, i1, i2) { @@ -15906,6 +16007,16 @@ function nearestIndexFromEnd(arr, predicate) { function arrayDoesNotContainNullOrUndefined(arr) { return !arr.includes(null) && !arr.includes(void 0); } +function assertArrayIsSorted(arr, compareFn) { + const comparator = compareFn || DEFAULT_COMPARATOR; + for (let i = 0; i < arr.length - 1; i++) { + const current = arr[i]; + const next = arr[i + 1]; + if (comparator(current, next) > 0) { + throw new Error(`Array is not sorted at index ${i}: ${JSON.stringify(current)} > ${JSON.stringify(next)}`); + } + } +} var removeElement, binaryIndexOf, intersectOrdered, mergeOrdered, DEFAULT_COMPARATOR; var init_ArrayUtilities = __esm({ "node_modules/@paulirish/trace_engine/core/platform/ArrayUtilities.js"() { @@ -15951,6 +16062,7 @@ var init_ArrayUtilities = __esm({ __name(nearestIndexFromBeginning, "nearestIndexFromBeginning"); __name(nearestIndexFromEnd, "nearestIndexFromEnd"); __name(arrayDoesNotContainNullOrUndefined, "arrayDoesNotContainNullOrUndefined"); + __name(assertArrayIsSorted, "assertArrayIsSorted"); } }); @@ -15982,10 +16094,15 @@ var init_DevToolsPath = __esm({ } }); -// node_modules/@paulirish/trace_engine/core/platform/DOMUtilities.js -var init_DOMUtilities = __esm({ - "node_modules/@paulirish/trace_engine/core/platform/DOMUtilities.js"() { +// node_modules/@paulirish/trace_engine/core/platform/HostRuntime.js +var IS_NODE, IS_BROWSER; +var init_HostRuntime = __esm({ + "node_modules/@paulirish/trace_engine/core/platform/HostRuntime.js"() { init_process_global(); + IS_NODE = typeof process !== "undefined" && process.versions?.node !== null; + IS_BROWSER = // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore 'window' is not available when type-checking against node.js types. + typeof window !== "undefined" || typeof self !== "undefined" && typeof self.postMessage === "function"; } }); @@ -16240,7 +16357,7 @@ var init_platform = __esm({ init_Constructor(); init_DateUtilities(); init_DevToolsPath(); - init_DOMUtilities(); + init_HostRuntime(); init_KeyboardUtilities(); init_MapUtilities(); init_MimeType(); @@ -16361,9 +16478,14 @@ __export(Timing_exports3, { windowFitsInsideBounds: () => windowFitsInsideBounds, windowsEqual: () => windowsEqual }); -function timeStampForEventAdjustedByClosestNavigation(event, traceBounds2, navigationsByNavigationId2, navigationsByFrameId2) { +function timeStampForEventAdjustedByClosestNavigation(event, traceBounds2, navigationsByNavigationId2, softNavigationsById2, navigationsByFrameId2) { let eventTimeStamp = event.ts - traceBounds2.min; - if (event.args?.data?.navigationId) { + if (event.name === TraceEvents_exports.Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION && event.args?.data?.performanceTimelineNavigationId) { + const navigationForEvent = softNavigationsById2.get(event.args.data.performanceTimelineNavigationId); + if (navigationForEvent) { + eventTimeStamp = event.ts - navigationForEvent.ts; + } + } else if (event.args?.data?.navigationId) { const navigationForEvent = navigationsByNavigationId2.get(event.args.data.navigationId); if (navigationForEvent) { eventTimeStamp = event.ts - navigationForEvent.ts; @@ -16572,6 +16694,7 @@ __export(Trace_exports, { makeZeroBasedCallFrame: () => makeZeroBasedCallFrame, mergeEventsInOrder: () => mergeEventsInOrder, parseDevtoolsDetails: () => parseDevtoolsDetails, + rawCallFrameForEntry: () => rawCallFrameForEntry, sortTraceEventsInPlace: () => sortTraceEventsInPlace, stackTraceInEvent: () => stackTraceInEvent }); @@ -16613,7 +16736,7 @@ function stackTraceInEvent(event) { return null; } function extractOriginFromTrace(firstNavigationURL) { - const url = new URL(firstNavigationURL); + const url = URL.parse(firstNavigationURL); if (url) { if (url.host.startsWith("www.")) { return url.host.slice(4); @@ -16942,6 +17065,16 @@ function getStackTraceTopCallFrameInEventPayload(event) { } } } +function rawCallFrameForEntry(entry) { + if (TraceEvents_exports.isProfileCall(entry)) { + return entry.callFrame; + } + const topCallFrame = getStackTraceTopCallFrameInEventPayload(entry); + if (topCallFrame) { + return topCallFrame; + } + return null; +} function makeZeroBasedCallFrame(callFrame) { const normalizedCallFrame = { ...callFrame }; normalizedCallFrame.lineNumber = callFrame.lineNumber && callFrame.lineNumber - 1; @@ -16950,10 +17083,7 @@ function makeZeroBasedCallFrame(callFrame) { } function getRawLineAndColumnNumbersForEvent(event) { if (!event.args?.data) { - return { - lineNumber: void 0, - columnNumber: void 0 - }; + return {}; } let lineNumber = void 0; let columnNumber = void 0; @@ -17010,10 +17140,10 @@ function findPreviousEventBeforeTimestamp(candidates, ts) { const index = ArrayUtilities_exports.nearestIndexFromEnd(candidates, (candidate) => candidate.ts < ts); return index === null ? null : candidates[index]; } -function forEachEvent(events, config3) { - const globalStartTime = config3.startTime ?? Timing_exports.Micro(0); - const globalEndTime = config3.endTime || Timing_exports.Micro(Infinity); - const ignoreAsyncEvents = config3.ignoreAsyncEvents === false ? false : true; +function forEachEvent(events, config4) { + const globalStartTime = config4.startTime ?? Timing_exports.Micro(0); + const globalEndTime = config4.endTime || Timing_exports.Micro(Infinity); + const ignoreAsyncEvents = config4.ignoreAsyncEvents === false ? false : true; const stack = []; const startEventIndex = topLevelEventIndexEndingAfter(events, globalStartTime); for (let i = startEventIndex; i < events.length; i++) { @@ -17033,24 +17163,24 @@ function forEachEvent(events, config3) { let lastEventEndTime = lastEventOnStack ? eventTimingsMicroSeconds(lastEventOnStack).endTime : null; while (lastEventOnStack && lastEventEndTime && lastEventEndTime <= currentEventTimings.startTime) { stack.pop(); - config3.onEndEvent(lastEventOnStack); + config4.onEndEvent(lastEventOnStack); lastEventOnStack = stack.at(-1); lastEventEndTime = lastEventOnStack ? eventTimingsMicroSeconds(lastEventOnStack).endTime : null; } - if (config3.eventFilter && !config3.eventFilter(currentEvent)) { + if (config4.eventFilter && !config4.eventFilter(currentEvent)) { continue; } if (currentEventTimings.duration) { - config3.onStartEvent(currentEvent); + config4.onStartEvent(currentEvent); stack.push(currentEvent); - } else if (config3.onInstantEvent) { - config3.onInstantEvent(currentEvent); + } else if (config4.onInstantEvent) { + config4.onInstantEvent(currentEvent); } } while (stack.length) { const last = stack.pop(); if (last) { - config3.onEndEvent(last); + config4.onEndEvent(last); } } } @@ -17104,6 +17234,7 @@ var init_Trace = __esm({ __name(getZeroIndexedLineAndColumnForEvent, "getZeroIndexedLineAndColumnForEvent"); __name(getZeroIndexedStackTraceInEventPayload, "getZeroIndexedStackTraceInEventPayload"); __name(getStackTraceTopCallFrameInEventPayload, "getStackTraceTopCallFrameInEventPayload"); + __name(rawCallFrameForEntry, "rawCallFrameForEntry"); __name(makeZeroBasedCallFrame, "makeZeroBasedCallFrame"); __name(getRawLineAndColumnNumbersForEvent, "getRawLineAndColumnNumbersForEvent"); __name(frameIDForEvent, "frameIDForEvent"); @@ -17860,19 +17991,13 @@ var init_SamplesIntegrator = __esm({ if (showAllEvents) { return; } - let previousNativeFrameName = null; let j = 0; for (let i = 0; i < stack.length; ++i) { const frame = stack[i].callFrame; const nativeRuntimeFrame = _a.isNativeRuntimeFrame(frame); - if (nativeRuntimeFrame && !_a.showNativeName(frame.functionName, engineConfig.includeRuntimeCallStats)) { + if (nativeRuntimeFrame) { continue; } - const nativeFrameName = nativeRuntimeFrame ? _a.nativeGroup(frame.functionName) : null; - if (previousNativeFrameName && previousNativeFrameName === nativeFrameName) { - continue; - } - previousNativeFrameName = nativeFrameName; stack[j++] = stack[i]; } stack.length = j; @@ -17955,8 +18080,8 @@ function reset() { animationFramePresentations = /* @__PURE__ */ new Map(); isEnabled = false; } -function handleUserConfig(config3) { - isEnabled = config3.enableAnimationsFrameHandler; +function handleUserConfig(config4) { + isEnabled = config4.enableAnimationsFrameHandler; } function handleEvent(event) { if (!isEnabled) { @@ -18340,6 +18465,7 @@ function makeNewTraceBounds() { function reset5() { navigationsByFrameId = /* @__PURE__ */ new Map(); navigationsByNavigationId = /* @__PURE__ */ new Map(); + softNavigationsById = /* @__PURE__ */ new Map(); finalDisplayUrlByNavigationId = /* @__PURE__ */ new Map(); processNames = /* @__PURE__ */ new Map(); mainFrameNavigations = []; @@ -18483,6 +18609,9 @@ function handleEvent5(event) { } return; } + if (TraceEvents_exports.isSoftNavigationStart(event)) { + softNavigationsById.set(event.args.context.performanceTimelineNavigationId, event); + } if (TraceEvents_exports.isResourceSendRequest(event)) { if (event.args.data.resourceType !== "Document") { return; @@ -18505,7 +18634,8 @@ function handleEvent5(event) { return; } } -async function finalize5() { +async function finalize5(options) { + config = { showAllEvents: Boolean(options?.showAllEvents) }; if (traceStartedTimeFromTracingStartedEvent >= 0) { traceBounds.min = traceStartedTimeFromTracingStartedEvent; } @@ -18549,6 +18679,7 @@ async function finalize5() { } function data5() { return { + config, traceBounds, browserProcessId, browserThreadId, @@ -18561,6 +18692,7 @@ function data5() { mainFrameURL, navigationsByFrameId, navigationsByNavigationId, + softNavigationsById, finalDisplayUrlByNavigationId, threadsInProcess, rendererProcessesByFrame: rendererProcessesByFrameId, @@ -18570,7 +18702,7 @@ function data5() { traceIsGeneric }; } -var rendererProcessesByFrameId, mainFrameId, mainFrameURL, framesByProcessId, browserProcessId, browserThreadId, gpuProcessId, gpuThreadId, viewportRect, devicePixelRatio2, processNames, topLevelRendererIds, traceBounds, navigationsByFrameId, navigationsByNavigationId, finalDisplayUrlByNavigationId, mainFrameNavigations, threadsInProcess, traceStartedTimeFromTracingStartedEvent, eventPhasesOfInterestForTraceBounds, traceIsGeneric, CHROME_WEB_TRACE_EVENTS; +var config, rendererProcessesByFrameId, mainFrameId, mainFrameURL, framesByProcessId, browserProcessId, browserThreadId, gpuProcessId, gpuThreadId, viewportRect, devicePixelRatio2, processNames, topLevelRendererIds, traceBounds, navigationsByFrameId, navigationsByNavigationId, softNavigationsById, finalDisplayUrlByNavigationId, mainFrameNavigations, threadsInProcess, traceStartedTimeFromTracingStartedEvent, eventPhasesOfInterestForTraceBounds, traceIsGeneric, CHROME_WEB_TRACE_EVENTS; var init_MetaHandler = __esm({ "node_modules/@paulirish/trace_engine/models/trace/handlers/MetaHandler.js"() { init_process_global(); @@ -18593,6 +18725,7 @@ var init_MetaHandler = __esm({ traceBounds = makeNewTraceBounds(); navigationsByFrameId = /* @__PURE__ */ new Map(); navigationsByNavigationId = /* @__PURE__ */ new Map(); + softNavigationsById = /* @__PURE__ */ new Map(); finalDisplayUrlByNavigationId = /* @__PURE__ */ new Map(); mainFrameNavigations = []; threadsInProcess = /* @__PURE__ */ new Map(); @@ -18658,6 +18791,7 @@ function reset6() { networkRequestEventByInitiatorUrl = /* @__PURE__ */ new Map(); eventToInitiatorMap = /* @__PURE__ */ new Map(); webSocketData = /* @__PURE__ */ new Map(); + requestIdsByURL = /* @__PURE__ */ new Map(); entityMappings = { eventsByEntity: /* @__PURE__ */ new Map(), entityByEvent: /* @__PURE__ */ new Map(), @@ -18695,6 +18829,9 @@ function handleEvent6(event) { storeTraceEventWithRequestId(event.args.data.requestId, "resourceMarkAsCached", event); return; } + if (TraceEvents_exports.isPreloadRenderBlockingStatusChangeEvent(event)) { + storeTraceEventWithRequestId(event.args.data.requestId, "preloadRenderBlockingStatusChange", [event]); + } if (TraceEvents_exports.isWebSocketCreate(event) || TraceEvents_exports.isWebSocketInfo(event) || TraceEvents_exports.isWebSocketTransfer(event)) { const identifier = event.args.data.identifier; if (!webSocketData.has(identifier)) { @@ -18845,11 +18982,13 @@ async function finalize6() { const proxyNegotiation = timing ? Timing_exports.Micro((timing.proxyEnd - timing.proxyStart) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0); const requestSent = timing ? Timing_exports.Micro((timing.sendEnd - timing.sendStart) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0); const initialConnection = timing ? Timing_exports.Micro((timing.connectEnd - timing.connectStart) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0); - const { frame, url, renderBlocking } = finalSendRequest.args.data; + const { frame, url, renderBlocking: sendRequestIsRenderBlocking } = finalSendRequest.args.data; const { encodedDataLength, decodedBodyLength } = request.resourceFinish ? request.resourceFinish.args.data : { encodedDataLength: 0, decodedBodyLength: 0 }; const parsedUrl = new URL(url); const isHttps = parsedUrl.protocol === "https:"; const requestingFrameUrl = Trace_exports.activeURLForFrameAtTime(frame, finalSendRequest.ts, rendererProcessesByFrame) || ""; + const preloadRenderBlockingStatusChange = request.preloadRenderBlockingStatusChange?.at(-1)?.args.data.renderBlocking; + const isRenderBlocking = preloadRenderBlockingStatusChange ?? sendRequestIsRenderBlocking ?? "non_blocking"; const networkEvent = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent({ rawSourceEvent: finalSendRequest, args: { @@ -18889,8 +19028,7 @@ async function finalize6() { initialPriority, protocol: request.receiveResponse?.args.data.protocol ?? "unknown", redirects, - // In the event the property isn't set, assume non-blocking. - renderBlocking: renderBlocking ?? "non_blocking", + renderBlocking: isRenderBlocking, requestId, requestingFrameUrl, requestMethod: finalSendRequest.args.data.requestMethod, @@ -18922,6 +19060,9 @@ async function finalize6() { }); requestsByTime.push(networkEvent); requestsById.set(networkEvent.args.data.requestId, networkEvent); + const requestsForUrl = requestIdsByURL.get(networkEvent.args.data.url) ?? []; + requestsForUrl.push(networkEvent.args.data.requestId); + requestIdsByURL.set(networkEvent.args.data.url, requestsForUrl); addNetworkRequestToEntityMapping(networkEvent, entityMappings, request); const initiatorUrl = networkEvent.args.data.initiator?.url || Trace_exports.getStackTraceTopCallFrameInEventPayload(networkEvent)?.url; if (initiatorUrl) { @@ -18944,7 +19085,8 @@ function data6() { return { byId: requestsById, byTime: requestsByTime, - eventToInitiator: eventToInitiatorMap, + requestIdsByURL, + incompleteInitiator: eventToInitiatorMap, webSocket: [...webSocketData.values()], entityMappings: { entityByEvent: entityMappings.entityByEvent, @@ -18999,7 +19141,7 @@ function createSyntheticWebSocketConnection(startEvent, endEvent, firstRecordedE } }; } -var MILLISECONDS_TO_MICROSECONDS, SECONDS_TO_MICROSECONDS, webSocketData, linkPreconnectEvents, requestMap, requestsById, requestsByTime, networkRequestEventByInitiatorUrl, eventToInitiatorMap, entityMappings; +var MILLISECONDS_TO_MICROSECONDS, SECONDS_TO_MICROSECONDS, webSocketData, linkPreconnectEvents, requestMap, requestsById, requestsByTime, requestIdsByURL, networkRequestEventByInitiatorUrl, eventToInitiatorMap, entityMappings; var init_NetworkRequestsHandler = __esm({ "node_modules/@paulirish/trace_engine/models/trace/handlers/NetworkRequestsHandler.js"() { init_process_global(); @@ -19015,6 +19157,7 @@ var init_NetworkRequestsHandler = __esm({ requestMap = /* @__PURE__ */ new Map(); requestsById = /* @__PURE__ */ new Map(); requestsByTime = []; + requestIdsByURL = /* @__PURE__ */ new Map(); networkRequestEventByInitiatorUrl = /* @__PURE__ */ new Map(); eventToInitiatorMap = /* @__PURE__ */ new Map(); entityMappings = { @@ -19051,7 +19194,7 @@ var init_ProfileTreeModel = __esm({ id; parent; children; - functionName; + originalFunctionName = null; depth; deoptReason; constructor(callFrame) { @@ -19060,7 +19203,6 @@ var init_ProfileTreeModel = __esm({ this.self = 0; this.total = 0; this.id = 0; - this.functionName = callFrame.functionName; this.parent = null; this.children = []; } @@ -19076,11 +19218,11 @@ var init_ProfileTreeModel = __esm({ get columnNumber() { return this.callFrame.columnNumber; } - setFunctionName(name) { - if (name === null) { - return; - } - this.functionName = name; + get functionName() { + return this.originalFunctionName ?? this.callFrame.functionName; + } + setOriginalFunctionName(name) { + this.originalFunctionName = name; } }; ProfileTreeModel = class { @@ -19200,7 +19342,15 @@ var init_CPUProfileDataModel = __esm({ * for CPU profiles coming from traces. */ traceIds; + /** + * Each item in the `lines` array contains the script line executing + * when the sample in that array position was taken. + */ lines; + /** + * Same as `lines` above, but with the script column. + */ + columns; totalHitCount; profileHead; /** @@ -19230,6 +19380,7 @@ var init_CPUProfileDataModel = __esm({ this.traceIds = profile.traceIds; this.samples = profile.samples; this.lines = profile.lines; + this.columns = profile.columns; this.totalHitCount = 0; this.profileHead = this.translateProfileTree(profile.nodes); this.initialize(this.profileHead); @@ -19619,8 +19770,18 @@ __export(SamplesHandler_exports, { reset: () => reset7 }); function parseCPUProfileData(parseOptions) { + const priorityList = parseOptions.isCPUProfile ? PROFILE_SOURCES_BY_PRIORITY.cpuProfile : PROFILE_SOURCES_BY_PRIORITY.performanceTrace; for (const [processId, profiles] of preprocessedData) { + const profilesByThread = /* @__PURE__ */ new Map(); for (const [profileId, preProcessedData] of profiles) { + const threadId = preProcessedData.threadId; + if (threadId === void 0) { + continue; + } + const listForThread = MapUtilities_exports.getWithDefault(profilesByThread, threadId, () => []); + listForThread.push({ id: profileId, data: preProcessedData }); + } + for (const [threadId, candidates] of profilesByThread) { let buildProfileCallsForCPUProfile = function() { profileModel.forEachFrame(openFrameCallback, closeFrameCallback); function openFrameCallback(depth, node, sampleIndex, timeStampMilliseconds) { @@ -19629,7 +19790,7 @@ function parseCPUProfileData(parseOptions) { } const ts = Timing_exports3.milliToMicro(Timing_exports.Milli(timeStampMilliseconds)); const nodeId = node.id; - const profileCall = Trace_exports.makeProfileCall(node, profileId, sampleIndex, ts, processId, threadId); + const profileCall = Trace_exports.makeProfileCall(node, selectedProfileId, sampleIndex, ts, processId, threadId); finalizedData.profileCalls.push(profileCall); indexStack.push(finalizedData.profileCalls.length - 1); const traceEntryNode = TreeHelpers_exports.makeEmptyTraceEntryNode(profileCall, nodeId); @@ -19648,7 +19809,7 @@ function parseCPUProfileData(parseOptions) { } const { callFrame, ts, pid, tid } = profileCall; const traceEntryNode = entryToNode.get(profileCall); - if (callFrame === void 0 || ts === void 0 || pid === void 0 || profileId === void 0 || tid === void 0 || traceEntryNode === void 0) { + if (callFrame === void 0 || ts === void 0 || pid === void 0 || selectedProfileId === void 0 || tid === void 0 || traceEntryNode === void 0) { return; } const dur = Timing_exports3.milliToMicro(Timing_exports.Milli(durMs)); @@ -19667,20 +19828,32 @@ function parseCPUProfileData(parseOptions) { __name(closeFrameCallback, "closeFrameCallback"); }; __name(buildProfileCallsForCPUProfile, "buildProfileCallsForCPUProfile"); - const threadId = preProcessedData.threadId; - if (!preProcessedData.rawProfile.nodes.length || threadId === void 0) { + if (!candidates.length) { + continue; + } + let chosen = candidates[0]; + for (const source of priorityList) { + const match = candidates.find((p) => p.data.source === source); + if (match) { + chosen = match; + break; + } + } + const chosenData = chosen.data; + if (!chosenData.rawProfile.nodes.length) { continue; } const indexStack = []; - const profileModel = new CPUProfileDataModel_exports.CPUProfileDataModel(preProcessedData.rawProfile); + const profileModel = new CPUProfileDataModel_exports.CPUProfileDataModel(chosenData.rawProfile); const profileTree = TreeHelpers_exports.makeEmptyTraceEntryTree(); profileTree.maxDepth = profileModel.maxDepth; + const selectedProfileId = chosen.id; const finalizedData = { - rawProfile: preProcessedData.rawProfile, + rawProfile: chosenData.rawProfile, parsedProfile: profileModel, profileCalls: [], profileTree, - profileId + profileId: selectedProfileId }; const dataByThread = MapUtilities_exports.getWithDefault(profilesInProcess, processId, () => /* @__PURE__ */ new Map()); dataByThread.set(threadId, finalizedData); @@ -19706,6 +19879,7 @@ function handleEvent7(event) { const profileData = getOrCreatePreProcessedData(event.pid, event.id); profileData.rawProfile.startTime = event.ts; profileData.threadId = event.tid; + assignProfileSourceIfKnown(profileData, event.args?.data?.source); return; } if (TraceEvents_exports.isProfileChunk(event)) { @@ -19733,9 +19907,11 @@ function handleEvent7(event) { } const timeDeltas = event.args.data?.timeDeltas || []; const lines = event.args.data?.lines || Array(samples.length).fill(0); + const columns = event.args.data?.columns || Array(samples.length).fill(0); cdpProfile.samples?.push(...samples); cdpProfile.timeDeltas?.push(...timeDeltas); cdpProfile.lines?.push(...lines); + cdpProfile.columns?.push(...columns); if (traceIds) { cdpProfile.traceIds ??= {}; for (const key in traceIds) { @@ -19750,12 +19926,18 @@ function handleEvent7(event) { const timeDeltas2 = cdpProfile.timeDeltas; cdpProfile.endTime = timeDeltas2.reduce((x, y) => x + y, cdpProfile.startTime); } + assignProfileSourceIfKnown(profileData, event.args?.data?.source); return; } } async function finalize7(parseOptions = {}) { parseCPUProfileData(parseOptions); } +function assignProfileSourceIfKnown(profileData, source) { + if (TraceEvents_exports.VALID_PROFILE_SOURCES.includes(source)) { + profileData.source = source; + } +} function data7() { return { profilesInProcess, @@ -19771,7 +19953,8 @@ function getOrCreatePreProcessedData(processId, profileId) { nodes: [], samples: [], timeDeltas: [], - lines: [] + lines: [], + columns: [] }, profileId })); @@ -19784,7 +19967,7 @@ function getProfileCallFunctionName(data31, entry) { } return entry.callFrame.functionName; } -var profilesInProcess, entryToNode, preprocessedData; +var profilesInProcess, entryToNode, preprocessedData, PROFILE_SOURCES_BY_PRIORITY; var init_SamplesHandler = __esm({ "node_modules/@paulirish/trace_engine/models/trace/handlers/SamplesHandler.js"() { init_process_global(); @@ -19795,10 +19978,15 @@ var init_SamplesHandler = __esm({ profilesInProcess = /* @__PURE__ */ new Map(); entryToNode = /* @__PURE__ */ new Map(); preprocessedData = /* @__PURE__ */ new Map(); + PROFILE_SOURCES_BY_PRIORITY = { + cpuProfile: ["Inspector"], + performanceTrace: ["Internal", "Inspector"] + }; __name(parseCPUProfileData, "parseCPUProfileData"); __name(reset7, "reset"); __name(handleEvent7, "handleEvent"); __name(finalize7, "finalize"); + __name(assignProfileSourceIfKnown, "assignProfileSourceIfKnown"); __name(data7, "data"); __name(getOrCreatePreProcessedData, "getOrCreatePreProcessedData"); __name(getProfileCallFunctionName, "getProfileCallFunctionName"); @@ -19824,7 +20012,7 @@ __export(RendererHandler_exports, { sanitizeThreads: () => sanitizeThreads }); function handleUserConfig2(userConfig) { - config = userConfig; + config2 = userConfig; } function reset8() { processes = /* @__PURE__ */ new Map(); @@ -19980,7 +20168,7 @@ function buildHierarchy(processes2, options) { const samplesDataForThread = samplesData.profilesInProcess.get(pid)?.get(tid); if (samplesDataForThread) { const cpuProfile = samplesDataForThread.parsedProfile; - const samplesIntegrator = cpuProfile && new SamplesIntegrator_exports.SamplesIntegrator(cpuProfile, samplesDataForThread.profileId, pid, tid, config); + const samplesIntegrator = cpuProfile && new SamplesIntegrator_exports.SamplesIntegrator(cpuProfile, samplesDataForThread.profileId, pid, tid, config2); const profileCalls = samplesIntegrator?.buildProfileCalls(thread.entries); if (samplesIntegrator && profileCalls) { thread.entries = Trace_exports.mergeEventsInOrder(thread.entries, profileCalls); @@ -20024,7 +20212,7 @@ function makeCompleteEvent(event) { function deps3() { return ["Meta", "Samples", "AuctionWorklets", "NetworkRequests"]; } -var processes, entityMappings2, compositorTileWorkers, entryToNode2, completeEventStack, config, makeRendererProcess, makeRendererThread, getOrCreateRendererProcess, getOrCreateRendererThread; +var processes, entityMappings2, compositorTileWorkers, entryToNode2, completeEventStack, config2, makeRendererProcess, makeRendererThread, getOrCreateRendererProcess, getOrCreateRendererThread; var init_RendererHandler = __esm({ "node_modules/@paulirish/trace_engine/models/trace/handlers/RendererHandler.js"() { init_process_global(); @@ -20046,7 +20234,7 @@ var init_RendererHandler = __esm({ compositorTileWorkers = Array(); entryToNode2 = /* @__PURE__ */ new Map(); completeEventStack = []; - config = Configuration_exports.defaults(); + config2 = Configuration_exports.defaults(); makeRendererProcess = /* @__PURE__ */ __name(() => ({ url: null, isOnMainFrame: false, @@ -21716,18 +21904,20 @@ function reset19() { pageLoadEventsArray = []; allMarkerEvents = []; selectedLCPCandidateEvents = /* @__PURE__ */ new Set(); + metaCharsetCheckEventsByNavigation = /* @__PURE__ */ new Map(); + metaCharsetCheckEventsArray = []; } function handleEvent19(event) { + if (TraceEvents_exports.isMetaCharsetCheck(event)) { + metaCharsetCheckEventsArray.push(event); + return; + } if (!TraceEvents_exports.eventIsPageLoadEvent(event)) { return; } pageLoadEventsArray.push(event); } function storePageLoadMetricAgainstNavigationId(navigation2, event) { - const navigationId = navigation2.args.data?.navigationId; - if (!navigationId) { - throw new Error("Navigation event unexpectedly had no navigation ID."); - } const frameId = getFrameIdForPageLoadEvent(event); const { rendererProcessesByFrame } = data5(); const rendererProcessesInFrame = rendererProcessesByFrame.get(frameId); @@ -21745,14 +21935,14 @@ function storePageLoadMetricAgainstNavigationId(navigation2, event) { const fcpTime = Timing_exports.Micro(event.ts - navigation2.ts); const classification = scoreClassificationForFirstContentfulPaint(fcpTime); const metricScore = { event, metricName: MetricName.FCP, classification, navigation: navigation2, timing: fcpTime }; - storeMetricScore(frameId, navigationId, metricScore); + storeMetricScore(frameId, navigation2, metricScore); return; } if (TraceEvents_exports.isFirstPaint(event)) { const paintTime = Timing_exports.Micro(event.ts - navigation2.ts); const classification = ScoreClassification.UNCLASSIFIED; const metricScore = { event, metricName: MetricName.FP, classification, navigation: navigation2, timing: paintTime }; - storeMetricScore(frameId, navigationId, metricScore); + storeMetricScore(frameId, navigation2, metricScore); return; } if (TraceEvents_exports.isMarkDOMContent(event)) { @@ -21764,7 +21954,7 @@ function storePageLoadMetricAgainstNavigationId(navigation2, event) { navigation: navigation2, timing: dclTime }; - storeMetricScore(frameId, navigationId, metricScore); + storeMetricScore(frameId, navigation2, metricScore); return; } if (TraceEvents_exports.isInteractiveTime(event)) { @@ -21776,7 +21966,7 @@ function storePageLoadMetricAgainstNavigationId(navigation2, event) { navigation: navigation2, timing: ttiValue }; - storeMetricScore(frameId, navigationId, tti); + storeMetricScore(frameId, navigation2, tti); const tbtValue = Timing_exports3.milliToMicro(Timing_exports.Milli(event.args.args.total_blocking_time_ms)); const tbt = { event, @@ -21785,7 +21975,7 @@ function storePageLoadMetricAgainstNavigationId(navigation2, event) { navigation: navigation2, timing: tbtValue }; - storeMetricScore(frameId, navigationId, tbt); + storeMetricScore(frameId, navigation2, tbt); return; } if (TraceEvents_exports.isMarkLoad(event)) { @@ -21797,10 +21987,10 @@ function storePageLoadMetricAgainstNavigationId(navigation2, event) { navigation: navigation2, timing: loadTime }; - storeMetricScore(frameId, navigationId, metricScore); + storeMetricScore(frameId, navigation2, metricScore); return; } - if (TraceEvents_exports.isLargestContentfulPaintCandidate(event)) { + if (TraceEvents_exports.isAnyLargestContentfulPaintCandidate(event)) { const candidateIndex = event.args.data?.candidateIndex; if (!candidateIndex) { throw new Error("Largest Contentful Paint unexpectedly had no candidateIndex."); @@ -21814,15 +22004,15 @@ function storePageLoadMetricAgainstNavigationId(navigation2, event) { timing: lcpTime }; const metricsByNavigation = MapUtilities_exports.getWithDefault(metricScoresByFrameId, frameId, () => /* @__PURE__ */ new Map()); - const metrics = MapUtilities_exports.getWithDefault(metricsByNavigation, navigationId, () => /* @__PURE__ */ new Map()); + const metrics = MapUtilities_exports.getWithDefault(metricsByNavigation, navigation2, () => /* @__PURE__ */ new Map()); const lastLCPCandidate = metrics.get(MetricName.LCP); if (lastLCPCandidate === void 0) { selectedLCPCandidateEvents.add(lcp.event); - storeMetricScore(frameId, navigationId, lcp); + storeMetricScore(frameId, navigation2, lcp); return; } const lastLCPCandidateEvent = lastLCPCandidate.event; - if (!TraceEvents_exports.isLargestContentfulPaintCandidate(lastLCPCandidateEvent)) { + if (!TraceEvents_exports.isAnyLargestContentfulPaintCandidate(lastLCPCandidateEvent)) { return; } const lastCandidateIndex = lastLCPCandidateEvent.args.data?.candidateIndex; @@ -21832,23 +22022,26 @@ function storePageLoadMetricAgainstNavigationId(navigation2, event) { if (lastCandidateIndex < candidateIndex) { selectedLCPCandidateEvents.delete(lastLCPCandidateEvent); selectedLCPCandidateEvents.add(lcp.event); - storeMetricScore(frameId, navigationId, lcp); + storeMetricScore(frameId, navigation2, lcp); } return; } if (TraceEvents_exports.isLayoutShift(event)) { return; } + if (TraceEvents_exports.isSoftNavigationStart(event)) { + return; + } return assertNever(event, `Unexpected event type: ${event}`); } -function storeMetricScore(frameId, navigationId, metricScore) { +function storeMetricScore(frameId, navigation2, metricScore) { const metricsByNavigation = MapUtilities_exports.getWithDefault(metricScoresByFrameId, frameId, () => /* @__PURE__ */ new Map()); - const metrics = MapUtilities_exports.getWithDefault(metricsByNavigation, navigationId, () => /* @__PURE__ */ new Map()); + const metrics = MapUtilities_exports.getWithDefault(metricsByNavigation, navigation2, () => /* @__PURE__ */ new Map()); metrics.delete(metricScore.metricName); metrics.set(metricScore.metricName, metricScore); } function getFrameIdForPageLoadEvent(event) { - if (TraceEvents_exports.isFirstContentfulPaint(event) || TraceEvents_exports.isInteractiveTime(event) || TraceEvents_exports.isLargestContentfulPaintCandidate(event) || TraceEvents_exports.isNavigationStart(event) || TraceEvents_exports.isLayoutShift(event) || TraceEvents_exports.isFirstPaint(event)) { + if (TraceEvents_exports.isFirstContentfulPaint(event) || TraceEvents_exports.isInteractiveTime(event) || TraceEvents_exports.isAnyLargestContentfulPaintCandidate(event) || TraceEvents_exports.isNavigationStart(event) || TraceEvents_exports.isSoftNavigationStart(event) || TraceEvents_exports.isLayoutShift(event) || TraceEvents_exports.isFirstPaint(event)) { return event.args.frame; } if (TraceEvents_exports.isMarkDOMContent(event) || TraceEvents_exports.isMarkLoad(event)) { @@ -21861,18 +22054,30 @@ function getFrameIdForPageLoadEvent(event) { assertNever(event, `Unexpected event type: ${event}`); } function getNavigationForPageLoadEvent(event) { - if (TraceEvents_exports.isFirstContentfulPaint(event) || TraceEvents_exports.isLargestContentfulPaintCandidate(event) || TraceEvents_exports.isFirstPaint(event)) { - const navigationId = event.args.data?.navigationId; - if (!navigationId) { - throw new Error("Trace event unexpectedly had no navigation ID."); + if (TraceEvents_exports.isFirstContentfulPaint(event) || TraceEvents_exports.isAnyLargestContentfulPaintCandidate(event) || TraceEvents_exports.isFirstPaint(event)) { + const { navigationsByNavigationId: navigationsByNavigationId2, softNavigationsById: softNavigationsById2 } = data5(); + let navigation2; + if (event.name === TraceEvents_exports.Name.MARK_LCP_CANDIDATE_FOR_SOFT_NAVIGATION && event.args.data?.performanceTimelineNavigationId) { + navigation2 = softNavigationsById2.get(event.args.data.performanceTimelineNavigationId); + if (!navigation2) { + return null; + } + } else { + const navigationId = event.args.data?.navigationId; + if (!navigationId) { + throw new Error(`Trace event unexpectedly had no navigation ID: ${JSON.stringify(event, null, 2)}`); + } + navigation2 = navigationsByNavigationId2.get(navigationId); } - const { navigationsByNavigationId: navigationsByNavigationId2 } = data5(); - const navigation2 = navigationsByNavigationId2.get(navigationId); if (!navigation2) { return null; } return navigation2; } + if (TraceEvents_exports.isSoftNavigationStart(event)) { + const { softNavigationsById: softNavigationsById2 } = data5(); + return softNavigationsById2.get(event.args.context.performanceTimelineNavigationId) ?? null; + } if (TraceEvents_exports.isMarkDOMContent(event) || TraceEvents_exports.isInteractiveTime(event) || TraceEvents_exports.isLayoutShift(event) || TraceEvents_exports.isMarkLoad(event)) { const frameId = getFrameIdForPageLoadEvent(event); const { navigationsByFrameId: navigationsByFrameId2 } = data5(); @@ -21956,16 +22161,31 @@ async function finalize19() { storePageLoadMetricAgainstNavigationId(navigation2, pageLoadEvent); } } + const { navigationsByFrameId: navigationsByFrameId2 } = data5(); + metaCharsetCheckEventsArray.sort((a, b) => a.ts - b.ts); + for (const metaCharsetCheckEvent of metaCharsetCheckEventsArray) { + const frameId = metaCharsetCheckEvent.args.data?.frame; + if (!frameId) { + continue; + } + const navigation2 = Trace_exports.getNavigationForTraceEvent(metaCharsetCheckEvent, frameId, navigationsByFrameId2); + if (!navigation2) { + continue; + } + const eventsForNavigation = MapUtilities_exports.getWithDefault(metaCharsetCheckEventsByNavigation, navigation2, () => []); + eventsForNavigation.push(metaCharsetCheckEvent); + } const allFinalLCPEvents = gatherFinalLCPEvents(); const mainFrame = data5().mainFrameId; - const allEventsButLCP = pageLoadEventsArray.filter((event) => !TraceEvents_exports.isLargestContentfulPaintCandidate(event)); + const allEventsButLCP = pageLoadEventsArray.filter((event) => !TraceEvents_exports.isAnyLargestContentfulPaintCandidate(event)); const markerEvents = [...allFinalLCPEvents, ...allEventsButLCP].filter(TraceEvents_exports.isMarkerEvent); allMarkerEvents = markerEvents.filter((event) => getFrameIdForPageLoadEvent(event) === mainFrame).sort((a, b) => a.ts - b.ts); } function data19() { return { metricScoresByFrameId, - allMarkerEvents + allMarkerEvents, + metaCharsetCheckEventsByNavigation }; } function deps10() { @@ -21974,7 +22194,7 @@ function deps10() { function metricIsLCP(metric) { return metric.metricName === MetricName.LCP; } -var metricScoresByFrameId, allMarkerEvents, pageLoadEventsArray, selectedLCPCandidateEvents, ScoreClassification, MetricName; +var metricScoresByFrameId, allMarkerEvents, metaCharsetCheckEventsByNavigation, metaCharsetCheckEventsArray, pageLoadEventsArray, selectedLCPCandidateEvents, ScoreClassification, MetricName; var init_PageLoadMetricsHandler = __esm({ "node_modules/@paulirish/trace_engine/models/trace/handlers/PageLoadMetricsHandler.js"() { init_process_global(); @@ -21984,6 +22204,8 @@ var init_PageLoadMetricsHandler = __esm({ init_MetaHandler(); metricScoresByFrameId = /* @__PURE__ */ new Map(); allMarkerEvents = []; + metaCharsetCheckEventsByNavigation = /* @__PURE__ */ new Map(); + metaCharsetCheckEventsArray = []; __name(reset19, "reset"); pageLoadEventsArray = []; selectedLCPCandidateEvents = /* @__PURE__ */ new Set(); @@ -22017,6 +22239,8 @@ var init_PageLoadMetricsHandler = __esm({ MetricName2["TBT"] = "TBT"; MetricName2["CLS"] = "CLS"; MetricName2["NAV"] = "Nav"; + MetricName2["SOFT_NAV"] = "Nav*"; + MetricName2["SOFT_LCP"] = "LCP*"; })(MetricName || (MetricName = {})); __name(metricIsLCP, "metricIsLCP"); } @@ -22047,9 +22271,9 @@ async function finalize20() { const { traceBounds: traceBounds2, navigationsByNavigationId: navigationsByNavigationId2 } = data5(); const metricScoresByFrameId2 = data19().metricScoresByFrameId; for (const [navigationId, navigation2] of navigationsByNavigationId2) { - const lcpMetric = metricScoresByFrameId2.get(navigation2.args.frame)?.get(navigationId)?.get(MetricName.LCP); + const lcpMetric = metricScoresByFrameId2.get(navigation2.args.frame)?.get(navigation2)?.get(MetricName.LCP); const lcpEvent = lcpMetric?.event; - if (!lcpEvent || !TraceEvents_exports.isLargestContentfulPaintCandidate(lcpEvent)) { + if (!lcpEvent || !TraceEvents_exports.isAnyLargestContentfulPaintCandidate(lcpEvent)) { continue; } const nodeId = lcpEvent.args.data?.nodeId; @@ -22523,7 +22747,7 @@ async function buildLayoutShiftsClusters() { } if (worstShiftEvent) { cluster.worstShiftEvent = worstShiftEvent; - cluster.rawSourceEvent = worstShiftEvent; + cluster.rawSourceEvent = worstShiftEvent.rawSourceEvent; } cluster.ts = cluster.events[0].ts; const lastShiftTimings = Timing_exports3.eventTimingsMicroSeconds(cluster.events[cluster.events.length - 1]); @@ -22736,6 +22960,7 @@ function deps14() { } function reset26() { scriptById = /* @__PURE__ */ new Map(); + frameIdByIsolate = /* @__PURE__ */ new Map(); } function handleEvent26(event) { const getOrMakeScript = /* @__PURE__ */ __name((isolate, scriptIdAsNumber) => { @@ -22753,6 +22978,9 @@ function handleEvent26(event) { if (TraceEvents_exports.isRundownScript(event)) { const { isolate, scriptId, url, sourceUrl, sourceMapUrl, sourceMapUrlElided } = event.args.data; const script = getOrMakeScript(isolate, scriptId); + if (!script.frame) { + script.frame = frameIdByIsolate.get(String(isolate)) ?? ""; + } script.url = url; script.ts = event.ts; if (sourceUrl) { @@ -22777,6 +23005,18 @@ function handleEvent26(event) { script.content = (script.content ?? "") + sourceText; return; } + if (TraceEvents_exports.isFunctionCall(event) && event.args.data?.isolate && event.args.data.frame) { + const { isolate, frame } = event.args.data; + const existingValue = frameIdByIsolate.get(isolate); + if (existingValue !== frame) { + frameIdByIsolate.set(isolate, frame); + for (const script of scriptById.values()) { + if (!script.frame && script.isolate === isolate) { + script.frame = frame; + } + } + } + } } function findFrame(meta, frameId) { for (const frames2 of meta.frameByProcessId?.values()) { @@ -22946,7 +23186,7 @@ function data26() { scripts: [...scriptById.values()] }; } -var scriptById; +var scriptById, frameIdByIsolate; var init_ScriptsHandler = __esm({ "node_modules/@paulirish/trace_engine/models/trace/handlers/ScriptsHandler.js"() { init_process_global(); @@ -22956,6 +23196,7 @@ var init_ScriptsHandler = __esm({ init_NetworkRequestsHandler(); __name(completeURL, "completeURL"); scriptById = /* @__PURE__ */ new Map(); + frameIdByIsolate = /* @__PURE__ */ new Map(); __name(deps14, "deps"); __name(reset26, "reset"); __name(handleEvent26, "handleEvent"); @@ -23566,6 +23807,174 @@ var init_EventsSerializer = __esm({ } }); +// node_modules/@paulirish/trace_engine/models/trace/extras/StackTraceForEvent.js +var StackTraceForEvent_exports = {}; +__export(StackTraceForEvent_exports, { + clearCacheForTrace: () => clearCacheForTrace, + get: () => get, + stackTraceForEventInTrace: () => stackTraceForEventInTrace +}); +function clearCacheForTrace(data31) { + stackTraceForEventInTrace.delete(data31); +} +function get(event, data31) { + let cacheForTrace = stackTraceForEventInTrace.get(data31); + if (!cacheForTrace) { + cacheForTrace = /* @__PURE__ */ new Map(); + stackTraceForEventInTrace.set(data31, cacheForTrace); + } + const resultFromCache = cacheForTrace.get(event); + if (resultFromCache) { + return resultFromCache; + } + let result = null; + if (Extensions_exports.isSyntheticExtensionEntry(event)) { + result = getForExtensionEntry(event, data31); + } else if (TraceEvents_exports.isPerformanceMeasureBegin(event)) { + result = getForPerformanceMeasure(event, data31); + } else { + result = getForEvent(event, data31); + const payloadCallFrames = getTraceEventPayloadStackAsProtocolCallFrame(event).filter((callFrame) => !isNativeJSFunction(callFrame)); + if (!result.callFrames.length) { + result.callFrames = payloadCallFrames; + } else { + for (let i = 0; i < payloadCallFrames.length && i < result.callFrames.length; i++) { + result.callFrames[i] = payloadCallFrames[i]; + } + } + } + if (result) { + cacheForTrace.set(event, result); + } + return result; +} +function getForEvent(event, data31) { + const entryToNode4 = data31.Renderer.entryToNode.size > 0 ? data31.Renderer.entryToNode : data31.Samples.entryToNode; + const topStackTrace = { callFrames: [] }; + let stackTrace = topStackTrace; + let currentEntry; + let node = entryToNode4.get(event); + const traceCache = stackTraceForEventInTrace.get(data31) || /* @__PURE__ */ new Map(); + stackTraceForEventInTrace.set(data31, traceCache); + while (node) { + if (!TraceEvents_exports.isProfileCall(node.entry)) { + const maybeAsyncParent = data31.AsyncJSCalls.runEntryPointToScheduler.get(node.entry); + if (!maybeAsyncParent) { + node = node.parent; + continue; + } + const maybeAsyncParentNode2 = maybeAsyncParent && entryToNode4.get(maybeAsyncParent.scheduler); + if (maybeAsyncParentNode2) { + stackTrace = addAsyncParentToStack(stackTrace, maybeAsyncParent.taskName); + node = maybeAsyncParentNode2; + } + continue; + } + currentEntry = node.entry; + const stackTraceFromCache = traceCache.get(node.entry); + if (stackTraceFromCache) { + stackTrace.callFrames.push(...stackTraceFromCache.callFrames.filter((callFrame) => !isNativeJSFunction(callFrame))); + stackTrace.parent = stackTraceFromCache.parent; + stackTrace.description = stackTrace.description || stackTraceFromCache.description; + break; + } + if (!isNativeJSFunction(currentEntry.callFrame)) { + stackTrace.callFrames.push(currentEntry.callFrame); + } + const maybeAsyncParentEvent = data31.AsyncJSCalls.asyncCallToScheduler.get(currentEntry); + const maybeAsyncParentNode = maybeAsyncParentEvent && entryToNode4.get(maybeAsyncParentEvent.scheduler); + if (maybeAsyncParentNode) { + stackTrace = addAsyncParentToStack(stackTrace, maybeAsyncParentEvent.taskName); + node = maybeAsyncParentNode; + continue; + } + node = node.parent; + } + return topStackTrace; +} +function addAsyncParentToStack(stackTrace, taskName) { + const parent = { callFrames: [] }; + stackTrace.parent = parent; + parent.description = taskName; + return parent; +} +function getForExtensionEntry(event, data31) { + const rawEvent = event.rawSourceEvent; + if (TraceEvents_exports.isPerformanceMeasureBegin(rawEvent)) { + return getForPerformanceMeasure(rawEvent, data31); + } + if (!rawEvent) { + return null; + } + return get(rawEvent, data31); +} +function getForPerformanceMeasure(event, data31) { + let rawEvent = event; + if (event.args.traceId === void 0) { + return null; + } + rawEvent = data31.UserTimings.measureTraceByTraceId.get(event.args.traceId); + if (!rawEvent) { + return null; + } + return get(rawEvent, data31); +} +function isNativeJSFunction({ columnNumber, lineNumber, url, scriptId }) { + return lineNumber === -1 && columnNumber === -1 && url === "" && scriptId === "0"; +} +function getTraceEventPayloadStackAsProtocolCallFrame(event) { + const payloadCallStack = Trace_exports.getZeroIndexedStackTraceInEventPayload(event) || []; + const callFrames = []; + for (const frame of payloadCallStack) { + callFrames.push({ ...frame, scriptId: String(frame.scriptId) }); + } + return callFrames; +} +var stackTraceForEventInTrace; +var init_StackTraceForEvent = __esm({ + "node_modules/@paulirish/trace_engine/models/trace/extras/StackTraceForEvent.js"() { + init_process_global(); + init_helpers2(); + init_types2(); + stackTraceForEventInTrace = /* @__PURE__ */ new Map(); + __name(clearCacheForTrace, "clearCacheForTrace"); + __name(get, "get"); + __name(getForEvent, "getForEvent"); + __name(addAsyncParentToStack, "addAsyncParentToStack"); + __name(getForExtensionEntry, "getForExtensionEntry"); + __name(getForPerformanceMeasure, "getForPerformanceMeasure"); + __name(isNativeJSFunction, "isNativeJSFunction"); + __name(getTraceEventPayloadStackAsProtocolCallFrame, "getTraceEventPayloadStackAsProtocolCallFrame"); + } +}); + +// node_modules/@paulirish/trace_engine/models/trace/extras/Initiators.js +var Initiators_exports = {}; +__export(Initiators_exports, { + getNetworkInitiator: () => getNetworkInitiator +}); +function getNetworkInitiator(data31, event) { + const networkHandlerInitiator = data31.NetworkRequests.incompleteInitiator.get(event); + if (networkHandlerInitiator?.args.data.mimeType === "text/css") { + return networkHandlerInitiator; + } + const stack = get(event.rawSourceEvent, data31); + const initiatorCallFrame = stack?.parent?.callFrames.at(0); + if (!initiatorCallFrame) { + return networkHandlerInitiator; + } + const matchingRequestIds = data31.NetworkRequests.requestIdsByURL.get(initiatorCallFrame.url) ?? []; + const matchingRequests = matchingRequestIds.map((id) => data31.NetworkRequests.byId.get(id)).filter((req) => req !== void 0).filter((req) => req.ts < event.ts); + return matchingRequests.at(-1); +} +var init_Initiators = __esm({ + "node_modules/@paulirish/trace_engine/models/trace/extras/Initiators.js"() { + init_process_global(); + init_StackTraceForEvent(); + __name(getNetworkInitiator, "getNetworkInitiator"); + } +}); + // node_modules/@paulirish/trace_engine/models/trace/extras/ScriptDuplication.js var ScriptDuplication_exports = {}; __export(ScriptDuplication_exports, { @@ -23723,147 +24132,6 @@ var init_ScriptDuplication = __esm({ } }); -// node_modules/@paulirish/trace_engine/models/trace/extras/StackTraceForEvent.js -var StackTraceForEvent_exports = {}; -__export(StackTraceForEvent_exports, { - clearCacheForTrace: () => clearCacheForTrace, - get: () => get, - stackTraceForEventInTrace: () => stackTraceForEventInTrace -}); -function clearCacheForTrace(data31) { - stackTraceForEventInTrace.delete(data31); -} -function get(event, data31) { - let cacheForTrace = stackTraceForEventInTrace.get(data31); - if (!cacheForTrace) { - cacheForTrace = /* @__PURE__ */ new Map(); - stackTraceForEventInTrace.set(data31, cacheForTrace); - } - const resultFromCache = cacheForTrace.get(event); - if (resultFromCache) { - return resultFromCache; - } - let result = null; - if (Extensions_exports.isSyntheticExtensionEntry(event)) { - result = getForExtensionEntry(event, data31); - } else if (TraceEvents_exports.isPerformanceMeasureBegin(event)) { - result = getForPerformanceMeasure(event, data31); - } else { - result = getForEvent(event, data31); - const payloadCallFrames = getTraceEventPayloadStackAsProtocolCallFrame(event).filter((callFrame) => !isNativeJSFunction(callFrame)); - if (!result.callFrames.length) { - result.callFrames = payloadCallFrames; - } else { - for (let i = 0; i < payloadCallFrames.length && i < result.callFrames.length; i++) { - result.callFrames[i] = payloadCallFrames[i]; - } - } - } - if (result) { - cacheForTrace.set(event, result); - } - return result; -} -function getForEvent(event, data31) { - const entryToNode4 = data31.Renderer.entryToNode.size > 0 ? data31.Renderer.entryToNode : data31.Samples.entryToNode; - const topStackTrace = { callFrames: [] }; - let stackTrace = topStackTrace; - let currentEntry; - let node = entryToNode4.get(event); - const traceCache = stackTraceForEventInTrace.get(data31) || /* @__PURE__ */ new Map(); - stackTraceForEventInTrace.set(data31, traceCache); - while (node) { - if (!TraceEvents_exports.isProfileCall(node.entry)) { - const maybeAsyncParent = data31.AsyncJSCalls.runEntryPointToScheduler.get(node.entry); - if (!maybeAsyncParent) { - node = node.parent; - continue; - } - const maybeAsyncParentNode2 = maybeAsyncParent && entryToNode4.get(maybeAsyncParent.scheduler); - if (maybeAsyncParentNode2) { - stackTrace = addAsyncParentToStack(stackTrace, maybeAsyncParent.taskName); - node = maybeAsyncParentNode2; - } - continue; - } - currentEntry = node.entry; - const stackTraceFromCache = traceCache.get(node.entry); - if (stackTraceFromCache) { - stackTrace.callFrames.push(...stackTraceFromCache.callFrames.filter((callFrame) => !isNativeJSFunction(callFrame))); - stackTrace.parent = stackTraceFromCache.parent; - stackTrace.description = stackTrace.description || stackTraceFromCache.description; - break; - } - if (!isNativeJSFunction(currentEntry.callFrame)) { - stackTrace.callFrames.push(currentEntry.callFrame); - } - const maybeAsyncParentEvent = data31.AsyncJSCalls.asyncCallToScheduler.get(currentEntry); - const maybeAsyncParentNode = maybeAsyncParentEvent && entryToNode4.get(maybeAsyncParentEvent.scheduler); - if (maybeAsyncParentNode) { - stackTrace = addAsyncParentToStack(stackTrace, maybeAsyncParentEvent.taskName); - node = maybeAsyncParentNode; - continue; - } - node = node.parent; - } - return topStackTrace; -} -function addAsyncParentToStack(stackTrace, taskName) { - const parent = { callFrames: [] }; - stackTrace.parent = parent; - parent.description = taskName; - return parent; -} -function getForExtensionEntry(event, data31) { - const rawEvent = event.rawSourceEvent; - if (TraceEvents_exports.isPerformanceMeasureBegin(rawEvent)) { - return getForPerformanceMeasure(rawEvent, data31); - } - if (!rawEvent) { - return null; - } - return get(rawEvent, data31); -} -function getForPerformanceMeasure(event, data31) { - let rawEvent = event; - if (event.args.traceId === void 0) { - return null; - } - rawEvent = data31.UserTimings.measureTraceByTraceId.get(event.args.traceId); - if (!rawEvent) { - return null; - } - return get(rawEvent, data31); -} -function isNativeJSFunction({ columnNumber, lineNumber, url, scriptId }) { - return lineNumber === -1 && columnNumber === -1 && url === "" && scriptId === "0"; -} -function getTraceEventPayloadStackAsProtocolCallFrame(event) { - const payloadCallStack = Trace_exports.getZeroIndexedStackTraceInEventPayload(event) || []; - const callFrames = []; - for (const frame of payloadCallStack) { - callFrames.push({ ...frame, scriptId: String(frame.scriptId) }); - } - return callFrames; -} -var stackTraceForEventInTrace; -var init_StackTraceForEvent = __esm({ - "node_modules/@paulirish/trace_engine/models/trace/extras/StackTraceForEvent.js"() { - init_process_global(); - init_helpers2(); - init_types2(); - stackTraceForEventInTrace = /* @__PURE__ */ new Map(); - __name(clearCacheForTrace, "clearCacheForTrace"); - __name(get, "get"); - __name(getForEvent, "getForEvent"); - __name(addAsyncParentToStack, "addAsyncParentToStack"); - __name(getForExtensionEntry, "getForExtensionEntry"); - __name(getForPerformanceMeasure, "getForPerformanceMeasure"); - __name(isNativeJSFunction, "isNativeJSFunction"); - __name(getTraceEventPayloadStackAsProtocolCallFrame, "getTraceEventPayloadStackAsProtocolCallFrame"); - } -}); - // node_modules/@paulirish/trace_engine/models/trace/extras/TraceFilter.js var TraceFilter, VisibleEventsFilter, ExclusiveNameFilter; var init_TraceFilter = __esm({ @@ -23921,7 +24189,7 @@ function generateEventID(event) { if (TraceEvents_exports.isProfileCall(event)) { const name = SamplesIntegrator.isNativeRuntimeFrame(event.callFrame) ? SamplesIntegrator.nativeGroup(event.callFrame.functionName) : event.callFrame.functionName; const location = event.callFrame.scriptId || event.callFrame.url || ""; - return `f:${name}@${location}`; + return `f:${name}@${location}:${event.callFrame.lineNumber}:${event.callFrame.columnNumber}`; } if (TraceEvents_exports.isConsoleTimeStamp(event) && event.args.data) { return `${event.name}:${event.args.data.name}`; @@ -24047,6 +24315,7 @@ var init_TraceTree = __esm({ const root2 = this; const startTime = this.startTime; const endTime = this.endTime; + const idStack = []; const nodeById = /* @__PURE__ */ new Map(); const selfTimeStack = [endTime - startTime]; const firstNodeStack = []; @@ -24092,6 +24361,7 @@ var init_TraceTree = __esm({ if (forceGroupIdCallback && eventGroupIdCallback) { id = `${id}-${eventGroupIdCallback(e)}`; } + idStack.push(id); const noNodeOnStack = !totalTimeById.has(id); if (noNodeOnStack) { totalTimeById.set(id, duration); @@ -24100,9 +24370,9 @@ var init_TraceTree = __esm({ } __name(onStartEvent, "onStartEvent"); function onEndEvent(event) { - let id = generateEventID(event); - if (forceGroupIdCallback && eventGroupIdCallback) { - id = `${id}-${eventGroupIdCallback(event)}`; + const id = idStack.pop(); + if (!id) { + return; } let node = nodeById.get(id); if (!node) { @@ -24116,7 +24386,7 @@ var init_TraceTree = __esm({ node.totalTime += totalTimeById.get(id) || 0; totalTimeById.delete(id); } - if (firstNodeStack.length) { + if (idStack.length > 0) { node.setHasChildren(true); } } @@ -24400,6 +24670,7 @@ var init_ThirdParties = __esm({ var init_extras = __esm({ "node_modules/@paulirish/trace_engine/models/trace/extras/extras.js"() { init_process_global(); + init_Initiators(); init_ScriptDuplication(); init_StackTraceForEvent(); init_ThirdParties(); @@ -24511,6 +24782,7 @@ var init_types4 = __esm({ InsightKeys2["VIEWPORT"] = "Viewport"; InsightKeys2["MODERN_HTTP"] = "ModernHTTP"; InsightKeys2["CACHE"] = "Cache"; + InsightKeys2["CHARACTER_SET"] = "CharacterSet"; })(InsightKeys || (InsightKeys = {})); } }); @@ -24536,11 +24808,7 @@ __export(Common_exports, { metricSavingsForWastedBytes: () => metricSavingsForWastedBytes }); function getInsight(insightName, insightSet) { - const insight = insightSet.model[insightName]; - if (insight instanceof Error) { - return null; - } - return insight; + return insightSet.model[insightName]; } function getLCP(insightSet) { const insight = getInsight(InsightKeys.LCP_BREAKDOWN, insightSet); @@ -25036,16 +25304,163 @@ var init_Cache = __esm({ } }); +// node_modules/@paulirish/trace_engine/models/trace/insights/CharacterSet.js +var CharacterSet_exports = {}; +__export(CharacterSet_exports, { + UIStrings: () => UIStrings3, + createOverlays: () => createOverlays2, + generateInsight: () => generateInsight2, + i18nString: () => i18nString2, + isCharacterSetInsight: () => isCharacterSetInsight +}); +function isCharacterSetInsight(model2) { + return model2.insightKey === InsightKeys.CHARACTER_SET; +} +function finalize32(partialModel) { + let hasFailure = false; + if (partialModel.data) { + hasFailure = !partialModel.data.checklist.httpCharset.value && !partialModel.data.checklist.metaCharset.value; + } + return { + insightKey: InsightKeys.CHARACTER_SET, + strings: UIStrings3, + title: i18nString2(UIStrings3.title), + description: i18nString2(UIStrings3.description), + docs: "https://developer.chrome.com/docs/insights/charset/", + category: InsightCategory.ALL, + state: hasFailure ? "fail" : "pass", + ...partialModel + }; +} +function hasCharsetInContentType(request) { + if (!request.args.data.responseHeaders) { + return false; + } + for (const header of request.args.data.responseHeaders) { + if (header.name.toLowerCase() === "content-type") { + return CHARSET_HTTP_REGEX.test(header.value); + } + } + return false; +} +function findMetaCharsetDisposition(data31, context) { + if (!context.navigation) { + return void 0; + } + return data31.PageLoadMetrics.metaCharsetCheckEventsByNavigation.get(context.navigation)?.at(-1)?.args.data?.disposition; +} +function metaCharsetLabel(disposition) { + switch (disposition) { + case "found-in-first-1024-bytes": + return i18nString2(UIStrings3.passingMetaCharsetEarly); + case "found-after-first-1024-bytes": + return i18nString2(UIStrings3.failedMetaCharsetLate); + case "not-found": + return i18nString2(UIStrings3.failedMetaCharsetMissing); + default: + return i18nString2(UIStrings3.failedMetaCharsetUnknown); + } +} +function generateInsight2(data31, context) { + if (!context.navigation) { + return finalize32({}); + } + const documentRequest = data31.NetworkRequests.byId.get(context.navigationId); + if (!documentRequest) { + return finalize32({ warnings: [InsightWarning.NO_DOCUMENT_REQUEST] }); + } + const hasHttpCharset = hasCharsetInContentType(documentRequest); + const metaCharsetDisposition = findMetaCharsetDisposition(data31, context); + const hasMetaCharsetInFirst1024Bytes = metaCharsetDisposition === "found-in-first-1024-bytes"; + return finalize32({ + relatedEvents: [documentRequest], + data: { + hasHttpCharset, + metaCharsetDisposition, + documentRequest, + checklist: { + httpCharset: { + label: hasHttpCharset ? i18nString2(UIStrings3.passingHttpHeader) : i18nString2(UIStrings3.failedHttpHeader), + value: hasHttpCharset + }, + metaCharset: { + label: metaCharsetLabel(metaCharsetDisposition), + value: hasMetaCharsetInFirst1024Bytes + } + } + } + }); +} +function createOverlays2(model2) { + if (!model2.data?.documentRequest) { + return []; + } + return [{ + type: "ENTRY_SELECTED", + entry: model2.data.documentRequest + }]; +} +var UIStrings3, i18nString2, CHARSET_HTTP_REGEX; +var init_CharacterSet = __esm({ + "node_modules/@paulirish/trace_engine/models/trace/insights/CharacterSet.js"() { + init_process_global(); + init_types4(); + UIStrings3 = { + /** + * @description Title of an insight that checks whether the page declares a character encoding early enough. + */ + title: "Declare a character encoding", + /** + * @description Description of an insight that checks whether the page has a proper character encoding declaration via HTTP header or early meta tag. + */ + description: "A character encoding declaration is required. It can be done with a meta charset tag in the first 1024 bytes of the HTML or in the Content-Type HTTP response header. [Learn more about declaring the character encoding](https://developer.chrome.com/docs/insights/charset/).", + /** + * @description Text to tell the user that the charset is declared in the Content-Type HTTP response header. + */ + passingHttpHeader: "Declares charset in HTTP header", + /** + * @description Text to tell the user that the charset is NOT declared in the Content-Type HTTP response header. + */ + failedHttpHeader: "Does not declare charset in HTTP header", + /** + * @description Text to tell the user that a meta charset tag was found in the first 1024 bytes of the HTML. + */ + passingMetaCharsetEarly: "Declares charset using a meta tag in the first 1024 bytes", + /** + * @description Text to tell the user that a meta charset tag was found, but too late in the HTML. + */ + failedMetaCharsetLate: "Declares charset using a meta tag after the first 1024 bytes", + /** + * @description Text to tell the user that no meta charset tag was found in the HTML. + */ + failedMetaCharsetMissing: "Does not declare charset using a meta tag", + /** + * @description Text to tell the user that trace data did not include the Blink signal for meta charset. + */ + failedMetaCharsetUnknown: "Could not determine meta charset declaration from trace" + }; + i18nString2 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + CHARSET_HTTP_REGEX = /charset\s*=\s*[a-zA-Z0-9\-_:.()]{2,}/i; + __name(isCharacterSetInsight, "isCharacterSetInsight"); + __name(finalize32, "finalize"); + __name(hasCharsetInContentType, "hasCharsetInContentType"); + __name(findMetaCharsetDisposition, "findMetaCharsetDisposition"); + __name(metaCharsetLabel, "metaCharsetLabel"); + __name(generateInsight2, "generateInsight"); + __name(createOverlays2, "createOverlays"); + } +}); + // node_modules/@paulirish/trace_engine/models/trace/insights/CLSCulprits.js var CLSCulprits_exports = {}; __export(CLSCulprits_exports, { AnimationFailureReasons: () => AnimationFailureReasons, LayoutShiftType: () => LayoutShiftType, - UIStrings: () => UIStrings3, - createOverlays: () => createOverlays2, - generateInsight: () => generateInsight2, + UIStrings: () => UIStrings4, + createOverlays: () => createOverlays3, + generateInsight: () => generateInsight3, getNonCompositedFailure: () => getNonCompositedFailure, - i18nString: () => i18nString2, + i18nString: () => i18nString3, isCLSCulpritsInsight: () => isCLSCulpritsInsight }); function isInRootCauseWindow(event, targetEvent) { @@ -25225,18 +25640,18 @@ function getTopCulprits(cluster, culpritsByShift) { const animations2 = culprits.nonCompositedAnimations; const unsizedImages = culprits.unsizedImages; for (let i = 0; i < fontReq.length && causes.length < MAX_TOP_CULPRITS; i++) { - causes.push({ type: LayoutShiftType.WEB_FONT, description: i18nString2(UIStrings3.webFont) }); + causes.push({ type: LayoutShiftType.WEB_FONT, description: i18nString3(UIStrings4.webFont) }); } for (let i = 0; i < iframes.length && causes.length < MAX_TOP_CULPRITS; i++) { - causes.push({ type: LayoutShiftType.IFRAMES, description: i18nString2(UIStrings3.injectedIframe) }); + causes.push({ type: LayoutShiftType.IFRAMES, description: i18nString3(UIStrings4.injectedIframe) }); } for (let i = 0; i < animations2.length && causes.length < MAX_TOP_CULPRITS; i++) { - causes.push({ type: LayoutShiftType.ANIMATIONS, description: i18nString2(UIStrings3.animation) }); + causes.push({ type: LayoutShiftType.ANIMATIONS, description: i18nString3(UIStrings4.animation) }); } for (let i = 0; i < unsizedImages.length && causes.length < MAX_TOP_CULPRITS; i++) { causes.push({ type: LayoutShiftType.UNSIZED_IMAGE, - description: i18nString2(UIStrings3.unsizedImage), + description: i18nString3(UIStrings4.unsizedImage), url: unsizedImages[i].paintImageEvent.args.data.url || "", backendNodeId: unsizedImages[i].backendNodeId, frame: unsizedImages[i].paintImageEvent.args.data.frame || "" @@ -25248,7 +25663,7 @@ function getTopCulprits(cluster, culpritsByShift) { } return causes.slice(0, MAX_TOP_CULPRITS); } -function finalize32(partialModel) { +function finalize33(partialModel) { let state = "pass"; if (partialModel.worstCluster) { const classification = ModelHandlers_exports.LayoutShifts.scoreClassificationForLayoutShift(partialModel.worstCluster.clusterCumulativeScore); @@ -25260,16 +25675,16 @@ function finalize32(partialModel) { } return { insightKey: InsightKeys.CLS_CULPRITS, - strings: UIStrings3, - title: i18nString2(UIStrings3.title), - description: i18nString2(UIStrings3.description), + strings: UIStrings4, + title: i18nString3(UIStrings4.title), + description: i18nString3(UIStrings4.description), docs: "https://developer.chrome.com/docs/performance/insights/cls-culprit", category: InsightCategory.CLS, state, ...partialModel }; } -function generateInsight2(data31, context) { +function generateInsight3(data31, context) { const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context.bounds), "isWithinContext"); const compositeAnimationEvents = data31.Animations.animations.filter(isWithinContext); const iframeEvents = data31.LayoutShifts.renderFrameImplCreateChildFrameEvents.filter(isWithinContext); @@ -25300,7 +25715,7 @@ function generateInsight2(data31, context) { for (const cluster of clusters2) { topCulpritsByCluster.set(cluster, getTopCulprits(cluster, rootCausesByShift)); } - return finalize32({ + return finalize33({ relatedEvents, animationFailures, shifts: rootCausesByShift, @@ -25309,7 +25724,7 @@ function generateInsight2(data31, context) { topCulpritsByCluster }); } -function createOverlays2(model2) { +function createOverlays3(model2) { const clustersByScore = model2.clusters.toSorted((a, b) => b.clusterCumulativeScore - a.clusterCumulativeScore) ?? []; const worstCluster = clustersByScore[0]; if (!worstCluster) { @@ -25322,7 +25737,7 @@ function createOverlays2(model2) { sections: [ { bounds: { min: worstCluster.ts, range, max }, - label: i18nString2(UIStrings3.worstLayoutShiftCluster), + label: i18nString3(UIStrings4.worstLayoutShiftCluster), showDuration: false } ], @@ -25331,7 +25746,7 @@ function createOverlays2(model2) { renderLocation: "ABOVE_EVENT" }]; } -var UIStrings3, i18nString2, AnimationFailureReasons, LayoutShiftType, ACTIONABLE_FAILURE_REASONS, ROOT_CAUSE_WINDOW; +var UIStrings4, i18nString3, AnimationFailureReasons, LayoutShiftType, ACTIONABLE_FAILURE_REASONS, ROOT_CAUSE_WINDOW; var init_CLSCulprits = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/CLSCulprits.js"() { init_process_global(); @@ -25340,7 +25755,7 @@ var init_CLSCulprits = __esm({ init_helpers2(); init_types2(); init_types4(); - UIStrings3 = { + UIStrings4 = { /** Title of an insight that provides details about why elements shift/move on the page. The causes for these shifts are referred to as culprits ("reasons"). */ title: "Layout shift culprits", /** @@ -25390,7 +25805,7 @@ var init_CLSCulprits = __esm({ */ noCulprits: "Could not detect any layout shift culprits" }; - i18nString2 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString3 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); (function(AnimationFailureReasons2) { AnimationFailureReasons2["ACCELERATED_ANIMATIONS_DISABLED"] = "ACCELERATED_ANIMATIONS_DISABLED"; AnimationFailureReasons2["EFFECT_SUPPRESSED_BY_DEVTOOLS"] = "EFFECT_SUPPRESSED_BY_DEVTOOLS"; @@ -25504,19 +25919,19 @@ var init_CLSCulprits = __esm({ __name(isCLSCulpritsInsight, "isCLSCulpritsInsight"); __name(getFontRootCauses, "getFontRootCauses"); __name(getTopCulprits, "getTopCulprits"); - __name(finalize32, "finalize"); - __name(generateInsight2, "generateInsight"); - __name(createOverlays2, "createOverlays"); + __name(finalize33, "finalize"); + __name(generateInsight3, "generateInsight"); + __name(createOverlays3, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/DocumentLatency.js var DocumentLatency_exports = {}; __export(DocumentLatency_exports, { - UIStrings: () => UIStrings4, - createOverlays: () => createOverlays3, - generateInsight: () => generateInsight3, - i18nString: () => i18nString3, + UIStrings: () => UIStrings5, + createOverlays: () => createOverlays4, + generateInsight: () => generateInsight4, + i18nString: () => i18nString4, isDocumentLatencyInsight: () => isDocumentLatencyInsight }); function isDocumentLatencyInsight(x) { @@ -25577,30 +25992,30 @@ function getCompressionSavings(request) { } return estimatedSavings < IGNORE_THRESHOLD_IN_BYTES ? 0 : estimatedSavings; } -function finalize33(partialModel) { +function finalize34(partialModel) { let hasFailure = false; if (partialModel.data) { hasFailure = !partialModel.data.checklist.usesCompression.value || !partialModel.data.checklist.serverResponseIsFast.value || !partialModel.data.checklist.noRedirects.value; } return { insightKey: InsightKeys.DOCUMENT_LATENCY, - strings: UIStrings4, - title: i18nString3(UIStrings4.title), - description: i18nString3(UIStrings4.description), + strings: UIStrings5, + title: i18nString4(UIStrings5.title), + description: i18nString4(UIStrings5.description), docs: "https://developer.chrome.com/docs/performance/insights/document-latency", category: InsightCategory.ALL, state: hasFailure ? "fail" : "pass", ...partialModel }; } -function generateInsight3(data31, context) { +function generateInsight4(data31, context) { if (!context.navigation) { - return finalize33({}); + return finalize34({}); } const millisToString = context.options.insightTimeFormatters?.milli ?? ((bytes) => ({ __i18nMillis: bytes })); const documentRequest = data31.NetworkRequests.byId.get(context.navigationId); if (!documentRequest) { - return finalize33({ warnings: [InsightWarning.NO_DOCUMENT_REQUEST] }); + return finalize34({ warnings: [InsightWarning.NO_DOCUMENT_REQUEST] }); } const serverResponseTime = getServerResponseTime(documentRequest); if (serverResponseTime === null) { @@ -25621,7 +26036,7 @@ function generateInsight3(data31, context) { const noRedirects = redirectDuration === 0; const serverResponseIsFast = !serverResponseTooSlow; const usesCompression = uncompressedResponseBytes === 0; - return finalize33({ + return finalize34({ relatedEvents: [documentRequest], data: { serverResponseTime, @@ -25630,18 +26045,18 @@ function generateInsight3(data31, context) { documentRequest, checklist: { noRedirects: { - label: noRedirects ? i18nString3(UIStrings4.passingRedirects) : i18nString3(UIStrings4.failedRedirects, { + label: noRedirects ? i18nString4(UIStrings5.passingRedirects) : i18nString4(UIStrings5.failedRedirects, { PH1: documentRequest.args.data.redirects.length, PH2: millisToString(redirectDuration) }), value: noRedirects }, serverResponseIsFast: { - label: serverResponseIsFast ? i18nString3(UIStrings4.passingServerResponseTime, { PH1: millisToString(serverResponseTime) }) : i18nString3(UIStrings4.failedServerResponseTime, { PH1: millisToString(serverResponseTime) }), + label: serverResponseIsFast ? i18nString4(UIStrings5.passingServerResponseTime, { PH1: millisToString(serverResponseTime) }) : i18nString4(UIStrings5.failedServerResponseTime, { PH1: millisToString(serverResponseTime) }), value: serverResponseIsFast }, usesCompression: { - label: usesCompression ? i18nString3(UIStrings4.passingTextCompression) : i18nString3(UIStrings4.failedTextCompression), + label: usesCompression ? i18nString4(UIStrings5.passingTextCompression) : i18nString4(UIStrings5.failedTextCompression), value: usesCompression } } @@ -25650,7 +26065,7 @@ function generateInsight3(data31, context) { wastedBytes: uncompressedResponseBytes }); } -function createOverlays3(model2) { +function createOverlays4(model2) { if (!model2.data?.documentRequest) { return []; } @@ -25660,7 +26075,7 @@ function createOverlays3(model2) { const sections = []; if (model2.data.redirectDuration) { const bounds = Timing_exports3.traceWindowFromMicroSeconds(event.ts, event.ts + redirectDurationMicro); - sections.push({ bounds, label: i18nString3(UIStrings4.redirectsLabel), showDuration: true }); + sections.push({ bounds, label: i18nString4(UIStrings5.redirectsLabel), showDuration: true }); overlays.push({ type: "CANDY_STRIPED_TIME_RANGE", bounds, entry: event }); } if (!model2.data.checklist.serverResponseIsFast.value) { @@ -25668,11 +26083,11 @@ function createOverlays3(model2) { const sendEnd = event.args.data.timing?.sendEnd ?? Timing_exports.Milli(0); const sendEndMicro = Timing_exports3.milliToMicro(sendEnd); const bounds = Timing_exports3.traceWindowFromMicroSeconds(sendEndMicro, sendEndMicro + serverResponseTimeMicro); - sections.push({ bounds, label: i18nString3(UIStrings4.serverResponseTimeLabel), showDuration: true }); + sections.push({ bounds, label: i18nString4(UIStrings5.serverResponseTimeLabel), showDuration: true }); } if (model2.data.uncompressedResponseBytes) { const bounds = Timing_exports3.traceWindowFromMicroSeconds(event.args.data.syntheticData.downloadStart, event.args.data.syntheticData.downloadStart + event.args.data.syntheticData.download); - sections.push({ bounds, label: i18nString3(UIStrings4.uncompressedDownload), showDuration: true }); + sections.push({ bounds, label: i18nString4(UIStrings5.uncompressedDownload), showDuration: true }); overlays.push({ type: "CANDY_STRIPED_TIME_RANGE", bounds, entry: event }); } if (sections.length) { @@ -25691,7 +26106,7 @@ function createOverlays3(model2) { }); return overlays; } -var UIStrings4, i18nString3, TOO_SLOW_THRESHOLD_MS, TARGET_MS, IGNORE_THRESHOLD_IN_BYTES; +var UIStrings5, i18nString4, TOO_SLOW_THRESHOLD_MS, TARGET_MS, IGNORE_THRESHOLD_IN_BYTES; var init_DocumentLatency = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/DocumentLatency.js"() { init_process_global(); @@ -25699,7 +26114,7 @@ var init_DocumentLatency = __esm({ init_types2(); init_Common(); init_types4(); - UIStrings4 = { + UIStrings5 = { /** * @description Title of an insight that provides a breakdown for how long it took to download the main document. */ @@ -25749,35 +26164,35 @@ var init_DocumentLatency = __esm({ */ uncompressedDownload: "Uncompressed download" }; - i18nString3 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString4 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); TOO_SLOW_THRESHOLD_MS = 600; TARGET_MS = 100; IGNORE_THRESHOLD_IN_BYTES = 1400; __name(isDocumentLatencyInsight, "isDocumentLatencyInsight"); __name(getServerResponseTime, "getServerResponseTime"); __name(getCompressionSavings, "getCompressionSavings"); - __name(finalize33, "finalize"); - __name(generateInsight3, "generateInsight"); - __name(createOverlays3, "createOverlays"); + __name(finalize34, "finalize"); + __name(generateInsight4, "generateInsight"); + __name(createOverlays4, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/DOMSize.js var DOMSize_exports = {}; __export(DOMSize_exports, { - UIStrings: () => UIStrings5, - createOverlays: () => createOverlays4, - generateInsight: () => generateInsight4, - i18nString: () => i18nString4, + UIStrings: () => UIStrings6, + createOverlays: () => createOverlays5, + generateInsight: () => generateInsight5, + i18nString: () => i18nString5, isDomSizeInsight: () => isDomSizeInsight }); -function finalize34(partialModel) { +function finalize35(partialModel) { const relatedEvents = [...partialModel.largeLayoutUpdates, ...partialModel.largeStyleRecalcs]; return { insightKey: InsightKeys.DOM_SIZE, - strings: UIStrings5, - title: i18nString4(UIStrings5.title), - description: i18nString4(UIStrings5.description), + strings: UIStrings6, + title: i18nString5(UIStrings6.title), + description: i18nString5(UIStrings6.description), docs: "https://developer.chrome.com/docs/performance/insights/dom-size", category: InsightCategory.INP, state: relatedEvents.length > 0 ? "informative" : "pass", @@ -25788,7 +26203,7 @@ function finalize34(partialModel) { function isDomSizeInsight(model2) { return model2.insightKey === InsightKeys.DOM_SIZE; } -function generateInsight4(data31, context) { +function generateInsight5(data31, context) { const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context.bounds), "isWithinContext"); const mainTid = context.navigation?.tid; const largeLayoutUpdates = []; @@ -25842,13 +26257,13 @@ function generateInsight4(data31, context) { ...largeLayoutUpdates.map((event) => { const duration = event.dur / 1e3; const size = event.args.beginData.dirtyObjects; - const label = i18nString4(UIStrings5.largeLayout, { PH1: size }); + const label = i18nString5(UIStrings6.largeLayout, { PH1: size }); return { label, duration, size, event }; }), ...largeStyleRecalcs.map((event) => { const duration = event.dur / 1e3; const size = event.args.elementCount; - const label = i18nString4(UIStrings5.largeStyleRecalc, { PH1: size }); + const label = i18nString5(UIStrings6.largeStyleRecalc, { PH1: size }); return { label, duration, size, event }; }) ].sort((a, b) => b.duration - a.duration).slice(0, 5); @@ -25863,14 +26278,14 @@ function generateInsight4(data31, context) { maxDOMStats = domStats; } } - return finalize34({ + return finalize35({ largeLayoutUpdates, largeStyleRecalcs, largeUpdates, maxDOMStats }); } -function createOverlays4(model2) { +function createOverlays5(model2) { const entries = [...model2.largeStyleRecalcs, ...model2.largeLayoutUpdates]; return entries.map((entry) => ({ type: "ENTRY_OUTLINE", @@ -25878,7 +26293,7 @@ function createOverlays4(model2) { outlineReason: "ERROR" })); } -var UIStrings5, i18nString4, DOM_SIZE_DURATION_THRESHOLD, LAYOUT_OBJECTS_THRESHOLD, STYLE_RECALC_ELEMENTS_THRESHOLD; +var UIStrings6, i18nString5, DOM_SIZE_DURATION_THRESHOLD, LAYOUT_OBJECTS_THRESHOLD, STYLE_RECALC_ELEMENTS_THRESHOLD; var init_DOMSize = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/DOMSize.js"() { init_process_global(); @@ -25886,7 +26301,7 @@ var init_DOMSize = __esm({ init_helpers2(); init_types2(); init_types4(); - UIStrings5 = { + UIStrings6 = { /** * @description Title of an insight that recommends reducing the size of the DOM tree as a means to improve page responsiveness. "DOM" is an acronym and should not be translated. */ @@ -25938,33 +26353,33 @@ var init_DOMSize = __esm({ */ largeStyleRecalc: "Style recalculation ({PH1} elements)" }; - i18nString4 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString5 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); DOM_SIZE_DURATION_THRESHOLD = Timing_exports3.milliToMicro(Timing_exports.Milli(40)); LAYOUT_OBJECTS_THRESHOLD = 100; STYLE_RECALC_ELEMENTS_THRESHOLD = 300; - __name(finalize34, "finalize"); + __name(finalize35, "finalize"); __name(isDomSizeInsight, "isDomSizeInsight"); - __name(generateInsight4, "generateInsight"); - __name(createOverlays4, "createOverlays"); + __name(generateInsight5, "generateInsight"); + __name(createOverlays5, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/DuplicatedJavaScript.js var DuplicatedJavaScript_exports = {}; __export(DuplicatedJavaScript_exports, { - UIStrings: () => UIStrings6, - createOverlays: () => createOverlays5, - generateInsight: () => generateInsight5, - i18nString: () => i18nString5, + UIStrings: () => UIStrings7, + createOverlays: () => createOverlays6, + generateInsight: () => generateInsight6, + i18nString: () => i18nString6, isDuplicatedJavaScriptInsight: () => isDuplicatedJavaScriptInsight }); -function finalize35(partialModel) { +function finalize36(partialModel) { const requests = partialModel.scriptsWithDuplication.map((script) => script.request).filter((e) => !!e); return { insightKey: InsightKeys.DUPLICATE_JAVASCRIPT, - strings: UIStrings6, - title: i18nString5(UIStrings6.title), - description: i18nString5(UIStrings6.description), + strings: UIStrings7, + title: i18nString6(UIStrings7.title), + description: i18nString6(UIStrings7.description), docs: "https://developer.chrome.com/docs/performance/insights/duplicated-javascript", category: InsightCategory.LCP, state: Boolean(partialModel.duplication.values().next().value) ? "fail" : "pass", @@ -25975,7 +26390,7 @@ function finalize35(partialModel) { function isDuplicatedJavaScriptInsight(model2) { return model2.insightKey === InsightKeys.DUPLICATE_JAVASCRIPT; } -function generateInsight5(data31, context) { +function generateInsight6(data31, context) { const scripts = data31.Scripts.scripts.filter((script) => { if (script.frame !== context.frameId) { return false; @@ -26005,7 +26420,7 @@ function generateInsight5(data31, context) { wastedBytesByRequestId.set(requestId, (wastedBytesByRequestId.get(requestId) || 0) + transferSize); } } - return finalize35({ + return finalize36({ duplication, duplicationGroupedByNodeModules, scriptsWithDuplication: [...new Set(scriptsWithDuplication)], @@ -26015,7 +26430,7 @@ function generateInsight5(data31, context) { wastedBytes: wastedBytesByRequestId.values().reduce((acc, cur) => acc + cur, 0) }); } -function createOverlays5(model2) { +function createOverlays6(model2) { return model2.scriptsWithDuplication.map((script) => script.request).filter((e) => !!e).map((request) => { return { type: "ENTRY_OUTLINE", @@ -26024,7 +26439,7 @@ function createOverlays5(model2) { }; }); } -var UIStrings6, i18nString5; +var UIStrings7, i18nString6; var init_DuplicatedJavaScript = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/DuplicatedJavaScript.js"() { init_process_global(); @@ -26032,7 +26447,7 @@ var init_DuplicatedJavaScript = __esm({ init_helpers2(); init_Common(); init_types4(); - UIStrings6 = { + UIStrings7 = { /** * @description Title of an insight that identifies multiple copies of the same JavaScript sources, and recommends removing the duplication. */ @@ -26046,29 +26461,29 @@ var init_DuplicatedJavaScript = __esm({ /** Label for a column in a data table; entries will be the number of wasted bytes due to duplication of a web resource. */ columnDuplicatedBytes: "Duplicated bytes" }; - i18nString5 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); - __name(finalize35, "finalize"); + i18nString6 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + __name(finalize36, "finalize"); __name(isDuplicatedJavaScriptInsight, "isDuplicatedJavaScriptInsight"); - __name(generateInsight5, "generateInsight"); - __name(createOverlays5, "createOverlays"); + __name(generateInsight6, "generateInsight"); + __name(createOverlays6, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/FontDisplay.js var FontDisplay_exports = {}; __export(FontDisplay_exports, { - UIStrings: () => UIStrings7, - createOverlays: () => createOverlays6, - generateInsight: () => generateInsight6, - i18nString: () => i18nString6, + UIStrings: () => UIStrings8, + createOverlays: () => createOverlays7, + generateInsight: () => generateInsight7, + i18nString: () => i18nString7, isFontDisplayInsight: () => isFontDisplayInsight }); -function finalize36(partialModel) { +function finalize37(partialModel) { return { insightKey: InsightKeys.FONT_DISPLAY, - strings: UIStrings7, - title: i18nString6(UIStrings7.title), - description: i18nString6(UIStrings7.description), + strings: UIStrings8, + title: i18nString7(UIStrings8.title), + description: i18nString7(UIStrings8.description), docs: "https://developer.chrome.com/docs/performance/insights/font-display", category: InsightCategory.INP, state: partialModel.fonts.find((font) => font.wastedTime > 0) ? "fail" : "pass", @@ -26078,7 +26493,7 @@ function finalize36(partialModel) { function isFontDisplayInsight(model2) { return model2.insightKey === InsightKeys.FONT_DISPLAY; } -function generateInsight6(data31, context) { +function generateInsight7(data31, context) { const fonts = []; for (const remoteFont of data31.LayoutShifts.remoteFonts) { const event = remoteFont.beginRemoteFontLoadEvent; @@ -26108,20 +26523,20 @@ function generateInsight6(data31, context) { } fonts.sort((a, b) => b.wastedTime - a.wastedTime); const savings = Math.max(...fonts.map((f) => f.wastedTime)); - return finalize36({ + return finalize37({ relatedEvents: fonts.map((f) => f.request), fonts, metricSavings: { FCP: savings } }); } -function createOverlays6(model2) { +function createOverlays7(model2) { return model2.fonts.map((font) => ({ type: "ENTRY_OUTLINE", entry: font.request, outlineReason: font.wastedTime ? "ERROR" : "INFO" })); } -var UIStrings7, i18nString6; +var UIStrings8, i18nString7; var init_FontDisplay = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/FontDisplay.js"() { init_process_global(); @@ -26129,7 +26544,7 @@ var init_FontDisplay = __esm({ init_helpers2(); init_types2(); init_types4(); - UIStrings7 = { + UIStrings8 = { /** Title of an insight that provides details about the fonts used on the page, and the value of their `font-display` properties. */ title: "Font display", /** @@ -26141,22 +26556,22 @@ var init_FontDisplay = __esm({ /** Column for the amount of time wasted. */ wastedTimeColumn: "Wasted time" }; - i18nString6 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); - __name(finalize36, "finalize"); + i18nString7 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + __name(finalize37, "finalize"); __name(isFontDisplayInsight, "isFontDisplayInsight"); - __name(generateInsight6, "generateInsight"); - __name(createOverlays6, "createOverlays"); + __name(generateInsight7, "generateInsight"); + __name(createOverlays7, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/ForcedReflow.js var ForcedReflow_exports = {}; __export(ForcedReflow_exports, { - UIStrings: () => UIStrings8, + UIStrings: () => UIStrings9, createOverlayForEvents: () => createOverlayForEvents, - createOverlays: () => createOverlays7, - generateInsight: () => generateInsight7, - i18nString: () => i18nString7, + createOverlays: () => createOverlays8, + generateInsight: () => generateInsight8, + i18nString: () => i18nString8, isForcedReflowInsight: () => isForcedReflowInsight }); function getCallFrameId(callFrame) { @@ -26210,12 +26625,12 @@ function getLargestTopLevelFunctionData(forcedReflowEvents, traceParsedData) { }); return topTimeConsumingData; } -function finalize37(partialModel) { +function finalize38(partialModel) { return { insightKey: InsightKeys.FORCED_REFLOW, - strings: UIStrings8, - title: i18nString7(UIStrings8.title), - description: i18nString7(UIStrings8.description), + strings: UIStrings9, + title: i18nString8(UIStrings9.title), + description: i18nString8(UIStrings9.description), docs: "https://developer.chrome.com/docs/performance/insights/forced-reflow", category: InsightCategory.ALL, state: partialModel.aggregatedBottomUpData.length !== 0 ? "fail" : "pass", @@ -26230,7 +26645,7 @@ function getBottomCallFrameForEvent(event, traceParsedData) { function isForcedReflowInsight(model2) { return model2.insightKey === InsightKeys.FORCED_REFLOW; } -function generateInsight7(traceParsedData, context) { +function generateInsight8(traceParsedData, context) { const isWithinContext = /* @__PURE__ */ __name((event) => { const frameId = Trace_exports.frameIDForEvent(event); if (frameId !== context.frameId) { @@ -26252,13 +26667,13 @@ function generateInsight7(traceParsedData, context) { bottomUpData.relatedEvents.push(event); } const topLevelFunctionCallData = getLargestTopLevelFunctionData(events, traceParsedData); - return finalize37({ + return finalize38({ relatedEvents: events, topLevelFunctionCallData, aggregatedBottomUpData: [...bottomUpDataMap.values()] }); } -function createOverlays7(model2) { +function createOverlays8(model2) { if (!model2.topLevelFunctionCallData) { return []; } @@ -26275,7 +26690,7 @@ function createOverlayForEvents(events, outlineReason = "ERROR") { outlineReason })); } -var UIStrings8, i18nString7; +var UIStrings9, i18nString8; var init_ForcedReflow = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/ForcedReflow.js"() { init_process_global(); @@ -26284,7 +26699,7 @@ var init_ForcedReflow = __esm({ init_helpers2(); init_types2(); init_types4(); - UIStrings8 = { + UIStrings9 = { /** * @description Title of an insight that provides details about Forced reflow. */ @@ -26296,7 +26711,7 @@ var init_ForcedReflow = __esm({ /** * @description Title of a list to provide related stack trace data */ - relatedStackTrace: "Stack trace", + reflowCallFrames: "Call frames that trigger reflow", /** * @description Text to describe the top time-consuming function call */ @@ -26314,14 +26729,14 @@ var init_ForcedReflow = __esm({ */ anonymous: "(anonymous)" }; - i18nString7 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString8 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); __name(getCallFrameId, "getCallFrameId"); __name(getLargestTopLevelFunctionData, "getLargestTopLevelFunctionData"); - __name(finalize37, "finalize"); + __name(finalize38, "finalize"); __name(getBottomCallFrameForEvent, "getBottomCallFrameForEvent"); __name(isForcedReflowInsight, "isForcedReflowInsight"); - __name(generateInsight7, "generateInsight"); - __name(createOverlays7, "createOverlays"); + __name(generateInsight8, "generateInsight"); + __name(createOverlays8, "createOverlays"); __name(createOverlayForEvents, "createOverlayForEvents"); } }); @@ -26330,13 +26745,13 @@ var init_ForcedReflow = __esm({ var ImageDelivery_exports = {}; __export(ImageDelivery_exports, { ImageOptimizationType: () => ImageOptimizationType, - UIStrings: () => UIStrings9, + UIStrings: () => UIStrings10, createOverlayForRequest: () => createOverlayForRequest2, - createOverlays: () => createOverlays8, - generateInsight: () => generateInsight8, + createOverlays: () => createOverlays9, + generateInsight: () => generateInsight9, getOptimizationMessage: () => getOptimizationMessage, getOptimizationMessageWithBytes: () => getOptimizationMessageWithBytes, - i18nString: () => i18nString8, + i18nString: () => i18nString9, isImageDeliveryInsight: () => isImageDeliveryInsight }); function isImageDeliveryInsight(model2) { @@ -26345,13 +26760,13 @@ function isImageDeliveryInsight(model2) { function getOptimizationMessage(optimization) { switch (optimization.type) { case ImageOptimizationType.ADJUST_COMPRESSION: - return i18nString8(UIStrings9.useCompression); + return i18nString9(UIStrings10.useCompression); case ImageOptimizationType.MODERN_FORMAT_OR_COMPRESSION: - return i18nString8(UIStrings9.useModernFormat); + return i18nString9(UIStrings10.useModernFormat); case ImageOptimizationType.VIDEO_FORMAT: - return i18nString8(UIStrings9.useVideoFormat); + return i18nString9(UIStrings10.useVideoFormat); case ImageOptimizationType.RESPONSIVE_SIZE: - return i18nString8(UIStrings9.useResponsiveSize, { + return i18nString9(UIStrings10.useResponsiveSize, { PH1: `${optimization.fileDimensions.width}x${optimization.fileDimensions.height}`, PH2: `${optimization.displayDimensions.width}x${optimization.displayDimensions.height}` }); @@ -26360,14 +26775,14 @@ function getOptimizationMessage(optimization) { function getOptimizationMessageWithBytes(optimization) { const byteSavingsText = /* @__PURE__ */ ((bytes) => ({ __i18nBytes: bytes }))(optimization.byteSavings); const optimizationMessage = getOptimizationMessage(optimization); - return i18nString8(UIStrings9.estimatedSavings, { PH1: optimizationMessage, PH2: byteSavingsText }); + return i18nString9(UIStrings10.estimatedSavings, { PH1: optimizationMessage, PH2: byteSavingsText }); } -function finalize38(partialModel) { +function finalize39(partialModel) { return { insightKey: InsightKeys.IMAGE_DELIVERY, - strings: UIStrings9, - title: i18nString8(UIStrings9.title), - description: i18nString8(UIStrings9.description), + strings: UIStrings10, + title: i18nString9(UIStrings10.title), + description: i18nString9(UIStrings10.description), docs: "https://developer.chrome.com/docs/performance/insights/image-delivery", category: InsightCategory.LCP, state: partialModel.optimizableImages.length > 0 ? "fail" : "pass", @@ -26391,7 +26806,7 @@ function getPixelCounts(data31, paintImage) { displayedPixels: width * height }; } -function generateInsight8(data31, context) { +function generateInsight9(data31, context) { const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context.bounds), "isWithinContext"); const contextRequests = data31.NetworkRequests.byTime.filter(isWithinContext); const optimizableImages = []; @@ -26474,7 +26889,7 @@ function generateInsight8(data31, context) { } return b.request.args.data.decodedBodyLength - a.request.args.data.decodedBodyLength; }); - return finalize38({ + return finalize39({ optimizableImages, metricSavings: metricSavingsForWastedBytes(wastedBytesByRequestId, context), wastedBytes: optimizableImages.reduce((total, img) => total + img.byteSavings, 0) @@ -26487,17 +26902,17 @@ function createOverlayForRequest2(request) { outlineReason: "ERROR" }; } -function createOverlays8(model2) { +function createOverlays9(model2) { return model2.optimizableImages.map((image) => createOverlayForRequest2(image.request)); } -var UIStrings9, i18nString8, TARGET_BYTES_PER_PIXEL_AVIF, GIF_SIZE_THRESHOLD, BYTE_SAVINGS_THRESHOLD, BYTE_SAVINGS_THRESHOLD_RESPONSIVE_BREAKPOINTS, ImageOptimizationType; +var UIStrings10, i18nString9, TARGET_BYTES_PER_PIXEL_AVIF, GIF_SIZE_THRESHOLD, BYTE_SAVINGS_THRESHOLD, BYTE_SAVINGS_THRESHOLD_RESPONSIVE_BREAKPOINTS, ImageOptimizationType; var init_ImageDelivery = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/ImageDelivery.js"() { init_process_global(); init_helpers2(); init_Common(); init_types4(); - UIStrings9 = { + UIStrings10 = { /** * @description Title of an insight that recommends ways to reduce the size of images downloaded and used on the page. */ @@ -26544,7 +26959,7 @@ var init_ImageDelivery = __esm({ */ estimatedSavings: "{PH1} (Est {PH2})" }; - i18nString8 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString9 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); TARGET_BYTES_PER_PIXEL_AVIF = 2 * 1 / 12; GIF_SIZE_THRESHOLD = 100 * 1024; BYTE_SAVINGS_THRESHOLD = 4096; @@ -26558,30 +26973,30 @@ var init_ImageDelivery = __esm({ __name(isImageDeliveryInsight, "isImageDeliveryInsight"); __name(getOptimizationMessage, "getOptimizationMessage"); __name(getOptimizationMessageWithBytes, "getOptimizationMessageWithBytes"); - __name(finalize38, "finalize"); + __name(finalize39, "finalize"); __name(estimateGIFPercentSavings, "estimateGIFPercentSavings"); __name(getDisplayedSize, "getDisplayedSize"); __name(getPixelCounts, "getPixelCounts"); - __name(generateInsight8, "generateInsight"); + __name(generateInsight9, "generateInsight"); __name(createOverlayForRequest2, "createOverlayForRequest"); - __name(createOverlays8, "createOverlays"); + __name(createOverlays9, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/INPBreakdown.js var INPBreakdown_exports = {}; __export(INPBreakdown_exports, { - UIStrings: () => UIStrings10, - createOverlays: () => createOverlays9, + UIStrings: () => UIStrings11, + createOverlays: () => createOverlays10, createOverlaysForSubpart: () => createOverlaysForSubpart, - generateInsight: () => generateInsight9, - i18nString: () => i18nString9, + generateInsight: () => generateInsight10, + i18nString: () => i18nString10, isINPBreakdownInsight: () => isINPBreakdownInsight }); function isINPBreakdownInsight(insight) { return insight.insightKey === InsightKeys.INP_BREAKDOWN; } -function finalize39(partialModel) { +function finalize40(partialModel) { let state = "pass"; if (partialModel.longestInteractionEvent) { const classification = ModelHandlers_exports.UserInteractions.scoreClassificationForInteractionToNextPaint(partialModel.longestInteractionEvent.dur); @@ -26593,21 +27008,21 @@ function finalize39(partialModel) { } return { insightKey: InsightKeys.INP_BREAKDOWN, - strings: UIStrings10, - title: i18nString9(UIStrings10.title), - description: i18nString9(UIStrings10.description), + strings: UIStrings11, + title: i18nString10(UIStrings11.title), + description: i18nString10(UIStrings11.description), docs: "https://developer.chrome.com/docs/performance/insights/inp-breakdown", category: InsightCategory.INP, state, ...partialModel }; } -function generateInsight9(data31, context) { +function generateInsight10(data31, context) { const interactionEvents2 = data31.UserInteractions.interactionEventsWithNoNesting.filter((event) => { return Timing_exports3.eventIsInBounds(event, context.bounds); }); if (!interactionEvents2.length) { - return finalize39({}); + return finalize40({}); } const longestByInteractionId = /* @__PURE__ */ new Map(); for (const event of interactionEvents2) { @@ -26620,7 +27035,7 @@ function generateInsight9(data31, context) { const normalizedInteractionEvents = [...longestByInteractionId.values()]; normalizedInteractionEvents.sort((a, b) => b.dur - a.dur); const highPercentileIndex = Math.min(9, Math.floor(normalizedInteractionEvents.length / 50)); - return finalize39({ + return finalize40({ relatedEvents: [normalizedInteractionEvents[0]], longestInteractionEvent: normalizedInteractionEvents[0], highPercentileInteractionEvent: normalizedInteractionEvents[highPercentileIndex] @@ -26631,9 +27046,9 @@ function createOverlaysForSubpart(event, subpartIndex = -1) { const p2 = Timing_exports3.traceWindowFromMicroSeconds(p1.max, p1.max + event.mainThreadHandling); const p3 = Timing_exports3.traceWindowFromMicroSeconds(p2.max, p2.max + event.presentationDelay); let sections = [ - { bounds: p1, label: i18nString9(UIStrings10.inputDelay), showDuration: true }, - { bounds: p2, label: i18nString9(UIStrings10.processingDuration), showDuration: true }, - { bounds: p3, label: i18nString9(UIStrings10.presentationDelay), showDuration: true } + { bounds: p1, label: i18nString10(UIStrings11.inputDelay), showDuration: true }, + { bounds: p2, label: i18nString10(UIStrings11.processingDuration), showDuration: true }, + { bounds: p3, label: i18nString10(UIStrings11.presentationDelay), showDuration: true } ]; if (subpartIndex !== -1) { sections = [sections[subpartIndex]]; @@ -26647,21 +27062,21 @@ function createOverlaysForSubpart(event, subpartIndex = -1) { } ]; } -function createOverlays9(model2) { +function createOverlays10(model2) { const event = model2.longestInteractionEvent; if (!event) { return []; } return createOverlaysForSubpart(event); } -var UIStrings10, i18nString9; +var UIStrings11, i18nString10; var init_INPBreakdown = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/INPBreakdown.js"() { init_process_global(); init_handlers(); init_helpers2(); init_types4(); - UIStrings10 = { + UIStrings11 = { /** * @description Text to tell the user about the longest user interaction. */ @@ -26696,22 +27111,22 @@ var init_INPBreakdown = __esm({ */ noInteractions: "No interactions detected" }; - i18nString9 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString10 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); __name(isINPBreakdownInsight, "isINPBreakdownInsight"); - __name(finalize39, "finalize"); - __name(generateInsight9, "generateInsight"); + __name(finalize40, "finalize"); + __name(generateInsight10, "generateInsight"); __name(createOverlaysForSubpart, "createOverlaysForSubpart"); - __name(createOverlays9, "createOverlays"); + __name(createOverlays10, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/LCPBreakdown.js var LCPBreakdown_exports = {}; __export(LCPBreakdown_exports, { - UIStrings: () => UIStrings11, - createOverlays: () => createOverlays10, - generateInsight: () => generateInsight10, - i18nString: () => i18nString10, + UIStrings: () => UIStrings12, + createOverlays: () => createOverlays11, + generateInsight: () => generateInsight11, + i18nString: () => i18nString11, isLCPBreakdownInsight: () => isLCPBreakdownInsight }); function isLCPBreakdownInsight(model2) { @@ -26726,9 +27141,9 @@ function determineSubparts(nav, docRequest, lcpEvent, lcpRequest) { return null; } const ttfb = Timing_exports3.traceWindowFromMicroSeconds(nav.ts, firstDocByteTs); - ttfb.label = i18nString10(UIStrings11.timeToFirstByte); + ttfb.label = i18nString11(UIStrings12.timeToFirstByte); let renderDelay = Timing_exports3.traceWindowFromMicroSeconds(ttfb.max, lcpEvent.ts); - renderDelay.label = i18nString10(UIStrings11.elementRenderDelay); + renderDelay.label = i18nString11(UIStrings12.elementRenderDelay); if (!lcpRequest) { if (anyValuesNaN(ttfb.range, renderDelay.range)) { return null; @@ -26740,9 +27155,9 @@ function determineSubparts(nav, docRequest, lcpEvent, lcpRequest) { const loadDelay = Timing_exports3.traceWindowFromMicroSeconds(ttfb.max, lcpStartTs); const loadDuration = Timing_exports3.traceWindowFromMicroSeconds(lcpStartTs, lcpReqEndTs); renderDelay = Timing_exports3.traceWindowFromMicroSeconds(lcpReqEndTs, lcpEvent.ts); - loadDelay.label = i18nString10(UIStrings11.resourceLoadDelay); - loadDuration.label = i18nString10(UIStrings11.resourceLoadDuration); - renderDelay.label = i18nString10(UIStrings11.elementRenderDelay); + loadDelay.label = i18nString11(UIStrings12.resourceLoadDelay); + loadDuration.label = i18nString11(UIStrings12.resourceLoadDuration); + renderDelay.label = i18nString11(UIStrings12.elementRenderDelay); if (anyValuesNaN(ttfb.range, loadDelay.range, loadDuration.range, renderDelay.range)) { return null; } @@ -26753,7 +27168,7 @@ function determineSubparts(nav, docRequest, lcpEvent, lcpRequest) { renderDelay }; } -function finalize40(partialModel) { +function finalize41(partialModel) { const relatedEvents = []; if (partialModel.lcpEvent) { relatedEvents.push(partialModel.lcpEvent); @@ -26772,9 +27187,9 @@ function finalize40(partialModel) { } return { insightKey: InsightKeys.LCP_BREAKDOWN, - strings: UIStrings11, - title: i18nString10(UIStrings11.title), - description: i18nString10(UIStrings11.description), + strings: UIStrings12, + title: i18nString11(UIStrings12.title), + description: i18nString11(UIStrings12.description), docs: "https://developer.chrome.com/docs/performance/insights/lcp-breakdown", category: InsightCategory.LCP, state, @@ -26782,32 +27197,32 @@ function finalize40(partialModel) { relatedEvents }; } -function generateInsight10(data31, context) { +function generateInsight11(data31, context) { if (!context.navigation) { - return finalize40({}); + return finalize41({}); } const networkRequests = data31.NetworkRequests; const frameMetrics = data31.PageLoadMetrics.metricScoresByFrameId.get(context.frameId); if (!frameMetrics) { throw new Error("no frame metrics"); } - const navMetrics = frameMetrics.get(context.navigationId); + const navMetrics = frameMetrics.get(context.navigation); if (!navMetrics) { throw new Error("no navigation metrics"); } const metricScore = navMetrics.get(ModelHandlers_exports.PageLoadMetrics.MetricName.LCP); const lcpEvent = metricScore?.event; - if (!lcpEvent || !TraceEvents_exports.isLargestContentfulPaintCandidate(lcpEvent)) { - return finalize40({ warnings: [InsightWarning.NO_LCP] }); + if (!lcpEvent || !TraceEvents_exports.isAnyLargestContentfulPaintCandidate(lcpEvent)) { + return finalize41({ warnings: [InsightWarning.NO_LCP] }); } const lcpMs = Timing_exports3.microToMilli(metricScore.timing); const lcpTs = metricScore.event?.ts ? Timing_exports3.microToMilli(metricScore.event?.ts) : void 0; const lcpRequest = data31.LargestImagePaint.lcpRequestByNavigationId.get(context.navigationId); const docRequest = networkRequests.byId.get(context.navigationId); if (!docRequest) { - return finalize40({ lcpMs, lcpTs, lcpEvent, lcpRequest, warnings: [InsightWarning.NO_DOCUMENT_REQUEST] }); + return finalize41({ lcpMs, lcpTs, lcpEvent, lcpRequest, warnings: [InsightWarning.NO_DOCUMENT_REQUEST] }); } - return finalize40({ + return finalize41({ lcpMs, lcpTs, lcpEvent, @@ -26815,7 +27230,7 @@ function generateInsight10(data31, context) { subparts: determineSubparts(context.navigation, docRequest, lcpEvent, lcpRequest) ?? void 0 }); } -function createOverlays10(model2) { +function createOverlays11(model2) { if (!model2.subparts || !model2.lcpTs) { return []; } @@ -26830,7 +27245,7 @@ function createOverlays10(model2) { } return overlays; } -var UIStrings11, i18nString10; +var UIStrings12, i18nString11; var init_LCPBreakdown = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/LCPBreakdown.js"() { init_process_global(); @@ -26839,7 +27254,7 @@ var init_LCPBreakdown = __esm({ init_types2(); init_Common(); init_types4(); - UIStrings11 = { + UIStrings12 = { /** * @description Title of an insight that provides details about the LCP metric, broken down by parts. */ @@ -26882,39 +27297,39 @@ var init_LCPBreakdown = __esm({ */ noLcp: "No LCP detected" }; - i18nString10 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString11 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); __name(isLCPBreakdownInsight, "isLCPBreakdownInsight"); __name(anyValuesNaN, "anyValuesNaN"); __name(determineSubparts, "determineSubparts"); - __name(finalize40, "finalize"); - __name(generateInsight10, "generateInsight"); - __name(createOverlays10, "createOverlays"); + __name(finalize41, "finalize"); + __name(generateInsight11, "generateInsight"); + __name(createOverlays11, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/LCPDiscovery.js var LCPDiscovery_exports = {}; __export(LCPDiscovery_exports, { - UIStrings: () => UIStrings12, - createOverlays: () => createOverlays11, - generateInsight: () => generateInsight11, + UIStrings: () => UIStrings13, + createOverlays: () => createOverlays12, + generateInsight: () => generateInsight12, getImageData: () => getImageData, - i18nString: () => i18nString11, + i18nString: () => i18nString12, isLCPDiscoveryInsight: () => isLCPDiscoveryInsight }); function isLCPDiscoveryInsight(model2) { return model2.insightKey === "LCPDiscovery"; } -function finalize41(partialModel) { +function finalize42(partialModel) { const relatedEvents = partialModel.lcpEvent && partialModel.lcpRequest ? ( // TODO: add entire request initiator chain? [partialModel.lcpEvent, partialModel.lcpRequest] ) : []; return { insightKey: InsightKeys.LCP_DISCOVERY, - strings: UIStrings12, - title: i18nString11(UIStrings12.title), - description: i18nString11(UIStrings12.description), + strings: UIStrings13, + title: i18nString12(UIStrings13.title), + description: i18nString12(UIStrings13.description), docs: "https://developer.chrome.com/docs/performance/insights/lcp-discovery", category: InsightCategory.LCP, state: partialModel.lcpRequest && partialModel.checklist && (!partialModel.checklist.eagerlyLoaded.value || !partialModel.checklist.requestDiscoverable.value || !partialModel.checklist.priorityHinted.value) ? "fail" : "pass", @@ -26922,50 +27337,51 @@ function finalize41(partialModel) { relatedEvents }; } -function generateInsight11(data31, context) { +function generateInsight12(data31, context) { if (!context.navigation) { - return finalize41({}); + return finalize42({}); } const networkRequests = data31.NetworkRequests; const frameMetrics = data31.PageLoadMetrics.metricScoresByFrameId.get(context.frameId); if (!frameMetrics) { throw new Error("no frame metrics"); } - const navMetrics = frameMetrics.get(context.navigationId); + const navMetrics = frameMetrics.get(context.navigation); if (!navMetrics) { throw new Error("no navigation metrics"); } const metricScore = navMetrics.get(ModelHandlers_exports.PageLoadMetrics.MetricName.LCP); const lcpEvent = metricScore?.event; - if (!lcpEvent || !TraceEvents_exports.isLargestContentfulPaintCandidate(lcpEvent)) { - return finalize41({ warnings: [InsightWarning.NO_LCP] }); + if (!lcpEvent || !TraceEvents_exports.isAnyLargestContentfulPaintCandidate(lcpEvent)) { + return finalize42({ warnings: [InsightWarning.NO_LCP] }); } const docRequest = networkRequests.byId.get(context.navigationId); if (!docRequest) { - return finalize41({ warnings: [InsightWarning.NO_DOCUMENT_REQUEST] }); + return finalize42({ warnings: [InsightWarning.NO_DOCUMENT_REQUEST] }); } const lcpRequest = data31.LargestImagePaint.lcpRequestByNavigationId.get(context.navigationId); if (!lcpRequest) { - return finalize41({ lcpEvent }); + return finalize42({ lcpEvent }); } const initiatorUrl = lcpRequest.args.data.initiator?.url; const initiatedByMainDoc = lcpRequest?.args.data.initiator?.type === "parser" && docRequest.args.data.url === initiatorUrl; const imgPreloadedOrFoundInHTML = lcpRequest?.args.data.isLinkPreload || initiatedByMainDoc; - const imageLoadingAttr = lcpEvent.args.data?.loadingAttr; const imageFetchPriorityHint = lcpRequest?.args.data.fetchPriorityHint; const earliestDiscoveryTime = calculateDocFirstByteTs(docRequest); const priorityHintFound = imageFetchPriorityHint === "high"; - return finalize41({ + const missingPriorityHintLabel = lcpRequest.args.data.isLinkPreload ? i18nString12(UIStrings13.fetchPriorityShouldBeAppliedToImagePreload) : i18nString12(UIStrings13.fetchPriorityShouldBeApplied); + const lcpNotLazyLoaded = lcpEvent.args.data?.loadingAttr !== "lazy" || lcpRequest.args.data.isLinkPreload; + return finalize42({ lcpEvent, lcpRequest, earliestDiscoveryTimeTs: earliestDiscoveryTime ? Timing_exports.Micro(earliestDiscoveryTime) : void 0, checklist: { priorityHinted: { - label: priorityHintFound ? i18nString11(UIStrings12.fetchPriorityApplied) : i18nString11(UIStrings12.fetchPriorityShouldBeApplied), + label: priorityHintFound ? i18nString12(UIStrings13.fetchPriorityApplied) : missingPriorityHintLabel, value: priorityHintFound }, - requestDiscoverable: { label: i18nString11(UIStrings12.requestDiscoverable), value: imgPreloadedOrFoundInHTML }, - eagerlyLoaded: { label: i18nString11(UIStrings12.lazyLoadNotApplied), value: imageLoadingAttr !== "lazy" } + requestDiscoverable: { label: i18nString12(UIStrings13.requestDiscoverable), value: imgPreloadedOrFoundInHTML }, + eagerlyLoaded: { label: i18nString12(UIStrings13.lazyLoadNotApplied), value: lcpNotLazyLoaded } } }); } @@ -26992,7 +27408,7 @@ function getImageData(model2) { } return data31; } -function createOverlays11(model2) { +function createOverlays12(model2) { const imageResults = getImageData(model2); if (!imageResults?.discoveryDelay) { return []; @@ -27022,7 +27438,7 @@ function createOverlays11(model2) { } ]; } -var UIStrings12, i18nString11; +var UIStrings13, i18nString12; var init_LCPDiscovery = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/LCPDiscovery.js"() { init_process_global(); @@ -27031,7 +27447,7 @@ var init_LCPDiscovery = __esm({ init_types2(); init_Common(); init_types4(); - UIStrings12 = { + UIStrings13 = { /** * @description Title of an insight that provides details about the LCP metric, and the network requests necessary to load it. Details how the LCP request was discoverable - in other words, the path necessary to load it (ex: network requests, JavaScript) */ @@ -27053,14 +27469,18 @@ var init_LCPDiscovery = __esm({ * @description Text to tell the user that a fetchpriority property value of "high" should be applied to the LCP request. */ fetchPriorityShouldBeApplied: "fetchpriority=high should be applied", + /** + * @description Text to tell the user that a fetchpriority property value of "high" should be applied to the preload request that loads the LCP image. + */ + fetchPriorityShouldBeAppliedToImagePreload: "fetchpriority=high should be applied to the image preload request", /** * @description Text to tell the user that the LCP request is discoverable in the initial document. */ requestDiscoverable: "Request is discoverable in initial document", /** - * @description Text to tell the user that the LCP request does not have the lazy load property applied. + * @description Text to tell the user that LCP resources should avoid using loading=lazy. */ - lazyLoadNotApplied: "lazy load not applied", + lazyLoadNotApplied: "LCP resources should not use loading=lazy", /** * @description Text status indicating that the the Largest Contentful Paint (LCP) metric timing was not found. "LCP" is an acronym and should not be translated. */ @@ -27070,12 +27490,12 @@ var init_LCPDiscovery = __esm({ */ noLcpResource: "No LCP resource detected because the LCP is not an image" }; - i18nString11 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString12 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); __name(isLCPDiscoveryInsight, "isLCPDiscoveryInsight"); - __name(finalize41, "finalize"); - __name(generateInsight11, "generateInsight"); + __name(finalize42, "finalize"); + __name(generateInsight12, "generateInsight"); __name(getImageData, "getImageData"); - __name(createOverlays11, "createOverlays"); + __name(createOverlays12, "createOverlays"); } }); @@ -28047,19 +28467,19 @@ var init_legacy_javascript2 = __esm({ // node_modules/@paulirish/trace_engine/models/trace/insights/LegacyJavaScript.js var LegacyJavaScript_exports = {}; __export(LegacyJavaScript_exports, { - UIStrings: () => UIStrings13, - createOverlays: () => createOverlays12, - generateInsight: () => generateInsight12, - i18nString: () => i18nString12, + UIStrings: () => UIStrings14, + createOverlays: () => createOverlays13, + generateInsight: () => generateInsight13, + i18nString: () => i18nString13, isLegacyJavaScript: () => isLegacyJavaScript }); -function finalize42(partialModel) { +function finalize43(partialModel) { const requests = [...partialModel.legacyJavaScriptResults.keys()].map((script) => script.request).filter((e) => !!e); return { insightKey: InsightKeys.LEGACY_JAVASCRIPT, - strings: UIStrings13, - title: i18nString12(UIStrings13.title), - description: i18nString12(UIStrings13.description), + strings: UIStrings14, + title: i18nString13(UIStrings14.title), + description: i18nString13(UIStrings14.description), docs: "https://developer.chrome.com/docs/performance/insights/legacy-javascript", category: InsightCategory.ALL, state: requests.length ? "fail" : "pass", @@ -28070,7 +28490,7 @@ function finalize42(partialModel) { function isLegacyJavaScript(model2) { return model2.insightKey === InsightKeys.LEGACY_JAVASCRIPT; } -function generateInsight12(data31, context) { +function generateInsight13(data31, context) { const scripts = data31.Scripts.scripts.filter((script) => { if (script.frame !== context.frameId) { return false; @@ -28100,13 +28520,13 @@ function generateInsight12(data31, context) { } } const sorted2 = new Map([...legacyJavaScriptResults].sort((a, b) => b[1].estimatedByteSavings - a[1].estimatedByteSavings)); - return finalize42({ + return finalize43({ legacyJavaScriptResults: sorted2, metricSavings: metricSavingsForWastedBytes(wastedBytesByRequestId, context), wastedBytes: wastedBytesByRequestId.values().reduce((acc, cur) => acc + cur, 0) }); } -function createOverlays12(model2) { +function createOverlays13(model2) { return [...model2.legacyJavaScriptResults.keys()].map((script) => script.request).filter((e) => !!e).map((request) => { return { type: "ENTRY_OUTLINE", @@ -28115,7 +28535,7 @@ function createOverlays12(model2) { }; }); } -var detectLegacyJavaScript2, UIStrings13, i18nString12, BYTE_THRESHOLD; +var detectLegacyJavaScript2, UIStrings14, i18nString13, BYTE_THRESHOLD; var init_LegacyJavaScript = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/LegacyJavaScript.js"() { init_process_global(); @@ -28124,7 +28544,7 @@ var init_LegacyJavaScript = __esm({ init_Common(); init_types4(); ({ detectLegacyJavaScript: detectLegacyJavaScript2 } = legacy_javascript_exports); - UIStrings13 = { + UIStrings14 = { /** * @description Title of an insight that identifies polyfills for modern JavaScript features, and recommends their removal. */ @@ -28138,24 +28558,24 @@ var init_LegacyJavaScript = __esm({ /** Label for a column in a data table; entries will be the number of wasted bytes (aka the estimated savings in terms of bytes). */ columnWastedBytes: "Wasted bytes" }; - i18nString12 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString13 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); BYTE_THRESHOLD = 5e3; - __name(finalize42, "finalize"); + __name(finalize43, "finalize"); __name(isLegacyJavaScript, "isLegacyJavaScript"); - __name(generateInsight12, "generateInsight"); - __name(createOverlays12, "createOverlays"); + __name(generateInsight13, "generateInsight"); + __name(createOverlays13, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/ModernHTTP.js var ModernHTTP_exports = {}; __export(ModernHTTP_exports, { - UIStrings: () => UIStrings14, + UIStrings: () => UIStrings15, createOverlayForRequest: () => createOverlayForRequest3, - createOverlays: () => createOverlays13, + createOverlays: () => createOverlays14, determineHttp1Requests: () => determineHttp1Requests, - generateInsight: () => generateInsight13, - i18nString: () => i18nString13, + generateInsight: () => generateInsight14, + i18nString: () => i18nString14, isModernHTTPInsight: () => isModernHTTPInsight }); function isModernHTTPInsight(model2) { @@ -28253,12 +28673,12 @@ function computeMetricSavings(http1Requests, context) { LCP: computeWasteWithGraph(urlsToChange, lcpGraph, context.lantern.simulator) }; } -function finalize43(partialModel) { +function finalize44(partialModel) { return { insightKey: InsightKeys.MODERN_HTTP, - strings: UIStrings14, - title: i18nString13(UIStrings14.title), - description: i18nString13(UIStrings14.description), + strings: UIStrings15, + title: i18nString14(UIStrings15.title), + description: i18nString14(UIStrings15.description), docs: "https://developer.chrome.com/docs/performance/insights/modern-http", category: InsightCategory.LCP, state: partialModel.http1Requests.length > 0 ? "fail" : "pass", @@ -28266,14 +28686,14 @@ function finalize43(partialModel) { relatedEvents: partialModel.http1Requests }; } -function generateInsight13(data31, context) { +function generateInsight14(data31, context) { const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context.bounds), "isWithinContext"); const contextRequests = data31.NetworkRequests.byTime.filter(isWithinContext); const entityMappings3 = data31.NetworkRequests.entityMappings; const firstPartyUrl = context.navigation?.args.data?.documentLoaderURL ?? data31.Meta.mainFrameURL; const firstPartyEntity = helpers_exports.getEntityForUrl(firstPartyUrl, entityMappings3); const http1Requests = determineHttp1Requests(contextRequests, entityMappings3, firstPartyEntity ?? null); - return finalize43({ + return finalize44({ http1Requests, metricSavings: computeMetricSavings(http1Requests, context) }); @@ -28285,10 +28705,10 @@ function createOverlayForRequest3(request) { outlineReason: "ERROR" }; } -function createOverlays13(model2) { +function createOverlays14(model2) { return model2.http1Requests.map((req) => createOverlayForRequest3(req)) ?? []; } -var UIStrings14, i18nString13; +var UIStrings15, i18nString14; var init_ModernHTTP = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/ModernHTTP.js"() { init_process_global(); @@ -28296,7 +28716,7 @@ var init_ModernHTTP = __esm({ init_handlers(); init_helpers2(); init_types4(); - UIStrings14 = { + UIStrings15 = { /** * @description Title of an insight that recommends using HTTP/2 over HTTP/1.1 because of the performance benefits. "HTTP" should not be translated. */ @@ -28318,16 +28738,16 @@ var init_ModernHTTP = __esm({ */ noOldProtocolRequests: "No requests used HTTP/1.1, or its current use of HTTP/1.1 does not present a significant optimization opportunity. HTTP/1.1 requests are only flagged if six or more static assets originate from the same origin, and they are not served from a local development environment or a third-party source." }; - i18nString13 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString14 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); __name(isModernHTTPInsight, "isModernHTTPInsight"); __name(isMultiplexableStaticAsset, "isMultiplexableStaticAsset"); __name(determineHttp1Requests, "determineHttp1Requests"); __name(computeWasteWithGraph, "computeWasteWithGraph"); __name(computeMetricSavings, "computeMetricSavings"); - __name(finalize43, "finalize"); - __name(generateInsight13, "generateInsight"); + __name(finalize44, "finalize"); + __name(generateInsight14, "generateInsight"); __name(createOverlayForRequest3, "createOverlayForRequest"); - __name(createOverlays13, "createOverlays"); + __name(createOverlays14, "createOverlays"); } }); @@ -28336,23 +28756,23 @@ var NetworkDependencyTree_exports = {}; __export(NetworkDependencyTree_exports, { ParsedURL: () => ParsedURL, TOO_MANY_PRECONNECTS_THRESHOLD: () => TOO_MANY_PRECONNECTS_THRESHOLD, - UIStrings: () => UIStrings15, - createOverlays: () => createOverlays14, - generateInsight: () => generateInsight14, + UIStrings: () => UIStrings16, + createOverlays: () => createOverlays15, + generateInsight: () => generateInsight15, generatePreconnectCandidates: () => generatePreconnectCandidates, generatePreconnectedOrigins: () => generatePreconnectedOrigins, handleLinkResponseHeader: () => handleLinkResponseHeader, - i18nString: () => i18nString14, + i18nString: () => i18nString15, isNetworkDependencyTreeInsight: () => isNetworkDependencyTreeInsight, normalizePath: () => normalizePath, schemeIs: () => schemeIs }); -function finalize44(partialModel) { +function finalize45(partialModel) { return { insightKey: InsightKeys.NETWORK_DEPENDENCY_TREE, - strings: UIStrings15, - title: i18nString14(UIStrings15.title), - description: i18nString14(UIStrings15.description), + strings: UIStrings16, + title: i18nString15(UIStrings16.title), + description: i18nString15(UIStrings16.description), docs: "https://developer.chrome.com/docs/performance/insights/network-dependency-tree", category: InsightCategory.LCP, state: partialModel.fail ? "fail" : "pass", @@ -28439,7 +28859,7 @@ function generateNetworkDependencyTree(context) { currentNodes.push(found); } path7.forEach((request2) => found?.relatedRequests.add(request2)); - relatedEvents.set(request, depth < 2 ? [] : [i18nString14(UIStrings15.warningDescription)]); + relatedEvents.set(request, depth < 2 ? [] : [i18nString15(UIStrings16.warningDescription)]); currentNodes = found.children; } } @@ -28615,7 +29035,8 @@ function candidateRequestsByOrigin(data31, mainResource, contextRequests, lcpGra if (!hasValidTiming(request)) { return; } - if (data31.NetworkRequests.eventToInitiator.get(request) === mainResource) { + const initiator = Initiators_exports.getNetworkInitiator(data31, request); + if (initiator === mainResource) { return; } const url = new URL(request.args.data.url); @@ -28699,9 +29120,9 @@ function generatePreconnectCandidates(data31, context, contextRequests) { function isNetworkDependencyTreeInsight(model2) { return model2.insightKey === InsightKeys.NETWORK_DEPENDENCY_TREE; } -function generateInsight14(data31, context) { +function generateInsight15(data31, context) { if (!context.navigation) { - return finalize44({ + return finalize45({ rootNodes: [], maxTime: 0, fail: false, @@ -28714,7 +29135,7 @@ function generateInsight14(data31, context) { const contextRequests = data31.NetworkRequests.byTime.filter(isWithinContext); const preconnectCandidates = generatePreconnectCandidates(data31, context, contextRequests); const preconnectedOrigins = generatePreconnectedOrigins(data31, context, contextRequests, preconnectCandidates); - return finalize44({ + return finalize45({ rootNodes, maxTime, fail, @@ -28723,7 +29144,7 @@ function generateInsight14(data31, context) { preconnectCandidates }); } -function createOverlays14(model2) { +function createOverlays15(model2) { function walk(nodes, overlays2) { nodes.forEach((node) => { overlays2.push({ @@ -28770,15 +29191,16 @@ function schemeIs(url, scheme) { return false; } } -var UIStrings15, i18nString14, nonCriticalResourceTypes, PRECONNECT_SOCKET_MAX_IDLE_IN_MS, IGNORE_THRESHOLD_IN_MILLISECONDS, TOO_MANY_PRECONNECTS_THRESHOLD, ParsedURL; +var UIStrings16, i18nString15, nonCriticalResourceTypes, PRECONNECT_SOCKET_MAX_IDLE_IN_MS, IGNORE_THRESHOLD_IN_MILLISECONDS, TOO_MANY_PRECONNECTS_THRESHOLD, ParsedURL; var init_NetworkDependencyTree = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/NetworkDependencyTree.js"() { init_process_global(); init_platform(); + init_extras(); init_helpers2(); init_types2(); init_types4(); - UIStrings15 = { + UIStrings16 = { /** * @description Title of an insight that recommends avoiding chaining critical requests. */ @@ -28853,7 +29275,7 @@ var init_NetworkDependencyTree = __esm({ */ columnWastedMs: "Est LCP savings" }; - i18nString14 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString15 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); nonCriticalResourceTypes = /* @__PURE__ */ new Set([ "Image", "XHR", @@ -28863,7 +29285,7 @@ var init_NetworkDependencyTree = __esm({ PRECONNECT_SOCKET_MAX_IDLE_IN_MS = Timing_exports.Milli(15e3); IGNORE_THRESHOLD_IN_MILLISECONDS = Timing_exports.Milli(50); TOO_MANY_PRECONNECTS_THRESHOLD = 4; - __name(finalize44, "finalize"); + __name(finalize45, "finalize"); __name(isCritical, "isCritical"); __name(findMaxLeafNode, "findMaxLeafNode"); __name(sortRecursively, "sortRecursively"); @@ -28878,8 +29300,8 @@ var init_NetworkDependencyTree = __esm({ __name(candidateRequestsByOrigin, "candidateRequestsByOrigin"); __name(generatePreconnectCandidates, "generatePreconnectCandidates"); __name(isNetworkDependencyTreeInsight, "isNetworkDependencyTreeInsight"); - __name(generateInsight14, "generateInsight"); - __name(createOverlays14, "createOverlays"); + __name(generateInsight15, "generateInsight"); + __name(createOverlays15, "createOverlays"); __name(normalizePath, "normalizePath"); __name(schemeIs, "schemeIs"); ParsedURL = class _ParsedURL { @@ -29247,11 +29669,11 @@ var init_NetworkDependencyTree = __esm({ // node_modules/@paulirish/trace_engine/models/trace/insights/RenderBlocking.js var RenderBlocking_exports = {}; __export(RenderBlocking_exports, { - UIStrings: () => UIStrings16, + UIStrings: () => UIStrings17, createOverlayForRequest: () => createOverlayForRequest4, - createOverlays: () => createOverlays15, - generateInsight: () => generateInsight15, - i18nString: () => i18nString15, + createOverlays: () => createOverlays16, + generateInsight: () => generateInsight16, + i18nString: () => i18nString16, isRenderBlockingInsight: () => isRenderBlockingInsight }); function isRenderBlockingInsight(insight) { @@ -29320,27 +29742,27 @@ function computeSavings(data31, context, renderBlockingRequests) { } return { metricSavings, requestIdToWastedMs }; } -function finalize45(partialModel) { +function finalize46(partialModel) { return { insightKey: InsightKeys.RENDER_BLOCKING, - strings: UIStrings16, - title: i18nString15(UIStrings16.title), - description: i18nString15(UIStrings16.description), + strings: UIStrings17, + title: i18nString16(UIStrings17.title), + description: i18nString16(UIStrings17.description), docs: "https://developer.chrome.com/docs/performance/insights/render-blocking", category: InsightCategory.LCP, state: partialModel.renderBlockingRequests.length > 0 ? "fail" : "pass", ...partialModel }; } -function generateInsight15(data31, context) { +function generateInsight16(data31, context) { if (!context.navigation) { - return finalize45({ + return finalize46({ renderBlockingRequests: [] }); } - const firstPaintTs = data31.PageLoadMetrics.metricScoresByFrameId.get(context.frameId)?.get(context.navigationId)?.get(ModelHandlers_exports.PageLoadMetrics.MetricName.FP)?.event?.ts; + const firstPaintTs = data31.PageLoadMetrics.metricScoresByFrameId.get(context.frameId)?.get(context.navigation)?.get(ModelHandlers_exports.PageLoadMetrics.MetricName.FP)?.event?.ts; if (!firstPaintTs) { - return finalize45({ + return finalize46({ renderBlockingRequests: [], warnings: [InsightWarning.NO_FP] }); @@ -29373,7 +29795,7 @@ function generateInsight15(data31, context) { renderBlockingRequests = renderBlockingRequests.sort((a, b) => { return b.dur - a.dur; }); - return finalize45({ + return finalize46({ relatedEvents: renderBlockingRequests, renderBlockingRequests, ...savings @@ -29386,21 +29808,21 @@ function createOverlayForRequest4(request) { outlineReason: "ERROR" }; } -function createOverlays15(model2) { +function createOverlays16(model2) { return model2.renderBlockingRequests.map((request) => createOverlayForRequest4(request)); } -var UIStrings16, i18nString15, MINIMUM_WASTED_MS; +var UIStrings17, i18nString16, MINIMUM_WASTED_MS; var init_RenderBlocking = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/RenderBlocking.js"() { init_process_global(); init_handlers(); init_helpers2(); init_types4(); - UIStrings16 = { + UIStrings17 = { /** * @description Title of an insight that provides the user with the list of network requests that blocked and therefore slowed down the page rendering and becoming visible to the user. */ - title: "Render blocking requests", + title: "Render-blocking requests", /** * @description Text to describe that there are requests blocking rendering, which may affect LCP. */ @@ -29416,29 +29838,29 @@ var init_RenderBlocking = __esm({ /** * @description Text status indicating that no requests blocked the initial render of a navigation */ - noRenderBlocking: "No render blocking requests for this navigation" + noRenderBlocking: "No render-blocking requests for this navigation" }; - i18nString15 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString16 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); __name(isRenderBlockingInsight, "isRenderBlockingInsight"); MINIMUM_WASTED_MS = 50; __name(getNodesAndTimingByRequestId, "getNodesAndTimingByRequestId"); __name(estimateSavingsWithGraphs2, "estimateSavingsWithGraphs"); __name(hasImageLCP, "hasImageLCP"); __name(computeSavings, "computeSavings"); - __name(finalize45, "finalize"); - __name(generateInsight15, "generateInsight"); + __name(finalize46, "finalize"); + __name(generateInsight16, "generateInsight"); __name(createOverlayForRequest4, "createOverlayForRequest"); - __name(createOverlays15, "createOverlays"); + __name(createOverlays16, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/SlowCSSSelector.js var SlowCSSSelector_exports = {}; __export(SlowCSSSelector_exports, { - UIStrings: () => UIStrings17, - createOverlays: () => createOverlays16, - generateInsight: () => generateInsight16, - i18nString: () => i18nString16, + UIStrings: () => UIStrings18, + createOverlays: () => createOverlays17, + generateInsight: () => generateInsight17, + i18nString: () => i18nString17, isSlowCSSSelectorInsight: () => isSlowCSSSelectorInsight }); function aggregateSelectorStats(data31, context) { @@ -29465,12 +29887,12 @@ function aggregateSelectorStats(data31, context) { } return [...selectorMap.values()]; } -function finalize46(partialModel) { +function finalize47(partialModel) { return { insightKey: InsightKeys.SLOW_CSS_SELECTOR, - strings: UIStrings17, - title: i18nString16(UIStrings17.title), - description: i18nString16(UIStrings17.description), + strings: UIStrings18, + title: i18nString17(UIStrings18.title), + description: i18nString17(UIStrings18.description), docs: "https://developer.chrome.com/docs/performance/insights/slow-css-selector", category: InsightCategory.ALL, state: partialModel.topSelectorElapsedMs && partialModel.topSelectorMatchAttempts ? "informative" : "pass", @@ -29480,7 +29902,7 @@ function finalize46(partialModel) { function isSlowCSSSelectorInsight(model2) { return model2.insightKey === InsightKeys.SLOW_CSS_SELECTOR; } -function generateInsight16(data31, context) { +function generateInsight17(data31, context) { const selectorStatsData = data31.SelectorStats; if (!selectorStatsData) { throw new Error("no selector stats data"); @@ -29507,7 +29929,7 @@ function generateInsight16(data31, context) { return a[SelectorTimingsKey.MatchAttempts] > b[SelectorTimingsKey.MatchAttempts] ? a : b; }); } - return finalize46({ + return finalize47({ // TODO: should we identify RecalcStyle events as linked to this insight? relatedEvents: [], totalElapsedMs: Timing_exports.Milli(totalElapsedUs / 1e3), @@ -29517,10 +29939,10 @@ function generateInsight16(data31, context) { topSelectorMatchAttempts }); } -function createOverlays16(_) { +function createOverlays17(_) { return []; } -var UIStrings17, i18nString16, slowCSSSelectorThreshold; +var UIStrings18, i18nString17, slowCSSSelectorThreshold; var init_SlowCSSSelector = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/SlowCSSSelector.js"() { init_process_global(); @@ -29528,7 +29950,7 @@ var init_SlowCSSSelector = __esm({ init_TraceEvents(); init_types2(); init_types4(); - UIStrings17 = { + UIStrings18 = { /** * @description Title of an insight that provides details about slow CSS selectors. */ @@ -29570,24 +29992,24 @@ var init_SlowCSSSelector = __esm({ */ topSelectorMatchAttempt: "Top selector match attempt" }; - i18nString16 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString17 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); slowCSSSelectorThreshold = 500; __name(aggregateSelectorStats, "aggregateSelectorStats"); - __name(finalize46, "finalize"); + __name(finalize47, "finalize"); __name(isSlowCSSSelectorInsight, "isSlowCSSSelectorInsight"); - __name(generateInsight16, "generateInsight"); - __name(createOverlays16, "createOverlays"); + __name(generateInsight17, "generateInsight"); + __name(createOverlays17, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/ThirdParties.js var ThirdParties_exports2 = {}; __export(ThirdParties_exports2, { - UIStrings: () => UIStrings18, - createOverlays: () => createOverlays17, + UIStrings: () => UIStrings19, + createOverlays: () => createOverlays18, createOverlaysForSummary: () => createOverlaysForSummary, - generateInsight: () => generateInsight17, - i18nString: () => i18nString17, + generateInsight: () => generateInsight18, + i18nString: () => i18nString18, isThirdPartyInsight: () => isThirdPartyInsight }); function getRelatedEvents(summaries, firstPartyEntity) { @@ -29599,12 +30021,12 @@ function getRelatedEvents(summaries, firstPartyEntity) { } return relatedEvents; } -function finalize47(partialModel) { +function finalize48(partialModel) { return { insightKey: InsightKeys.THIRD_PARTIES, - strings: UIStrings18, - title: i18nString17(UIStrings18.title), - description: i18nString17(UIStrings18.description), + strings: UIStrings19, + title: i18nString18(UIStrings19.title), + description: i18nString18(UIStrings19.description), docs: "https://developer.chrome.com/docs/performance/insights/third-parties", category: InsightCategory.ALL, state: partialModel.entitySummaries.find((summary) => summary.entity !== partialModel.firstPartyEntity) ? "informative" : "pass", @@ -29614,11 +30036,11 @@ function finalize47(partialModel) { function isThirdPartyInsight(model2) { return model2.insightKey === InsightKeys.THIRD_PARTIES; } -function generateInsight17(data31, context) { +function generateInsight18(data31, context) { const entitySummaries = ThirdParties_exports.summarizeByThirdParty(data31, context.bounds); const firstPartyUrl = context.navigation?.args.data?.documentLoaderURL ?? data31.Meta.mainFrameURL; const firstPartyEntity = import_third_party_web.default.getEntity(firstPartyUrl) || helpers_exports.makeUpEntity(data31.Renderer.entityMappings.createdEntityCache, firstPartyUrl); - return finalize47({ + return finalize48({ relatedEvents: getRelatedEvents(entitySummaries, firstPartyEntity), firstPartyEntity, entitySummaries @@ -29639,7 +30061,7 @@ function createOverlaysForSummary(summary) { } return overlays; } -function createOverlays17(model2) { +function createOverlays18(model2) { const overlays = []; const summaries = model2.entitySummaries ?? []; for (const summary of summaries) { @@ -29651,7 +30073,7 @@ function createOverlays17(model2) { } return overlays; } -var UIStrings18, i18nString17; +var UIStrings19, i18nString18; var init_ThirdParties2 = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/ThirdParties.js"() { init_process_global(); @@ -29659,7 +30081,7 @@ var init_ThirdParties2 = __esm({ init_extras(); init_handlers(); init_types4(); - UIStrings18 = { + UIStrings19 = { /** Title of an insight that provides details about the code on a web page that the user doesn't control (referred to as "third-party code"). */ title: "3rd parties", /** @@ -29678,31 +30100,31 @@ var init_ThirdParties2 = __esm({ */ noThirdParties: "No third parties found" }; - i18nString17 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + i18nString18 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); __name(getRelatedEvents, "getRelatedEvents"); - __name(finalize47, "finalize"); + __name(finalize48, "finalize"); __name(isThirdPartyInsight, "isThirdPartyInsight"); - __name(generateInsight17, "generateInsight"); + __name(generateInsight18, "generateInsight"); __name(createOverlaysForSummary, "createOverlaysForSummary"); - __name(createOverlays17, "createOverlays"); + __name(createOverlays18, "createOverlays"); } }); // node_modules/@paulirish/trace_engine/models/trace/insights/Viewport.js var Viewport_exports = {}; __export(Viewport_exports, { - UIStrings: () => UIStrings19, - createOverlays: () => createOverlays18, - generateInsight: () => generateInsight18, - i18nString: () => i18nString18, + UIStrings: () => UIStrings20, + createOverlays: () => createOverlays19, + generateInsight: () => generateInsight19, + i18nString: () => i18nString19, isViewportInsight: () => isViewportInsight }); -function finalize48(partialModel) { +function finalize49(partialModel) { return { insightKey: InsightKeys.VIEWPORT, - strings: UIStrings19, - title: i18nString18(UIStrings19.title), - description: i18nString18(UIStrings19.description), + strings: UIStrings20, + title: i18nString19(UIStrings20.title), + description: i18nString19(UIStrings20.description), docs: "https://developer.chrome.com/docs/performance/insights/viewport", category: InsightCategory.INP, state: partialModel.mobileOptimized === false ? "fail" : "pass", @@ -29712,7 +30134,7 @@ function finalize48(partialModel) { function isViewportInsight(model2) { return model2.insightKey === InsightKeys.VIEWPORT; } -function generateInsight18(data31, context) { +function generateInsight19(data31, context) { const viewportEvent = data31.UserInteractions.parseMetaViewportEvents.find((event) => { if (event.args.data.frame !== context.frameId) { return false; @@ -29729,7 +30151,7 @@ function generateInsight18(data31, context) { return Timing_exports3.eventIsInBounds(event, context.bounds); }); if (!compositorEvents.length) { - return finalize48({ + return finalize49({ mobileOptimized: null, warnings: [InsightWarning.NO_LAYOUT] }); @@ -29739,7 +30161,7 @@ function generateInsight18(data31, context) { const longPointerInteractions = [...data31.UserInteractions.interactionsOverThreshold.values()].filter((interaction) => ModelHandlers_exports.UserInteractions.categoryOfInteraction(interaction) === "POINTER" && interaction.inputDelay >= 5e4); const inputDelay = Math.max(0, ...longPointerInteractions.map((interaction) => interaction.inputDelay)) / 1e3; const inpMetricSavings = NumberUtilities_exports.clamp(inputDelay, 0, 300); - return finalize48({ + return finalize49({ mobileOptimized: false, viewportEvent, longPointerInteractions, @@ -29747,12 +30169,12 @@ function generateInsight18(data31, context) { }); } } - return finalize48({ + return finalize49({ mobileOptimized: true, viewportEvent }); } -function createOverlays18(model2) { +function createOverlays19(model2) { if (!model2.longPointerInteractions) { return []; } @@ -29762,12 +30184,12 @@ function createOverlays18(model2) { return { type: "TIMESPAN_BREAKDOWN", entry: interaction, - sections: [{ bounds, label: i18nString18(UIStrings19.mobileTapDelayLabel), showDuration: true }], + sections: [{ bounds, label: i18nString19(UIStrings20.mobileTapDelayLabel), showDuration: true }], renderLocation: "ABOVE_EVENT" }; }); } -var UIStrings19, i18nString18; +var UIStrings20, i18nString19; var init_Viewport = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/Viewport.js"() { init_process_global(); @@ -29776,7 +30198,7 @@ var init_Viewport = __esm({ init_helpers2(); init_types2(); init_types4(); - UIStrings19 = { + UIStrings20 = { /** Title of an insight that provides details about if the page's viewport is optimized for mobile viewing. */ title: "Optimize viewport for mobile", /** @@ -29788,11 +30210,11 @@ var init_Viewport = __esm({ */ mobileTapDelayLabel: "Mobile tap delay" }; - i18nString18 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); - __name(finalize48, "finalize"); + i18nString19 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString"); + __name(finalize49, "finalize"); __name(isViewportInsight, "isViewportInsight"); - __name(generateInsight18, "generateInsight"); - __name(createOverlays18, "createOverlays"); + __name(generateInsight19, "generateInsight"); + __name(createOverlays19, "createOverlays"); } }); @@ -29801,6 +30223,7 @@ var Models_exports = {}; __export(Models_exports, { CLSCulprits: () => CLSCulprits_exports, Cache: () => Cache_exports, + CharacterSet: () => CharacterSet_exports, DOMSize: () => DOMSize_exports, DocumentLatency: () => DocumentLatency_exports, DuplicatedJavaScript: () => DuplicatedJavaScript_exports, @@ -29822,6 +30245,7 @@ var init_Models = __esm({ "node_modules/@paulirish/trace_engine/models/trace/insights/Models.js"() { init_process_global(); init_Cache(); + init_CharacterSet(); init_CLSCulprits(); init_DocumentLatency(); init_DOMSize(); @@ -29856,12 +30280,12 @@ var init_insights = __esm({ }); // node_modules/@paulirish/trace_engine/models/trace/LanternComputationData.js -function createProcessedNavigation(data31, frameId, navigationId) { +function createProcessedNavigation(data31, frameId, navigation2) { const scoresByNav = data31.PageLoadMetrics.metricScoresByFrameId.get(frameId); if (!scoresByNav) { throw new core_exports.LanternError("missing metric scores for frame"); } - const scores = scoresByNav.get(navigationId); + const scores = scoresByNav.get(navigation2); if (!scores) { throw new core_exports.LanternError("missing metric scores for specified navigation"); } @@ -30001,12 +30425,7 @@ function createLanternRequest(parsedTrace, workerThreads, request) { priority: request.args.data.priority, frameId: request.args.data.frame, fromWorker, - serverResponseTime: request.args.data.lrServerResponseTime ?? void 0, - // Set later. - redirects: void 0, - redirectSource: void 0, - redirectDestination: void 0, - initiatorRequest: void 0 + serverResponseTime: request.args.data.lrServerResponseTime }; } function chooseInitiatorRequest(request, requestsByURL) { @@ -30433,7 +30852,7 @@ var init_Processor = __esm({ } return this.#insights; } - #createLanternContext(data31, traceEvents, frameId, navigationId, options) { + #createLanternContext(data31, traceEvents, frameId, navigation2, options) { if (!data31.NetworkRequests || !data31.Workers || !data31.PageLoadMetrics) { return; } @@ -30441,7 +30860,7 @@ var init_Processor = __esm({ throw new core_exports.LanternError("No network requests found in trace"); } const navStarts = data31.Meta.navigationsByFrameId.get(frameId); - const navStartIndex = navStarts?.findIndex((n) => n.args.data?.navigationId === navigationId); + const navStartIndex = navStarts?.findIndex((n) => n === navigation2); if (!navStarts || navStartIndex === void 0 || navStartIndex === -1) { throw new core_exports.LanternError("Could not find navigation start"); } @@ -30453,7 +30872,7 @@ var init_Processor = __esm({ }; const requests = createNetworkRequests(trace, data31, startTime, endTime); const graph2 = createGraph(requests, trace, data31); - const processedNavigation = createProcessedNavigation(data31, frameId, navigationId); + const processedNavigation = createProcessedNavigation(data31, frameId, navigation2); const networkAnalysis = core_exports.NetworkAnalyzer.analyze(requests); if (!networkAnalysis) { return; @@ -30501,6 +30920,7 @@ var init_Processor = __esm({ SlowCSSSelector: null, ForcedReflow: null, Cache: null, + CharacterSet: null, ModernHTTP: null, LegacyJavaScript: null }; @@ -30514,10 +30934,10 @@ var init_Processor = __esm({ const observedInpScore = Common_exports.evaluateINPMetricScore(observedInp); const observedClsScore = Common_exports.evaluateCLSMetricScore(observedCls); const insightToSortingRank = /* @__PURE__ */ new Map(); - for (const [name, model2] of Object.entries(insightSet.model)) { - const lcp = model2.metricSavings?.LCP ?? 0; - const inp = model2.metricSavings?.INP ?? 0; - const cls = model2.metricSavings?.CLS ?? 0; + for (const [name, insight] of Object.entries(insightSet.model)) { + const lcp = insight.metricSavings?.LCP ?? 0; + const inp = insight.metricSavings?.INP ?? 0; + const cls = insight.metricSavings?.CLS ?? 0; const lcpPostSavings = observedLcp !== void 0 ? Math.max(0, observedLcp - lcp) : void 0; const inpPostSavings = Math.max(0, observedInp - inp); const clsPostSavings = Math.max(0, observedCls - cls); @@ -30559,9 +30979,12 @@ var init_Processor = __esm({ } #computeInsightSet(data31, context) { const logger = context.options.logger; + if (!this.#insights) { + this.#insights = /* @__PURE__ */ new Map(); + } let id, urlString, navigation2; if (context.navigation) { - id = context.navigationId; + id = `NAVIGATION_${this.#insights.size}`; urlString = data31.Meta.finalDisplayUrlByNavigationId.get(context.navigationId) ?? data31.Meta.mainFrameURL; navigation2 = context.navigation; } else { @@ -30569,32 +30992,32 @@ var init_Processor = __esm({ urlString = data31.Meta.finalDisplayUrlByNavigationId.get("") ?? data31.Meta.mainFrameURL; } const insightSetModel = {}; + const insightSetModelErrors = {}; for (const [name, insight] of Object.entries(_a2.getInsightRunners())) { - let model2; try { logger?.start(`insights:${name}`); - model2 = insight.generateInsight(data31, context); + const model2 = insight.generateInsight(data31, context); model2.frameId = context.frameId; const navId = context.navigation?.args.data?.navigationId; if (navId) { - model2.navigationId = navId; + model2.navigation = context.navigation; } model2.createOverlays = () => { return insight.createOverlays(model2); }; + Object.assign(insightSetModel, { [name]: model2 }); } catch (err) { - model2 = err; + Object.assign(insightSetModelErrors, { [name]: err }); } finally { logger?.end(`insights:${name}`); } - Object.assign(insightSetModel, { [name]: model2 }); } const isNavigation = id === TraceEvents_exports.NO_NAVIGATION; const trivialThreshold = Timing_exports3.milliToMicro(Timing_exports.Milli(5e3)); - const everyInsightPasses = Object.values(insightSetModel).filter((model2) => !(model2 instanceof Error)).every((model2) => model2.state === "pass"); - const noLcp = !insightSetModel.LCPBreakdown.lcpEvent; - const noInp = !insightSetModel.INPBreakdown.longestInteractionEvent; - const noLayoutShifts = insightSetModel.CLSCulprits.shifts?.size === 0; + const everyInsightPasses = Object.values(insightSetModel).every((model2) => model2 && model2.state === "pass"); + const noLcp = !insightSetModel.LCPBreakdown?.lcpEvent; + const noInp = !insightSetModel.INPBreakdown?.longestInteractionEvent; + const noLayoutShifts = insightSetModel.CLSCulprits?.shifts?.size === 0; const shouldExclude = isNavigation && context.bounds.range < trivialThreshold && everyInsightPasses && noLcp && noInp && noLayoutShifts; if (shouldExclude) { return; @@ -30611,11 +31034,9 @@ var init_Processor = __esm({ navigation: navigation2, frameId: context.frameId, bounds: context.bounds, - model: insightSetModel + model: insightSetModel, + modelErrors: insightSetModelErrors }; - if (!this.#insights) { - this.#insights = /* @__PURE__ */ new Map(); - } this.#insights.set(insightSet.id, insightSet); this.sortInsightSet(insightSet, context.options.metadata ?? null); } @@ -30655,7 +31076,7 @@ var init_Processor = __esm({ let lantern; try { options.logger?.start("insights:createLanternContext"); - lantern = this.#createLanternContext(data31, traceEvents, frameId, navigationId, options); + lantern = this.#createLanternContext(data31, traceEvents, frameId, navigation2, options); } catch (e) { const expectedErrors = [ "mainDocumentRequest not found", @@ -31484,7 +31905,7 @@ xn--3pxu8k": _74, "点看": _74, "xn--42c2d9a": _74, "คอม": _74, "xn--45q1 }); // core/lib/lh-error.js -var UIStrings20, str_, LHERROR_SENTINEL, ERROR_SENTINEL, LighthouseError, ERRORS; +var UIStrings21, str_, LHERROR_SENTINEL, ERROR_SENTINEL, LighthouseError, ERRORS; var init_lh_error = __esm({ "core/lib/lh-error.js"() { "use strict"; @@ -31495,7 +31916,7 @@ var init_lh_error = __esm({ * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings20 = { + UIStrings21 = { /** * @description Error message explaining that the Lighthouse run was not able to collect screenshots through Chrome. * @example {NO_SPEEDLINE_FRAMES} errorCode @@ -31581,7 +32002,7 @@ var init_lh_error = __esm({ /** Error message explaining that the browser tab that Lighthouse is inspecting has crashed. */ targetCrashed: "Browser tab has unexpectedly crashed." }; - str_ = createIcuMessageFn({ url: "core/lib/lh-error.js" }.url, UIStrings20); + str_ = createIcuMessageFn({ url: "core/lib/lh-error.js" }.url, UIStrings21); LHERROR_SENTINEL = "__LighthouseErrorSentinel"; ERROR_SENTINEL = "__ErrorSentinel"; LighthouseError = class _LighthouseError extends Error { @@ -31694,76 +32115,76 @@ var init_lh_error = __esm({ // Screenshot/speedline errors NO_SPEEDLINE_FRAMES: { code: "NO_SPEEDLINE_FRAMES", - message: UIStrings20.didntCollectScreenshots, + message: UIStrings21.didntCollectScreenshots, lhrRuntimeError: true }, SPEEDINDEX_OF_ZERO: { code: "SPEEDINDEX_OF_ZERO", - message: UIStrings20.didntCollectScreenshots, + message: UIStrings21.didntCollectScreenshots, lhrRuntimeError: true }, NO_SCREENSHOTS: { code: "NO_SCREENSHOTS", - message: UIStrings20.didntCollectScreenshots, + message: UIStrings21.didntCollectScreenshots, lhrRuntimeError: true }, INVALID_SPEEDLINE: { code: "INVALID_SPEEDLINE", - message: UIStrings20.didntCollectScreenshots, + message: UIStrings21.didntCollectScreenshots, lhrRuntimeError: true }, // Trace parsing errors NO_TRACING_STARTED: { code: "NO_TRACING_STARTED", - message: UIStrings20.badTraceRecording, + message: UIStrings21.badTraceRecording, lhrRuntimeError: true }, NO_RESOURCE_REQUEST: { code: "NO_RESOURCE_REQUEST", - message: UIStrings20.badTraceRecording, + message: UIStrings21.badTraceRecording, lhrRuntimeError: true }, NO_NAVSTART: { code: "NO_NAVSTART", - message: UIStrings20.badTraceRecording, + message: UIStrings21.badTraceRecording, lhrRuntimeError: true }, NO_FCP: { code: "NO_FCP", - message: UIStrings20.noFcp, + message: UIStrings21.noFcp, lhrRuntimeError: true }, NO_DCL: { code: "NO_DCL", - message: UIStrings20.badTraceRecording, + message: UIStrings21.badTraceRecording, lhrRuntimeError: true }, NO_FMP: { code: "NO_FMP", - message: UIStrings20.badTraceRecording + message: UIStrings21.badTraceRecording }, NO_LCP: { code: "NO_LCP", - message: UIStrings20.noLcp + message: UIStrings21.noLcp }, NO_LCP_ALL_FRAMES: { code: "NO_LCP_ALL_FRAMES", - message: UIStrings20.noLcp + message: UIStrings21.noLcp }, UNSUPPORTED_OLD_CHROME: { code: "UNSUPPORTED_OLD_CHROME", - message: UIStrings20.oldChromeDoesNotSupportFeature + message: UIStrings21.oldChromeDoesNotSupportFeature }, // TTI calculation failures - NO_TTI_CPU_IDLE_PERIOD: { code: "NO_TTI_CPU_IDLE_PERIOD", message: UIStrings20.pageLoadTookTooLong }, + NO_TTI_CPU_IDLE_PERIOD: { code: "NO_TTI_CPU_IDLE_PERIOD", message: UIStrings21.pageLoadTookTooLong }, NO_TTI_NETWORK_IDLE_PERIOD: { code: "NO_TTI_NETWORK_IDLE_PERIOD", - message: UIStrings20.pageLoadTookTooLong + message: UIStrings21.pageLoadTookTooLong }, // Page load failures NO_DOCUMENT_REQUEST: { code: "NO_DOCUMENT_REQUEST", - message: UIStrings20.pageLoadFailed, + message: UIStrings21.pageLoadFailed, lhrRuntimeError: true }, /* Used when DevTools reports loading failed. Usually an internal (Chrome) issue. @@ -31771,7 +32192,7 @@ var init_lh_error = __esm({ */ FAILED_DOCUMENT_REQUEST: { code: "FAILED_DOCUMENT_REQUEST", - message: UIStrings20.pageLoadFailedWithDetails, + message: UIStrings21.pageLoadFailedWithDetails, lhrRuntimeError: true }, /* Used when status code is 4xx or 5xx. @@ -31779,7 +32200,7 @@ var init_lh_error = __esm({ */ ERRORED_DOCUMENT_REQUEST: { code: "ERRORED_DOCUMENT_REQUEST", - message: UIStrings20.pageLoadFailedWithStatusCode, + message: UIStrings21.pageLoadFailedWithStatusCode, lhrRuntimeError: true }, /* Used when security error prevents page load. @@ -31787,70 +32208,70 @@ var init_lh_error = __esm({ */ INSECURE_DOCUMENT_REQUEST: { code: "INSECURE_DOCUMENT_REQUEST", - message: UIStrings20.pageLoadFailedInsecure, + message: UIStrings21.pageLoadFailedInsecure, lhrRuntimeError: true }, /* Used when any Chrome interstitial error prevents page load. */ CHROME_INTERSTITIAL_ERROR: { code: "CHROME_INTERSTITIAL_ERROR", - message: UIStrings20.pageLoadFailedInterstitial, + message: UIStrings21.pageLoadFailedInterstitial, lhrRuntimeError: true }, /* Used when the page stopped responding and did not finish loading. */ PAGE_HUNG: { code: "PAGE_HUNG", - message: UIStrings20.pageLoadFailedHung, + message: UIStrings21.pageLoadFailedHung, lhrRuntimeError: true }, /* Used when the page is non-HTML. */ NOT_HTML: { code: "NOT_HTML", - message: UIStrings20.notHtml, + message: UIStrings21.notHtml, lhrRuntimeError: true }, // Protocol internal failures TRACING_ALREADY_STARTED: { code: "TRACING_ALREADY_STARTED", - message: UIStrings20.internalChromeError, + message: UIStrings21.internalChromeError, pattern: /Tracing.*started/, lhrRuntimeError: true }, PARSING_PROBLEM: { code: "PARSING_PROBLEM", - message: UIStrings20.internalChromeError, + message: UIStrings21.internalChromeError, pattern: /Parsing problem/, lhrRuntimeError: true }, READ_FAILED: { code: "READ_FAILED", - message: UIStrings20.internalChromeError, + message: UIStrings21.internalChromeError, pattern: /Read failed/, lhrRuntimeError: true }, // URL parsing failures INVALID_URL: { code: "INVALID_URL", - message: UIStrings20.urlInvalid + message: UIStrings21.urlInvalid }, /* Protocol timeout failures * Requires an additional `protocolMethod` field for translation. */ PROTOCOL_TIMEOUT: { code: "PROTOCOL_TIMEOUT", - message: UIStrings20.protocolTimeout, + message: UIStrings21.protocolTimeout, lhrRuntimeError: true }, // DNS failure on main document (no resolution, timed out, etc) DNS_FAILURE: { code: "DNS_FAILURE", - message: UIStrings20.dnsFailure, + message: UIStrings21.dnsFailure, lhrRuntimeError: true }, /** A timeout in the initial connection to the debugger protocol. */ CRI_TIMEOUT: { code: "CRI_TIMEOUT", - message: UIStrings20.criTimeout, + message: UIStrings21.criTimeout, lhrRuntimeError: true }, /** @@ -31859,7 +32280,7 @@ var init_lh_error = __esm({ */ MISSING_REQUIRED_ARTIFACT: { code: "MISSING_REQUIRED_ARTIFACT", - message: UIStrings20.missingRequiredArtifact + message: UIStrings21.missingRequiredArtifact }, /** * Error internal to Runner used when an artifact required for an audit was an error. @@ -31867,12 +32288,12 @@ var init_lh_error = __esm({ */ ERRORED_REQUIRED_ARTIFACT: { code: "ERRORED_REQUIRED_ARTIFACT", - message: UIStrings20.erroredRequiredArtifact + message: UIStrings21.erroredRequiredArtifact }, /** The page has crashed and will no longer respond to 99% of CDP commmands. */ TARGET_CRASHED: { code: "TARGET_CRASHED", - message: UIStrings20.targetCrashed, + message: UIStrings21.targetCrashed, lhrRuntimeError: true } // Hey! When adding a new error type, update lighthouse-result.proto too. @@ -33972,6 +34393,7 @@ async function runA11yChecks() { "aria-roledescription": { enabled: false }, "aria-treeitem-name": { enabled: true }, "aria-text": { enabled: true }, + "autocomplete-valid": { enabled: true }, "audio-caption": { enabled: false }, "blink": { enabled: false }, "duplicate-id": { enabled: false }, @@ -33991,6 +34413,7 @@ async function runA11yChecks() { // https://github.com/dequelabs/axe-core/issues/2958 "nested-interactive": { enabled: false }, "no-autoplay-audio": { enabled: false }, + "presentation-role-conflict": { enabled: true }, "role-img-alt": { enabled: false }, "scrollable-region-focusable": { enabled: false }, "select-name": { enabled: true }, @@ -33998,7 +34421,7 @@ async function runA11yChecks() { "skip-link": { enabled: true }, // https://github.com/GoogleChrome/lighthouse/issues/16163 "summary-name": { enabled: false }, - "svg-img-alt": { enabled: false }, + "svg-img-alt": { enabled: true }, "tabindex": { enabled: true }, "table-duplicate-name": { enabled: true }, "table-fake-caption": { enabled: true }, @@ -34910,7 +35333,9 @@ function collectElements() { name: formEl.name, autocomplete: formEl.autocomplete, // @ts-expect-error - getNodeDetails put into scope via stringification - node: getNodeDetails(formEl) + node: getNodeDetails(formEl), + webMcpToolname: formEl.getAttribute("toolname"), + webMcpTooldescription: formEl.getAttribute("tooldescription") }); } const labelEls = getElementsInDocument("label"); @@ -35420,7 +35845,6 @@ var init_main_resource = __esm({ if (!mainDocumentUrl) throw new Error("mainDocumentUrl must exist to get the main resource"); const records = await NetworkRecordsComputed.request(data31.devtoolsLog, context); const mainResource = core_exports.NetworkAnalyzer.findLastDocumentForUrl( - // @ts-expect-error - trace engine types for InitiatorType are outdated records, mainDocumentUrl ); @@ -35437,7 +35861,7 @@ var init_main_resource = __esm({ // core/gather/gatherers/link-elements.js var link_elements_exports = {}; __export(link_elements_exports, { - UIStrings: () => UIStrings22, + UIStrings: () => UIStrings23, default: () => link_elements_default }); function normalizeUrlOrNull(url, finalDisplayedUrl) { @@ -35474,7 +35898,7 @@ function getLinkElementsInDOM() { } return linkElements; } -var import_http_link_header, UIStrings22, str_3, LinkElements, link_elements_default; +var import_http_link_header, UIStrings23, str_3, LinkElements, link_elements_default; var init_link_elements = __esm({ "core/gather/gatherers/link-elements.js"() { "use strict"; @@ -35491,7 +35915,7 @@ var init_link_elements = __esm({ * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings22 = { + UIStrings23 = { /** * @description Warning message explaining that there was an error parsing a link header in an HTTP response. `error` will be an english string with more details on the error. `header` will be the value of the header that caused the error. `link` is a type of HTTP header and should not be translated. * @example {Expected attribute delimiter at offset 94} error @@ -35499,7 +35923,7 @@ var init_link_elements = __esm({ */ headerParseWarning: "Error parsing `link` header ({error}): `{header}`" }; - str_3 = createIcuMessageFn({ url: "core/gather/gatherers/link-elements.js" }.url, UIStrings22); + str_3 = createIcuMessageFn({ url: "core/gather/gatherers/link-elements.js" }.url, UIStrings23); __name(normalizeUrlOrNull, "normalizeUrlOrNull"); __name(getCrossoriginFromHeader, "getCrossoriginFromHeader"); __name(getLinkElementsInDOM, "getLinkElementsInDOM"); @@ -35541,7 +35965,7 @@ var init_link_elements = __esm({ parsedRefs = import_http_link_header.default.parse(header.value).refs; } catch (err) { const truncatedHeader = Util.truncate(header.value, 100); - const warning = str_3(UIStrings22.headerParseWarning, { + const warning = str_3(UIStrings23.headerParseWarning, { error: err.message, header: truncatedHeader }); @@ -36395,7 +36819,7 @@ var require_SourceMap = __commonJS({ let nameIndex = 0; const names2 = map.names ?? []; const tokenIter = new TokenIterator(map.mappings); - let sourceURL = this.#sourceInfos[sourceIndex].sourceURL; + let sourceURL = this.#sourceInfos[sourceIndex]?.sourceURL; while (true) { if (tokenIter.peek() === ",") { tokenIter.next(); @@ -36417,7 +36841,7 @@ var require_SourceMap = __commonJS({ const sourceIndexDelta = tokenIter.nextVLQ(); if (sourceIndexDelta) { sourceIndex += sourceIndexDelta; - sourceURL = this.#sourceInfos[sourceIndex].sourceURL; + sourceURL = this.#sourceInfos[sourceIndex]?.sourceURL; } sourceLineNumber += tokenIter.nextVLQ(); sourceColumnNumber += tokenIter.nextVLQ(); @@ -36900,7 +37324,7 @@ var init_viewport_dimensions = __esm({ }); // core/audits/accessibility/axe-audit.js -var UIStrings23, str_4, AxeAudit, axe_audit_default; +var UIStrings24, str_4, AxeAudit, axe_audit_default; var init_axe_audit = __esm({ "core/audits/accessibility/axe-audit.js"() { "use strict"; @@ -36912,11 +37336,11 @@ var init_axe_audit = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings23 = { + UIStrings24 = { /** Label of a table column that identifies HTML elements that have failed an audit. */ failingElementsHeader: "Failing Elements" }; - str_4 = createIcuMessageFn({ url: "core/audits/accessibility/axe-audit.js" }.url, UIStrings23); + str_4 = createIcuMessageFn({ url: "core/audits/accessibility/axe-audit.js" }.url, UIStrings24); AxeAudit = class extends Audit { static { __name(this, "AxeAudit"); @@ -36973,7 +37397,7 @@ var init_axe_audit = __esm({ } const headings = [ /* eslint-disable max-len */ - { key: "node", valueType: "node", subItemsHeading: { key: "relatedNode", valueType: "node" }, label: str_4(UIStrings23.failingElementsHeader) } + { key: "node", valueType: "node", subItemsHeading: { key: "relatedNode", valueType: "node" }, label: str_4(UIStrings24.failingElementsHeader) } /* eslint-enable max-len */ ]; let debugData; @@ -36997,10 +37421,10 @@ var init_axe_audit = __esm({ // core/audits/accessibility/accesskeys.js var accesskeys_exports = {}; __export(accesskeys_exports, { - UIStrings: () => UIStrings24, + UIStrings: () => UIStrings25, default: () => accesskeys_default }); -var UIStrings24, str_5, Accesskeys, accesskeys_default; +var UIStrings25, str_5, Accesskeys, accesskeys_default; var init_accesskeys = __esm({ "core/audits/accessibility/accesskeys.js"() { "use strict"; @@ -37012,7 +37436,7 @@ var init_accesskeys = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings24 = { + UIStrings25 = { /** Title of an accessibility audit that evaluates if the accesskey HTML attribute values are unique across all elements. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`[accesskey]` values are unique", /** Title of an accessibility audit that evaluates if the ARIA HTML attributes are misaligned with the aria-role HTML attribute specificed on the element, such mismatches are invalid. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37020,7 +37444,7 @@ var init_accesskeys = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Access keys let users quickly focus a part of the page. For proper navigation, each access key must be unique. [Learn more about access keys](https://dequeuniversity.com/rules/axe/4.11/accesskeys)." }; - str_5 = createIcuMessageFn({ url: "core/audits/accessibility/accesskeys.js" }.url, UIStrings24); + str_5 = createIcuMessageFn({ url: "core/audits/accessibility/accesskeys.js" }.url, UIStrings25); Accesskeys = class extends axe_audit_default { static { __name(this, "Accesskeys"); @@ -37031,9 +37455,9 @@ var init_accesskeys = __esm({ static get meta() { return { id: "accesskeys", - title: str_5(UIStrings24.title), - failureTitle: str_5(UIStrings24.failureTitle), - description: str_5(UIStrings24.description), + title: str_5(UIStrings25.title), + failureTitle: str_5(UIStrings25.failureTitle), + description: str_5(UIStrings25.description), requiredArtifacts: ["Accessibility"] }; } @@ -37045,10 +37469,10 @@ var init_accesskeys = __esm({ // core/audits/accessibility/aria-allowed-attr.js var aria_allowed_attr_exports = {}; __export(aria_allowed_attr_exports, { - UIStrings: () => UIStrings25, + UIStrings: () => UIStrings26, default: () => aria_allowed_attr_default }); -var UIStrings25, str_6, ARIAAllowedAttr, aria_allowed_attr_default; +var UIStrings26, str_6, ARIAAllowedAttr, aria_allowed_attr_default; var init_aria_allowed_attr = __esm({ "core/audits/accessibility/aria-allowed-attr.js"() { "use strict"; @@ -37060,7 +37484,7 @@ var init_aria_allowed_attr = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings25 = { + UIStrings26 = { /** Title of an accessibility audit that evaluates if the ARIA HTML attributes are misaligned with the aria-role HTML attribute specificed on the element, such mismatches are invalid. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`[aria-*]` attributes match their roles", /** Title of an accessibility audit that evaluates if the ARIA HTML attributes are misaligned with the aria-role HTML attribute specificed on the element, such mismatches are invalid. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37068,7 +37492,7 @@ var init_aria_allowed_attr = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Each ARIA `role` supports a specific subset of `aria-*` attributes. Mismatching these invalidates the `aria-*` attributes. [Learn how to match ARIA attributes to their roles](https://dequeuniversity.com/rules/axe/4.11/aria-allowed-attr)." }; - str_6 = createIcuMessageFn({ url: "core/audits/accessibility/aria-allowed-attr.js" }.url, UIStrings25); + str_6 = createIcuMessageFn({ url: "core/audits/accessibility/aria-allowed-attr.js" }.url, UIStrings26); ARIAAllowedAttr = class extends axe_audit_default { static { __name(this, "ARIAAllowedAttr"); @@ -37079,9 +37503,9 @@ var init_aria_allowed_attr = __esm({ static get meta() { return { id: "aria-allowed-attr", - title: str_6(UIStrings25.title), - failureTitle: str_6(UIStrings25.failureTitle), - description: str_6(UIStrings25.description), + title: str_6(UIStrings26.title), + failureTitle: str_6(UIStrings26.failureTitle), + description: str_6(UIStrings26.description), requiredArtifacts: ["Accessibility"] }; } @@ -37093,10 +37517,10 @@ var init_aria_allowed_attr = __esm({ // core/audits/accessibility/aria-allowed-role.js var aria_allowed_role_exports = {}; __export(aria_allowed_role_exports, { - UIStrings: () => UIStrings26, + UIStrings: () => UIStrings27, default: () => aria_allowed_role_default }); -var UIStrings26, str_7, ARIAAllowedRole, aria_allowed_role_default; +var UIStrings27, str_7, ARIAAllowedRole, aria_allowed_role_default; var init_aria_allowed_role = __esm({ "core/audits/accessibility/aria-allowed-role.js"() { "use strict"; @@ -37108,7 +37532,7 @@ var init_aria_allowed_role = __esm({ * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings26 = { + UIStrings27 = { /** Title of an accessibility audit that evaluates if the ARIA role attributes are valid for the HTML element. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "Uses ARIA roles only on compatible elements", /** Title of an accessibility audit that evaluates if the ARIA role attributes are valid for the HTML element. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37116,7 +37540,7 @@ var init_aria_allowed_role = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Many HTML elements can only be assigned certain ARIA roles. Using ARIA roles where they are not allowed can interfere with the accessibility of the web page. [Learn more about ARIA roles](https://dequeuniversity.com/rules/axe/4.11/aria-allowed-role)." }; - str_7 = createIcuMessageFn({ url: "core/audits/accessibility/aria-allowed-role.js" }.url, UIStrings26); + str_7 = createIcuMessageFn({ url: "core/audits/accessibility/aria-allowed-role.js" }.url, UIStrings27); ARIAAllowedRole = class extends axe_audit_default { static { __name(this, "ARIAAllowedRole"); @@ -37127,9 +37551,9 @@ var init_aria_allowed_role = __esm({ static get meta() { return { id: "aria-allowed-role", - title: str_7(UIStrings26.title), - failureTitle: str_7(UIStrings26.failureTitle), - description: str_7(UIStrings26.description), + title: str_7(UIStrings27.title), + failureTitle: str_7(UIStrings27.failureTitle), + description: str_7(UIStrings27.description), scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE, requiredArtifacts: ["Accessibility"] }; @@ -37142,10 +37566,10 @@ var init_aria_allowed_role = __esm({ // core/audits/accessibility/aria-command-name.js var aria_command_name_exports = {}; __export(aria_command_name_exports, { - UIStrings: () => UIStrings27, + UIStrings: () => UIStrings28, default: () => aria_command_name_default }); -var UIStrings27, str_8, AriaCommandName, aria_command_name_default; +var UIStrings28, str_8, AriaCommandName, aria_command_name_default; var init_aria_command_name = __esm({ "core/audits/accessibility/aria-command-name.js"() { "use strict"; @@ -37157,7 +37581,7 @@ var init_aria_command_name = __esm({ * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings27 = { + UIStrings28 = { /** Title of an accessibility audit that evaluates if important HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`button`, `link`, and `menuitem` elements have accessible names", /** Title of an accessibility audit that evaluates if important HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37165,7 +37589,7 @@ var init_aria_command_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML elements. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "When an element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to make command elements more accessible](https://dequeuniversity.com/rules/axe/4.11/aria-command-name)." }; - str_8 = createIcuMessageFn({ url: "core/audits/accessibility/aria-command-name.js" }.url, UIStrings27); + str_8 = createIcuMessageFn({ url: "core/audits/accessibility/aria-command-name.js" }.url, UIStrings28); AriaCommandName = class extends axe_audit_default { static { __name(this, "AriaCommandName"); @@ -37176,9 +37600,9 @@ var init_aria_command_name = __esm({ static get meta() { return { id: "aria-command-name", - title: str_8(UIStrings27.title), - failureTitle: str_8(UIStrings27.failureTitle), - description: str_8(UIStrings27.description), + title: str_8(UIStrings28.title), + failureTitle: str_8(UIStrings28.failureTitle), + description: str_8(UIStrings28.description), requiredArtifacts: ["Accessibility"] }; } @@ -37190,10 +37614,10 @@ var init_aria_command_name = __esm({ // core/audits/accessibility/aria-conditional-attr.js var aria_conditional_attr_exports = {}; __export(aria_conditional_attr_exports, { - UIStrings: () => UIStrings28, + UIStrings: () => UIStrings29, default: () => aria_conditional_attr_default }); -var UIStrings28, str_9, AriaConditionalAttr, aria_conditional_attr_default; +var UIStrings29, str_9, AriaConditionalAttr, aria_conditional_attr_default; var init_aria_conditional_attr = __esm({ "core/audits/accessibility/aria-conditional-attr.js"() { "use strict"; @@ -37205,7 +37629,7 @@ var init_aria_conditional_attr = __esm({ * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings28 = { + UIStrings29 = { /** Title of an accessibility audit that checks if ARIA attributes are used as specified for element roles. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "ARIA attributes are used as specified for the element's role", /** Title of an accessibility audit that checks if ARIA attributes are used as specified for element roles. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37213,7 +37637,7 @@ var init_aria_conditional_attr = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Some ARIA attributes are only allowed on an element under certain conditions. [Learn more about conditional ARIA attributes](https://dequeuniversity.com/rules/axe/4.11/aria-conditional-attr)." }; - str_9 = createIcuMessageFn({ url: "core/audits/accessibility/aria-conditional-attr.js" }.url, UIStrings28); + str_9 = createIcuMessageFn({ url: "core/audits/accessibility/aria-conditional-attr.js" }.url, UIStrings29); AriaConditionalAttr = class extends axe_audit_default { static { __name(this, "AriaConditionalAttr"); @@ -37224,9 +37648,9 @@ var init_aria_conditional_attr = __esm({ static get meta() { return { id: "aria-conditional-attr", - title: str_9(UIStrings28.title), - failureTitle: str_9(UIStrings28.failureTitle), - description: str_9(UIStrings28.description), + title: str_9(UIStrings29.title), + failureTitle: str_9(UIStrings29.failureTitle), + description: str_9(UIStrings29.description), requiredArtifacts: ["Accessibility"] }; } @@ -37238,10 +37662,10 @@ var init_aria_conditional_attr = __esm({ // core/audits/accessibility/aria-deprecated-role.js var aria_deprecated_role_exports = {}; __export(aria_deprecated_role_exports, { - UIStrings: () => UIStrings29, + UIStrings: () => UIStrings30, default: () => aria_deprecated_role_default }); -var UIStrings29, str_10, AriaDeprecatedRole, aria_deprecated_role_default; +var UIStrings30, str_10, AriaDeprecatedRole, aria_deprecated_role_default; var init_aria_deprecated_role = __esm({ "core/audits/accessibility/aria-deprecated-role.js"() { "use strict"; @@ -37253,7 +37677,7 @@ var init_aria_deprecated_role = __esm({ * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings29 = { + UIStrings30 = { /** Title of an accessibility audit that checks if deprecated ARIA roles are used. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "Deprecated ARIA roles were not used", /** Title of an accessibility audit that checks if deprecated ARIA roles are used. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37261,7 +37685,7 @@ var init_aria_deprecated_role = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Deprecated ARIA roles may not be processed correctly by assistive technology. [Learn more about deprecated ARIA roles](https://dequeuniversity.com/rules/axe/4.11/aria-deprecated-role)." }; - str_10 = createIcuMessageFn({ url: "core/audits/accessibility/aria-deprecated-role.js" }.url, UIStrings29); + str_10 = createIcuMessageFn({ url: "core/audits/accessibility/aria-deprecated-role.js" }.url, UIStrings30); AriaDeprecatedRole = class extends axe_audit_default { static { __name(this, "AriaDeprecatedRole"); @@ -37272,9 +37696,9 @@ var init_aria_deprecated_role = __esm({ static get meta() { return { id: "aria-deprecated-role", - title: str_10(UIStrings29.title), - failureTitle: str_10(UIStrings29.failureTitle), - description: str_10(UIStrings29.description), + title: str_10(UIStrings30.title), + failureTitle: str_10(UIStrings30.failureTitle), + description: str_10(UIStrings30.description), requiredArtifacts: ["Accessibility"] }; } @@ -37286,10 +37710,10 @@ var init_aria_deprecated_role = __esm({ // core/audits/accessibility/aria-dialog-name.js var aria_dialog_name_exports = {}; __export(aria_dialog_name_exports, { - UIStrings: () => UIStrings30, + UIStrings: () => UIStrings31, default: () => aria_dialog_name_default }); -var UIStrings30, str_11, AriaDialogName, aria_dialog_name_default; +var UIStrings31, str_11, AriaDialogName, aria_dialog_name_default; var init_aria_dialog_name = __esm({ "core/audits/accessibility/aria-dialog-name.js"() { "use strict"; @@ -37301,7 +37725,7 @@ var init_aria_dialog_name = __esm({ * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings30 = { + UIStrings31 = { /** Title of an accessibility audit that evaluates if ARIA dialog elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: 'Elements with `role="dialog"` or `role="alertdialog"` have accessible names.', /** Title of an accessibility audit that evaluates if ARIA dialog elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37309,7 +37733,7 @@ var init_aria_dialog_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for ARIA dialog elements. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "ARIA dialog elements without accessible names may prevent screen readers users from discerning the purpose of these elements. [Learn how to make ARIA dialog elements more accessible](https://dequeuniversity.com/rules/axe/4.11/aria-dialog-name)." }; - str_11 = createIcuMessageFn({ url: "core/audits/accessibility/aria-dialog-name.js" }.url, UIStrings30); + str_11 = createIcuMessageFn({ url: "core/audits/accessibility/aria-dialog-name.js" }.url, UIStrings31); AriaDialogName = class extends axe_audit_default { static { __name(this, "AriaDialogName"); @@ -37320,9 +37744,9 @@ var init_aria_dialog_name = __esm({ static get meta() { return { id: "aria-dialog-name", - title: str_11(UIStrings30.title), - failureTitle: str_11(UIStrings30.failureTitle), - description: str_11(UIStrings30.description), + title: str_11(UIStrings31.title), + failureTitle: str_11(UIStrings31.failureTitle), + description: str_11(UIStrings31.description), requiredArtifacts: ["Accessibility"] }; } @@ -37334,10 +37758,10 @@ var init_aria_dialog_name = __esm({ // core/audits/accessibility/aria-hidden-body.js var aria_hidden_body_exports = {}; __export(aria_hidden_body_exports, { - UIStrings: () => UIStrings31, + UIStrings: () => UIStrings32, default: () => aria_hidden_body_default }); -var UIStrings31, str_12, AriaHiddenBody, aria_hidden_body_default; +var UIStrings32, str_12, AriaHiddenBody, aria_hidden_body_default; var init_aria_hidden_body = __esm({ "core/audits/accessibility/aria-hidden-body.js"() { "use strict"; @@ -37349,7 +37773,7 @@ var init_aria_hidden_body = __esm({ * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings31 = { + UIStrings32 = { /** Title of an accessibility audit that checks if the html element does not have an aria-hidden attribute set on it. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: '`[aria-hidden="true"]` is not present on the document ``', /** Title of an accessibility audit that checks if the html element does not have an aria-hidden attribute set on it. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37357,7 +37781,7 @@ var init_aria_hidden_body = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: 'Assistive technologies, like screen readers, work inconsistently when `aria-hidden="true"` is set on the document ``. [Learn how `aria-hidden` affects the document body](https://dequeuniversity.com/rules/axe/4.11/aria-hidden-body).' }; - str_12 = createIcuMessageFn({ url: "core/audits/accessibility/aria-hidden-body.js" }.url, UIStrings31); + str_12 = createIcuMessageFn({ url: "core/audits/accessibility/aria-hidden-body.js" }.url, UIStrings32); AriaHiddenBody = class extends axe_audit_default { static { __name(this, "AriaHiddenBody"); @@ -37368,9 +37792,9 @@ var init_aria_hidden_body = __esm({ static get meta() { return { id: "aria-hidden-body", - title: str_12(UIStrings31.title), - failureTitle: str_12(UIStrings31.failureTitle), - description: str_12(UIStrings31.description), + title: str_12(UIStrings32.title), + failureTitle: str_12(UIStrings32.failureTitle), + description: str_12(UIStrings32.description), requiredArtifacts: ["Accessibility"] }; } @@ -37382,10 +37806,10 @@ var init_aria_hidden_body = __esm({ // core/audits/accessibility/aria-hidden-focus.js var aria_hidden_focus_exports = {}; __export(aria_hidden_focus_exports, { - UIStrings: () => UIStrings32, + UIStrings: () => UIStrings33, default: () => aria_hidden_focus_default }); -var UIStrings32, str_13, AriaHiddenFocus, aria_hidden_focus_default; +var UIStrings33, str_13, AriaHiddenFocus, aria_hidden_focus_default; var init_aria_hidden_focus = __esm({ "core/audits/accessibility/aria-hidden-focus.js"() { "use strict"; @@ -37397,7 +37821,7 @@ var init_aria_hidden_focus = __esm({ * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings32 = { + UIStrings33 = { /** Title of an accessibility audit that checks if all elements that have an aria-hidden attribute do not contain focusable descendent elements. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: '`[aria-hidden="true"]` elements do not contain focusable descendents', /** Title of an accessibility audit that checks if all elements that have an aria-hidden attribute do not contain focusable descendent elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37405,7 +37829,7 @@ var init_aria_hidden_focus = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: 'Focusable descendents within an `[aria-hidden="true"]` element prevent those interactive elements from being available to users of assistive technologies like screen readers. [Learn how `aria-hidden` affects focusable elements](https://dequeuniversity.com/rules/axe/4.11/aria-hidden-focus).' }; - str_13 = createIcuMessageFn({ url: "core/audits/accessibility/aria-hidden-focus.js" }.url, UIStrings32); + str_13 = createIcuMessageFn({ url: "core/audits/accessibility/aria-hidden-focus.js" }.url, UIStrings33); AriaHiddenFocus = class extends axe_audit_default { static { __name(this, "AriaHiddenFocus"); @@ -37416,9 +37840,9 @@ var init_aria_hidden_focus = __esm({ static get meta() { return { id: "aria-hidden-focus", - title: str_13(UIStrings32.title), - failureTitle: str_13(UIStrings32.failureTitle), - description: str_13(UIStrings32.description), + title: str_13(UIStrings33.title), + failureTitle: str_13(UIStrings33.failureTitle), + description: str_13(UIStrings33.description), requiredArtifacts: ["Accessibility"] }; } @@ -37430,10 +37854,10 @@ var init_aria_hidden_focus = __esm({ // core/audits/accessibility/aria-input-field-name.js var aria_input_field_name_exports = {}; __export(aria_input_field_name_exports, { - UIStrings: () => UIStrings33, + UIStrings: () => UIStrings34, default: () => aria_input_field_name_default }); -var UIStrings33, str_14, AriaInputFieldName, aria_input_field_name_default; +var UIStrings34, str_14, AriaInputFieldName, aria_input_field_name_default; var init_aria_input_field_name = __esm({ "core/audits/accessibility/aria-input-field-name.js"() { "use strict"; @@ -37445,7 +37869,7 @@ var init_aria_input_field_name = __esm({ * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings33 = { + UIStrings34 = { /** Title of an accessibility audit that checks that all ARIA input fields have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "ARIA input fields have accessible names", /** Title of an accessibility audit that checks that all ARIA input fields have an accessible name. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37453,7 +37877,7 @@ var init_aria_input_field_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "When an input field doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about input field labels](https://dequeuniversity.com/rules/axe/4.11/aria-input-field-name)." }; - str_14 = createIcuMessageFn({ url: "core/audits/accessibility/aria-input-field-name.js" }.url, UIStrings33); + str_14 = createIcuMessageFn({ url: "core/audits/accessibility/aria-input-field-name.js" }.url, UIStrings34); AriaInputFieldName = class extends axe_audit_default { static { __name(this, "AriaInputFieldName"); @@ -37464,9 +37888,9 @@ var init_aria_input_field_name = __esm({ static get meta() { return { id: "aria-input-field-name", - title: str_14(UIStrings33.title), - failureTitle: str_14(UIStrings33.failureTitle), - description: str_14(UIStrings33.description), + title: str_14(UIStrings34.title), + failureTitle: str_14(UIStrings34.failureTitle), + description: str_14(UIStrings34.description), requiredArtifacts: ["Accessibility"] }; } @@ -37478,10 +37902,10 @@ var init_aria_input_field_name = __esm({ // core/audits/accessibility/aria-meter-name.js var aria_meter_name_exports = {}; __export(aria_meter_name_exports, { - UIStrings: () => UIStrings34, + UIStrings: () => UIStrings35, default: () => aria_meter_name_default }); -var UIStrings34, str_15, AriaMeterName, aria_meter_name_default; +var UIStrings35, str_15, AriaMeterName, aria_meter_name_default; var init_aria_meter_name = __esm({ "core/audits/accessibility/aria-meter-name.js"() { "use strict"; @@ -37493,7 +37917,7 @@ var init_aria_meter_name = __esm({ * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings34 = { + UIStrings35 = { /** Title of an accessibility audit that evaluates if meter HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "ARIA `meter` elements have accessible names", /** Title of an accessibility audit that evaluates if meter HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37501,7 +37925,7 @@ var init_aria_meter_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML 'meter' elements. This is displayed after a user expands the section to see more. No character length limits. 'Learn how...' becomes link text to additional documentation. */ description: "When a meter element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to name `meter` elements](https://dequeuniversity.com/rules/axe/4.11/aria-meter-name)." }; - str_15 = createIcuMessageFn({ url: "core/audits/accessibility/aria-meter-name.js" }.url, UIStrings34); + str_15 = createIcuMessageFn({ url: "core/audits/accessibility/aria-meter-name.js" }.url, UIStrings35); AriaMeterName = class extends axe_audit_default { static { __name(this, "AriaMeterName"); @@ -37512,9 +37936,9 @@ var init_aria_meter_name = __esm({ static get meta() { return { id: "aria-meter-name", - title: str_15(UIStrings34.title), - failureTitle: str_15(UIStrings34.failureTitle), - description: str_15(UIStrings34.description), + title: str_15(UIStrings35.title), + failureTitle: str_15(UIStrings35.failureTitle), + description: str_15(UIStrings35.description), requiredArtifacts: ["Accessibility"] }; } @@ -37526,10 +37950,10 @@ var init_aria_meter_name = __esm({ // core/audits/accessibility/aria-progressbar-name.js var aria_progressbar_name_exports = {}; __export(aria_progressbar_name_exports, { - UIStrings: () => UIStrings35, + UIStrings: () => UIStrings36, default: () => aria_progressbar_name_default }); -var UIStrings35, str_16, AriaProgressbarName, aria_progressbar_name_default; +var UIStrings36, str_16, AriaProgressbarName, aria_progressbar_name_default; var init_aria_progressbar_name = __esm({ "core/audits/accessibility/aria-progressbar-name.js"() { "use strict"; @@ -37541,7 +37965,7 @@ var init_aria_progressbar_name = __esm({ * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings35 = { + UIStrings36 = { /** Title of an accessibility audit that evaluates if progressbar HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "ARIA `progressbar` elements have accessible names", /** Title of an accessibility audit that evaluates if progressbar HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37549,7 +37973,7 @@ var init_aria_progressbar_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "When a `progressbar` element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to label `progressbar` elements](https://dequeuniversity.com/rules/axe/4.11/aria-progressbar-name)." }; - str_16 = createIcuMessageFn({ url: "core/audits/accessibility/aria-progressbar-name.js" }.url, UIStrings35); + str_16 = createIcuMessageFn({ url: "core/audits/accessibility/aria-progressbar-name.js" }.url, UIStrings36); AriaProgressbarName = class extends axe_audit_default { static { __name(this, "AriaProgressbarName"); @@ -37560,9 +37984,9 @@ var init_aria_progressbar_name = __esm({ static get meta() { return { id: "aria-progressbar-name", - title: str_16(UIStrings35.title), - failureTitle: str_16(UIStrings35.failureTitle), - description: str_16(UIStrings35.description), + title: str_16(UIStrings36.title), + failureTitle: str_16(UIStrings36.failureTitle), + description: str_16(UIStrings36.description), requiredArtifacts: ["Accessibility"] }; } @@ -37574,10 +37998,10 @@ var init_aria_progressbar_name = __esm({ // core/audits/accessibility/aria-prohibited-attr.js var aria_prohibited_attr_exports = {}; __export(aria_prohibited_attr_exports, { - UIStrings: () => UIStrings36, + UIStrings: () => UIStrings37, default: () => aria_prohibited_attr_default }); -var UIStrings36, str_17, AriaProhibitedAttr, aria_prohibited_attr_default; +var UIStrings37, str_17, AriaProhibitedAttr, aria_prohibited_attr_default; var init_aria_prohibited_attr = __esm({ "core/audits/accessibility/aria-prohibited-attr.js"() { "use strict"; @@ -37589,7 +38013,7 @@ var init_aria_prohibited_attr = __esm({ * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings36 = { + UIStrings37 = { /** Title of an accessibility audit that checks if elements use prohibited ARIA attributes. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "Elements use only permitted ARIA attributes", /** Title of an accessibility audit that checks if elements use prohibited ARIA attributes. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37597,7 +38021,7 @@ var init_aria_prohibited_attr = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Using ARIA attributes in roles where they are prohibited can mean that important information is not communicated to users of assistive technologies. [Learn more about prohibited ARIA roles](https://dequeuniversity.com/rules/axe/4.11/aria-prohibited-attr)." }; - str_17 = createIcuMessageFn({ url: "core/audits/accessibility/aria-prohibited-attr.js" }.url, UIStrings36); + str_17 = createIcuMessageFn({ url: "core/audits/accessibility/aria-prohibited-attr.js" }.url, UIStrings37); AriaProhibitedAttr = class extends axe_audit_default { static { __name(this, "AriaProhibitedAttr"); @@ -37608,9 +38032,9 @@ var init_aria_prohibited_attr = __esm({ static get meta() { return { id: "aria-prohibited-attr", - title: str_17(UIStrings36.title), - failureTitle: str_17(UIStrings36.failureTitle), - description: str_17(UIStrings36.description), + title: str_17(UIStrings37.title), + failureTitle: str_17(UIStrings37.failureTitle), + description: str_17(UIStrings37.description), requiredArtifacts: ["Accessibility"] }; } @@ -37622,10 +38046,10 @@ var init_aria_prohibited_attr = __esm({ // core/audits/accessibility/aria-required-attr.js var aria_required_attr_exports = {}; __export(aria_required_attr_exports, { - UIStrings: () => UIStrings37, + UIStrings: () => UIStrings38, default: () => aria_required_attr_default }); -var UIStrings37, str_18, ARIARequiredAttr, aria_required_attr_default; +var UIStrings38, str_18, ARIARequiredAttr, aria_required_attr_default; var init_aria_required_attr = __esm({ "core/audits/accessibility/aria-required-attr.js"() { "use strict"; @@ -37637,7 +38061,7 @@ var init_aria_required_attr = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings37 = { + UIStrings38 = { /** Title of an accessibility audit that evaluates if all elements with the aria-role attribute have the other corresponding ARIA attributes set as well. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`[role]`s have all required `[aria-*]` attributes", /** Title of an accessibility audit that evaluates if all elements with the aria-role attribute have the other corresponding ARIA attributes set as well. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37645,7 +38069,7 @@ var init_aria_required_attr = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Some ARIA roles have required attributes that describe the state of the element to screen readers. [Learn more about roles and required attributes](https://dequeuniversity.com/rules/axe/4.11/aria-required-attr)." }; - str_18 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-attr.js" }.url, UIStrings37); + str_18 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-attr.js" }.url, UIStrings38); ARIARequiredAttr = class extends axe_audit_default { static { __name(this, "ARIARequiredAttr"); @@ -37656,9 +38080,9 @@ var init_aria_required_attr = __esm({ static get meta() { return { id: "aria-required-attr", - title: str_18(UIStrings37.title), - failureTitle: str_18(UIStrings37.failureTitle), - description: str_18(UIStrings37.description), + title: str_18(UIStrings38.title), + failureTitle: str_18(UIStrings38.failureTitle), + description: str_18(UIStrings38.description), requiredArtifacts: ["Accessibility"] }; } @@ -37670,10 +38094,10 @@ var init_aria_required_attr = __esm({ // core/audits/accessibility/aria-required-children.js var aria_required_children_exports = {}; __export(aria_required_children_exports, { - UIStrings: () => UIStrings38, + UIStrings: () => UIStrings39, default: () => aria_required_children_default }); -var UIStrings38, str_19, AriaRequiredChildren, aria_required_children_default; +var UIStrings39, str_19, AriaRequiredChildren, aria_required_children_default; var init_aria_required_children = __esm({ "core/audits/accessibility/aria-required-children.js"() { "use strict"; @@ -37685,7 +38109,7 @@ var init_aria_required_children = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings38 = { + UIStrings39 = { /** Title of an accessibility audit that evaluates if the elements with an aria-role that require child elements have the required children. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "Elements with an ARIA `[role]` that require children to contain a specific `[role]` have all required children.", /** Title of an accessibility audit that evaluates if the elements with an aria-role that require child elements have the required children. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37693,7 +38117,7 @@ var init_aria_required_children = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions. [Learn more about roles and required children elements](https://dequeuniversity.com/rules/axe/4.11/aria-required-children)." }; - str_19 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-children.js" }.url, UIStrings38); + str_19 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-children.js" }.url, UIStrings39); AriaRequiredChildren = class extends axe_audit_default { static { __name(this, "AriaRequiredChildren"); @@ -37704,9 +38128,9 @@ var init_aria_required_children = __esm({ static get meta() { return { id: "aria-required-children", - title: str_19(UIStrings38.title), - failureTitle: str_19(UIStrings38.failureTitle), - description: str_19(UIStrings38.description), + title: str_19(UIStrings39.title), + failureTitle: str_19(UIStrings39.failureTitle), + description: str_19(UIStrings39.description), requiredArtifacts: ["Accessibility"] }; } @@ -37718,10 +38142,10 @@ var init_aria_required_children = __esm({ // core/audits/accessibility/aria-required-parent.js var aria_required_parent_exports = {}; __export(aria_required_parent_exports, { - UIStrings: () => UIStrings39, + UIStrings: () => UIStrings40, default: () => aria_required_parent_default }); -var UIStrings39, str_20, AriaRequiredParent, aria_required_parent_default; +var UIStrings40, str_20, AriaRequiredParent, aria_required_parent_default; var init_aria_required_parent = __esm({ "core/audits/accessibility/aria-required-parent.js"() { "use strict"; @@ -37733,7 +38157,7 @@ var init_aria_required_parent = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings39 = { + UIStrings40 = { /** Title of an accessibility audit that evaluates valid aria-role usage. Some ARIA roles require that elements must be a child of specific parent element. This audit checks that when those roles are used, the element with the role is in fact a child of the required parent. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`[role]`s are contained by their required parent element", /** Title of an accessibility audit that evaluates valid aria-role usage. Some ARIA roles require that elements must be a child of specific parent element. This audit checks that when those roles are used, the element with the role is in fact a child of the required parent. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37741,7 +38165,7 @@ var init_aria_required_parent = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Some ARIA child roles must be contained by specific parent roles to properly perform their intended accessibility functions. [Learn more about ARIA roles and required parent element](https://dequeuniversity.com/rules/axe/4.11/aria-required-parent)." }; - str_20 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-parent.js" }.url, UIStrings39); + str_20 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-parent.js" }.url, UIStrings40); AriaRequiredParent = class extends axe_audit_default { static { __name(this, "AriaRequiredParent"); @@ -37752,9 +38176,9 @@ var init_aria_required_parent = __esm({ static get meta() { return { id: "aria-required-parent", - title: str_20(UIStrings39.title), - failureTitle: str_20(UIStrings39.failureTitle), - description: str_20(UIStrings39.description), + title: str_20(UIStrings40.title), + failureTitle: str_20(UIStrings40.failureTitle), + description: str_20(UIStrings40.description), requiredArtifacts: ["Accessibility"] }; } @@ -37766,10 +38190,10 @@ var init_aria_required_parent = __esm({ // core/audits/accessibility/aria-roles.js var aria_roles_exports = {}; __export(aria_roles_exports, { - UIStrings: () => UIStrings40, + UIStrings: () => UIStrings41, default: () => aria_roles_default }); -var UIStrings40, str_21, AriaRoles, aria_roles_default; +var UIStrings41, str_21, AriaRoles, aria_roles_default; var init_aria_roles = __esm({ "core/audits/accessibility/aria-roles.js"() { "use strict"; @@ -37781,7 +38205,7 @@ var init_aria_roles = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings40 = { + UIStrings41 = { /** Title of an accessibility audit that evaluates if all elements have valid aria-role HTML attributes. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`[role]` values are valid", /** Title of an accessibility audit that evaluates if all elements have valid aria-role HTML attributes. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37789,7 +38213,7 @@ var init_aria_roles = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "ARIA roles must have valid values in order to perform their intended accessibility functions. [Learn more about valid ARIA roles](https://dequeuniversity.com/rules/axe/4.11/aria-roles)." }; - str_21 = createIcuMessageFn({ url: "core/audits/accessibility/aria-roles.js" }.url, UIStrings40); + str_21 = createIcuMessageFn({ url: "core/audits/accessibility/aria-roles.js" }.url, UIStrings41); AriaRoles = class extends axe_audit_default { static { __name(this, "AriaRoles"); @@ -37800,9 +38224,9 @@ var init_aria_roles = __esm({ static get meta() { return { id: "aria-roles", - title: str_21(UIStrings40.title), - failureTitle: str_21(UIStrings40.failureTitle), - description: str_21(UIStrings40.description), + title: str_21(UIStrings41.title), + failureTitle: str_21(UIStrings41.failureTitle), + description: str_21(UIStrings41.description), requiredArtifacts: ["Accessibility"] }; } @@ -37814,10 +38238,10 @@ var init_aria_roles = __esm({ // core/audits/accessibility/aria-text.js var aria_text_exports = {}; __export(aria_text_exports, { - UIStrings: () => UIStrings41, + UIStrings: () => UIStrings42, default: () => aria_text_default }); -var UIStrings41, str_22, AriaText, aria_text_default; +var UIStrings42, str_22, AriaText, aria_text_default; var init_aria_text = __esm({ "core/audits/accessibility/aria-text.js"() { "use strict"; @@ -37829,7 +38253,7 @@ var init_aria_text = __esm({ * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings41 = { + UIStrings42 = { /** Title of an accessibility audit that evaluates if elements with `role=text` have no focusable descendents. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "Elements with the `role=text` attribute do not have focusable descendents.", /** Title of an accessibility audit that evaluates if elements with `role=text` have focusable descendents. This title is descriptive of the successful state and is shown to users when no user action is required. */ @@ -37837,7 +38261,7 @@ var init_aria_text = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Adding `role=text` around a text node split by markup enables VoiceOver to treat it as one phrase, but the element's focusable descendents will not be announced. [Learn more about the `role=text` attribute](https://dequeuniversity.com/rules/axe/4.11/aria-text)." }; - str_22 = createIcuMessageFn({ url: "core/audits/accessibility/aria-text.js" }.url, UIStrings41); + str_22 = createIcuMessageFn({ url: "core/audits/accessibility/aria-text.js" }.url, UIStrings42); AriaText = class extends axe_audit_default { static { __name(this, "AriaText"); @@ -37848,9 +38272,9 @@ var init_aria_text = __esm({ static get meta() { return { id: "aria-text", - title: str_22(UIStrings41.title), - failureTitle: str_22(UIStrings41.failureTitle), - description: str_22(UIStrings41.description), + title: str_22(UIStrings42.title), + failureTitle: str_22(UIStrings42.failureTitle), + description: str_22(UIStrings42.description), requiredArtifacts: ["Accessibility"] }; } @@ -37862,10 +38286,10 @@ var init_aria_text = __esm({ // core/audits/accessibility/aria-toggle-field-name.js var aria_toggle_field_name_exports = {}; __export(aria_toggle_field_name_exports, { - UIStrings: () => UIStrings42, + UIStrings: () => UIStrings43, default: () => aria_toggle_field_name_default }); -var UIStrings42, str_23, AriaToggleFieldName, aria_toggle_field_name_default; +var UIStrings43, str_23, AriaToggleFieldName, aria_toggle_field_name_default; var init_aria_toggle_field_name = __esm({ "core/audits/accessibility/aria-toggle-field-name.js"() { "use strict"; @@ -37877,7 +38301,7 @@ var init_aria_toggle_field_name = __esm({ * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings42 = { + UIStrings43 = { /** Title of an accessibility audit that checks that all ARIA toggle fields have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "ARIA toggle fields have accessible names", /** Title of an accessibility audit that checks that all ARIA toggle fields have an accessible name. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37885,7 +38309,7 @@ var init_aria_toggle_field_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "When a toggle field doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about toggle fields](https://dequeuniversity.com/rules/axe/4.11/aria-toggle-field-name)." }; - str_23 = createIcuMessageFn({ url: "core/audits/accessibility/aria-toggle-field-name.js" }.url, UIStrings42); + str_23 = createIcuMessageFn({ url: "core/audits/accessibility/aria-toggle-field-name.js" }.url, UIStrings43); AriaToggleFieldName = class extends axe_audit_default { static { __name(this, "AriaToggleFieldName"); @@ -37896,9 +38320,9 @@ var init_aria_toggle_field_name = __esm({ static get meta() { return { id: "aria-toggle-field-name", - title: str_23(UIStrings42.title), - failureTitle: str_23(UIStrings42.failureTitle), - description: str_23(UIStrings42.description), + title: str_23(UIStrings43.title), + failureTitle: str_23(UIStrings43.failureTitle), + description: str_23(UIStrings43.description), requiredArtifacts: ["Accessibility"] }; } @@ -37910,10 +38334,10 @@ var init_aria_toggle_field_name = __esm({ // core/audits/accessibility/aria-tooltip-name.js var aria_tooltip_name_exports = {}; __export(aria_tooltip_name_exports, { - UIStrings: () => UIStrings43, + UIStrings: () => UIStrings44, default: () => aria_tooltip_name_default }); -var UIStrings43, str_24, AriaTooltipName, aria_tooltip_name_default; +var UIStrings44, str_24, AriaTooltipName, aria_tooltip_name_default; var init_aria_tooltip_name = __esm({ "core/audits/accessibility/aria-tooltip-name.js"() { "use strict"; @@ -37925,7 +38349,7 @@ var init_aria_tooltip_name = __esm({ * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings43 = { + UIStrings44 = { /** Title of an accessibility audit that evaluates if tooltip HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "ARIA `tooltip` elements have accessible names", /** Title of an accessibility audit that evaluates if tooltip HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37933,7 +38357,7 @@ var init_aria_tooltip_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML 'tooltip' elements. This is displayed after a user expands the section to see more. No character length limits. 'Learn how...' becomes link text to additional documentation. */ description: "When a tooltip element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to name `tooltip` elements](https://dequeuniversity.com/rules/axe/4.11/aria-tooltip-name)." }; - str_24 = createIcuMessageFn({ url: "core/audits/accessibility/aria-tooltip-name.js" }.url, UIStrings43); + str_24 = createIcuMessageFn({ url: "core/audits/accessibility/aria-tooltip-name.js" }.url, UIStrings44); AriaTooltipName = class extends axe_audit_default { static { __name(this, "AriaTooltipName"); @@ -37944,9 +38368,9 @@ var init_aria_tooltip_name = __esm({ static get meta() { return { id: "aria-tooltip-name", - title: str_24(UIStrings43.title), - failureTitle: str_24(UIStrings43.failureTitle), - description: str_24(UIStrings43.description), + title: str_24(UIStrings44.title), + failureTitle: str_24(UIStrings44.failureTitle), + description: str_24(UIStrings44.description), requiredArtifacts: ["Accessibility"] }; } @@ -37958,10 +38382,10 @@ var init_aria_tooltip_name = __esm({ // core/audits/accessibility/aria-treeitem-name.js var aria_treeitem_name_exports = {}; __export(aria_treeitem_name_exports, { - UIStrings: () => UIStrings44, + UIStrings: () => UIStrings45, default: () => aria_treeitem_name_default }); -var UIStrings44, str_25, AriaTreeitemName, aria_treeitem_name_default; +var UIStrings45, str_25, AriaTreeitemName, aria_treeitem_name_default; var init_aria_treeitem_name = __esm({ "core/audits/accessibility/aria-treeitem-name.js"() { "use strict"; @@ -37973,7 +38397,7 @@ var init_aria_treeitem_name = __esm({ * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings44 = { + UIStrings45 = { /** Title of an accessibility audit that evaluates if treeitem HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "ARIA `treeitem` elements have accessible names", /** Title of an accessibility audit that evaluates if treeitem HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -37981,7 +38405,7 @@ var init_aria_treeitem_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML elements. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "When a `treeitem` element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about labeling `treeitem` elements](https://dequeuniversity.com/rules/axe/4.11/aria-treeitem-name)." }; - str_25 = createIcuMessageFn({ url: "core/audits/accessibility/aria-treeitem-name.js" }.url, UIStrings44); + str_25 = createIcuMessageFn({ url: "core/audits/accessibility/aria-treeitem-name.js" }.url, UIStrings45); AriaTreeitemName = class extends axe_audit_default { static { __name(this, "AriaTreeitemName"); @@ -37992,9 +38416,9 @@ var init_aria_treeitem_name = __esm({ static get meta() { return { id: "aria-treeitem-name", - title: str_25(UIStrings44.title), - failureTitle: str_25(UIStrings44.failureTitle), - description: str_25(UIStrings44.description), + title: str_25(UIStrings45.title), + failureTitle: str_25(UIStrings45.failureTitle), + description: str_25(UIStrings45.description), requiredArtifacts: ["Accessibility"] }; } @@ -38006,10 +38430,10 @@ var init_aria_treeitem_name = __esm({ // core/audits/accessibility/aria-valid-attr-value.js var aria_valid_attr_value_exports = {}; __export(aria_valid_attr_value_exports, { - UIStrings: () => UIStrings45, + UIStrings: () => UIStrings46, default: () => aria_valid_attr_value_default }); -var UIStrings45, str_26, ARIAValidAttr, aria_valid_attr_value_default; +var UIStrings46, str_26, ARIAValidAttr, aria_valid_attr_value_default; var init_aria_valid_attr_value = __esm({ "core/audits/accessibility/aria-valid-attr-value.js"() { "use strict"; @@ -38021,7 +38445,7 @@ var init_aria_valid_attr_value = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings45 = { + UIStrings46 = { /** Title of an accessibility audit that evaluates if all elements that have an ARIA HTML attribute have a valid value for that attribute. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`[aria-*]` attributes have valid values", /** Title of an accessibility audit that evaluates if all elements that have an ARIA HTML attribute have a valid value for that attribute. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -38029,7 +38453,7 @@ var init_aria_valid_attr_value = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid values. [Learn more about valid values for ARIA attributes](https://dequeuniversity.com/rules/axe/4.11/aria-valid-attr-value)." }; - str_26 = createIcuMessageFn({ url: "core/audits/accessibility/aria-valid-attr-value.js" }.url, UIStrings45); + str_26 = createIcuMessageFn({ url: "core/audits/accessibility/aria-valid-attr-value.js" }.url, UIStrings46); ARIAValidAttr = class extends axe_audit_default { static { __name(this, "ARIAValidAttr"); @@ -38040,9 +38464,9 @@ var init_aria_valid_attr_value = __esm({ static get meta() { return { id: "aria-valid-attr-value", - title: str_26(UIStrings45.title), - failureTitle: str_26(UIStrings45.failureTitle), - description: str_26(UIStrings45.description), + title: str_26(UIStrings46.title), + failureTitle: str_26(UIStrings46.failureTitle), + description: str_26(UIStrings46.description), requiredArtifacts: ["Accessibility"] }; } @@ -38054,10 +38478,10 @@ var init_aria_valid_attr_value = __esm({ // core/audits/accessibility/aria-valid-attr.js var aria_valid_attr_exports = {}; __export(aria_valid_attr_exports, { - UIStrings: () => UIStrings46, + UIStrings: () => UIStrings47, default: () => aria_valid_attr_default }); -var UIStrings46, str_27, ARIAValidAttr2, aria_valid_attr_default; +var UIStrings47, str_27, ARIAValidAttr2, aria_valid_attr_default; var init_aria_valid_attr = __esm({ "core/audits/accessibility/aria-valid-attr.js"() { "use strict"; @@ -38069,7 +38493,7 @@ var init_aria_valid_attr = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings46 = { + UIStrings47 = { /** Title of an accessibility audit that evaluates if all elements with ARIA HTML attributes have spelled the name of attribute correctly. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`[aria-*]` attributes are valid and not misspelled", /** Title of an accessibility audit that evaluates if all elements with ARIA HTML attributes have spelled the name of attribute correctly. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -38077,7 +38501,7 @@ var init_aria_valid_attr = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid names. [Learn more about valid ARIA attributes](https://dequeuniversity.com/rules/axe/4.11/aria-valid-attr)." }; - str_27 = createIcuMessageFn({ url: "core/audits/accessibility/aria-valid-attr.js" }.url, UIStrings46); + str_27 = createIcuMessageFn({ url: "core/audits/accessibility/aria-valid-attr.js" }.url, UIStrings47); ARIAValidAttr2 = class extends axe_audit_default { static { __name(this, "ARIAValidAttr"); @@ -38088,9 +38512,9 @@ var init_aria_valid_attr = __esm({ static get meta() { return { id: "aria-valid-attr", - title: str_27(UIStrings46.title), - failureTitle: str_27(UIStrings46.failureTitle), - description: str_27(UIStrings46.description), + title: str_27(UIStrings47.title), + failureTitle: str_27(UIStrings47.failureTitle), + description: str_27(UIStrings47.description), requiredArtifacts: ["Accessibility"] }; } @@ -38099,13 +38523,61 @@ var init_aria_valid_attr = __esm({ } }); +// core/audits/accessibility/autocomplete-valid.js +var autocomplete_valid_exports = {}; +__export(autocomplete_valid_exports, { + UIStrings: () => UIStrings48, + default: () => autocomplete_valid_default +}); +var UIStrings48, str_28, AutocompleteValid, autocomplete_valid_default; +var init_autocomplete_valid = __esm({ + "core/audits/accessibility/autocomplete-valid.js"() { + "use strict"; + init_process_global(); + init_axe_audit(); + init_i18n(); + /** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + UIStrings48 = { + /** Title of an accessibility audit that evaluates if all form fields have valid autocomplete attributes. This title is descriptive of the successful state and is shown to users when no user action is required. */ + title: "`autocomplete` attributes are used correctly", + /** Title of an accessibility audit that evaluates if all form fields have valid autocomplete attributes. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ + failureTitle: "`autocomplete` attributes are not used correctly", + /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ + description: "The `autocomplete` attribute values must be valid and correctly applied for screen readers to function correctly. [Learn more about valid autocomplete values](https://dequeuniversity.com/rules/axe/4.11/autocomplete-valid)." + }; + str_28 = createIcuMessageFn({ url: "core/audits/accessibility/autocomplete-valid.js" }.url, UIStrings48); + AutocompleteValid = class extends axe_audit_default { + static { + __name(this, "AutocompleteValid"); + } + /** + * @return {LH.Audit.Meta} + */ + static get meta() { + return { + id: "autocomplete-valid", + title: str_28(UIStrings48.title), + failureTitle: str_28(UIStrings48.failureTitle), + description: str_28(UIStrings48.description), + requiredArtifacts: ["Accessibility"] + }; + } + }; + autocomplete_valid_default = AutocompleteValid; + } +}); + // core/audits/accessibility/button-name.js var button_name_exports = {}; __export(button_name_exports, { - UIStrings: () => UIStrings47, + UIStrings: () => UIStrings49, default: () => button_name_default }); -var UIStrings47, str_28, ButtonName, button_name_default; +var UIStrings49, str_29, ButtonName, button_name_default; var init_button_name = __esm({ "core/audits/accessibility/button-name.js"() { "use strict"; @@ -38117,7 +38589,7 @@ var init_button_name = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings47 = { + UIStrings49 = { /** Title of an accessibility audit that evaluates if all button elements have names accessible to screen readers. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "Buttons have an accessible name", /** Title of an accessibility audit that evaluates if all button elements have names accessible to screen readers. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -38125,7 +38597,7 @@ var init_button_name = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: `When a button doesn't have an accessible name, screen readers announce it as "button", making it unusable for users who rely on screen readers. [Learn how to make buttons more accessible](https://dequeuniversity.com/rules/axe/4.11/button-name).` }; - str_28 = createIcuMessageFn({ url: "core/audits/accessibility/button-name.js" }.url, UIStrings47); + str_29 = createIcuMessageFn({ url: "core/audits/accessibility/button-name.js" }.url, UIStrings49); ButtonName = class extends axe_audit_default { static { __name(this, "ButtonName"); @@ -38136,9 +38608,9 @@ var init_button_name = __esm({ static get meta() { return { id: "button-name", - title: str_28(UIStrings47.title), - failureTitle: str_28(UIStrings47.failureTitle), - description: str_28(UIStrings47.description), + title: str_29(UIStrings49.title), + failureTitle: str_29(UIStrings49.failureTitle), + description: str_29(UIStrings49.description), requiredArtifacts: ["Accessibility"] }; } @@ -38150,10 +38622,10 @@ var init_button_name = __esm({ // core/audits/accessibility/bypass.js var bypass_exports = {}; __export(bypass_exports, { - UIStrings: () => UIStrings48, + UIStrings: () => UIStrings50, default: () => bypass_default }); -var UIStrings48, str_29, Bypass, bypass_default; +var UIStrings50, str_30, Bypass, bypass_default; var init_bypass = __esm({ "core/audits/accessibility/bypass.js"() { "use strict"; @@ -38165,7 +38637,7 @@ var init_bypass = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings48 = { + UIStrings50 = { /** Title of an accessibility audit that evaluates if the page has elements that let screen reader users skip over repetitive content. `heading`, `skip link`, and `landmark region` are technical terms for the elements that enable quick page navigation. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "The page contains a heading, skip link, or landmark region", /** Title of an accessibility audit that evaluates if the page has elements that let screen reader users skip over repetitive content. `heading`, `skip link`, and `landmark region` are technical terms for the elements that enable quick page navigation. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -38173,7 +38645,7 @@ var init_bypass = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Adding ways to bypass repetitive content lets keyboard users navigate the page more efficiently. [Learn more about bypass blocks](https://dequeuniversity.com/rules/axe/4.11/bypass)." }; - str_29 = createIcuMessageFn({ url: "core/audits/accessibility/bypass.js" }.url, UIStrings48); + str_30 = createIcuMessageFn({ url: "core/audits/accessibility/bypass.js" }.url, UIStrings50); Bypass = class extends axe_audit_default { static { __name(this, "Bypass"); @@ -38184,9 +38656,9 @@ var init_bypass = __esm({ static get meta() { return { id: "bypass", - title: str_29(UIStrings48.title), - failureTitle: str_29(UIStrings48.failureTitle), - description: str_29(UIStrings48.description), + title: str_30(UIStrings50.title), + failureTitle: str_30(UIStrings50.failureTitle), + description: str_30(UIStrings50.description), scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE, requiredArtifacts: ["Accessibility"] }; @@ -38199,10 +38671,10 @@ var init_bypass = __esm({ // core/audits/accessibility/color-contrast.js var color_contrast_exports = {}; __export(color_contrast_exports, { - UIStrings: () => UIStrings49, + UIStrings: () => UIStrings51, default: () => color_contrast_default }); -var UIStrings49, str_30, ColorContrast, color_contrast_default; +var UIStrings51, str_31, ColorContrast, color_contrast_default; var init_color_contrast = __esm({ "core/audits/accessibility/color-contrast.js"() { "use strict"; @@ -38214,7 +38686,7 @@ var init_color_contrast = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings49 = { + UIStrings51 = { /** Title of an accessibility audit that evaluates if all foreground colors are distinct enough from their background colors to be legible for users. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "Background and foreground colors have a sufficient contrast ratio", /** Title of an accessibility audit that evaluates if all foreground colors are distinct enough from their background colors to be legible for users. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */ @@ -38222,7 +38694,7 @@ var init_color_contrast = __esm({ /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */ description: "Low-contrast text is difficult or impossible for many users to read. [Learn how to provide sufficient color contrast](https://dequeuniversity.com/rules/axe/4.11/color-contrast)." }; - str_30 = createIcuMessageFn({ url: "core/audits/accessibility/color-contrast.js" }.url, UIStrings49); + str_31 = createIcuMessageFn({ url: "core/audits/accessibility/color-contrast.js" }.url, UIStrings51); ColorContrast = class extends axe_audit_default { static { __name(this, "ColorContrast"); @@ -38233,9 +38705,9 @@ var init_color_contrast = __esm({ static get meta() { return { id: "color-contrast", - title: str_30(UIStrings49.title), - failureTitle: str_30(UIStrings49.failureTitle), - description: str_30(UIStrings49.description), + title: str_31(UIStrings51.title), + failureTitle: str_31(UIStrings51.failureTitle), + description: str_31(UIStrings51.description), requiredArtifacts: ["Accessibility"] }; } @@ -38247,10 +38719,10 @@ var init_color_contrast = __esm({ // core/audits/accessibility/definition-list.js var definition_list_exports = {}; __export(definition_list_exports, { - UIStrings: () => UIStrings50, + UIStrings: () => UIStrings52, default: () => definition_list_default }); -var UIStrings50, str_31, DefinitionList, definition_list_default; +var UIStrings52, str_32, DefinitionList, definition_list_default; var init_definition_list = __esm({ "core/audits/accessibility/definition-list.js"() { "use strict"; @@ -38262,7 +38734,7 @@ var init_definition_list = __esm({ * Copyright 2017 Google LLC * SPDX-License-Identifier: Apache-2.0 */ - UIStrings50 = { + UIStrings52 = { /** Title of an accessibility audit that evaluates if all the definition list elements have valid markup for screen readers. This title is descriptive of the successful state and is shown to users when no user action is required. */ title: "`
`'s contain only properly-ordered `
` and `
` groups, `