{"version":3,"file":"static/chunks/8714.c7c5e0f54a238e47.js","mappings":"yGAIA,IAAMA,EAAa,CACjBC,IAAK,CAAC,GAAK,IAAK,CAChBC,IAAK,CAAC,KAAM,IAAK,CACjBC,IAAK,CAAC,IAAK,IAAI,CACfC,IAAK,CAAC,KAAM,IAAK,CACjBC,KAAM,CAAC,IAAK,IAAI,EAYZC,EAAY,CAACC,EAAOC,IACxB,EAAYA,CAAS,CAAC,EAAE,CAAS,OAC7BD,EAAQC,CAAS,CAAC,EAAE,CAAS,KAC1B,MAkCTC,CAAAA,EAAA,QAtBwB,IACtB,GAAM,CAAEC,KAAAA,CAAI,CAAEH,MAAAA,CAAK,CAAE,CAAGI,EAExBC,SAAS,QAAS,KAEhB,IAAMC,EAAkB,CAAE,GAAGC,SAASC,UAAU,CAChDF,CAAAA,EAAgBG,OAAO,CAAG,CACxBN,KAAM,aACNO,QAAS,OACX,EAGAC,QAAQ,OAAQ,CACd,QAAS,oBACTC,WAAYC,OAAOV,GACnBW,OAAQf,EAAUC,EAAOP,CAAU,CAACU,EAAK,EACzCH,MAAOe,OAAOf,GACdQ,WAAYF,CACd,EACF,EACF","sources":["webpack://_N_E/./src/helpers/utils/cwv.js"],"sourcesContent":["/**\n * @module Core Web Vitals\n * @description Core Web Vitals Reporting\n */\nconst thresholds = {\n CLS: [0.1, 0.25],\n FCP: [1800, 3000],\n FID: [100, 300],\n LCP: [2500, 4000],\n TTFB: [100, 600],\n};\n\n/**\n * @function getRating\n * @description Get Core Web Vitals rating for each metric.\n * @see https://github.com/GoogleChromeLabs/web-vitals-report/blob/71b0879334798c732f460945ded5267cab5a36bf/src/js/analytics.js#L57-L65\n *\n * @param {Number} value\n * @param {Array} thresholds\n * @return {String}\n */\nconst getRating = (value, threshold) => {\n if (value > threshold[1]) return 'POOR';\n if (value > threshold[0]) return 'NI'; // NI == Needs Improvement\n return 'GOOD';\n};\n\n/**\n * @function sendToAnalytics\n * @description Track web vitals data via Tagular.\n * @see https://github.com/GoogleChrome/web-vitals#readme\n * @see https://app.make.rvapps.io/schemas/sch_1ofhDFwJqLfXE91RzyPPIFhuyt6\n *\n * @param {Object} metric { name, value }\n * @return {void}\n */\nconst sendToAnalytics = (metric) => {\n const { name, value } = metric;\n\n cohesion('ready', () => {\n // Copy the webContext object and add web-vitals library info.\n const modifiedContext = { ..._Tagular.webContext };\n modifiedContext.library = {\n name: 'web-vitals',\n version: '2.1.0',\n };\n\n // Beam the data to Make\n tagular('beam', {\n '@type': 'core.WebVitals.v1',\n metricName: String(name),\n rating: getRating(value, thresholds[name]),\n value: Number(value),\n webContext: modifiedContext,\n });\n });\n};\n\nexport default sendToAnalytics;\n"],"names":["thresholds","CLS","FCP","FID","LCP","TTFB","getRating","value","threshold","__webpack_exports__","name","metric","cohesion","modifiedContext","_Tagular","webContext","library","version","tagular","metricName","String","rating","Number"],"sourceRoot":""}