export const lcpHighlightScript: "\nreturn (function(color) {\n    const observer = new PerformanceObserver(list => {});\n    observer.observe({ type: 'largest-contentful-paint', buffered: true });\n    const entries = observer.takeRecords();\n    if (entries.length > 0) {\n        const largestEntry = entries[entries.length - 1];\n        // There could be cases where we do not get an element\n        if (largestEntry.element) {\n            const clientRect = largestEntry.element.getBoundingClientRect();\n\n            const canvas = document.createElement('canvas'); //Create a canvas element\n            canvas.style.width='100%';\n            canvas.style.height='100%';\n            canvas.width = window.innerWidth;\n            canvas.height = window.innerHeight;\n            canvas.style.position='absolute';\n            canvas.style.left=0;\n            canvas.style.top=0;\n            canvas.style.zIndex=2147483646;\n            canvas.id = \"browsertime-lcp\";\n            document.body.appendChild(canvas); \n            const context = canvas.getContext('2d');\n            context.rect(Math.max(0,clientRect.x), Math.max(0,clientRect.y), Math.min(clientRect.width, window.innerWidth - clientRect.x) , Math.min(clientRect.height, window.innerHeight-clientRect.y));\n            context.lineWidth = \"6\";\n            context.strokeStyle = color;\n            context.stroke();\n\n            context.fillStyle = color;\n            context.globalAlpha = 0.1;\n            context.rect(Math.max(0,clientRect.x), Math.max(0,clientRect.y), Math.min(clientRect.width, window.innerWidth - clientRect.x) , Math.min(clientRect.height, window.innerHeight-clientRect.y));\n            context.fill();\n            return '';\n        } else {\n            return 'No element attached to the entry in largest-contentful-paint';\n        }\n    } else {\n        return 'Chrome did not report any largest-contentful-paint';\n    }\n})(arguments[arguments.length - 1]);\n";
//# sourceMappingURL=lcpHighlightScript.d.ts.map