kollapsminoriteten/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-modules-searc...

43 lines
218 KiB
JavaScript
Raw Permalink Normal View History

2026-03-31 11:30:59 +02:00
(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[918],{80:(e,t,i)=>{"use strict";i.d(t,{CV:()=>x,Cu:()=>A,K9:()=>s,Kr:()=>h,Lf:()=>p,Oh:()=>n,PW:()=>M,Rx:()=>w,S9:()=>y,TQ:()=>d,Vt:()=>T,Wl:()=>v,ZC:()=>o,ZY:()=>a,_p:()=>C,ag:()=>m,aj:()=>u,bz:()=>N,dq:()=>D,f2:()=>c,fB:()=>j,fV:()=>S,iB:()=>g,kc:()=>l,mo:()=>I,nc:()=>_,rm:()=>k,to:()=>r,wo:()=>f,yn:()=>b});const s="modules/analytics-4",o="account_create",r="property_create",n="webdatastream_create",a="analyticsSetup",l=10,c=0,g="https://www.googleapis.com/auth/tagmanager.readonly",d="enhanced-measurement-form",u="enhanced-measurement-enabled",p="enhanced-measurement-should-dismiss-activation-banner",m="analyticsAccountCreate",h="analyticsCustomDimensionsCreate",y="https://www.googleapis.com/auth/analytics.edit",f="dashboardAllTrafficWidgetDimensionName",I="dashboardAllTrafficWidgetDimensionColor",b="dashboardAllTrafficWidgetDimensionValue",v="dashboardAllTrafficWidgetActiveRowIndex",k="dashboardAllTrafficWidgetLoaded",A={googlesitekit_post_date:{parameterName:"googlesitekit_post_date",displayName:"WordPress Post Date",description:"Created by Site Kit: Date when a post was published",scope:"EVENT"},googlesitekit_post_author:{parameterName:"googlesitekit_post_author",displayName:"WordPress Post Author",description:"Created by Site Kit: WordPress name of the post author",scope:"EVENT"},googlesitekit_post_categories:{parameterName:"googlesitekit_post_categories",displayName:"WordPress Post Categories",description:"Created by Site Kit: Names of categories assigned to a post",scope:"EVENT"},googlesitekit_post_type:{parameterName:"googlesitekit_post_type",displayName:"WordPress Post Type",description:"Created by Site Kit: Content type of a post",scope:"EVENT"}},_={ADD_TO_CART:"add_to_cart",PURCHASE:"purchase",SUBMIT_LEAD_FORM:"submit_lead_form",GENERATE_LEAD:"generate_lead",CONTACT:"contact"},S=[_.CONTACT,_.GENERATE_LEAD,_.SUBMIT_LEAD_FORM],j={"new-visitors":{description:"People who visited the site for the first time",displayName:"New visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"new"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:new_visitors"}}}}]}}]}}}}]},"returning-visitors":{description:"People who have visited your site at least once before",displayName:"Returning visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"returning"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:returning_visitors"}}}}]}}]}}}}]}},M="audiencePermissionsSetup",x="audienceTileCustomDimensionCreate",N="audience-selection-panel-expirable-new-badge-",D="audience",T="customDimension",C="property",w=[D,T,C]},674:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,o,r=i(63696);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},n.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 22"},e),s||(s=r.createElement("path",{fillRule:"evenodd",d:"m12.149 7.96-5.166 5.166a.34.34 0 0 0-.094.176l-.35 1.755a.344.344 0 0 0 .404.404l1.755-.35a.34.34 0 0 0 .175-.095l5.166-5.165zm2.301-1.814a1.03 1.03 0 0 0-1.458 0L6.497 12.64a1.03 1.03 0 0 0-.282.527l-.35 1.755a1.03 1.03 0 0 0 1.213 1.213l1.7
(0,I.__)("%1$d selected <MaxCount>(up to %2$d)</MaxCount>","google-site-kit"),C,o),{MaxCount:(0,m.jsx)("span",{className:"googlesitekit-selection-panel-footer__item-count--max-count"})})});return(0,m.jsx)("footer",{className:"googlesitekit-selection-panel-footer",children:(0,m.jsxs)("div",{className:"googlesitekit-selection-panel-footer__content",children:[w,(0,m.jsxs)("div",{className:"googlesitekit-selection-panel-footer__actions",children:[(0,m.jsx)(b.Button,{onClick:N,disabled:r,tertiary:!0,children:(0,I.__)("Cancel","google-site-kit")}),(0,m.jsx)(b.SpinnerButton,{onClick:x,isSaving:r,disabled:C<s||C>o||r||!l&&p,children:g||v})]})]})})}SelectionPanelFooter.propTypes={savedItemSlugs:n().array,selectedItemSlugs:n().array,saveSettings:n().func,minSelectedItemCount:n().number,maxSelectedItemCount:n().number,isBusy:n().bool,onSaveSuccess:n().func,onCancel:n().func,isOpen:n().bool,closePanel:n().func};const x=SelectionPanel},6730:(e,t,i)=>{"use strict";i.d(t,{A:()=>GenericErrorHandlerActions});var s=i(62688),o=i.n(s),r=i(82871),n=i(38432),a=i(38021),l=i.n(a),c=i(63696),g=i(12417),d=i(1027),u=i(65123),p=i(49383),m=i(62540);function ReportErrorButton({message:e,componentStack:t}){const[i,s]=(0,c.useState)(!1);return(0,m.jsx)(p.Button,{"aria-label":i?(0,r.__)("Error message copied to clipboard. Click to copy the error message again.","google-site-kit"):void 0,onClick:function(){l()(`\`\`\`\n${e}\n${t}\n\`\`\``),s(!0)},trailingIcon:(0,m.jsx)(g.A,{className:"mdc-button__icon",icon:i?d.A:u.A}),children:i?(0,r.__)("Copied to clipboard","google-site-kit"):(0,r.__)("Copy error contents","google-site-kit")})}ReportErrorButton.propTypes={message:o().string,componentStack:o().string};const h=ReportErrorButton;function GenericErrorHandlerActions({message:e,componentStack:t}){return(0,m.jsxs)("div",{className:"googlesitekit-generic-error-handler-actions",children:[(0,m.jsx)(h,{message:e,componentStack:t}),(0,m.jsx)(n.A,{href:"https://wordpress.org/support/plugin/google-site-kit/",external:!0,children:(0,r.__)("Report this problem","google-site-kit")})]})}GenericErrorHandlerActions.propTypes={message:o().string,componentStack:o().string}},7076:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});var s=i(18117),o=i(17243),r=i(63696);function n(...e){const t=(0,s.MA)(()=>(0,o.debounce)(...e),e);return(0,r.useEffect)(()=>()=>t.cancel(),[t]),t}},7144:(e,t,i)=>{"use strict";i.d(t,{EA:()=>r,GF:()=>f,Hl:()=>d,IX:()=>m,Is:()=>n,KD:()=>p,LO:()=>g,NO:()=>c,Nl:()=>l,QJ:()=>u,Uf:()=>o,XU:()=>y,Y0:()=>a,hs:()=>I,wb:()=>h});var s=i(82871);const o="key-metrics-setup-cta-widget",r="googlesitekit-key-metrics-selection-panel-opened",n="key-metrics-selection-form",a="key-metrics-selected",l="key-metrics-effective-selection",c="key-metrics-unstaged-selection",g=2,d=8,u={SLUG:"current-selection",LABEL:(0,s.__)("Current selection","google-site-kit")},p={SLUG:"suggested",LABEL:(0,s.__)("Suggested","google-site-kit")},m={SLUG:"visitors",LABEL:(0,s.__)("Visitors","google-site-kit")},h={SLUG:"driving-traffic",LABEL:(0,s.__)("Driving traffic","google-site-kit")},y={SLUG:"generating-leads",LABEL:(0,s.__)("Generating leads","google-site-kit")},f={SLUG:"selling-products",LABEL:(0,s.__)("Selling products","google-site-kit")},I={SLUG:"content-performance",LABEL:(0,s.__)("Content performance","google-site-kit")}},7551:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>a,Oo:()=>r,oE:()=>n});var s=i(20697),o=i(62659);const r=s.jU,n=s.f7;function a(){const e=(0,o.A)();return e===s.jU||e===s.Ax?r:e===s.f7||e===s.Is?n:null}},7972:(e,t,i)=>{"use strict";i.d(t,{F:()=>o,n:()=>s});const s="core/ui",o="activeContextID"},8084:(e,t,i)=>{"use strict";i.d(t,{$C:()=>x,RF:()=>M,WI:()=>S,_5:()=>k,jU:()=>v,o3:()=>b,x0:()=>_});var s=i(32091),o=i.n(s),r=i(50532),n=i.n(r),a=i(17243),l=i(78913);const c="GET_REGISTRY",g="AWAIT";function d(...e){const t=e.reduce((e,t)=>({...e,...t}),{}),i=A(e.reduce((e,t)=>[...e,...Object.keys(t)],[]));return o()(0===i.length,`collect() cannot accept collections with duplicate keys. Your call to collect() contains the following duplicated functions: ${i.join(", ")}. Check your data sto
(0,q._n)("%s is disconnected, no data to show","%s are disconnected, no data to show",c.length,"google-site-kit"),c.join((0,q.__)(" and ","google-site-kit")))})})}function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},K.apply(null,arguments)}MetricItem.propTypes={slug:I().string.isRequired,title:I().string.isRequired,description:I().string.isRequired,isNewlyDetected:I().bool,savedItemSlugs:I().array};const key_metrics_no_selected_items=e=>s.createElement("svg",K({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 383 238"},e),N||(N=s.createElement("path",{fill:"#B8E6CA",d:"M59.238 58.571c-2.136 20.178 4.272 29.099 20.48 53.216 16.209 24.118-29.092 62.914 5.475 101.268 33.827 37.532 69.419.009 111.314-4.555 29.443-3.208 57.819 12.98 90.86 5.9s46.385-42.599 43.153-68.059c-5.59-44.041-26.24-49.107-34.893-66.461s2.902-52.997-30.287-73.16-76.71 14.42-112.503 12.37c-20.651-1.182-40.932-4.995-59.264.86-18.53 5.918-32.662 22.571-34.335 38.621"})),D||(D=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__a)"},s.createElement("rect",{width:130.621,height:89.651,x:242.455,y:45.266,fill:"#fff",rx:10.957,transform:"rotate(15 242.455 45.266)"}))),T||(T=s.createElement("rect",{width:24.903,height:7.969,x:253.726,y:64.785,fill:"#EBEEF0",rx:3.985,transform:"rotate(15 253.726 64.785)"})),C||(C=s.createElement("rect",{width:49.806,height:19.923,x:249.342,y:81.144,fill:"#FFDED3",rx:9.961,transform:"rotate(15 249.342 81.144)"})),w||(w=s.createElement("rect",{width:99.428,height:8.773,x:240.436,y:114.357,fill:"#EBEEF0",rx:3.985,transform:"rotate(15 240.436 114.357)"})),E||(E=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m256.195 90.198 4.644 8.044m0 0 1.412-4.986m-1.412 4.986-5.023-1.27"})),R||(R=s.createElement("rect",{width:19.923,height:5.977,x:268.706,y:93.551,fill:"#fff",rx:1.992,transform:"rotate(15 268.706 93.55)"})),L||(L=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__b)"},s.createElement("rect",{width:130.621,height:89.68,x:13.887,y:79.094,fill:"#fff",rx:10.957,transform:"rotate(-15 13.887 79.094)"}))),O||(O=s.createElement("rect",{width:62.386,height:7.798,x:32.989,y:90.122,fill:"#EBEEF0",rx:3.899,transform:"rotate(-15 32.99 90.122)"})),G||(G=s.createElement("rect",{width:49.806,height:19.923,x:37.691,y:106.902,fill:"#FFDED3",rx:9.961,transform:"rotate(-15 37.691 106.902)"})),P||(P=s.createElement("rect",{width:99.428,height:7.798,x:46.612,y:140.967,fill:"#EBEEF0",rx:3.899,transform:"rotate(-15 46.612 140.967)"})),z||(z=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m48.152 111.318 8.044 4.645m0 0-1.27-5.024m1.27 5.024-4.986 1.411"})),Z||(Z=s.createElement("rect",{width:19.923,height:5.977,x:60.663,y:107.966,fill:"#fff",rx:1.992,transform:"rotate(-15 60.663 107.966)"})),W||(W=s.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__c)"},s.createElement("rect",{width:130.621,height:89.68,x:126.251,y:37.4,fill:"#fff",rx:10.957}))),U||(U=s.createElement("rect",{width:98.333,height:7.867,x:143.013,y:53.134,fill:"#EBEEF0",rx:3.933})),B||(B=s.createElement("rect",{width:49.806,height:19.923,x:142.369,y:70.423,fill:"#B8E6CA",rx:9.961})),V||(V=s.createElement("rect",{width:33.04,height:7.867,x:143.013,y:105.84,fill:"#EBEEF0",rx:3.933})),F||(F=s.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.494,d:"m151.336 84.036 6.568-6.567m0 0-5.182-.073m5.182.073.073 5.18"})),H||(H=s.createElement("rect",{width:19.923,height:5.977,x:164.287,y:77.395,fill:"#fff",rx:1.992})),s.createElement("mask",{id:"key-metrics-no-selected-items_svg__d",width:273,height:230,x:58,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},Y||(Y=s.createElement("path",{fill:"#B8E6CA",d:"M59.237 58.571C57.1 78.75 63.509 87.67 79.717 111.787c16.209 24.118-29.091 62.914 5.475 101.268 33.827 37.532 69.419.009 111.314-4.555 2
(0,r.__)("By clicking confirm changes, youre granting other users view-only access to data from %s via your Google account. You can always manage this later in the dashboard sharing settings.","google-site-kit"),(0,c.K5)(u))}):null}EntityOwnershipChangeNotice.propTypes={slug:o().oneOfType([o().string,o().arrayOf(o().string)]).isRequired}},14578:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(4751),l=i(62540);function PreviewTable({rows:e,rowHeight:t,padding:i}){const s=[];for(let i=0;e>i;i++)s.push((0,l.jsx)("div",{className:"googlesitekit-preview-table__row",children:(0,l.jsx)(a.A,{width:"100%",height:t+"px"})},"table-row-"+i));return(0,l.jsx)("div",{className:n()("googlesitekit-preview-table",{"googlesitekit-preview-table--padding":i}),children:s})}PreviewTable.propTypes={rows:o().number,rowHeight:o().number,padding:o().bool},PreviewTable.defaultProps={rows:11,rowHeight:35,padding:!1};const c=PreviewTable},17443:(e,t,i)=>{"use strict";i.d(t,{r:()=>AdminScreenTooltip,i:()=>s.i});var s=i(52274),o=i(63696),r=i(50539),n=i(62688),a=i(36703),l=i(40960),c=i(83202),g=i(94656),d=i(71264),u=i(97513),p=i(62540);function JoyrideTooltip(e){const{title:t,content:s,dismissLabel:r,disableOverlay:n=!0,target:m,cta:h=!1,className:y,styles:f={},slug:I="",placement:b="auto",onDismiss:v=()=>{},onView:k=()=>{},onTourStart:A=()=>{},onTourEnd:_=()=>{}}=e;function S(){return!!i.g.document.querySelector(m)}const[j,M]=(0,o.useState)(S),x=(0,u.dv)(),N=x===u.mp||x===u.Lg,[D,T]=(0,o.useState)(!0),C=(0,o.useRef)(N);if((0,l.A)(()=>{S()&&M(!0)},j?null:250),(0,o.useEffect)(()=>{let e=()=>{};if("function"==typeof i.g.ResizeObserver){const t=i.g.document.querySelector(m);if(t){const s=new ResizeObserver(()=>{i.g.dispatchEvent(new Event("resize"))});s.observe(t),e=()=>s.disconnect()}}return e},[m,j]),(0,o.useEffect)(()=>{let e;return C.current!==N&&(T(!1),e=setTimeout(()=>{T(!0)},50),C.current=N),()=>{e&&clearTimeout(e)}},[N]),!j)return null;const w=[{title:t,target:m,content:s,disableBeacon:!0,isFixed:!0,placement:b,cta:h,className:y}],E={close:r,last:r};return(0,p.jsx)(g.A,{slug:I,children:(0,p.jsx)(a.Ay,{callback:function({type:e}){switch(e){case a.qY.TOUR_START:A(),i.g.document.body.classList.add("googlesitekit-showing-tooltip");break;case a.qY.TOUR_END:_(),i.g.document.body.classList.remove("googlesitekit-showing-tooltip");break;case a.qY.STEP_AFTER:v();break;case a.qY.TOOLTIP:k()}},disableOverlay:n,spotlightPadding:0,floaterProps:d.ei,locale:E,steps:w,styles:{...d.R0,...f,options:{...d.R0.options,...f?.options},spotlight:{...d.R0.spotlight,...f?.spotlight}},tooltipComponent:c.A,run:D,disableScrolling:!0})})}JoyrideTooltip.propTypes={title:n.PropTypes.node,content:n.PropTypes.string,disableOverlay:n.PropTypes.bool,dismissLabel:n.PropTypes.string,target:n.PropTypes.string.isRequired,onDismiss:n.PropTypes.func,onShow:n.PropTypes.func,className:n.PropTypes.string,styles:n.PropTypes.object,slug:n.PropTypes.string,placement:n.PropTypes.string,onView:n.PropTypes.func};var m=i(7972),h=i(13047),y=i(62659);function AdminScreenTooltip(){const e=(0,y.A)(),{setValue:t}=(0,r.useDispatch)(m.n),i=(0,u.dv)(),{isTooltipVisible:s=!1,target:n,placement:a,className:l,tooltipSlug:c,title:g,content:d,dismissLabel:f,gaTrackingEventLabel:I}=(0,r.useSelect)(e=>e(m.n).getValue("admin-screen-tooltip")||{isTooltipVisible:!1});const b=(0,o.useCallback)(()=>{c&&(0,h.sx)(`${e}_${c}`,"tooltip_dismiss",I),t("admin-screen-tooltip",void 0)},[t,c,e,I]);if(!s)return null;const v=i===u.mp||i===u.Lg,k=null!=n?n:'#adminmenu [href*="page=googlesitekit-settings"]',A=null!=a?a:"right";return(0,p.jsx)(JoyrideTooltip,{target:v?"body":k,placement:v?"center":A,className:v?"googlesitekit-tour-tooltip__modal_step":l||(n?void 0:"googlesitekit-tour-tooltip__fixed-settings-tooltip"),disableOverlay:!v,slug:"admin-screen-tooltip",title:g,content:d,dismissLabel:f,onView:function(){(0,h.sx)(`${e}_${c}`,"tooltip_view",I)},onDismiss:b})}},17716:(e,t,i)=>{"use strict";var s=i(50539),o=i.n(s),r=i(13620),n=i.n(r),a=i(88176),l=i.n(a),c=i(82871),g=i(49481),d=i(50464),u=
(0,c.__)("%s (domain property)","google-site-kit"),e.replace(/^sc-domain:/,"")):e},e))}):(0,p.jsx)(I.ProgressBar,{small:!0})}var k=i(62688),A=i.n(k),_=i(29785);function ZeroDataMessage({skipPrefix:e}){const t=(0,s.useSelect)(e=>e(_.O4).getCurrentEntityURL());return e?t?(0,c.__)("Your page hasnt appeared in Search yet","google-site-kit"):(0,c.__)("Your site hasnt appeared in Search yet","google-site-kit"):t?(0,c.__)("No data to display: your page hasnt appeared in Search yet","google-site-kit"):(0,c.__)("No data to display: your site hasnt appeared in Search yet","google-site-kit")}ZeroDataMessage.propTypes={skipPrefix:A().bool};var S,j,M=i(69667);function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},x.apply(null,arguments)}const N=e=>f.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 101 36"},e),S||(S=f.createElement("path",{stroke:"#CCC",d:"M101 35.5H1V0"})),j||(j=f.createElement("path",{stroke:"#CCC",strokeWidth:2,d:"m2 24.685 24.5-7.404L51 25 75.5 8.774 100 2"})));var D=i(13429),T=i(75110),C=i(30805);function ActivateAnalyticsCTA_ActivateAnalyticsCTA({title:e}){return(0,C.i)("setupFlowRefresh")?(0,p.jsx)(D.A,{dismissedItemSlug:"analytics-setup-cta-search-funnel"}):(0,p.jsxs)(D.A,{dismissedItemSlug:"analytics-setup-cta-search-funnel",children:[(0,p.jsx)(T.A,{title:(0,c.__)("Unique visitors from Search","google-site-kit"),GraphSVG:M.A}),(0,p.jsx)(T.A,{title:e,GraphSVG:N})]})}ActivateAnalyticsCTA_ActivateAnalyticsCTA.propTypes={title:A().string.isRequired};var w=i(10740),E=i(32981),R=i(44161),L=i(80),O=i(4124),G=i(13047),P=i(97345);function AnalyticsStats(e){const{data:t,selectedStats:i,dateRangeLength:o,dataLabels:r,tooltipDataFormats:n,chartDataFormats:a,statsColor:l,gatheringData:g,moduleSlug:d}=e,u=(0,O.A)(),m=(0,s.useSelect)(e=>e(y.i).isModuleConnected(d)),h=(0,s.useSelect)(e=>e(y.i).isModuleActive(d)),f=(0,s.useSelect)(e=>e(P.oR).getReferenceDate()),I=(0,s.useSelect)(e=>u?null:e(L.K9).getPropertyCreateTime());let b=[];if(I&&(b=[{date:(0,G.sq)(new Date(I)),text:(0,c.__)("Google Analytics property created","google-site-kit")}]),!h||!m)return null;const v=(0,E.sq)(t,i,o,f,r,n,a),[,...k]=v.slice(1).map(([e])=>e),A={...AnalyticsStats.chartOptions,hAxis:{...AnalyticsStats.chartOptions.hAxis,ticks:k},vAxis:{...AnalyticsStats.chartOptions.vAxis},series:{0:{color:l,targetAxisIndex:0},1:{color:l,targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}};if(!v.slice(1).some(e=>e[2]>0||e[3]>0)){const e={0:1,1:100}[i];A.vAxis.viewWindow.max=e}else A.vAxis.viewWindow.max=void 0;return(0,p.jsx)(w.xA,{className:"googlesitekit-analytics-site-stats",children:(0,p.jsx)(w.fI,{children:(0,p.jsx)(w.fh,{size:12,children:(0,p.jsx)(R.A,{chartType:"LineChart",data:v,dateMarkers:b,loadingHeight:"270px",loadingWidth:"100%",options:A,gatheringData:g})})})})}AnalyticsStats.propTypes={data:A().oneOfType([A().arrayOf(A().object),A().object]).isRequired,dateRangeLength:A().number.isRequired,selectedStats:A().number.isRequired,dataLabels:A().arrayOf(A().string).isRequired,tooltipDataFormats:A().arrayOf(A().func).isRequired,statsColor:A().string.isRequired,gatheringData:A().bool,moduleSlug:A().string.isRequired},AnalyticsStats.chartOptions={chart:{title:""},curveType:"function",height:270,width:"100%",chartArea:{height:"80%",left:60,right:25},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"MMM d",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1},viewWindow:{min:0}},focusTarget:"category",crosshair:{color:"gray",opacity:.1,orientation:"vertical",trigger:"both"},tooltip:{isHtml:!0,trigger:"both"}};var z,Z,W,U,B,V,F=i(78014),H=i(14056),Y=i(25797);function SettingsForm({hasModuleAccess:e}){const t=(0,s.useSelect)(e=>e(y.i).getModule(h.Y)),i=t?.owner?.login?`<strong>${t.owner.lo
(0,c.__)("%1$s configured %2$s and you dont have access to this Search Console property. Contact them to share access or change the Search Console property.","google-site-kit"),i,t?.name),{strong:(0,p.jsx)("strong",{})})}),e&&(0,p.jsx)(H.A,{slug:"search-console"})]})}function SettingsEdit(){(0,s.useSelect)(e=>e(g.n).getMatchedProperties());const e=(0,s.useSelect)(e=>e(g.n).isDoingSubmitChanges()),t=(0,s.useSelect)(e=>e(g.n).hasFinishedResolution("getMatchedProperties")),i=(0,s.useSelect)(e=>e(y.i).hasModuleOwnershipOrAccess(h.Y));let o;return o=e||!t||void 0===i?(0,p.jsx)(I.ProgressBar,{}):(0,p.jsx)(SettingsForm,{hasModuleAccess:i}),(0,p.jsx)("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console",children:o})}function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Q.apply(null,arguments)}const J=e=>f.createElement("svg",Q({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32"},e),z||(z=f.createElement("path",{fill:"#FBBC04",d:"m7.081 26.527-4.72 4.721a.933.933 0 0 1-1.317 0l-.292-.292a.933.933 0 0 1 0-1.316l4.72-4.721a.933.933 0 0 1 1.318 0l.291.291a.93.93 0 0 1 0 1.317"})),Z||(Z=f.createElement("path",{fill:"#4285F4",d:"M19.75 28.5h6.042a6.04 6.04 0 0 0 6.041-6.042V6.208A6.04 6.04 0 0 0 23.48.626a6.04 6.04 0 0 0-3.73 5.582z"})),W||(W=f.createElement("path",{fill:"#FBBC04",d:"M9.75 28.5a6.04 6.04 0 0 0 6.042-6.042 6.041 6.041 0 1 0-12.084 0A6.04 6.04 0 0 0 9.75 28.5"})),U||(U=f.createElement("path",{fill:"#34A853",d:"M23.97 28.5h-5.887a6.04 6.04 0 0 1-6.041-6.042v-7.916a6.04 6.04 0 0 1 10.314-4.273 6.04 6.04 0 0 1 1.769 4.273v13.804a.154.154 0 0 1-.154.154z"})),B||(B=f.createElement("path",{fill:"#1967D2",d:"M24.125 28.346V14.542a6.04 6.04 0 0 0-4.375-5.807V28.5h4.22a.16.16 0 0 0 .11-.045.15.15 0 0 0 .045-.109"})),V||(V=f.createElement("path",{fill:"#EA4335",d:"M15.792 22.575a6.04 6.04 0 0 0-3.75-5.59v5.59c0 1.72.72 3.273 1.875 4.373a6.02 6.02 0 0 0 1.875-4.373"})));var q=i(32091),X=i.n(q),$=i(54419),K=i(8084),ee=i(17243);var te=i(4452),ie=i.n(te);function se(e){const{startDate:t,endDate:i}=e;return X()((0,G.Qr)(t),"A valid startDate is required."),X()((0,G.Qr)(i),"A valid endDate is required."),{start_date:t.replace(/-/g,""),end_date:i.replace(/-/g,"")}}function oe(e){const t=[[{type:"string",label:"Day"},{type:"number",label:"Clicks"},{type:"number",label:"Impressions"},{type:"number",label:"CTR"},{type:"number",label:"Position"}]];let i=0,s=0,o=0,r=0;const n=e.length;(0,ee.each)(e,e=>{const n=(0,G.XH)(e.keys[0]);t.push([n.getMonth()+1+"/"+n.getUTCDate(),e.clicks,e.impressions,(0,ee.round)(e.ctr,3),(0,ee.round)(e.position,3)]),i+=e.clicks,s+=e.impressions,o+=e.ctr,r+=e.position});return{dataMap:t,totalClicks:i,totalImpressions:s,averageCTR:n>0?o/n:0,averagePosition:n>0?r/n:0}}var re=i(46763);const ne={selectors:{areSettingsEditDependenciesLoaded:(0,s.createRegistrySelector)(e=>()=>e(g.n).hasFinishedResolution("getMatchedProperties"))}};const ae=n().createModuleStore(h.Y,{ownedSettingsSlugs:["propertyID"],storeName:g.n,settingSlugs:["propertyID","ownerID"],requiresSetup:!1,submitChanges:async function({select:e,dispatch:t}){if(e(g.n).haveSettingsChanged()){const{error:e}=await t(g.n).saveSettings();if(e)return{error:e}}return await(0,$.invalidateCache)("modules",h.Y),{}},validateCanSubmitChanges:function(e){const t=(0,K.WI)(e),{getPropertyID:i,haveSettingsChanged:s}=t(g.n);var o;X()("string"==typeof(o=i())&&o.length>0,"a valid propertyID is required to submit changes"),X()(s(),re.Wq)}});var le=i(35812),ce=i(73730),ge=i(89173);const de=(0,le.U)({baseName:"getReport",storeName:g.n,controlCallback:({options:e})=>(0,$.get)("modules",h.Y,"searchanalytics",e),reducerCallback:(0,s.createReducer)((e,t,{options:i})=>{e.reports[(0,G.Zm)(i)]=t}),argsToParams:e=>({options:e}),validateParams:({options:e}={})=>{X()((0,ee.isPlainObject)(e),"Options for Search Console report must be an object."),X()((0,ce.O5)(e),"Either date range or start/end dates mu
(0,c._n)("Search traffic over the last %s day","Search traffic over the last %s days",e,"google-site-kit"),e)})};function SourceLinkAnalytics4(){const e=(0,O.A)(),t=(0,s.useSelect)(t=>{if(e)return null;const{getServiceReportURL:i}=t(L.K9),s=t(_.O4).getCurrentEntityURL(),o={dates:t(P.oR).getDateRangeDates({compare:!0,offsetDays:L.f2}),filters:{sessionSource:"google"},otherArgs:{collectionId:"life-cycle"}};return(0,we.m)(s)&&(o.filters.unifiedPagePathScreen=(0,G.pH)(s)),i("lifecycle-traffic-acquisition-v2",o)});return(0,p.jsx)(Ne.A,{href:t,name:(0,c._x)("Analytics","Service name","google-site-kit"),external:!0})}function SourceLinkSearch({metric:e}){const t=(0,O.A)(),i=(0,s.useSelect)(i=>{if(t)return null;const{getServiceReportURL:s,getPropertyID:o,isDomainProperty:r}=i(g.n),n=(0,G.CZ)(i(_.O4).getReferenceSiteURL()),a=i(_.O4).getCurrentEntityURL(),l=i(P.oR).getDateRangeDates({offsetDays:g.f}),c={resource_id:o(),metrics:e,...se(l)};return a?c.page=`!${a}`:r()&&n&&(c.page=`*${n}`),s(c)},[e]);return(0,p.jsx)(Ne.A,{href:i,name:(0,c._x)("Search Console","Service name","google-site-kit"),external:!0})}function Footer({metrics:e,selectedStats:t}){if(!e?.[t])return null;const{service:i,metric:s}=e[t];return i===h.Y?(0,p.jsx)(SourceLinkSearch,{metric:s}):(0,p.jsx)(SourceLinkAnalytics4,{})}Footer.propTypes={metrics:A().arrayOf(A().object).isRequired,selectedStats:A().number.isRequired};const Oe=Footer;var Ge=i(7551),Pe=i(22942),ze=i(15844);function CreateKeyEventCTA(){const e=`${(0,v.A)()}_search-traffic-widget`,t=(0,s.useSelect)(e=>e(_.O4).getGoogleSupportURL({path:"/analytics/answer/12844695"})),i=(0,f.useCallback)(()=>{(0,G.sx)(e,"click_ga4_keyEvents_cta")},[e]);return(0,ze.A)(()=>{(0,G.sx)(e,"view_ga4_keyEvents_cta")}),(0,p.jsxs)("div",{className:"googlesitekit-analytics-cta googlesitekit-analytics-cta--setup-key-events",children:[(0,p.jsx)("div",{className:"googlesitekit-analytics-cta__preview-graphs",children:(0,p.jsx)(T.A,{title:(0,c.__)("Key Events completed","google-site-kit"),GraphSVG:N})}),(0,p.jsxs)("div",{className:"googlesitekit-analytics-cta__details",children:[(0,p.jsx)("p",{className:"googlesitekit-analytics-cta--description",children:(0,c.__)("Set up key events to track how well your site fulfills your business objectives","google-site-kit")}),(0,p.jsx)(I.Button,{href:t,target:"_blank",onClick:i,children:(0,c.__)("Set up key events","google-site-kit")})]})]})}var Ze=i(97591),We=i(97513);function Ue(e){return{quarterCellProps:{smSize:2,mdSize:e?4:2,lgSize:3},halfCellProps:{smSize:4,mdSize:4,lgSize:6},oneThirdCellProps:{smSize:2,mdSize:4,lgSize:4},threeQuartersCellProps:{smSize:4,mdSize:4,lgSize:9},fullCellProps:{smSize:4,mdSize:8,lgSize:12}}}function Be(e,t,i=1){return{datapoint:e?.totals?.[0]?.metricValues?.[t]?.value/i,change:(0,G.Zf)(e?.totals?.[1]?.metricValues?.[t]?.value,e?.totals?.[0]?.metricValues?.[t]?.value)}}function OptionalCells({canViewSharedAnalytics4:e,errors:t,showGA4:i,showKeyEventsCTA:o,showRecoverableGA4:r,WidgetReportError:n}){const a=(0,We.dv)(),l=(0,s.useSelect)(e=>e(y.i).isModuleConnected(Pe.L1)),g=(0,s.useSelect)(e=>e(y.i).isModuleActive(Pe.L1)),d=g&&l,{quarterCellProps:u,halfCellProps:m}=Ue(o);return(0,p.jsxs)(f.Fragment,{children:[e&&(!l||!g)&&(0,p.jsx)(w.fh,{...m,children:We.mp!==a&&(0,p.jsx)(ActivateAnalyticsCTA_ActivateAnalyticsCTA,{title:(0,c.__)("Key Events completed","google-site-kit")})}),!r&&e&&d&&t.length>0&&(0,p.jsx)(w.fh,{...m,children:(0,p.jsx)(n,{moduleSlug:"analytics-4",error:t})}),i&&(0,p.jsx)(w.fh,{...u,smSize:4,children:o&&(0,p.jsx)(CreateKeyEventCTA,{})}),e&&d&&r&&(0,p.jsx)(w.fh,{...m,children:(0,p.jsx)(Ze.A,{moduleSlugs:[Pe.L1]})})]})}OptionalCells.propTypes={canViewSharedAnalytics4:A().bool.isRequired,error:A().arrayOf(A().object),showGA4:A().bool.isRequired,showKeyEventsCTA:A().bool.isRequired,showRecoverableGA4:A().bool,WidgetReportError:A().elementType.isRequired};var Ve=i(63505),Fe=i(94406),He=i(60515);function DataBlocks({ga4Data:e,ga4VisitorsData:t,searchConsoleData:i,selectedStats:o,handleStatsSelection:r,dateRangeLength:n,showGA4:a,dashboardType:l,showKeyEvents
(0,c._x)("%1$s vs %2$s","Date range for chart tooltip","google-site-kit"),(0,G.XH)(d).toLocaleDateString(n,a),(0,G.XH)(p).toLocaleDateString(n,a)),h=(0,G.Zf)(u,g),y=(0,G.Cn)(g,u),f=(0,G.vY)(y),I=(0,c.sprintf)(/* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage, %%: percent symbol */ /* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage, %%: percent symbol */
(0,c._x)("%1$s: <strong>%2$s</strong> <em>%3$s %4$s%%</em>","Stat information for chart tooltip","google-site-kit"),i,Math.abs(g).toFixed(2).replace(/(.00|0)$/,""),f,(0,G.Eo)(h));r.push([(0,G.XH)(d),`<div class="${ie()("googlesitekit-visualization-tooltip",{"googlesitekit-visualization-tooltip--up":y>0,"googlesitekit-visualization-tooltip--down":y<0})}">\n\t\t\t\t<p>${m}</p>\n\t\t\t\t<p>${I}</p>\n\t\t\t</div>`,g,u])}),r}(a,n,i[s].label,i[s].metric,o),[,...g]=l.slice(1).map(([e])=>e),d={...SearchConsoleStats.chartOptions,hAxis:{format:"MMM d",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12},ticks:g},series:{0:{color:i[s].color,targetAxisIndex:0},1:{color:i[s].color,targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}},u=!l.slice(1).some(e=>e[2]>0||e[3]>0);return d.vAxis.viewWindow.max=u?1:void 0,(0,p.jsx)(w.xA,{className:"googlesitekit-search-console-site-stats",children:(0,p.jsx)(w.fI,{children:(0,p.jsx)(w.fh,{size:12,children:(0,p.jsx)(R.A,{chartType:"LineChart",data:l,loadingHeight:"270px",loadingWidth:"100%",options:d,gatheringData:r})})})})}function Chart({canViewSharedAnalytics4:e,dateRangeLength:t,ga4StatsData:i,ga4VisitorsOverviewAndStatsData:o,isGA4GatheringData:r,isSearchConsoleGatheringData:n,metrics:a,searchConsoleData:l,selectedStats:g}){const d=(0,We.dv)(),u=(0,s.useSelect)(e=>e(y.i).isModuleActive(Pe.L1)),m=(0,s.useSelect)(e=>e(y.i).isModuleConnected(Pe.L1));return(0,p.jsxs)(f.Fragment,{children:[(0===g||1===g)&&(0,p.jsx)(SearchConsoleStats,{data:l,dateRangeLength:t,selectedStats:g,metrics:a,gatheringData:n}),e&&(!u||!m)&&We.mp===d&&(0,p.jsx)(w.xA,{children:(0,p.jsx)(w.fI,{children:(0,p.jsx)(w.fh,{children:(0,p.jsx)(ActivateAnalyticsCTA_ActivateAnalyticsCTA,{title:(0,c.__)("Key Events completed","google-site-kit")})})})}),2===g&&(0,p.jsx)(AnalyticsStats,{data:o,dateRangeLength:t,selectedStats:0,metrics:a,dataLabels:[(0,c.__)("Unique Visitors","google-site-kit")],tooltipDataFormats:[e=>parseFloat(e).toLocaleString()],statsColor:a[g].color,gatheringData:r,moduleSlug:"analytics-4"}),e&&(3===g||4===g)&&(0,p.jsx)(AnalyticsStats,{data:i,dateRangeLength:t,selectedStats:g-3,metrics:a,dataLabels:[(0,c.__)("Key Events","google-site-kit"),(0,c.__)("Engagement Rate %","google-site-kit")],tooltipDataFormats:[e=>parseFloat(e).toLocaleString(),e=>(0,G.Eo)(e/100,{style:"percent",signDisplay:"never",maximumFractionDigits:2})],chartDataFormats:[ee.identity,e=>100*e],statsColor:a[g].color,gatheringData:r,moduleSlug:"analytics-4"})]})}function SearchFunnelWidgetGA4({Widget:e,WidgetReportError:t}){const[i,o]=(0,f.useState)(0),r=(0,O.A)(),n=(0,s.useSelect)(e=>e(y.i).isModuleAvailable(Pe.L1)),a=(0,s.useSelect)(e=>!!n&&(!r||e(P.oR).canViewSharedModule(Pe.L1))),l=(0,s.useSelect)(e=>e(y.i).isModuleConnected(Pe.L1)),c=(0,s.useSelect)(e=>e(P.oR).getDateRangeNumberOfDays()),d=(0,s.useSelect)(e=>e(_.O4).getCurrentEntityURL()),{endDate:u,compareStartDate:m}=(0,s.useSelect)(e=>e(P.oR).getDateRangeDates({compare:!0,offsetDays:g.f})),h=(0,s.useSelect)(e=>e(P.oR).getDateRangeDates({compare:!0,offsetDays:L.f2})),I=(0,s.useSelect)(e=>{if(!r)return!1;const t=e(y.i).getRecoverableModules();return void 0!==t?Object.keys(t).includes(Pe.L1):void 0}),b=(0,s.useInViewSelect)(e=>l&&a&&!I?e(L.K9).getKeyEvents():[],[l,a,I]),v={startDate:m,endDate:u,dimensions:"date"},k={...h,metrics:[{name:"keyEvents"},{name:"engagementRate"}],dimensionFilters:{sessionDefaultChannelGrouping:["Organic Search"]},reportID:"search-console_search-funnel-widget-ga4_widget_ga4OverviewArgs"},A={...h,...k,dimensions:[{name:"date"}],orderby:[{dimension:{dimensionName:"date"}}],reportID:"search-console_search-funnel-widget-ga4_widget_ga4StatsArgs"},S={...h,metrics:[{name:"totalUsers"}],dimensions:[{name:"date"}],dimensionFilters:{sessionDefaultChannelGrouping:["Organic Search"]},orderby:[{dimension:{dimensionName:"date"}}],reportID:"search-console_search-funnel-widget-ga4_widget_ga4VisitorsOverviewAndStatsArgs"};(0,we.m)(d)&&(v.url=d,k.url=d,A.url=d,S.url=d);const j=(0,s.useInViewSelect)(e=>e(g.n).getReport(v),[v]),M=(0,s.useSelect)(e=>e(g.n).getErrorForSelector("g
(0,c.__)("%s CTR","google-site-kit"),(0,G.Eo)(e,"%"))})}],u=[...r||[]].sort(({ctr:e=0},{ctr:t=0})=>t-e);return(0,p.jsx)(Xe.$,{Widget:e,widgetSlug:P.t7,loading:a,rows:u,columns:d,ZeroState:ZeroDataMessage,limit:3,error:n,moduleSlug:"search-console"})}PopularKeywordsWidget.propTypes={Widget:A().elementType.isRequired},o().registerStore(g.n,Me),n().registerModule(h.Y,{storeName:g.n,SettingsEditComponent:SettingsEdit,SettingsViewComponent:SettingsView,Icon:J}),(Je=l()).registerWidget("searchConsolePopularKeywords",{Component:DashboardPopularKeywordsWidget,width:[Je.WIDGET_WIDTHS.HALF,Je.WIDGET_WIDTHS.FULL],priority:1,wrapWidget:!1,modules:[h.Y]},[qe.AREA_MAIN_DASHBOARD_CONTENT_PRIMARY,qe.AREA_ENTITY_DASHBOARD_CONTENT_PRIMARY]),Je.registerWidget("searchFunnelGA4",{Component:Qe,width:[Je.WIDGET_WIDTHS.FULL],priority:3,wrapWidget:!1,modules:[h.Y]},[qe.AREA_MAIN_DASHBOARD_TRAFFIC_PRIMARY,qe.AREA_ENTITY_DASHBOARD_TRAFFIC_PRIMARY]),Je.registerWidget(P.t7,{Component:PopularKeywordsWidget,width:Je.WIDGET_WIDTHS.QUARTER,priority:2,wrapWidget:!1,modules:[h.Y],isActive:e=>e(P.oR).isKeyMetricActive(P.t7)},[qe.AREA_MAIN_DASHBOARD_KEY_METRICS_PRIMARY])},19793:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,o=i(63696);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},r.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>o.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),s||(s=o.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1m4.806 8.592.592-.806-1.612-1.184-.592.806-3.89 5.296c-.166.226-.36.296-.512.296s-.346-.07-.512-.296l-1.474-2.007-.592-.806-1.612 1.184.592.806 1.474 2.007C9.191 15.6 9.971 16 10.792 16s1.6-.4 2.124-1.112z",clipRule:"evenodd"})))},19826:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>n,Kq:()=>r});const s=(0,i(63696).createContext)(""),{Consumer:o,Provider:r}=s,n=s},20697:(e,t,i)=>{"use strict";i.d(t,{Ax:()=>r,CZ:()=>g,Ej:()=>_,Gw:()=>S,Is:()=>n,KK:()=>u,Nn:()=>M,OT:()=>k,SH:()=>v,Y$:()=>p,ZS:()=>a,bg:()=>y,en:()=>A,ep:()=>h,f7:()=>o,hi:()=>m,jU:()=>s,k$:()=>I,kz:()=>j,ly:()=>l,mo:()=>f,s3:()=>b,uR:()=>c,zx:()=>d});const s="mainDashboard",o="entityDashboard",r="mainDashboardViewOnly",n="entityDashboardViewOnly",a="userInput",l="activation",c="splash",g="adminBar",d="adminBarViewOnly",u="settings",p="adBlockingRecovery",m="wpDashboard",h="wpDashboardViewOnly",y="moduleSetup",f="metricSelection",I="wpBlockEditor",b="keyMetricsSetup",v="key-metrics",k="traffic",A="content",_="speed",S="monetization",j=[s,o,r,n,a,c,u,y,f],M=[r,n,d,h]},21018:(e,t,i)=>{"use strict";i.d(t,{A:()=>MetricTileText});var s=i(62688),o=i.n(s),r=i(74655),n=i(13047),a=i(95806),l=i(62540);function MetricTileText({metricValue:e,metricValueFormat:t,subText:i,previousValue:s,currentValue:o,...c}){const g=(0,n.mK)(t);return(0,l.jsxs)(a.A,{className:"googlesitekit-km-widget-tile--text",...c,children:[(0,l.jsxs)("div",{className:"googlesitekit-km-widget-tile__metric-container",children:[(0,l.jsx)("div",{className:"googlesitekit-km-widget-tile__metric",children:e}),(0,l.jsx)("p",{className:"googlesitekit-km-widget-tile__subtext",children:i})]}),(0,l.jsx)("div",{className:"googlesitekit-km-widget-tile__metric-change-container",children:(0,l.jsx)(r.A,{previousValue:s,currentValue:o,isAbsolute:"percent"===g?.style})})]})}MetricTileText.propTypes={metricValue:o().oneOfType([o().string,o().number]),subtext:o().string,previousValue:o().number,currentValue:o().number}},22942:(e,t,i)=>{"use strict";i.d(t,{A_:()=>g,DF:()=>u,L1:()=>p,M0:()=>n,Mc:()=>a,Ok:()=>c,U9:()=>l,iW:()=>r,ue:()=>o,wq:()=>s,xR:()=>d});const s=1,o=2,r=3,n="enhanced-measurement-activation-banner-tooltip-state",a="enhanced-measurement-activation-banner-dismissed-item",l="_r.explorerCard..selmet",c="_r.explorerCard..seldim",g="_r..dataFilters",d="_r..nav",u="key-metrics-connect-ga4-cta-widget",p="analytics-4"},24355
(0,s.__)("Your Google account does not have sufficient permissions to access %s data, so you wont be able to see stats from it on the Site Kit dashboard.","google-site-kit"),n)),a&&a.login&&(c=(0,s.sprintf)(/* translators: %s: owner name */ /* translators: %s: owner name */
(0,s.__)('This service was originally connected by the administrator "%s" — you can contact them for more information.',"google-site-kit"),a.login)),c||(c=(0,s.__)("This service was originally connected by an administrator — you can contact them for more information.","google-site-kit")),`${l} ${c}`}},32803:(e,t,i)=>{"use strict";i.d(t,{Y:()=>s});const s="search-console"},32981:(e,t,i)=>{"use strict";i.d(t,{Ii:()=>g,sq:()=>c.s,ph:()=>o,Hb:()=>r,H5:()=>a,Aj:()=>l.A,JN:()=>d});var s=i(82871);function o(e,t={}){const{keyColumnIndex:i=0,maxSlices:o,withOthers:r=!1,tooltipCallback:n}=t,{rows:a=[]}=e||{},l="function"==typeof n,c=["Source","Percent"];l&&c.push({type:"string",role:"tooltip",p:{html:!0}});const g=[c],d=a.filter(({dimensionValues:e})=>"date_range_0"===e[1].value),u=d.reduce((e,t)=>e+parseInt(t.metricValues[0].value,10),0),p=a.filter(({dimensionValues:e})=>"date_range_1"===e[1].value),m=p.reduce((e,t)=>e+parseInt(t.metricValues[0].value,10),0);let h=r,y=d.length,f=u,I=m;o>0?(h=r&&d.length>o,y=Math.min(d.length,h?o-1:o)):(h=!1,y=d.length);for(let e=0;e<y;e++){const t=d[e],s=t.metricValues[i].value,o=p.find(({dimensionValues:e})=>e[0].value===t.dimensionValues[0].value);f-=s,I-=o?o.metricValues[i].value:0;const r=u>0?s/u:0,c=[t.dimensionValues[0].value,r];if(l){const e=a.find(({dimensionValues:e})=>"date_range_1"===e[1].value&&e[0].value===t.dimensionValues[0].value);c.push(n(t,e,c))}g.push(c)}if(h&&f>0){const e=[(0,s.__)("Others","google-site-kit"),f/u];l&&e.push(n({metricValues:[{value:f}]},{metricValues:[{value:I}]},e)),g.push(e)}return g}function r(e){if(void 0===e)return;const t=(e?.rows||[]).filter(({dimensionValues:e})=>"date_range_0"===e[1].value);return 1===t?.length||t?.[0]?.metricValues?.[0]?.value===e?.totals?.[0]?.metricValues?.[0]?.value}var n=i(17243);function a(e){if(void 0!==e)return!(e?.rows&&e?.totals&&!e?.totals?.every(n.isEmpty))||!e.totals.some(e=>!!e.metricValues&&e.metricValues.some(({value:e})=>e>0))}var l=i(65379),c=(i(25427),i(74508));function g(e){return e.replace(/&amp;/gi,"&")}function d(e){return g(e).split("; ")}},33052:(e,t,i)=>{"use strict";i.d(t,{A:()=>Typography});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(8513),l=i(62540);function Typography({className:e,type:t,size:i,as:s="span",children:o,...r}){return(0,l.jsx)(s,{className:n()("googlesitekit-typography",e,{[`googlesitekit-typography--${t}`]:t&&a.tT.includes(t),[`googlesitekit-typography--${i}`]:i&&a.oJ.includes(i)}),...r,children:o})}Typography.propTypes={className:o().string,type:o().oneOf(a.tT),size:o().oneOf(a.oJ),as:o().oneOfType([o().string,o().elementType])}},33610:(e,t,i)=>{"use strict";i.d(t,{i$:()=>ChangeMetricsLink,kB:()=>InsufficientPermissionsError,uQ:()=>E,ym:()=>MetricTileNumeric,$:()=>MetricTileTable,mF:()=>MetricTileTablePlainText,sq:()=>z.A,sB:()=>L.A});var s=i(63696),o=i(82871),r=i(50539),n=i(7972),a=i(97345),l=i(7144),c=i(38432),g=i(674),d=i(29785),u=i(13047),p=i(89065),m=i(62540);function SetupCompletedSurveyTrigger(){const e=(0,r.useSelect)(e=>e(d.O4).isKeyMetricsSetupCompleted()),t=(0,r.useSelect)(e=>e(d.O4).getKeyMetricsSetupCompletedBy()),i=(0,r.useSelect)(e=>e(a.oR).getID());return e?(0,m.jsxs)(s.Fragment,{children:[(0,m.jsx)(p.A,{triggerID:"view_kmw",ttl:u.Du}),t===i&&(0,m.jsx)(p.A,{triggerID:"view_kmw_setup_completed",ttl:u.Du})]}):null}var h=i(62659),y=i(20697);const f={slug:"sharedKeyMetrics",contexts:[y.jU,y.Ax,y.f7,y.Is],gaEventCategory:e=>`${e}_shared_key-metrics`,steps:[{target:".googlesitekit-km-change-metrics-cta",title:(0,o.__)("Personalize your key metrics","google-site-kit"),content:(0,o.__)("Another admin has set up these tailored metrics for your site. Click here to personalize them.","google-site-kit"),placement:"bottom-start"}]};var I=i(30805),b=i(73135);function ChangeMetricsLink(){const e=(0,r.useSelect)(e=>e(a.oR).getKeyMetrics()),t=(0,h.A)(),{setValue:i}=(0,r.useDispatch)(n.n),p=(0,s.useCallback)(()=>{i(l.EA,!0),(0,u.sx)(`${t}_kmw`,"change_metrics")},[i,t]),y=Array.isArray(e)&&e?.length>0;return function({renderChangeMetricLink:e}){const t=(0,r.useSelect)(e=>e(d.O4).getKeyM
(0,c.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:h.createElement(g.A,{key:"link",href:t,external:s,onClick:f})}))}SourceLink.propTypes={name:o().string,href:o().string,className:o().string,external:o().bool};const y=SourceLink},44161:(e,t,i)=>{"use strict";i.d(t,{A:()=>GoogleChart});i(39368);var s=i(4452),o=i.n(s),r=i(32091),n=i.n(r),a=i(62688),l=i.n(a),c=i(89054),g=i(15844),d=i(52684),u=i(63696),p=i(4751),m=i(97345),h=i(13113),y=i(50539),f=i(38021),I=i.n(f),b=i(82871),v=i(12317),k=i(6730),A=i(19826),_=i(13047),S=i(83880),j=i(62540);class GoogleChartErrorHandler extends u.Component{constructor(e){super(e),this.state={error:null,info:null},this.onErrorClick=this.onErrorClick.bind(this)}componentDidCatch(e,t){i.g.console.error("Google Charts error:",e,t),this.setState({error:e,info:t}),(0,_.sx)("google_chart_error",`handle_${this.context||"unknown"}_error`,`${e?.message}\n${t?.componentStack}`.slice(0,500))}onErrorClick(){const{error:e,info:t}=this.state;I()(`\`${e?.message}\n${t?.componentStack}\``)}render(){const{children:e}=this.props,{error:t,info:i}=this.state;return t?(0,j.jsx)("div",{className:"googlesitekit-googlechart-error-handler",children:(0,j.jsx)(v.A,{description:(0,j.jsxs)(u.Fragment,{children:[(0,j.jsx)(S.A,{children:(0,b.__)("An error prevented this Google chart from being displayed properly. Report the exact contents of the error on the support forum to find out what caused it.","google-site-kit")}),(0,j.jsx)(k.A,{message:t.message,componentStack:i.componentStack})]}),onErrorClick:this.onErrorClick,onClick:this.onErrorClick,title:(0,b.__)("Error in Google Chart","google-site-kit"),error:!0})}):e}}GoogleChartErrorHandler.contextType=A.Ay,GoogleChartErrorHandler.propTypes={children:l().node.isRequired};const M=GoogleChartErrorHandler;var x=i(12417),N=i(51135),D=i(49383),T=i(62659),C=i(7076);function DateMarker({id:e,text:t}){const i=`${(0,T.A)()}_ga4-data-collection-line`;(0,u.useEffect)(()=>{(0,_.sx)(i,"chart_line_view")},[i]);const s=(0,u.useCallback)(()=>{(0,_.sx)(i,"chart_tooltip_view")},[i]),o=(0,C.d)(s,5e3,{leading:!0,trailing:!1});return(0,j.jsxs)(u.Fragment,{children:[(0,j.jsx)("div",{id:`googlesitekit-chart__date-marker-line--${e}`,className:"googlesitekit-chart__date-marker-line"}),t&&(0,j.jsx)("div",{id:`googlesitekit-chart__date-marker-tooltip--${e}`,className:"googlesitekit-chart__date-marker-tooltip",children:(0,j.jsx)(D.Tooltip,{title:t,onOpen:o,children:(0,j.jsx)("span",{children:(0,j.jsx)(x.A,{fill:"currentColor",icon:N.A,size:18})})})})]})}var w=i(7972),E=i(86582),R=i(28975),L=i(97513);function GoogleChart(e){const{chartEvents:t,chartType:s,children:r,className:a,data:l,dateMarkers:f,getChartWrapper:I,height:b,loaded:v,loadingHeight:k,loadingWidth:A,onMouseOver:S,onMouseOut:x,onReady:N,onSelect:D,selectedStats:C,width:O,options:G,gatheringData:P,...z}=e,Z=(0,d.A)(GoogleChart),W=(0,L.dv)(),{startDate:U,endDate:B}=(0,y.useSelect)(e=>e(m.oR).getDateRangeDates({offsetDays:0})),V=(0,T.A)(),F=(0,y.useSelect)(e=>e(w.n).getValue("googleChartsCollisionError")),[H,Y]=(0,u.useState)(!1),{setValue:Q}=(0,y.useDispatch)(w.n),J=(0,R.gZ)(l,C),q="PieChart"===s?"circular":"square",X=(0,R._8)(k,b,A,O),$=(0,j.jsx)("div",{className:"googlesitekit-chart-loading",children:(0,j.jsx)(p.A,{className:"googlesitekit-chart-loading__wrapper",shape:q,...X})}),K=(0,u.useRef)(),ee=(0,u.useRef)();(0,g.A)(()=>{void 0===F&&((0,E.A)(V)&&i.g?.google?.charts&&(i.g.google.charts=void 0),!(0,E.A)(V)&&i.g?.google?.charts?Q("googleChartsCollisionError",!0):Q("googleChartsCollisionError",!1))}),(0,u.useEffect)(()=>()=>{if(ee.current&&K.current){const{events:e}=ee.current.visualization;e.removeAllListeners(K.current.getChart()),e.removeAllListeners(K.current)}},[]),(0,u.useLayoutEffect)(()=>{S&&ee.current?.visualization.events.addListener(K.current.getChart(),"onmouseover",e=>{S(e,{chartWrapper:K.current,google:ee.current})}),x&&ee.current?.visualization.events.addListener(K.current.getChart(),"onmouseout",e=>{x(e,{chartWrapper:K.current,google:ee.current})})},[S,x]);const te=f.filter(e=>{return!!((t=new Date(e.date))&&U&&
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?p(o,{...l,unit:"second"}):"",s?p(s,{...l,unit:"minute"}):"",i?p(i,{...l,unit:"hour"}):"").trim()},formatDecimal(){const t=(0,n.sprintf)(
// translators: %s: number of seconds with "s" as the abbreviated unit.
// translators: %s: number of seconds with "s" as the abbreviated unit.
(0,n.__)("%ds","google-site-kit"),o);if(0===e)return t;const r=(0,n.sprintf)(
// translators: %s: number of minutes with "m" as the abbreviated unit.
// translators: %s: number of minutes with "m" as the abbreviated unit.
(0,n.__)("%dm","google-site-kit"),s),a=(0,n.sprintf)(
// translators: %s: number of hours with "h" as the abbreviated unit.
// translators: %s: number of hours with "h" as the abbreviated unit.
(0,n.__)("%dh","google-site-kit"),i);return(0,n.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?t:"",s?r:"",i?a:"").trim()}}}(e,t);try{return i()}catch{return s()}}function l(e){e=parseInt(e,10),Number.isNaN(e)&&(e=0);return{hours:Math.floor(e/60/60),minutes:Math.floor(e/60%60),seconds:Math.floor(e%60)}}function c(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e}function g(e){let t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:(0,s.isPlainObject)(e)&&(t={...e}),t}function d(e,t={}){e=(0,s.isFinite)(e)?e:Number(e),(0,s.isFinite)(e)||(console.warn("Invalid number",e,typeof e),e=0);const i=g(t),{style:o="metric"}=i;return"metric"===o?function(e){const t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in millions.
// translators: %s: an abbreviated number in millions.
(0,n.__)("%sM","google-site-kit"),p(c(e),e%10==0?{}:t)):1e4<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in thousands.
// translators: %s: an abbreviated number in thousands.
(0,n.__)("%sK","google-site-kit"),p(c(e))):1e3<=e?(0,n.sprintf)(
// translators: %s: an abbreviated number in thousands.
// translators: %s: an abbreviated number in thousands.
(0,n.__)("%sK","google-site-kit"),p(c(e),e%10==0?{}:t)):p(e,{signDisplay:"never",maximumFractionDigits:1})}(e):"duration"===o?a(e,i):"durationISO"===o?function(e){let{hours:t,minutes:i,seconds:s}=l(e);return s=("0"+s).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${s}`:`${t}:${i}:${s}`}(e):p(e,i)}const u=r()(console.warn);function p(e,t={}){const{locale:i=h(),...s}=t;try{return new Intl.NumberFormat(i,s).format(e)}catch(t){u(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(s)} ).format( ${typeof e} )`,t.message)}const o={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},r=["signDisplay","compactDisplay"],n={};for(const[e,t]of Object.entries(s))o[e]&&t===o[e]||r.includes(e)||(n[e]=t);try{return new Intl.NumberFormat(i,n).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function m(e,t={}){const{locale:i=h(),style:s="long",type:o="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:s,type:o}).format(e)}
/* translators: used between list items, there is a space after the comma. */const r=(0,n.__)(", ","google-site-kit");return e.join(r)}function h(e=i.g){const t=(0,s.get)(e,["_googlesitekitLegacyData","locale"]);if(t){const e=t.match(/^(\w{2})?(_)?(\w{2})/);if(e&&e[0])return e[0].replace(/_/g,"-")}return e.navigator.language}},49993:(e,t,i)=>{"use strict";i.d(t,{Gq:()=>d,IL:()=>h,LD:()=>p,SO:()=>u,a2:()=>o,xD:()=>m});var s=i(13047);const o="googlesitekit_",r=`${o}1.175.0_${i.g._googlesitekitBaseData.storagePrefix}_`,n=["sessionStorage","localStorage"];let a,l=[...n];async function c(e){const t=i.g[e];if(!t)return!1;try{const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}}async function g(){if(void 0!==a)return a;for(const e of l)a||await c(e)&&(a=i.g[e]);return void 0===a&&(a=null),a}async function d(e){const t=await g();if(t){const i=t.getItem(`${r}${e}`);if(i){const e=JSON.parse(i),{timestamp:t,ttl:s,value:o,isError:r}=e;if(t&&(!s||Math.round(Date.now()/1e3)-t<s))return{cacheHit:!0,value:o,isError:r}}}return{cacheHit:!1,value:void 0}}async function u(e,t,{ttl:o=s.Jg,timestamp:n=Math.round(Date.now()/1e3),isError:a=!1}={}){const l=await g();if(l)try{return l.setItem(`${r}${e}`,JSON.stringify({timestamp:n,ttl:o,value:t,isError:a})),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function p(e){const t=await g();if(t)try{const i=e.startsWith(o)?e:`${r}${e}`;return t.removeItem(i),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function m(){const e=await g();if(e)try{const t=[];for(let i=0;i<e.length;i++){const s=e.key(i);0===s.indexOf(o)&&t.push(s)}return t}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),[]}return[]}async function h(){if(await g()){const e=await m();for(const t of e)await p(t);return!0}return!1}},50231:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var s=i(62688),o=i.n(s),r=i(17243),n=i(4452),a=i.n(n),l=i(31589),c=i(63696),g=i(62540);function TableOverflowContainer({children:e}){const[t,i]=(0,c.useState)(!1),s=(0,c.useRef)(),o=(0,r.debounce)(n,100);function n(){if(!s.current)return;const{scrollLeft:e,scrollWidth:t,offsetWidth:o}=s.current,r=t-o;i(e<r-16&&0<r-16)}return(0,l.A)("resize",o),(0,c.useEffect)(()=>{n()},[]),(0,g.jsx)("div",{onScroll:(0,r.debounce)(n,100),className:a()("googlesitekit-table-overflow",{"googlesitekit-table-overflow--gradient":t}),children:(0,g.jsx)("div",{ref:s,className:"googlesitekit-table-overflow__container",children:e})})}TableOverflowContainer.propTypes={children:o().element};const d=TableOverflowContainer},50304:(e,t,i)=>{"use strict";i.d(t,{A:()=>IconWrapper});var s=i(62688),o=i.n(s),r=i(62540);function IconWrapper({children:e,marginLeft:t,marginRight:i}){return(0,r.jsx)("span",{className:"googlesitekit-icon-wrapper",style:{marginLeft:t,marginRight:i},children:e})}IconWrapper.propTypes={children:o().node.isRequired,marginLeft:o().number,marginRight:o().number}},50454:(e,t,i)=>{"use strict";i.d(t,{G:()=>d});var s=i(82871),o=i(97345),r=i(29785),n=i(80);function a({select:e,slug:t}){return e(n.K9).hasConversionReportingEvents(this.requiredConversionEventName)||e(o.oR).isKeyMetricActive(t)}var l=i(7144);function c({select:e,isViewOnlyDashboard:t}){return!t||!(!t||!e(n.K9).getAdSenseLinked())}function g({select:e,isViewOnlyDashboard:t}){return!t||e(n.K9).hasCustomDimensions(this.requiredCustomDimensions)}const d={[o.p3]:{title:(0,s.__)("Top earning pages","google-site-kit"),description:(0,s.__)("Pages that generated the most AdSense revenue","google-site-kit"),infoTooltip:(0,s.__)("Pages that generated the most AdSense revenue","google-site-kit"),displayInSelectionPanel:c,displayInList:c,metadata:{group:l.hs.SLUG}},[o.BT]:{title:(0,s.__)("Top recent trending pages","google-site-kit"),description:(0,s.__)("Pages with the most pageviews published in the last 3 days","google-site-kit"),i
(0,n._n)("Last %s day","Last %s days",e,"google-site-kit"),e)}return{"last-7-days":{slug:"last-7-days",label:e(7),days:7},"last-14-days":{slug:"last-14-days",label:e(14),days:14},"last-28-days":{slug:"last-28-days",label:e(28),days:28},"last-90-days":{slug:"last-90-days",label:e(90),days:90}}}function h(e=""){if(!(0,r.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,r.isDate)(t)&&!isNaN(t)}function y(e){o()((0,r.isDate)(e)&&!isNaN(e),a);const t=`${e.getMonth()+1}`,i=`${e.getDate()}`;return[e.getFullYear(),t.length<2?`0${t}`:t,i.length<2?`0${i}`:i].join("-")}function f(e){o()(h(e),l);const[t,i,s]=e.split("-");return new Date(t,i-1,s)}function I(e,t){return y(v(e,t*u))}function b(e){const t=e.split("-");return 3===t.length&&"last"===t[0]&&!Number.isNaN(t[1])&&!Number.isNaN(parseFloat(t[1]))&&"days"===t[2]}function v(e,t){o()(h(e)||(0,r.isDate)(e)&&!isNaN(e),l);const i=h(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}},52274:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});var s=i(63696),o=i(50539),r=i(7972);function n(e){const{setValue:t}=(0,o.useDispatch)(r.n);return(0,s.useCallback)(()=>{t("admin-screen-tooltip",{isTooltipVisible:!0,...e})},[t,e])}},54286:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var s=i(62688),o=i.n(s),r=i(33052),n=i(62540);function WidgetHeaderTitle({title:e}){return(0,n.jsx)(r.A,{className:"googlesitekit-widget__header-title",as:"h3",type:"title",size:"small",children:e})}WidgetHeaderTitle.propTypes={title:o().string.isRequired};const a=WidgetHeaderTitle},54419:e=>{"use strict";e.exports=googlesitekit.api},55465:(e,t,i)=>{"use strict";i.d(t,{O:()=>o});var s=i(31234);const o=i.n(s)()(i.g)},55989:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(62540);function VisuallyHidden({className:e,children:t,...i}){return t?(0,a.jsx)("span",{...i,className:n()("screen-reader-text",e),children:t}):null}VisuallyHidden.propTypes={className:o().string,children:o().node},VisuallyHidden.defaultProps={className:""};const l=VisuallyHidden},60515:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(63696),l=i(82871),c=i(49383),g=i(5855),d=i(38432),u=i(62540);function NewBadge({tooltipTitle:e,learnMoreLink:t,forceOpen:i,hasLeftSpacing:s,hasNoSpacing:o,onLearnMoreClick:r=()=>{}}){const p=(0,u.jsx)(g.A,{className:n()("googlesitekit-new-badge",{"googlesitekit-new-badge--has-no-spacing":o}),label:(0,l.__)("New","google-site-kit"),hasLeftSpacing:s});return e?(0,u.jsx)(c.Tooltip,{tooltipClassName:"googlesitekit-new-badge__tooltip",title:(0,u.jsxs)(a.Fragment,{children:[e,(0,u.jsx)("br",{}),(0,u.jsx)(d.A,{href:t,onClick:r,external:!0,hideExternalIndicator:!0,children:(0,l.__)("Learn more","google-site-kit")})]}),placement:"top",enterTouchDelay:0,leaveTouchDelay:5e3,open:i,interactive:!0,children:p}):p}NewBadge.propTypes={tooltipTitle:o().string,learnMoreLink:o().string,forceOpen:o().bool,onLearnMoreClick:o().func,hasLeftSpacing:o().bool,hasNoSpacing:o().bool};const p=NewBadge},60947:(e,t,i)=>{"use strict";i.d(t,{A:()=>MetricTileError});var s=i(12317),o=i(82267),r=i(62540);function MetricTileError(e){const{children:t,headerText:i,infoTooltip:n,title:a}=e;return(0,r.jsx)("div",{className:"googlesitekit-km-widget-tile--error",children:(0,r.jsx)(s.A,{title:a,headerText:i,headerContent:n&&(0,r.jsx)(o.A,{title:n}),description:"",error:!0,children:t})})}},61983:(e,t,i)=>{"use strict";i.d(t,{A:()=>DismissButton});var s=i(62688),o=i.n(s),r=i(82871),n=i(49383),a=i(62540);function DismissButton({className:e,label:t=(0,r.__)("Maybe later","google-site-kit"),onClick:i,disabled:s,tertiary:o=!0}){return i?(0,a.jsx)(n.Button,{className:e,onClick:i,disabled:s,tertiary:o,children:t}):null}DismissButton.propTypes={className:o().string,label:o().string,onClick:o().func,disabled:o().bool,tertiary:o().bool,dismissOptions:o().shape({expiresInSeconds:o().number,skipHidingFromQueue:o().bool})}},62659:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s=i(63696),o=i(19826);const __WEBPACK_DEFAULT_EXPORT__=function(){return(0,s.useCo
(0,n.__)("%s (Please try again.)","google-site-kit"),v)),p||(v=(0,n.sprintf)(/* translators: $%s: Error message */ /* translators: $%s: Error message */
(0,n.__)("Error: %s","google-site-kit"),v));const k=t?.data?.reconnectURL;k&&(0,a.m)(k)&&(v=(0,n.sprintf)(/* translators: 1: Original error message 2: Reconnect URL */ /* translators: 1: Original error message 2: Reconnect URL */
(0,n.__)('%1$s To fix this, <a href="%2$s">redo the plugin setup</a>.',"google-site-kit"),v,k));return(0,u.jsx)(g.A,{className:e,type:g.A.TYPES.ERROR,description:(0,u.jsx)("span",{dangerouslySetInnerHTML:(0,d.p9)(v,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}),ctaButton:b?{label:(0,n.__)("Retry","google-site-kit"),onClick:I}:void 0,hideIcon:h})}ErrorNotice.propTypes={className:o().string,error:o().shape({message:o().string}),hasButton:o().bool,storeName:o().string,message:o().string,noPrefix:o().bool,skipRetryMessage:o().bool,hideIcon:o().bool}},73730:(e,t,i)=>{"use strict";function s(e,t,i=()=>!0){return"string"==typeof e?i(e):!("object"!=typeof e||!t(e))||!!Array.isArray(e)&&e.every(e=>"string"==typeof e?i(e):"object"==typeof e&&t(e))}function o({startDate:e,endDate:t}){const i=e&&e.match(/^\d{4}-\d{2}-\d{2}$/),s=t&&t.match(/^\d{4}-\d{2}-\d{2}$/);return i&&s}function r(e){function t(e){const t=e.hasOwnProperty("fieldName")&&!!e.fieldName,i=e.hasOwnProperty("sortOrder")&&/(ASCENDING|DESCENDING)/i.test(e.sortOrder.toString());return t&&i}return Array.isArray(e)?e.every(e=>"object"==typeof e&&t(e)):"object"==typeof e&&t(e)}function n(e){return"string"==typeof e||!!Array.isArray(e)&&e.every(e=>"string"==typeof e)}i.d(t,{G4:()=>r,O5:()=>o,cX:()=>s,cq:()=>n})},73866:(e,t,i)=>{"use strict";i.d(t,{g4:()=>h,o1:()=>m});var s=i(78913),o=i(32091),r=i.n(o),n=i(10523),a=i.n(n),l=i(13047),c=i(50539);const g="RECEIVE_ERROR",d="CLEAR_ERROR",u="CLEAR_ERRORS";function p(e,t){if(t&&Array.isArray(t)){const i=t.map(e=>"object"==typeof e?(0,l.Zm)(e):e);return`${e}::${a()(JSON.stringify(i))}`}return e}const m={receiveError:(e,t,i=[])=>(r()(e,"error is required."),r()(t,"baseName is required."),r()(i&&Array.isArray(i),"args must be an array."),{type:g,payload:{error:e,baseName:t,args:i}}),clearError:(e,t=[])=>(r()(e,"baseName is required."),r()(t&&Array.isArray(t),"args must be an array."),{type:d,payload:{baseName:e,args:t}}),clearErrors:e=>({type:u,payload:{baseName:e}})};function h(e){r()(e,"storeName must be defined.");const t=(0,c.createReducer)((e,{type:t,payload:i})=>{switch(t){case g:{const{baseName:t,args:s,error:o}=i,r=p(t,s);e.errors=e.errors||{},e.errorArgs=e.errorArgs||{},e.errors[r]=o,e.errorArgs[r]=s;break}case d:{const{baseName:t,args:s}=i,o=p(t,s);e.errors=e.errors||{},e.errorArgs=e.errorArgs||{},delete e.errors[o],delete e.errorArgs[o];break}case u:{const{baseName:t}=i;if(t){e.errors=e.errors||{},e.errorArgs=e.errorArgs||{};for(const i in e.errors)(i===t||i.startsWith(`${t}::`))&&(delete e.errors[i],delete e.errorArgs[i])}else e.errors={},e.errorArgs={};break}}}),i={getErrorForSelector:(e,t,s=[])=>(r()(t,"selectorName is required."),i.getError(e,t,s)),getErrorForAction:(e,t,s=[])=>(r()(t,"actionName is required."),i.getError(e,t,s)),getError(e,t,i){const{errors:s}=e;return r()(t,"baseName is required."),s[p(t,i)]},getErrors(e){const t=new Set(Object.values(e.errors));return Array.from(t)},getMetaDataForError(e,t){const i=Object.keys(e.errors).find(i=>e.errors[i]===t);if(i){return{baseName:i.substring(0,i.indexOf("::")),args:e.errorArgs[i]}}return null},getSelectorDataForError:(0,s.N)(t=>function(i,s){const o=t(e).getMetaDataForError(s);if(o){const{baseName:i,args:s}=o;if(!!t(e)[i])return{storeName:e,name:i,args:s}}return null}),hasErrors:e=>i.getErrors(e).length>0};return{initialState:{errors:{},errorArgs:{}},actions:m,controls:{},reducer:t,resolvers:{},selectors:i}}},73881:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});const s="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA4IiBoZWlnaHQ9IjI2NyIgdmlld0JveD0iMCAwIDUwOCAyNjciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xNDYxXzEwNTc2KSI+CjxwYXRoIGQ9Ik01MzMuOTg5IDIxNi4yNDNDNTA4LjI4MSAyNjkuOTc4IDQzOS41ODcgMjcwLjU1NiA0MDEuNDQyIDI2Mi4zNzFDMzUxLjY3OCAyNTEuNjkzIDMxOC42NDcgMjEyLjYzNCAyNzUuMiAyMTAuMTZDMjMxLjc1NCAyMDcuNjg1IDIwNy41MzIgMjMwLjI4OCAxNjAuNzE0IDIzNS45MzdDMTEzLjg5NSAyNDEuNTg1IDU2LjQ3NDcgMjM2LjQ1IDI2LjY5MjIgMTc4LjQyNUMtMy4wOTAyOCAxMjAuNDAxIDE3LjQ0OTMgNTguOTc2MyA3MC4zMzkgMjguMTkyM0MxMjMuMjI5IC0yLjU5MTc4IDE1NS4zMTcgMjguMzQ4MyAyMDcuNTMy
(0,n._x)("%1$s vs %2$s","Date range for chart tooltip","google-site-kit"),e[0].toLocaleDateString(_,S),A[i][0].toLocaleDateString(_,S)),f=(0,n.sprintf)(/* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage */ /* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage */
(0,n._x)("%1$s: <strong>%2$s</strong> <em>%3$s %4$s</em>","Stat information for chart tooltip","google-site-kit"),c[t],d[t](r),m,(0,l.Eo)(Math.abs(u),"%"));I.push([e[0],`<div class="${o()("googlesitekit-visualization-tooltip",{"googlesitekit-visualization-tooltip--up":u>0,"googlesitekit-visualization-tooltip--down":u<0})}">\n\t\t\t\t<p>${h}</p>\n\t\t\t\t<p>${f}</p>\n\t\t\t</div>`,y?(0,l.vH)(r):r,y?(0,l.vH)(a):a])}),I}},74655:(e,t,i)=>{"use strict";i.d(t,{A:()=>ChangeBadge});var s=i(62688),o=i.n(s),r=i(4452),n=i.n(r),a=i(13047),l=i(62540);function ChangeBadge(e){const{previousValue:t,currentValue:i,isAbsolute:s}=e,o=s?i-t:(0,a.Zf)(t,i),r=o<0,c=0===o;return null===o?null:(0,l.jsx)("div",{className:n()("googlesitekit-change-badge",{"googlesitekit-change-badge--negative":r,"googlesitekit-change-badge--zero":c}),children:(0,a.Eo)(o,{style:"percent",signDisplay:"exceptZero",maximumFractionDigits:1})})}ChangeBadge.propTypes={isAbsolute:o().bool,previousValue:o().number.isRequired,currentValue:o().number.isRequired}},75110:(e,t,i)=>{"use strict";i.d(t,{A:()=>PreviewGraph});var s,o=i(62688),r=i.n(o),n=i(63696);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},a.apply(null,arguments)}const l=e=>n.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 6"},e),s||(s=n.createElement("path",{fill:"currentColor",d:"m0 3.01.443.387 1.755-1.534v3.344h.628V1.863L4.578 3.4l.446-.39L2.512.811z"})));var c=i(33052),g=i(62540);function PreviewGraph({title:e,GraphSVG:t,showIcons:i}){return(0,g.jsxs)("div",{className:"googlesitekit-analytics-cta__preview-graph",children:[(0,g.jsx)(c.A,{as:"h3",size:"small",type:"body",className:"googlesitekit-analytics-cta__preview-graph--title",children:e}),(0,g.jsx)("div",{children:(0,g.jsx)(t,{})}),i&&(0,g.jsxs)("div",{className:"googlesitekit-analytics-cta__preview-graph--icons",children:[(0,g.jsx)(l,{className:"googlesitekit-analytics-cta__preview-graph--up-arrow"}),(0,g.jsx)("span",{className:"googlesitekit-analytics-cta__preview-graph--bar"})]})]})}PreviewGraph.propTypes={title:r().string.isRequired,GraphSVG:r().elementType.isRequired,showIcons:r().bool},PreviewGraph.defaultProps={showIcons:!0}},76984:(e,t,i)=>{"use strict";i.d(t,{Q:()=>s});const s={NEW:"new",SUCCESS:"success",WARNING:"warning",INFO:"info",INFO_ALT:"info-alt",INFO_ALT_2:"info-alt-2",ERROR:"error"}},78014:(e,t,i)=>{"use strict";i.d(t,{A:()=>StoreErrorNotices});var s=i(62688),o=i.n(s),r=i(50539),n=i(73198),a=i(88273),l=i(13137),c=i(31012),g=i(62540);function StoreErrorNotices({hasButton:e=!1,moduleSlug:t,storeName:i}){const s=(0,r.useSelect)(e=>e(i).getErrors()),o=(0,r.useSelect)(e=>e(a.i).getModule(t)),d=[];return s.filter(e=>!(!e?.message||d.includes(e.message))&&(d.push(e.message),!0)).map((t,s)=>{let{message:r}=t;return(0,l.SG)(t)&&(r=(0,c.c)(r,o)),(0,g.jsx)(n.A,{error:t,hasButton:e,storeName:i,message:r},s)})}StoreErrorNotices.propTypes={hasButton:o().bool,storeName:o().string.isRequired,moduleSlug:o().string}},79961:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var s=i(63696),o=i(84895);const r=(0,s.createContext)(o.t)},80452:(e,t,i)=>{"use strict";i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,o=i(63696);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},r.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>o.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 9"},e),s||(s=o.createElement("path",{stroke:"currentColor",strokeLinecap:"square",strokeWidth:1.6,d:"m2 5.309 1.474 2.14c.69 1.001 1.946 1.001 2.636 0L10 1.8"})))},82267:(e,t,i)=>{"use strict";i.d(t,{A:()=>InfoTooltip});var s,o=i(4452),r=i.n(o),n=i(62688),a=i.n(n),l=i(49383),c=i(63696);function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnPro
(0,c.__)("Trouble getting access? <HelpLink />","google-site-kit"),{HelpLink:(0,p.jsx)(u.A,{href:e,external:!0,hideExternalIndicator:!0,children:(0,c.__)("Get help","google-site-kit")})})}GetHelpLink.propTypes={linkURL:a().string.isRequired};var m=i(4751);function MetricTileLoader(){return(0,p.jsxs)("div",{className:"googlesitekit-km-widget-tile__loading",children:[(0,p.jsx)(m.A,{className:"googlesitekit-km-widget-tile__loading-header",width:"100%",height:"14px"}),(0,p.jsx)(m.A,{className:"googlesitekit-km-widget-tile__loading-body",width:"100%",height:"53px"})]})}var h=i(60947),y=i(25064),f=i(1641),I=i(13137),b=i(13047),v=i(62659);function MetricTileWrapper(e){const{className:t,children:i,error:s,loading:n,moduleSlug:a,Widget:d,widgetSlug:u,title:m=g.G[u]?.title,infoTooltip:k=g.G[u]?.infoTooltip||g.G[u]?.description}=e,A=(0,v.A)(),_=!!s&&(0,r.castArray)(s).some(I.SG),S=(0,l.useCallback)(()=>{(0,b.sx)(`${A}_kmw`,"data_loading_error_retry")},[A]);return(0,l.useEffect)(()=>{s&&(0,b.sx)(`${A}_kmw`,"data_loading_error")},[A,s]),s?(0,p.jsx)(h.A,{title:_?(0,c.__)("Insufficient permissions","google-site-kit"):(0,c.__)("Data loading failed","google-site-kit"),headerText:m,infoTooltip:k,children:(0,p.jsx)(f.A,{moduleSlug:a,error:s,onRetry:S,GetHelpLink:_?GetHelpLink:void 0,getHelpClassName:"googlesitekit-error-retry-text"})}):(0,p.jsx)(d,{noPadding:!0,children:(0,p.jsxs)("div",{className:o()("googlesitekit-km-widget-tile",t),children:[(0,p.jsx)(y.A,{title:m,infoTooltip:k,loading:n}),(0,p.jsxs)("div",{className:"googlesitekit-km-widget-tile__body",children:[n&&(0,p.jsx)(MetricTileLoader,{}),!n&&i]})]})})}MetricTileWrapper.propTypes={Widget:a().elementType.isRequired,loading:a().bool,title:a().string,infoTooltip:a().oneOfType([a().string,a().element]),moduleSlug:a().string.isRequired}},96574:(e,t,i)=>{"use strict";i.d(t,{A:()=>ReportTable});var s=i(4452),o=i.n(s),r=i(32091),n=i.n(r),a=i(62688),l=i.n(a),c=i(17243),g=i(63696),d=i(49383),u=i(13113),p=i(62540);function ReportTable(e){const{rows:t,columns:i,className:s,limit:r,zeroState:a,gatheringData:l=!1,tabbedLayout:m=!1}=e;n()(Array.isArray(t),"rows must be an array."),n()(Array.isArray(i),"columns must be an array."),i.forEach(({Component:e,field:t=null})=>{n()(e||null!==t,"each column must define a Component and/or a field.")}),n()(Number.isInteger(r)||void 0===r,"limit must be an integer, if provided.");const h=i.some(({badge:e})=>!!e),[y,f]=(0,g.useState)(0),I=m&&i.slice(1),b=m?[i[0],I[y]]:i;return(0,p.jsxs)("div",{className:s,children:[m&&(0,p.jsx)(d.TabBar,{className:"googlesitekit-tab-bar--start-aligned-high-contrast",activeIndex:y,handleActiveIndexUpdate:f,children:I.map(({title:e,badge:t})=>(0,p.jsxs)(d.Tab,{"aria-label":e,children:[e,t]},e))}),(0,p.jsx)("div",{className:o()("googlesitekit-table","googlesitekit-table--with-list",{"googlesitekit-table--gathering-data":l}),children:(0,p.jsxs)("table",{className:o()("googlesitekit-table__wrapper",`googlesitekit-table__wrapper--${b.length}-col`,{"googlesitekit-table__wrapper--tabbed-layout":m}),children:[!m&&(0,p.jsxs)("thead",{className:"googlesitekit-table__head",children:[h&&(0,p.jsx)("tr",{className:"googlesitekit-table__head-badges",children:i.map(({badge:e,primary:t,className:i,columnHeaderClassName:s},r)=>(0,p.jsx)("th",{className:o()("googlesitekit-table__head-item","googlesitekit-table__head-item--badge",{"googlesitekit-table__head-item--primary":t},i,s),children:e},`googlesitekit-table__head-row-badge-${r}`))}),(0,p.jsx)("tr",{className:"googlesitekit-table__head-row",children:i.map(({title:e,description:t,primary:i,className:s,columnHeaderClassName:r},n)=>(0,p.jsx)("th",{className:o()("googlesitekit-table__head-item",{"googlesitekit-table__head-item--primary":i},s,r),"data-tooltip":t,children:(0,p.jsx)("span",{className:"googlesitekit-table__head-item-title",children:e})},`googlesitekit-table__head-row-${n}`))})]}),(0,p.jsxs)("tbody",{className:"googlesitekit-table__body",children:[l&&(0,p.jsx)("tr",{className:"googlesitekit-table__body-row googlesitekit-table__body-row--no-data",children:(0,p.jsx)("td",{className:
(0,r.__)("%s data was previously shared by an admin who no longer has access. Please contact another admin to restore it.","google-site-kit"),t[0]):(0,r.sprintf)(/* translators: %s: List of module names */ /* translators: %s: List of module names */
(0,r.__)("The data for the following modules was previously shared by an admin who no longer has access: %s. Please contact another admin to restore it.","google-site-kit"),t.join((0,r._x)(", ","Recoverable modules","google-site-kit")));return(0,c.jsx)(l.A,{title:(0,r.__)("Data Unavailable","google-site-kit"),description:i})}RecoverableModules.propTypes={moduleSlugs:o().arrayOf(o().string).isRequired}}},e=>{e.O(0,[660],()=>{return t=17716,e(e.s=t);var t});e.O()}]);