1&&void 0!==arguments[1]?arguments[1]:location,r=new URL(t.href);if(e)return r.searchParams&&r.searchParams.get?r.searchParams.get(e):m(e);var n,a={},i=f(r.searchParams.entries());try{for(i.s();!(n=i.n()).done;){var o=g()(n.value,2),c=o[0],s=o[1];a[c]=s}}catch(e){i.e(e)}finally{i.f()}return a},b=(r(86),r(67));function h(e){return e.replace(new RegExp("\\[([^\\]]+)\\]\\((https?://[^/]+\\.\\w+/?.*?)\\)","gi"),'$1')}function _(e){return"".concat(e.replace(/\n{2,}/g,"
"),"
")}function y(e){return e.replace(/\n/gi,"
")}function O(e){for(var t=e,r=0,n=[h,_,y];r0}function A(e){if("number"==typeof e)return!0;var t=(e||"").toString();return!!t&&!isNaN(t)}var N=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},S=function(e,t){if("0"===e||0===e||isNaN(e))return null;var r=(t-e)/e;return isNaN(r)||!Object(n.isFinite)(r)?null:r},D=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},P=function(e){if(!e)return"";var t=e.replace(/(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(n.unescape)(t)}},81:function(e,t,r){"use strict";r.d(t,"d",(function(){return n})),r.d(t,"f",(function(){return a})),r.d(t,"e",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return s})),r.d(t,"h",(function(){return l})),r.d(t,"g",(function(){return u}));var n="modules/pagespeed-insights",a="mobile",i="desktop",o="data_lab",c="data_field",s="data_recommendations",l="dashboardPageSpeedWidgetStrategy",u="dashboardPageSpeedWidgetDataSource"},82:function(e,t,r){"use strict";(function(e){var n=r(0),a=r.n(n),i=r(92),o=r(1),c=r(8);function ErrorText(t){var r=t.message,n=t.reconnectURL;if(!r)return null;var a=Object(o.sprintf)(
/* translators: %s: Error message */
Object(o.__)("Error: %s","google-site-kit"),r);n&&Object(i.a)(n)&&(a=a+" "+Object(o.sprintf)(
/* translators: %s: Reconnect URL */
Object(o.__)('To fix this, redo the plugin setup.',"google-site-kit"),n));return e.createElement("div",{className:"googlesitekit-error-text"},e.createElement("p",{dangerouslySetInnerHTML:Object(c.w)(a,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}))}ErrorText.propTypes={message:a.a.string.isRequired,reconnectURL:a.a.string},ErrorText.defaultProps={reconnectURL:""},t.a=ErrorText}).call(this,r(3))},84:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return i}));var n=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},a=function(e){return e.replace(/([a-z0-9]{1})([A-Z]{1})/g,"$1_$2").toUpperCase()};function i(e){return e.split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join("")}},86:function(e,t,r){"use strict";(function(e){r(49),r(51)}).call(this,r(25))},87:function(e,t,r){"use strict";(function(e){r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return c}));var n=r(178),a=r(65),i=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isNaN(Number(t)))return"";var i=r.invertColor,o=void 0!==i&&i;return Object(n.a)(e.createElement(a.a,{direction:t>0?"up":"down",invertColor:o}))},o=function(e){var t,r,n,a,i,o,c,s,l,u,d,g,f,p,m;if(void 0!==e)return 1===(null==e||null===(t=e[0])||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.rows)||void 0===n?void 0:n.length)||(null==e||null===(a=e[0])||void 0===a||null===(i=a.data)||void 0===i||null===(o=i.rows)||void 0===o||null===(c=o[0])||void 0===c||null===(s=c.metrics)||void 0===s||null===(l=s[0])||void 0===l||null===(u=l.values)||void 0===u?void 0:u[0])===(null==e||null===(d=e[0])||void 0===d||null===(g=d.data)||void 0===g||null===(f=g.totals)||void 0===f||null===(p=f[0])||void 0===p||null===(m=p.values)||void 0===m?void 0:m[0])},c=function(e,t){return e>0&&t>0?e/t-1:e>0?1:t>0?-1:0}}).call(this,r(3))},88:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return u}));var n=r(6),a=r.n(n),i=r(89),o=r(90);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,a=s(s({},l),t);a.referenceSiteURL&&(a.referenceSiteURL=a.referenceSiteURL.toString().replace(/\/+$/,""));var c=Object(i.a)(a,r);return{enableTracking:function(){a.trackingEnabled=!0},disableTracking:function(){a.trackingEnabled=!1},initializeSnippet:c,isTrackingEnabled:function(){return!!a.trackingEnabled},trackEvent:Object(o.a)(a,r,c,n)}}}).call(this,r(25))},89:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return i}));var n=r(57),a=r(32);function i(t,r){var i,o=Object(n.a)(r);return function(){var r=e.document;if(void 0===i&&(i=!!r.querySelector("script[".concat(a.b,"]"))),!i){var n=r.createElement("script");n.setAttribute(a.b,""),n.async=!0,n.src="https://www.googletagmanager.com/gtag/js?id=".concat(t.trackingID,"&l=").concat(a.a),r.head.appendChild(n),o("js",new Date),o("config",t.trackingID,{send_page_view:t.isSiteKitScreen}),i=!0}}}}).call(this,r(25))},90:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(5),a=r.n(n),i=r(6),o=r.n(i),c=r(17),s=r.n(c),l=r(57),u=r(38);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.strategy,r=e.url;L()(Object(x.a)(r),"a valid url is required to fetch a report."),L()("string"==typeof t,"a valid strategy is required to fetch a report.")}}),Y={getReport:P.a.mark((function e(t,r){return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,V.actions.fetchGetReport(t,r);case 4:case"end":return e.stop()}}),e)}))},K={getReport:function(e,t,r){return e.reports["".concat(r,"::").concat(t)]},getAudits:q((function(e){return function(t,r,n){var a=e(S.d).getReport(r,n);if(void 0!==a){var i=((a||{}).lighthouseResult||{}).audits;return i||{}}}})),getAuditsWithStackPack:q((function(e){return function(t,r,n,a){var i=e(S.d).getAudits(r,n);if(!i)return{};var o={};return Object.keys(i).forEach((function(t){e(S.d).getStackPackDescription(r,n,t,a)&&(o[t]=i[t])})),o}})),getStackPackDescription:q((function(e){return function(t,r,n,a,i){var o=e(S.d).getReport(r,n);if(void 0!==o){var c=((o||{}).lighthouseResult||[]).stackPacks;if(!Array.isArray(c))return null;var s=c.find((function(e){var t=e.id,r=e.descriptions;return t===i&&!!r[a]}));return s?{id:s.id,icon:s.iconDataURL,title:s.title,description:s.descriptions[a]}:null}}}))},$=W(V,{initialState:{reports:{}},resolvers:Y,selectors:K}),G=($.initialState,$.actions,$.controls,$.reducer,$.resolvers,$.selectors,$),Z=r(227),J={selectors:{getServiceURL:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.path,n=t.query,a="https://pagespeed.web.dev";if(r){var i=r.match(/^\//)?r:"/".concat(r);return Object(Z.a)("".concat(a).concat(i),n)}return Object(Z.a)(a,n)}}},X=o.a.createModuleStore("pagespeed-insights",{storeName:S.d,requiresSetup:!1,settingSlugs:["ownerID"]}),Q=a.a.combineStores(X,G,J);a.a.registerStore(S.d,Q),o.a.registerModule("pagespeed-insights",{storeName:S.d,SettingsViewComponent:d.a,Icon:N,features:[Object(l.__)("Website performance reports for mobile and desktop","google-site-kit")]}),(B=s.a).registerWidget("pagespeedInsightsWebVitals",{Component:g.a,width:B.WIDGET_WIDTHS.FULL,wrapWidget:!1,modules:["pagespeed-insights"]},[u.AREA_MAIN_DASHBOARD_SPEED_PRIMARY,u.AREA_ENTITY_DASHBOARD_SPEED_PRIMARY])}},[[961,1,0]]]);