48 lines
344 KiB
JavaScript
48 lines
344 KiB
JavaScript
|
|
"use strict";(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[290,849],{133:(e,t,i)=>{i.d(t,{B:()=>n});i(72455);function n(e){return 400===e?.code&&e?.message?.includes("is not a valid dimension")}},674:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n,o,s=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 n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>s.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 22"},e),n||(n=s.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.754-.35c.2-.04.383-.139.527-.283l6.495-6.494a1.03 1.03 0 0 0 0-1.459z",clipRule:"evenodd"})),o||(o=s.createElement("path",{d:"m12.149 7.96.117-.116a.165.165 0 0 0-.234 0zm-5.166 5.166-.116-.116zm-.094.176.162.033zm-.35 1.755.161.032zm.404.404.032.162zm1.755-.35.032.161zm.175-.095.117.117zm5.166-5.165.116.116a.165.165 0 0 0 0-.233zm-1.047-3.705.116.116zm1.458 0-.116.116zM6.497 12.64l.117.117zm-.282.527-.162-.032zm-.35 1.755.161.032zm1.213 1.213-.033-.162zm1.754-.35.033.161zm.527-.283.117.117zm6.495-6.494-.117-.117zm0-1.459.117-.116zm-3.822.295L6.867 13.01l.233.233 5.166-5.165zM6.867 13.01a.5.5 0 0 0-.14.26l.324.065a.2.2 0 0 1 .05-.092zm-.14.26-.35 1.754.323.065.351-1.755zm-.35 1.754a.51.51 0 0 0 .598.599l-.064-.324a.18.18 0 0 1-.21-.21zm.598.599 1.755-.35-.065-.325-1.754.351zm1.755-.35a.5.5 0 0 0 .26-.14l-.233-.233a.2.2 0 0 1-.092.048zm.26-.14 5.165-5.166-.233-.233L8.757 14.9zm3.042-7.055 1.89 1.89.233-.234-1.89-1.89zm1.076-1.816a.866.866 0 0 1 1.226 0l.233-.233a1.196 1.196 0 0 0-1.692 0zm-6.494 6.495 6.494-6.495-.233-.233-6.494 6.495zm-.237.443a.87.87 0 0 1 .237-.443l-.233-.233c-.167.167-.281.38-.328.61zm-.35 1.754.35-1.754-.324-.065-.35 1.755zm1.018 1.02a.866.866 0 0 1-1.019-1.02l-.323-.065a1.196 1.196 0 0 0 1.407 1.408zm1.755-.351-1.755.35.065.324 1.755-.35zm.443-.237a.87.87 0 0 1-.443.237l.065.323c.231-.046.444-.16.611-.327zm6.494-6.495-6.494 6.495.233.233 6.495-6.494zm0-1.225a.866.866 0 0 1 0 1.225l.234.234a1.196 1.196 0 0 0 0-1.692zm-1.403-1.404 1.403 1.404.234-.233-1.404-1.404z"})))},718:(e,t,i)=>{i.d(t,{gy:()=>SelectionPanelFooter,W4:()=>SelectionPanelHeader,y3:()=>SelectionPanelItem,DW:()=>SelectionPanelItems,Ay:()=>E});var n=i(4452),o=i.n(n),s=i(62688),r=i.n(s),a=i(4544),l=i.n(a),c=i(21795),d=i(78174),g=i(63696),u=i(19266),p=i(14007),m=i(62540);function SideSheet({className:e,children:t,isOpen:i,isLoading:n,onOpen:s=()=>{},closeSheet:r=()=>{},focusTrapOptions:a={}}){const h=(0,g.useRef)();return(0,g.useEffect)(()=>{i?(s(),document.body.classList.add("googlesitekit-side-sheet-scroll-lock")):document.body.classList.remove("googlesitekit-side-sheet-scroll-lock")},[i,s]),(0,c.A)(h,r),(0,d.A)(e=>i&&u._f===e.keyCode,r),(0,m.jsxs)(p.A,{children:[(0,m.jsx)(l(),{active:!!i&&!n,focusTrapOptions:{fallbackFocus:"body",...a},children:(0,m.jsx)("section",{ref:h,className:o()("googlesitekit-side-sheet",e,{"googlesitekit-side-sheet--open":i}),role:"dialog","aria-modal":"true","aria-hidden":!i,tabIndex:"0",children:t})}),i&&(0,m.jsx)("span",{className:"googlesitekit-side-sheet-overlay"})]})}function SelectionPanel({children:e,isOpen:t,isLoading:i,onOpen:n,closePanel:s,className:r}){const a=r?.split(/\s+/).map(e=>`.${e}`).join(""),l=a?`${a} .googlesitekit-selection-panel-item .googlesitekit-selection-box input`:".googlesitekit-selection-panel-item .googlesitekit-selection-box input";return(0,m.jsx)(SideSheet,{className:o()("googlesitekit-selection-panel",r),isOpen:t,isLoading:i,onOpen:n,closeSheet:s,focusTrapOptions:{initialFocus:l},children:e})}SideSheet.propTypes={className:r().string,children:r().node,isOpen:r().bool,isLoading:r().bool,onOpen:r().func,closeSheet:r().func,focus
|
|||
|
|
(0,y.__)("%1$d selected <MaxCount>(up to %2$d)</MaxCount>","google-site-kit"),S,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:[C,(0,m.jsxs)("div",{className:"googlesitekit-selection-panel-footer__actions",children:[(0,m.jsx)(f.Button,{onClick:D,disabled:s,tertiary:!0,children:(0,y.__)("Cancel","google-site-kit")}),(0,m.jsx)(f.SpinnerButton,{onClick:E,isSaving:s,disabled:S<n||S>o||s||!l&&p,children:d||A})]})]})})}SelectionPanelFooter.propTypes={savedItemSlugs:r().array,selectedItemSlugs:r().array,saveSettings:r().func,minSelectedItemCount:r().number,maxSelectedItemCount:r().number,isBusy:r().bool,onSaveSuccess:r().func,onCancel:r().func,isOpen:r().bool,closePanel:r().func};const E=SelectionPanel},1102:(e,t,i)=>{i.d(t,{w:()=>a});var n=i(35470),o=i(63696),s=i(2422);function r(){}function a(e,t){const i=(0,s.W)({sticky:!0}),a=(0,o.useRef)(),l=(0,o.useCallback)(e,t),c=(0,n.A)(i?l:r);return i&&(a.current=c),a.current}},2362:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(4452),o=i.n(n),s=i(62688),r=i.n(s),a=i(63696),l=i(62540);const c=(0,a.forwardRef)(({label:e,className:t,hasLeftSpacing:i=!1,...n},s)=>(0,l.jsx)("span",{ref:s,...n,className:o()("googlesitekit-badge",t,{"googlesitekit-badge--has-left-spacing":i}),children:e}));c.displayName="Badge",c.propTypes={label:r().string.isRequired,hasLeftSpacing:r().bool};const d=c},2390:(e,t,i)=>{i.d(t,{A:()=>SpinnerButton,k:()=>d});var n=i(62688),o=i.n(n),s=i(4452),r=i.n(s),a=i(25874),l=i(9341),c=i(62540);const d={BEFORE:"before",AFTER:"after"};function SpinnerButton(e){const{className:t,onClick:i=()=>{},isSaving:n=!1,spinnerPosition:o=d.AFTER,...s}=e;return(0,c.jsx)(a.A,{className:r()(t,"googlesitekit-button-icon--spinner",{"googlesitekit-button-icon--spinner__running":n,"googlesitekit-button-icon--spinner__before":o===d.BEFORE,"googlesitekit-button-icon--spinner__after":o===d.AFTER}),icon:n&&o===d.BEFORE?(0,c.jsx)(l.A,{size:14}):void 0,trailingIcon:n&&o===d.AFTER?(0,c.jsx)(l.A,{size:14}):void 0,onClick:i,...s})}SpinnerButton.propTypes={className:o().string,onClick:o().func,isSaving:o().bool,spinnerPosition:o().oneOf(Object.values(d))}},2422:(e,t,i)=>{i.d(t,{W:()=>l});var n=i(79257),o=i(35470),s=i(63696),r=i(6732),a=i(7081);function l({sticky:e=!1}={}){const t=(0,s.useContext)(r.A),[i,l]=(0,s.useState)(!1),c=(0,o.A)(e=>e(a.n).getInViewResetCount()),d=(0,o.A)(e=>e(a.n).getValue("forceInView"));return(0,s.useEffect)(()=>{t.value&&!i&&l(!0)},[i,t,l]),(0,s.useEffect)(()=>{d&&l(!0)},[d]),(0,n.A)(()=>{l(!1)},[c]),!(!e||!i)||!!t.value}},2478:(e,t,i)=>{i.d(t,{A:()=>ChangeBadge});var n=i(62688),o=i.n(n),s=i(4452),r=i.n(s),a=i(12850),l=i(62540);function ChangeBadge(e){const{previousValue:t,currentValue:i,isAbsolute:n}=e,o=n?i-t:(0,a.Zf)(t,i),s=o<0,c=0===o;return null===o?null:(0,l.jsx)("div",{className:r()("googlesitekit-change-badge",{"googlesitekit-change-badge--negative":s,"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}},2522:(e,t,i)=>{i.d(t,{D:()=>s});var n=i(32091),o=i.n(n);function s(e,{dateRangeLength:t}){o()(Array.isArray(e),"report must be an array to partition."),o()(Number.isInteger(t)&&t>0,"dateRangeLength must be a positive integer.");const i=-1*t;return{currentRange:e.slice(i),compareRange:e.slice(2*i,i)}}},3714:(e,t,i)=>{i.d(t,{Kk:()=>s,SZ:()=>n,Yw:()=>r,oJ:()=>a,tT:()=>o});const n="body",o=[n,"display","headline","label","title"],s="small",r="medium",a=[s,r,"large"]},3782:(e,t,i)=>{i.d(t,{A:()=>CTAButton});var n=i(62688),o=i.n(n),s=i(49383),r=i(83366),a=i(62540);function CTAButton({label:e,ariaLabel:t,disabled:i,inProgress:n,onClick:o,href:l,external:c=!1,hideExternalIndicator:d=!1}){if(!e||!o&&!l)return null;let g;return c&&!d&&(g=(0,a.jsx)(r.A,{width:14,height:14})),(
|
|||
|
|
(0,c.__)("<strong>Note:</strong> %s","google-site-kit"),M),{strong:(0,u.jsx)("strong",{})})})]}),(0,u.jsxs)(d.DialogFooter,{children:[(0,u.jsx)(d.Button,{className:"mdc-dialog__cancel-button",onClick:i,disabled:f,tertiary:!0,children:(0,c.__)("Cancel","google-site-kit")}),N?(0,u.jsx)(d.Button,{href:N,onClick:m,target:"_blank",danger:y,children:I}):(0,u.jsx)(d.SpinnerButton,{onClick:m,danger:y,disabled:f,isSaving:f,children:I||(0,c.__)("Disconnect","google-site-kit")})]})]})}ModalDialog.displayName="Dialog",ModalDialog.propTypes={className:o().string,dialogActive:o().bool,handleDialog:o().func,handleConfirm:o().func.isRequired,onOpen:o().func,onClose:o().func,title:o().string,confirmButton:o().string,danger:o().bool,small:o().bool,medium:o().bool,buttonLink:o().string};const p=ModalDialog},9341:(e,t,i)=>{i.d(t,{A:()=>CircularProgress});var n=i(75762),o=i(62540);function CircularProgress(e){return(0,o.jsx)(n.A,{...e})}},9652:(e,t,i)=>{i.d(t,{A:()=>RecoverableModules});var n=i(62688),o=i.n(n),s=i(82871),r=i(50539),a=i(37226),l=i(4884),c=i(62540);function RecoverableModules({moduleSlugs:e}){const t=(0,r.useSelect)(t=>{const i=t(a.i).getModules();if(void 0!==i)return e.map(e=>i[e].name)});if(void 0===t)return null;const i=1===t.length?(0,s.sprintf)(/* translators: %s: Module name */ /* translators: %s: Module name */
|
|||
|
|
(0,s.__)("%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,s.sprintf)(/* translators: %s: List of module names */ /* translators: %s: List of module names */
|
|||
|
|
(0,s.__)("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,s._x)(", ","Recoverable modules","google-site-kit")));return(0,c.jsx)(l.A,{title:(0,s.__)("Data Unavailable","google-site-kit"),description:i})}RecoverableModules.propTypes={moduleSlugs:o().arrayOf(o().string).isRequired}},10953:(e,t,i)=>{i.d(t,{A:()=>InfoTooltip});var n,o=i(4452),s=i.n(o),r=i(62688),a=i.n(r),l=i(49383),c=i(63696);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const g=e=>c.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),n||(n=c.createElement("path",{fill:"currentColor",d:"M7.334 11.333h1.333v-4H7.334zM8.001 6a.658.658 0 0 0 .667-.667.6.6 0 0 0-.2-.467.6.6 0 0 0-.467-.2.66.66 0 0 0-.667.667q0 .284.183.483A.7.7 0 0 0 8.001 6m0 8.666a6.6 6.6 0 0 1-2.6-.516 6.9 6.9 0 0 1-2.117-1.434A6.9 6.9 0 0 1 1.851 10.6 6.6 6.6 0 0 1 1.334 8q0-1.385.517-2.6a6.9 6.9 0 0 1 1.433-2.117q.9-.9 2.117-1.417A6.4 6.4 0 0 1 8 1.333q1.383 0 2.6.533a6.6 6.6 0 0 1 2.116 1.417q.9.9 1.417 2.117.533 1.215.533 2.6 0 1.383-.533 2.6a6.6 6.6 0 0 1-1.417 2.116 6.9 6.9 0 0 1-2.116 1.434 6.6 6.6 0 0 1-2.6.516m0-1.333q2.233 0 3.783-1.55T13.334 8t-1.55-3.784-3.783-1.55-3.784 1.55T2.667 8t1.55 3.783 3.784 1.55"})));var u=i(62540);function InfoTooltip({onOpen:e,title:t,tooltipClassName:i}){return t?(0,u.jsx)(l.Tooltip,{className:"googlesitekit-info-tooltip",tooltipClassName:s()("googlesitekit-info-tooltip__content",i),title:t,placement:"top",enterTouchDelay:0,leaveTouchDelay:5e3,onOpen:e,interactive:!0,children:(0,u.jsx)("span",{children:(0,u.jsx)(g,{width:"16",height:"16"})})}):null}InfoTooltip.propTypes={onOpen:a().func,title:a().oneOfType([a().string,a().element]),tooltipClassName:a().string}},11345:(e,t,i)=>{i.d(t,{A:()=>ReportError});var n=i(62688),o=i.n(n),s=i(17243),r=i(63696),a=i(82871),l=i(81375),c=i(50539),d=i(37226),g=i(67150),u=i(65311),p=i(15210),m=i(4884),h=i(35902),I=i(35323),M=i(77967),y=i(62540);function ReportError({moduleSlug:e,error:t}){const i=(0,I.A)(),n=(0,c.useSelect)(t=>t(d.i).getModule(e)),o=Array.isArray(t)?t:[t];let f;function A(e){return(0,g.SG)(e)?i?(f=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("Access lost to %s","google-site-kit"),n?.name),(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("The administrator sharing this module with you has lost access to the %s service, so you won’t be able to see stats from it on the Site Kit dashboard. You can contact them or another administrator to restore access.","google-site-kit"),n?.name)):(f=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("Insufficient permissions in %s","google-site-kit"),n?.name),(0,u.c)(e.message,n)):(0,g.e4)(e)}const j=(0,s.uniqWith)(o.map(e=>({...e,message:A(e),reconnectURL:e.data?.reconnectURL?(0,l.m)(e.data.reconnectURL,"code"):void 0})),(e,t)=>e.message===t.message&&e.reconnectURL===t.reconnectURL),N=o.some(e=>(0,g.SG)(e));N||1!==j.length?!N&&j.length>1&&(f=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("Data errors in %s","google-site-kit"),n?.name)):f=(0,a.sprintf)(/* translators: %s: module name */ /* translators: %s: module name */
|
|||
|
|
(0,a.__)("Data error in %s","google-site-kit"),n?.name);const k=(0,y.jsx)(r.Fragment,{children:j.map(e=>{const t=e?.data?.reconnectURL;return t?(0,y.jsx)(M.A,{error:e,message:e.message},e.message):(0,y.jsx)("p",{children:p.O.sanitize(e.message,{ALLOWED_TAGS:[]})},e.message)})});return(0,y.jsx)(m.A,{title:f,description:k,error:!0,children:(0,y.jsx)(h.A,{moduleSlug:e,error:t})})}ReportError.propTypes={moduleSlug:o().string.isRequired,error:o().oneOfType([o().arrayOf(o().object),o().object]).isRequired}},12108:(e,t,i)=>{i.d(t,{YJ:()=>s,Eq:()=>r});var n=i(32947),o=i(17243);function s(e,t){const n=document.querySelector(e);if(!n)return 0;const o=n.getBoundingClientRect().top,s=r(t);return o+i.g.scrollY-s}function r(e){let t=function(e){let t=0;const s=document.querySelector(".googlesitekit-header");t=s&&"sticky"===i.g.getComputedStyle(s).position?function(e){const t=document.querySelector(".googlesitekit-header");if(t){if(e===n.mp)return t.offsetHeight;const i=t.getBoundingClientRect().bottom;return i<0?0:i}return 0}(e):function(e){const t=document.querySelector("#wpadminbar");if(t&&e!==n.mp)return t.offsetHeight;return 0}(e);return t=function(e){return(0,o.isFinite)(e)?e:0}(t),t<0?0:t}(e);const s=document.querySelectorAll(".googlesitekit-navigation, .googlesitekit-entity-header");return t+=Array.from(s).reduce((e,t)=>e+t.offsetHeight,0),t}},12850:(e,t,i)=>{i.d(t,{tt:()=>v,Jg:()=>_,Gp:()=>N,GH:()=>j,r0:()=>k,Du:()=>T,Zf:()=>V,Cn:()=>B,G7:()=>I,vH:()=>h,N_:()=>w,zh:()=>H,mK:()=>d.mK,Ql:()=>E,vY:()=>O,sq:()=>x,VZ:()=>G.VZ,JK:()=>d.JK,IS:()=>S,pH:()=>G.pH,kf:()=>W,O5:()=>C,Qr:()=>D,x6:()=>P,K5:()=>d.K5,S_:()=>m,dc:()=>G.dc,Eo:()=>d.Eo,jq:()=>d.jq,DK:()=>U.D,N9:()=>Z,p9:()=>s.p,XH:()=>b,Zm:()=>l,sx:()=>o.sx,BI:()=>o.BI,CZ:()=>s.C,BG:()=>F});var n=i(17243),o=i(89318),s=i(82046),r=i(10523),a=i.n(r);function l(e){return a()(JSON.stringify(c(e)))}function c(e){const t={};return Object.keys(e).sort().forEach(i=>{let n=e[i];n&&"object"==typeof n&&!Array.isArray(n)&&(n=c(n)),t[i]=n}),t}var d=i(79829);function g(e){return e.replace(new RegExp("\\[([^\\]]+)\\]\\((https?://[^/]+\\.\\w+/?.*?)\\)","gi"),'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}function u(e){return`<p>${e.replace(/\n{2,}/g,"</p><p>")}</p>`}function p(e){return e.replace(/\n/gi,"<br>")}function m(e){const t=[g,u,p];let i=e;for(const e of t)i=e(i);return i}function h(e){return e=parseFloat(e),isNaN(e)||0===e?[0,0,0,0]:[Math.floor(e/60/60),Math.floor(e/60%60),Math.floor(e%60),Math.floor(1e3*e)-1e3*Math.floor(e)]}function I(e){const t=e&&!Number.isInteger(e)?new Date(e).getTime():e;return isNaN(t)||!t?0:t}var M=i(32091),y=i.n(M),f=i(82871);const A="Date param must construct to a valid date instance or be a valid date instance itself.",j="Invalid dateString parameter, it must be a string.",N='Invalid date range, it must be a string with the format "last-x-days".',k=60,_=60*k,v=24*_,T=7*v;function E(){function e(e){return(0,f.sprintf)(/* translators: %s: number of days */ /* translators: %s: number of days */
|
|||
|
|
(0,f._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 D(e=""){if(!(0,n.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,n.isDate)(t)&&!isNaN(t)}function x(e){y()((0,n.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 b(e){y()(D(e),j);const[t,i,n]=e.split("-");return new Date(t,i-1,n)}function S(e,t){return x(w(e,t*v))}function C(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 w(e,t){y()(D(e)||(0,n.isDate)(e)&&!isNaN(e),j);const i=D(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}var R=i(69743),z=i(94552),L=i(62540);function O(e,t={}){if(Number.isNaN(Number(e)))return"";const{invertColor:i=!1}=t;return(0,R.Ay)((0,L.jsx)(z.A,{direction:e>0?"up":"down",invertColor:i}))}function B(e,t){return e>0&&t>0?e/t-1:e>0?1:t>0?-1:0}var G=i(8143);function P(e){const t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function W(e){if("number"==typeof e)return!0;const t=(e||"").toString();return!!t&&!isNaN(t)}function Z(e){return Array.isArray(e)?[...e].sort():e}var U=i(2522);function V(e,t){function i(e){return"0"===e||0===e}if(i(e)&&i(t))return 0;if(i(e)||Number.isNaN(e))return null;const n=(t-e)/e;return Number.isNaN(n)||!Number.isFinite(n)?null:n}function F(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}}function H(e){if(!e)return"";const t=e.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t)).replace(/(\\)/g,"");return(0,n.unescape)(t)}},14007:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(47209),o=i(62688),s=i.n(o),r=i(63696),a=i(78325);function Portal({children:e,slug:t}){const[i]=(0,r.useState)(document.createElement("div"));return(0,n.A)(()=>{t&&i.classList.add(`googlesitekit-portal-${t}`);const e=document.querySelector(".googlesitekit-plugin")||document.body;return e.appendChild(i),()=>e.removeChild(i)}),(0,a.createPortal)(e,i)}Portal.propTypes={slug:s().string,children:s().node},Portal.defaultProps={slug:"",children:null};const l=Portal},15135:(e,t,i)=>{i.d(t,{Gr:()=>r,We:()=>l,Y2:()=>a});var n=i(86134),o=i(73549),s=i(9652);const r={[n.N$.QUARTER]:3,[n.N$.HALF]:6,[n.N$.FULL]:12},a="googlesitekit-hidden",l=[o.A,s.A]},15167:(e,t,i)=>{i.d(t,{A:()=>Typography});var n=i(62688),o=i.n(n),s=i(4452),r=i.n(s),a=i(3714),l=i(62540);function Typography({className:e,type:t,size:i,as:n="span",children:o,...s}){return(0,l.jsx)(n,{className:r()("googlesitekit-typography",e,{[`googlesitekit-typography--${t}`]:t&&a.tT.includes(t),[`googlesitekit-typography--${i}`]:i&&a.oJ.includes(i)}),...s,children:o})}Typography.propTypes={className:o().string,type:o().oneOf(a.tT),size:o().oneOf(a.oJ),as:o().oneOfType([o().string,o().elementType])}},15210:(e,t,i)=>{i.d(t,{O:()=>o});var n=i(31234);const o=i.n(n)()(i.g)},15577:(e,t,i)=>{i.d(t,{SO:()=>c});var n=i(55620),o=i(99123);const s={},r=void 0===i.g?null:i.g;function a(){return[i.g.innerWidth,i.g.innerHeight]}function l(e=s){const{fps:t,leading:i,initialWidth:l=0,initialHeight:c=0}=e,[d,g]=(0,n._)("undefined"==typeof document?[l,c]:a,t,i);function u(){return g(a)}return(0,o.A)(r,"resize",u),(0,o.A)(r,"orientationchange",u),d}function c(e){return l(e)[0]}},15863:(e,t,i)=>{i.d(t,{i:()=>r});var n=i(63696),o=i(50539),s=i(7081);function r(e){const{setValue:t}=(0,o.useDispatch)(s.n);return(0,n.useCallback)(()=>{t("admin-screen-tooltip",{isTooltipVisible:!0,...e})},[t,e])}},16196:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(50539),o=i(37226),s=i(71769),r=i(62540);function a({moduleName:e,FallbackComponent:t,IncompleteComponent:i}){return a=>{function WhenActiveComponent(s){const l=(0,n.useSelect)(t=>t(o.i).getModule(e),[e]);if(!l)return null;const c=t||s.WidgetNull||null;if(!1===l.active)return c&&(0,r.jsx)(c,{...s});if(!1===l.connected){const e=i||c
|
|||
|
|
(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(23224);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(36148),I=i(92473),M=i(35902),y=i(67150),f=i(12850),A=i(77766);function MetricTileWrapper(e){const{className:t,children:i,error:n,loading:r,moduleSlug:a,Widget:g,widgetSlug:u,title:m=d.G[u]?.title,infoTooltip:j=d.G[u]?.infoTooltip||d.G[u]?.description}=e,N=(0,A.A)(),k=!!n&&(0,s.castArray)(n).some(y.SG),_=(0,l.useCallback)(()=>{(0,f.sx)(`${N}_kmw`,"data_loading_error_retry")},[N]);return(0,l.useEffect)(()=>{n&&(0,f.sx)(`${N}_kmw`,"data_loading_error")},[N,n]),n?(0,p.jsx)(h.A,{title:k?(0,c.__)("Insufficient permissions","google-site-kit"):(0,c.__)("Data loading failed","google-site-kit"),headerText:m,infoTooltip:j,children:(0,p.jsx)(M.A,{moduleSlug:a,error:n,onRetry:_,GetHelpLink:k?GetHelpLink:void 0,getHelpClassName:"googlesitekit-error-retry-text"})}):(0,p.jsx)(g,{noPadding:!0,children:(0,p.jsxs)("div",{className:o()("googlesitekit-km-widget-tile",t),children:[(0,p.jsx)(I.A,{title:m,infoTooltip:j,loading:r}),(0,p.jsxs)("div",{className:"googlesitekit-km-widget-tile__body",children:[r&&(0,p.jsx)(MetricTileLoader,{}),!r&&i]})]})})}MetricTileWrapper.propTypes={Widget:a().elementType.isRequired,loading:a().bool,title:a().string,infoTooltip:a().oneOfType([a().string,a().element]),moduleSlug:a().string.isRequired}},35902:(e,t,i)=>{i.d(t,{A:()=>ReportErrorActions});var n=i(62688),o=i.n(n),s=i(63696),r=i(13606),a=i(82871),l=i(50539),c=i(49383),d=i(93896),g=i(37226),u=i(67150),p=i(35323),m=i(20898),h=i(62540);function ReportErrorActions(e){const{moduleSlug:t,error:i,GetHelpLink:n,hideGetHelpLink:o,buttonVariant:I,onRetry:M,onRequestAccess:y,getHelpClassName:f,RequestAccessButton:A,RetryButton:j}=e,N=(0,p.A)(),k=(0,l.useSelect)(e=>e(g.i).getModuleStoreName(t)),_=(0,l.useSelect)(e=>"function"==typeof e(k)?.getServiceEntityAccessURL?e(k).getServiceEntityAccessURL():null),v=Array.isArray(i)?i:[i],T=(0,l.useSelect)(e=>v.map(t=>{const i=e(k)?.getSelectorDataForError(t);return{...t,selectorData:i}})),E=T?.filter(e=>(0,u.vl)(e,e.selectorData)&&"getReport"===e.selectorData.name),D=!!E.length,x=(0,l.useSelect)(e=>{const i={...D?E[0]:v[0]};return(0,u.SG)(i)&&(i.code=`${t}_insufficient_permissions`),e(d.O4).getErrorTroubleshootingLinkURL(i)}),b=(0,l.useDispatch)(),S=v.some(e=>(0,u.SG)(e)),C=(0,s.useCallback)(()=>{E.forEach(e=>{const{selectorData:t}=e;b(t.storeName).invalidateResolution(t.name,t.args)}),M?.()},[b,E,M]),w=_&&S&&!N;return(0,h.jsxs)("div",{className:"googlesitekit-report-error-actions",children:[w&&("function"==typeof A?(0,h.jsx)(A,{requestAccessURL:_}):(0,h.jsx)(c.Button,{onClick:y,href:_,target:"_blank",danger:"danger"===I,tertiary:"tertiary"===I,children:(0,a.__)("Request access","google-site-kit")})),D&&(0,h.jsxs)(s.Fragment,{children:["function"==typeof j?(0,h.jsx)(j,{handleRetry:C}):(0,h.jsx)(c.Button,{onClick:C,danger:"danger"===I,tertiary:"tertiary"===I,children:(0,a.__)("Retry","google-site-kit")}),!o&&(0,h.jsx)("span",{className:"googlesitekit-error-retry-text",children:(0,r.A)((0,a.__)("Retry didn’t work? <HelpLink />","google-site-kit"),{HelpLink:(0,h.jsx)(m.A,{href:x,external:!0,hideExternalIndicator:!0,children:(0,a.__)("Get help","google-site-kit")})})})]}),!D&&!o&&(0,h.jsx)("div",{className:f,children:"function"==typeof n?(0,h.jsx)(n,{linkURL:x}):(0,h.jsx)(m.A,{href:x,external:!0,hideExternalIndicator:!0,children:(0,a.__)("Get help","google-site-kit")})})]})}ReportErrorActions.propTypes={moduleSlug:o().string.isRequired,error:o().oneOfType([o().arrayOf(o().object),o().object]).isRequired,GetHelpLink:o().elementType,hideGetHelpLink:o().bool,bu
|
|||
|
|
(0,J._n)("%s is disconnected, no data to show","%s are disconnected, no data to show",c.length,"google-site-kit"),c.join((0,J.__)(" and ","google-site-kit")))})})}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},$.apply(null,arguments)}MetricItem.propTypes={slug:y().string.isRequired,title:y().string.isRequired,description:y().string.isRequired,isNewlyDetected:y().bool,savedItemSlugs:y().array};const key_metrics_no_selected_items=e=>n.createElement("svg",$({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 383 238"},e),D||(D=n.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"})),x||(x=n.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__a)"},n.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)"}))),b||(b=n.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)"})),S||(S=n.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)"})),C||(C=n.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)"})),w||(w=n.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=n.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)"})),z||(z=n.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__b)"},n.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)"}))),L||(L=n.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)"})),O||(O=n.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)"})),B||(B=n.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)"})),G||(G=n.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"})),P||(P=n.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=n.createElement("g",{filter:"url(#key-metrics-no-selected-items_svg__c)"},n.createElement("rect",{width:130.621,height:89.68,x:126.251,y:37.4,fill:"#fff",rx:10.957}))),Z||(Z=n.createElement("rect",{width:98.333,height:7.867,x:143.013,y:53.134,fill:"#EBEEF0",rx:3.933})),U||(U=n.createElement("rect",{width:49.806,height:19.923,x:142.369,y:70.423,fill:"#B8E6CA",rx:9.961})),V||(V=n.createElement("rect",{width:33.04,height:7.867,x:143.013,y:105.84,fill:"#EBEEF0",rx:3.933})),F||(F=n.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=n.createElement("rect",{width:19.923,height:5.977,x:164.287,y:77.395,fill:"#fff",rx:1.992})),n.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=n.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,n.__)("Your Google account does not have sufficient permissions to access %s data, so you won’t be able to see stats from it on the Site Kit dashboard.","google-site-kit"),r)),a&&a.login&&(c=(0,n.sprintf)(/* translators: %s: owner name */ /* translators: %s: owner name */
|
|||
|
|
(0,n.__)('This service was originally connected by the administrator "%s" — you can contact them for more information.',"google-site-kit"),a.login)),c||(c=(0,n.__)("This service was originally connected by an administrator — you can contact them for more information.","google-site-kit")),`${l} ${c}`}},66889:(e,t,i)=>{function n(e,t){const i=e.getBoundingClientRect(),n=t.getBoundingClientRect();return!(i.bottom<n.top||n.bottom<i.top||i.right<n.left||n.right<i.left)}i.d(t,{N:()=>n})},67150:(e,t,i)=>{i.d(t,{G:()=>c,HY:()=>g,SG:()=>d,db:()=>o,e4:()=>p,vl:()=>u});i(17243);var n=i(82871);const o="missing_required_scopes",s="insufficientPermissions",r="forbidden",a="internal_server_error",l="invalid_json";function c(e){return e?.code===o}function d(e){return[s,r].includes(e?.data?.reason)}function g(e){return!!e?.data?.reconnectURL}function u(e,t){return!(!t?.storeName||d(e)||c(e)||g(e))}function p(e){return e?.code===a?(0,n.__)("There was a critical error on this website while fetching data","google-site-kit"):e?.code===l?(0,n.__)("The server provided an invalid response","google-site-kit"):e?.message}},67768:(e,t,i)=>{i.d(t,{A:()=>SelectionPanelError});var n=i(62688),o=i.n(n),s=i(63696),r=i(66889),a=i(77967),l=i(62540);function SelectionPanelError({error:e,noPrefix:t=!0,skipRetryMessage:n=!0}){const o=(0,s.useRef)();return(0,s.useEffect)(()=>{if(e){const e=i.g.document.activeElement;e&&e.closest(".googlesitekit-selection-panel-item")&&(0,r.N)(o.current,e)&&e.scrollIntoView()}},[e]),e?(0,l.jsx)("div",{ref:o,children:(0,l.jsx)(a.A,{className:"googlesitekit-notice--square googlesitekit-selection-panel-error",error:e,noPrefix:t,skipRetryMessage:n})}):null}SelectionPanelError.propTypes={error:o().shape({message:o().string}),noPrefix:o().bool,skipRetryMessage:o().bool}},68485:(e,t,i)=>{i.d(t,{r:()=>AdminScreenTooltip,i:()=>n.i});var n=i(15863),o=i(63696),s=i(50539),r=i(62688),a=i(36703),l=i(40960),c=i(60592),d=i(14007),g=i(39771),u=i(32947),p=i(62540);function JoyrideTooltip(e){const{title:t,content:n,dismissLabel:s,disableOverlay:r=!0,target:m,cta:h=!1,className:I,styles:M={},slug:y="",placement:f="auto",onDismiss:A=()=>{},onView:j=()=>{},onTourStart:N=()=>{},onTourEnd:k=()=>{}}=e;function _(){return!!i.g.document.querySelector(m)}const[v,T]=(0,o.useState)(_),E=(0,u.dv)(),D=E===u.mp||E===u.Lg,[x,b]=(0,o.useState)(!0),S=(0,o.useRef)(D);if((0,l.A)(()=>{_()&&T(!0)},v?null:250),(0,o.useEffect)(()=>{let e=()=>{};if("function"==typeof i.g.ResizeObserver){const t=i.g.document.querySelector(m);if(t){const n=new ResizeObserver(()=>{i.g.dispatchEvent(new Event("resize"))});n.observe(t),e=()=>n.disconnect()}}return e},[m,v]),(0,o.useEffect)(()=>{let e;return S.current!==D&&(b(!1),e=setTimeout(()=>{b(!0)},50),S.current=D),()=>{e&&clearTimeout(e)}},[D]),!v)return null;const C=[{title:t,target:m,content:n,disableBeacon:!0,isFixed:!0,placement:f,cta:h,className:I}],w={close:s,last:s};return(0,p.jsx)(d.A,{slug:y,children:(0,p.jsx)(a.Ay,{callback:function({type:e}){switch(e){case a.qY.TOUR_START:N(),i.g.document.body.classList.add("googlesitekit-showing-tooltip");break;case a.qY.TOUR_END:k(),i.g.document.body.classList.remove("googlesitekit-showing-tooltip");break;case a.qY.STEP_AFTER:A();break;case a.qY.TOOLTIP:j()}},disableOverlay:r,spotlightPadding:0,floaterProps:g.ei,locale:w,steps:C,styles:{...g.R0,...M,options:{...g.R0.options,...M?.options},spotlight:{...g.R0.spotlight,...M?.spotlight}},tooltipComponent:c.A,run:x,disableScrolling:!0})})}JoyrideTooltip.propTypes={title:r.PropTypes.node,content:r.PropTypes.string,disableOverlay:r.PropTypes.bool,dismissLabel:r.PropTypes.string,target:r.PropTypes.string.isRequired,onDismiss:r.PropTypes.func,onShow:r.PropTypes.func,className:r.PropTypes.string,styles:r.PropTypes.object,slug:r.PropTypes.string,placement:r.PropTypes.string,onView:r.PropTypes.func};var m=i(7081),h=i(12850),I=i(77766);function AdminScreenTooltip(){const e=(0,I.A)(),{setValue:t}=(0,s.useDispatch)(m.n),i=(0,u.dv)(),{isTooltipVisible:n=!1,target:r,placement:a,className:l,tooltipSlug:c,title:d,content:g,dismissLabel:M}=(0,s.useSele
|
|||
|
|
(0,s.__)("%s Gathering Data","google-site-kit"),t?.name),description:(0,s.sprintf)(/* translators: %s: Module name */ /* translators: %s: Module name */
|
|||
|
|
(0,s.__)("%s data is not yet available, please check back later","google-site-kit"),t?.name)})}ReportZero.propTypes={moduleSlug:o().string.isRequired}},73881:(e,t,i)=>{i.d(t,{A:()=>n});const n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA4IiBoZWlnaHQ9IjI2NyIgdmlld0JveD0iMCAwIDUwOCAyNjciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xNDYxXzEwNTc2KSI+CjxwYXRoIGQ9Ik01MzMuOTg5IDIxNi4yNDNDNTA4LjI4MSAyNjkuOTc4IDQzOS41ODcgMjcwLjU1NiA0MDEuNDQyIDI2Mi4zNzFDMzUxLjY3OCAyNTEuNjkzIDMxOC42NDcgMjEyLjYzNCAyNzUuMiAyMTAuMTZDMjMxLjc1NCAyMDcuNjg1IDIwNy41MzIgMjMwLjI4OCAxNjAuNzE0IDIzNS45MzdDMTEzLjg5NSAyNDEuNTg1IDU2LjQ3NDcgMjM2LjQ1IDI2LjY5MjIgMTc4LjQyNUMtMy4wOTAyOCAxMjAuNDAxIDE3LjQ0OTMgNTguOTc2MyA3MC4zMzkgMjguMTkyM0MxMjMuMjI5IC0yLjU5MTc4IDE1NS4zMTcgMjguMzQ4MyAyMDcuNTMyIDI4LjE5MjNDMjU5Ljc0NyAyOC4wMzYzIDI4MC44NTQgLTE4LjU5MDkgMzI5LjQzMSAtMjIuMzcwMUMzNTMuNTQ0IC0yNC4yNDYgMzc3Ljg0MiAtMTkuMjg2IDQwMS45NjEgLTIuNTkxNzdDNDI1LjgxNiAxMy45MTk2IDQyOS4zMTIgNDQuMTM4OSA0ODguNjk5IDcyLjI1NTZDNTQ4LjA4NiAxMDAuMzcyIDU1OS42OTcgMTYyLjUwOCA1MzMuOTg5IDIxNi4yNDNaIiBmaWxsPSIjQjhFNkNBIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfMTQ2MV8xMDU3NikiPgo8cmVjdCB4PSIyNjciIHk9IjU4Ljg3NiIgd2lkdGg9IjEzNi4xMjIiIGhlaWdodD0iNzQuMjQ4NCIgcng9IjkuMDc0OCIgZmlsbD0id2hpdGUiLz4KPC9nPgo8cmVjdCB4PSIyODAuMiIgeT0iNzIuMDc1MSIgd2lkdGg9IjIwLjYyNDYiIGhlaWdodD0iNi41OTk4NiIgcng9IjMuMjk5OTMiIGZpbGw9IiNFQkVFRjAiLz4KPHJlY3QgeD0iMjgwLjIiIHk9Ijg2LjEwMDMiIHdpZHRoPSI0MS4yNDkxIiBoZWlnaHQ9IjE2LjQ5OTYiIHJ4PSI4LjI0OTgyIiBmaWxsPSIjRkZERUQzIi8+CjxyZWN0IHg9IjI4MC4yIiB5PSIxMTQuOTc0IiB3aWR0aD0iMTA5LjcyMyIgaGVpZ2h0PSI2LjU5OTg2IiByeD0iMy4yOTk5MyIgZmlsbD0iI0VCRUVGMCIvPgo8cGF0aCBkPSJNMjg3LjYyMiA5MS44NzUyTDI5My4wNjIgOTcuMzE0N00yOTMuMDYyIDk3LjMxNDdMMjkzLjEyMiA5My4wMjM2TTI5My4wNjIgOTcuMzE0N0wyODguNzcxIDk3LjM3NTEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMS4yMzc0NyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxyZWN0IHg9IjI5OC4zNSIgeT0iOTEuODc1MiIgd2lkdGg9IjE2LjQ5OTYiIGhlaWdodD0iNC45NDk4OSIgcng9IjEuNjQ5OTYiIGZpbGw9IndoaXRlIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIxX2RfMTQ2MV8xMDU3NikiPgo8cmVjdCB4PSIxMTciIHk9IjE0NSIgd2lkdGg9IjEzNi4xMjIiIGhlaWdodD0iNzQuMjQ4NCIgcng9IjkuMDc0OCIgZmlsbD0id2hpdGUiLz4KPC9nPgo8cmVjdCB4PSIxMzAiIHk9IjE1OCIgd2lkdGg9IjU0IiBoZWlnaHQ9IjciIHJ4PSIzLjI5OTkzIiBmaWxsPSIjRUJFRUYwIi8+CjxyZWN0IHg9IjEzMC4yIiB5PSIxNzIuMjI0IiB3aWR0aD0iNDEuMjQ5MSIgaGVpZ2h0PSIxNi40OTk2IiByeD0iOC4yNDk4MiIgZmlsbD0iI0ZGREVEMyIvPgo8cmVjdCB4PSIxMzAuMiIgeT0iMjAxLjA5OCIgd2lkdGg9IjEwOS43MjMiIGhlaWdodD0iNi41OTk4NiIgcng9IjMuMjk5OTMiIGZpbGw9IiNFQkVFRjAiLz4KPHBhdGggZD0iTTEzNy42MjIgMTc3Ljk5OUwxNDMuMDYyIDE4My40MzlNMTQzLjA2MiAxODMuNDM5TDE0My4xMjIgMTc5LjE0OE0xNDMuMDYyIDE4My40MzlMMTM4Ljc3MSAxODMuNDk5IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjEuMjM3NDciIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cmVjdCB4PSIxNDguMzUiIHk9IjE3Ny45OTkiIHdpZHRoPSIxNi40OTk2IiBoZWlnaHQ9IjQuOTQ5ODkiIHJ4PSIxLjY0OTk2IiBmaWxsPSJ3aGl0ZSIvPgo8ZyBmaWx0ZXI9InVybCgjZmlsdGVyMl9kXzE0NjFfMTA1NzYpIj4KPHJlY3QgeD0iMTE3IiB5PSI1OC44NzYiIHdpZHRoPSIxMzYuMTIyIiBoZWlnaHQ9Ijc0LjI0ODQiIHJ4PSI5LjA3NDgiIGZpbGw9IndoaXRlIi8+CjwvZz4KPHJlY3QgeD0iMTMwLjE5OSIgeT0iNzIuMDc1MSIgd2lkdGg9Ijg2LjYyMzEiIGhlaWdodD0iNi41OTk4NiIgcng9IjMuMjk5OTMiIGZpbGw9IiNFQkVFRjAiLz4KPHJlY3QgeD0iMTMwLjE5OSIgeT0iODYuMTAwMyIgd2lkdGg9IjQxLjI0OTEiIGhlaWdodD0iMTYuNDk5NiIgcng9IjguMjQ5ODIiIGZpbGw9IiNCOEU2Q0EiLz4KPHJlY3QgeD0iMTMwLjE5OSIgeT0iMTE0Ljk3NCIgd2lkdGg9IjEwOS43MjMiIGhlaWdodD0iNi41OTk4NiIgcng9IjMuMjk5OTMiIGZpbGw9IiNFQkVFRjAiLz4KPHBhdGggZD0iTTEzNy42MjUgOTcuMzc1MUwxNDMuMDY0IDkxLjkzNTdNMTQzLjA2NCA5MS45MzU3TDEzOC43NzMgOTEuODc1Mk0xNDMuMDY0IDkxLjkzNTdMMTQzLjEyNSA5Ni4yMjY4IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjEuMjM3NDciIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cmVjdCB4PSIxNDguMzUiIHk9IjkxLjg3NTIiIHdpZHRoPSIxNi40OTk2IiBoZWlnaHQ9IjQuOTQ5ODkiIHJ4PSIxLjY0OTk2IiBmaWxsPSJ3aGl0ZSIvPgo8ZyBmaWx0ZXI9InVybCgjZmlsdGVyM19kXzE0NjFfMTA1NzYpIj4KPHJlY3QgeD0iMjY3IiB5PSIxNDUiIHdpZHRoPSIxMzYuMTIyIiBoZWlnaHQ9Ijc0LjI0ODQiIHJ4PSI5LjA3NDgiIGZpbGw9IndoaXRlIi8+CjwvZz4KPHJlY3QgeD0iMjgwLjE5OSIgeT0iMTU4LjE5OSIgd2lkdGg9IjUyLjc5ODkiIGhlaWdodD0iNi41OTk4NiIgcng9IjM
|
|||
|
|
(0,u.__)("%s of total pageviews","google-site-kit"),(0,Z.Eo)(l,{style:"percent",maximumFractionDigits:1})),metricValue:a.currentValue,Badge:()=>(0,B.jsx)(st.A,{previousValue:a.previousValue,currentValue:a.currentValue})}),(0,B.jsx)(AudienceTileCitiesMetric,{TileIcon:Le,title:(0,u.__)("Cities with the most visitors","google-site-kit"),topCities:d}),(!k||D&&!m)&&(0,B.jsx)(AudienceTilePagesMetric,{audienceTileNumber:e,audienceSlug:t,TileIcon:Ge,title:(0,u.__)("Top content by pageviews","google-site-kit"),topContentTitles:p,topContent:g,isTopContentPartialData:E})]})]})})}function AudienceTooltipMessage({audienceSlug:e,audienceName:t}){const i=(0,c.useSelect)(e=>e(Ze.O4).getDocumentationLinkURL("visitor-group-insights"));return(0,a.useMemo)(()=>{switch(e){case"new-visitors":return(0,L.A)((0,u.sprintf)(/* translators: %s: is the audience name */ /* translators: %s: is the audience name */
|
|||
|
|
(0,u.__)('%s are people who visited your site for the first time. Note that under some circumstances it\'s possible for a visitor to be counted in both the "new" and "returning" groups. <link>Learn more</link>',"google-site-kit"),"<strong>New visitors</strong>"),{strong:(0,B.jsx)("strong",{}),link:(0,B.jsx)(O.A,{href:i,external:!0,hideExternalIndicator:!0})});case"returning-visitors":return(0,L.A)((0,u.sprintf)(/* translators: %s: is the audience name */ /* translators: %s: is the audience name */
|
|||
|
|
(0,u.__)('%s are people who have visited your site at least once before. Note that under some circumstances it\'s possible for a visitor to be counted in both the "new" and "returning" groups. <link>Learn more</link>',"google-site-kit"),"<strong>Returning visitors</strong>"),{strong:(0,B.jsx)("strong",{}),link:(0,B.jsx)(O.A,{href:i,external:!0,hideExternalIndicator:!0})});default:return(0,L.A)((0,u.sprintf)(/* translators: %s: is the audience name */ /* translators: %s: is the audience name */
|
|||
|
|
(0,u.__)("%s is an audience that already exists in your Analytics property. Note that it's possible for a visitor to be counted in more than one group. <link>Learn more</link>","google-site-kit"),`<strong>${t}</strong>`),{strong:(0,B.jsx)("strong",{}),link:(0,B.jsx)(O.A,{href:i,external:!0,hideExternalIndicator:!0})})}},[e,t,i])}var mt,ht,It,Mt,yt,ft,At,jt,Nt,kt,_t,vt,Tt,Et,Dt,xt,bt,St,Ct,wt,Rt,zt,Lt,Ot,Bt,Gt,Pt,Wt,Zt,Ut,Vt,Ft,Ht,Yt,Qt,Xt,Jt,qt,Kt,$t,ei,ti,ii,ni,oi,si,ri,ai,li,ci,di,gi,ui,pi,mi,hi,Ii,Mi,yi,fi,Ai,ji,Ni,ki,_i,vi,Ti,Ei,Di,xi;function bi(){return bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},bi.apply(null,arguments)}AudienceTileZeroData.propTypes={Widget:r().elementType.isRequired,audienceSlug:r().string.isRequired,title:r().string.isRequired,infoTooltip:r().oneOfType([r().string,r().element]),isMobileBreakpoint:r().bool,isTileHideable:r().bool,onHideTile:r().func},AudienceTile.propTypes={audienceTileNumber:r().number,audienceSlug:r().string.isRequired,title:r().string.isRequired,infoTooltip:r().oneOfType([r().string,r().element]),visitors:r().object,visitsPerVisitor:r().object,pagesPerVisit:r().object,pageviews:r().object,percentageOfTotalPageViews:r().number,topCities:r().object,topContent:r().object,topContentTitles:r().object,hasInvalidCustomDimensionError:r().bool,Widget:r().elementType.isRequired,audienceResourceName:r().string.isRequired,isZeroData:r().bool,isPartialData:r().bool,isTileHideable:r().bool,onHideTile:r().func},AudienceTooltipMessage.propTypes={audienceSlug:r().string.isRequired};const Si=e=>a.createElement("svg",bi({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 211 109"},e),mt||(mt=a.createElement("path",{fill:"#B8E6CA",d:"M2.675 72.31a29.3 29.3 0 0 0 5.678 8.74c9.451 9.955 23.416 10.799 36.223 8.308a88.8 88.8 0 0 0 35.776-15.752c6.09-4.513 12.104-10.113 20.167-10.363 3.027-.093 6.158.741 8.445 2.71 4.753 4.063 4.668 11.012 8.377 15.829 4.932 6.405 12.026 8.389 19.764 9.128 21.862 2.086 47.902-4.758 62.939-21.412 13.426-14.868 15.038-38.526-1.214-52.08-7.425-6.192-17.606-9.03-27.216-7.584-7.345 1.105-14.801 4.467-22.404 5.401-8.954 1.103-14.49-2.659-21.734-7.04C114.852.58 98.164-2.345 83.874 2.072 70.195 6.301 60.35 17.846 47.04 22.918c-11.502 4.385-25.089 3.717-35.082 10.86C.133 42.228-2.84 59.286 2.675 72.31"})),a.createElement("path",{fill:"#161B18",d:"M108.273 109c54.612 0 98.883-1.735 98.883-3.874s-44.271-3.875-98.883-3.875-98.882 1.735-98.882 3.875S53.66 109 108.273 109",opacity:.1,style:{mixBlendMode:"multiply"}}),ht||(ht=a.createElement("path",{fill:"#CBD0D3",d:"M108.273 109c54.612 0 98.883-1.735 98.883-3.874s-44.271-3.875-98.883-3.875-98.882 1.735-98.882 3.875S53.66 109 108.273 109"})),It||(It=a.createElement("path",{stroke:"#161B18",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.472,d:"M134.765 53.225c-1.065 16.927-6.936 32.112-3.012 51.193h-4.468M139.814 104.418h-4.47l7.9-51.193"})),Mt||(Mt=a.createElement("path",{stroke:"#000",strokeLinecap:"round",strokeWidth:1.468,d:"M120.504 36.651c-3.814 1.73-11.135 5.58-11.135 13.398M147.266 35.787c3.493 1.787 11.06 7.678 11.977 13.225"})),yt||(yt=a.createElement("path",{fill:"#77AD8C",d:"m151.555 75.952-3.102.282-18.926 1.719-11.063 1.002-1.049-24.735-1.825-43.046 34.528-1.262.697 32.058.094 4.316.642 29.565z"})),ft||(ft=a.createElement("path",{fill:"#5C9271",d:"m148.453 76.234 1.78-.162 1.323-.12-1.439-66.042-1.983.091 1.281 63.2-24.976 2.127.862-19.15-7.844-1.074.86 20.438.107 2.465.041.946 11.063-1.002 18.927-1.719z"})),At||(At=a.createElement("path",{fill:"#CBD0D3",d:"M135.891 70.752c.032.916-.392-20.197-.629-27.044-6.628-3.008-13.797-3.559-20.67-1.228l.628 27.043c6.874-2.33 14.043-1.779 20.671 1.23"})),jt||(jt=a.createElement("path",{fill:"#EBEEF0",d:"M135.926 70.752c.01.916-.547-20.194-.629-27.044 6.481-3.306 13.617-4.182 20.592-2.166l.629 27.043c-6.975-2.015-14.111-1.139-20.592 2.167"})),Nt||(Nt=a.createElement("path",{fill:"#CBD0D3",fillRule:"evenodd",d:"M133.233 60.796c-.083-3
|
|||
|
|
(0,u._n)("Select at least %1$d group (%2$d selected)","Select at least %1$d groups (%2$d selected)",Pi,"google-site-kit"),Pi,r):r>Wi&&(l=(0,u.sprintf)(/* translators: 1: Maximum number of groups that can be selected. 2: Number of selected groups. */ /* translators: 1: Maximum number of groups that can be selected. 2: Number of selected groups. */
|
|||
|
|
(0,u.__)("Select up to %1$d groups (%2$d selected)","google-site-kit"),Wi,r));const c=(0,a.useMemo)(()=>!(0,o.isEqual)((0,Z.N9)(t),(0,Z.N9)(e)),[t,e]);if(!l&&!s&&!i)return null;let d=s||i;return c&&l&&(d={message:l}),(0,B.jsx)(In.A,{error:d})}function Panel(){const e=(0,U.A)(),t=(0,c.useSelect)(e=>e(g.n).getValue(wi)),i=(0,c.useSelect)(e=>e(Q.K9).isFetchingSyncAvailableAudiences()),n=(0,c.useInViewSelect)(e=>{const{getConfigurableAudiences:t}=e(Q.K9),{getConfiguredAudiences:i}=e(X.oR),n=i()||[],o=t()||[];return o.length&&n.length?o.filter(({name:e})=>n.includes(e)).map(({name:e})=>e):[]}),o=(0,Qe.A)(Ui,"autoSubmit"),{setValues:s}=(0,c.useDispatch)(We.s),{setValue:r}=(0,c.useDispatch)(g.n),l=(0,a.useCallback)(()=>{s(Ri,{[zi]:n,[Li]:!1}),(0,Z.sx)(`${e}_audiences-sidebar`,"audiences_sidebar_view")},[n,s,e]),d=(0,a.useCallback)(()=>{t&&(r(wi,!1),r(Gi,!1))},[r,t]);return(0,B.jsxs)(on.Ay,{className:"googlesitekit-audience-selection-panel",closePanel:d,isOpen:t||o,isLoading:i,onOpen:l,children:[(0,B.jsx)(Header_Header,{closePanel:d}),(0,B.jsx)(AudienceItems,{savedItemSlugs:n}),(0,B.jsx)(LearnMoreLink,{}),(0,B.jsx)(SaveErrorNotice,{savedItemSlugs:n}),(0,B.jsx)(SyncErrorNotice,{}),(0,B.jsx)(AudienceCreationSuccessNotice,{}),(0,B.jsx)(Footer,{closePanel:d,isOpen:t,savedItemSlugs:n})]})}function AudienceSelectionPanel(){const e=(0,c.useSelect)(e=>e(g.n).getValue(wi));return(0,B.jsx)(en.Ay,{value:{key:"AudienceSelectionPanel",value:!!e},children:(0,B.jsx)(Panel,{})})}var Mn=i(91560);function AudienceAreaFooter(){const e=(0,pe.A)(),t=(0,c.useSelect)(e=>e(X.oR).getDateRangeDates({offsetDays:Q.f2})),i=(0,c.useSelect)(i=>e?null:i(Q.K9).getServiceReportURL("audiences",{dates:t}));return(0,c.useSelect)(e=>e(Vi.i).isModuleConnected(V.L1))?(0,B.jsx)(Mn.A,{className:"googlesitekit-audience-widget__source",name:(0,u._x)("Analytics","Service name","google-site-kit"),href:i,external:!0}):null}var yn,fn,An,jn,Nn=i(674);function ChangeGroupsLink(){const e=(0,U.A)(),t=(0,c.useInViewSelect)(e=>e(Q.K9).getConfigurableAudiences(),[]),{setValue:i}=(0,c.useDispatch)(g.n),n=(0,a.useCallback)(()=>{i(wi,!0),(0,Z.sx)(`${e}_audiences-sidebar`,"change_groups")},[i,e]);return Array.isArray(t)&&t?.length>0?(0,B.jsx)(O.A,{className:"googlesitekit-widget-area__cta-link",onClick:n,leadingIcon:(0,B.jsx)(Nn.A,{width:22,height:22}),secondary:!0,linkButton:!0,children:(0,u.__)("Change groups","google-site-kit")}):null}function kn(){return kn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},kn.apply(null,arguments)}const _n=e=>a.createElement("svg",kn({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"-3 1 333.666 149.252"},e),yn||(yn=a.createElement("defs",null,a.createElement("filter",{id:"audience-connect-analytics-cta-graphic_svg__c",width:144.59,height:185.064,x:109.551,y:18.171,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse"},a.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),a.createElement("feOffset",{dy:4}),a.createElement("feGaussianBlur",{stdDeviation:8}),a.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),a.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),a.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1731_24094"}),a.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1731_24094",result:"shape"})),a.createElement("filter",{id:"audience-connect-analytics-cta-graphic_svg__d",width:144.59,height:185.064,x:236.859,y:18.171,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse"},a.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),a.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),a.createElement("feOffset",{dy:4}),a.createElement("feGaussianBlur",{stdDeviation:8}),a.createElement("feComposit
|
|||
|
|
(0,r.__)("%s (Please try again.)","google-site-kit"),A)),p||(A=(0,r.sprintf)(/* translators: $%s: Error message */ /* translators: $%s: Error message */
|
|||
|
|
(0,r.__)("Error: %s","google-site-kit"),A));const j=t?.data?.reconnectURL;j&&(0,a.m)(j)&&(A=(0,r.sprintf)(/* translators: 1: Original error message 2: Reconnect URL */ /* translators: 1: Original error message 2: Reconnect URL */
|
|||
|
|
(0,r.__)('%1$s To fix this, <a href="%2$s">redo the plugin setup</a>.',"google-site-kit"),A,j));return(0,u.jsx)(d.A,{className:e,type:d.A.TYPES.ERROR,description:(0,u.jsx)("span",{dangerouslySetInnerHTML:(0,g.p9)(A,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}),ctaButton:f?{label:(0,r.__)("Retry","google-site-kit"),onClick:y}: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}},78340:(e,t,i)=>{i.d(t,{s:()=>n});const n="core/forms"},78464:(e,t,i)=>{i.d(t,{Z:()=>S,A:()=>C});var n=i(62688),o=i.n(n),s=i(82871),r=i(39016),a=i(63696),l=i(50539),c=i(78340),d=i(58116),g=i(93896),u=i(71423),p=i(53137),m=i(72455),h=i(77766),I=i(68485),M=i(12850),y=i(33566),f=i(80869),A=i(34375);var j=i(99897),N=i(16196),k=i(93934),_=i(54349),v=i(49655),T=i(12108),E=i(32947),D=i(62540);const x="setup-success-notification-audiences";function AudienceSegmentationSetupSuccessSubtleNotification({id:e,Notification:t}){const n=(0,E.dv)(),{dismissNotification:o}=(0,l.useDispatch)(u.D),r=(0,l.useSelect)(e=>e(d.oR).isAudienceSegmentationWidgetHidden());return(0,a.useEffect)(()=>{r&&o(x)},[o,r]),void 0===r?null:(0,D.jsx)(t,{children:(0,D.jsx)(_.A,{notificationID:e,type:v.Q.SUCCESS,title:(0,s.__)("Success! Visitor groups added to your dashboard","google-site-kit"),description:(0,s.__)("Get to know how different types of visitors interact with your site, e.g. which pages they visit and for how long","google-site-kit"),ctaButton:{label:(0,s.__)("Show me","google-site-kit"),onClick:function(e){e.preventDefault(),o(x),setTimeout(()=>{i.g.scrollTo({top:(0,T.YJ)(".googlesitekit-widget-area--mainDashboardTrafficAudienceSegmentation",n),behavior:"smooth"})},50)}},dismissButton:!0})})}AudienceSegmentationSetupSuccessSubtleNotification.propTypes={id:o().string.isRequired,Notification:o().elementType.isRequired};var b=i(27333);const S="audience_segmentation_setup_cta-notification";function AudienceSegmentationSetupCTABanner({id:e,Notification:t}){const i=(0,h.A)(),n=`${i}_audiences-setup-cta-dashboard`,{dismissNotification:o,registerNotification:r,pinNotification:j}=(0,l.useDispatch)(u.D),{setValues:N}=(0,l.useDispatch)(c.s),k={tooltipSlug:e,title:(0,s.__)("You can always enable groups in Settings later","google-site-kit"),content:(0,s.__)("The visitors group section will be added to your dashboard once you set it up.","google-site-kit"),dismissLabel:(0,s.__)("Got it","google-site-kit")},_=(0,I.i)(k),v=(0,l.useSelect)(t=>t(u.D).isNotificationDismissalFinal(e)),T=(0,b.A)(m.PW,"autoSubmit"),[E,S]=(0,a.useState)(!1),C=(0,a.useCallback)(()=>{r(x,{Component:AudienceSegmentationSetupSuccessSubtleNotification,areaSlug:p.bI.DASHBOARD_TOP}),o(e)},[r,o,e]),w=(0,a.useCallback)(()=>{S(!0)},[S]),R=(0,a.useCallback)(()=>j(e,p.He.SETUP_CTAS),[e,j]),{apiErrors:z,failedAudiences:L,isSaving:O,onEnableGroups:B}=(0,y.A)({onSuccess:C,onError:w,onOAuthNavigation:R}),{clearPermissionScopeError:G}=(0,l.useDispatch)(d.oR),{setSetupErrorCode:P}=(0,l.useDispatch)(g.O4),W=(0,a.useCallback)(()=>{N(m.PW,{autoSubmit:!1}),G(),P(null),S(!1)},[G,P,N]),Z=(0,l.useSelect)(e=>e(g.O4).getSetupErrorCode()),U=(0,l.useSelect)(e=>e(g.O4).getDocumentationLinkURL("visitor-groups")),V=T&&"access_denied"===Z,F={gaTrackingEventArgs:{category:n}};return(0,D.jsxs)(a.Fragment,{children:[(0,D.jsx)(t,{...F,children:(0,D.jsx)(A.A,{notificationID:e,title:(0,s.__)("Learn how different types of visitors interact with your site","google-site-kit"),description:(0,s.__)('Understand what brings new visitors to your site and keeps them coming back. Site Kit can now group your site visitors into relevant segments like "new" and "returning". To set up these new groups, Site Kit needs to update your Google Analytics property.',"google-site-kit"),learnMoreLink:{href:U},ctaButton:{label:O?(0,s.__)("Enabling groups","google-site-kit"):(0,s.__)("Enable groups","google-site-kit"),onClick:B,disabled:O,inProgress:O},dismissButton:{label:v?(0,s.__)("Don’t show again","go
|
|||
|
|
(0,r._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?p(o,{...l,unit:"second"}):"",n?p(n,{...l,unit:"minute"}):"",i?p(i,{...l,unit:"hour"}):"").trim()},formatDecimal(){const t=(0,r.sprintf)(
|
|||
|
|
// translators: %s: number of seconds with "s" as the abbreviated unit.
|
|||
|
|
// translators: %s: number of seconds with "s" as the abbreviated unit.
|
|||
|
|
(0,r.__)("%ds","google-site-kit"),o);if(0===e)return t;const s=(0,r.sprintf)(
|
|||
|
|
// translators: %s: number of minutes with "m" as the abbreviated unit.
|
|||
|
|
// translators: %s: number of minutes with "m" as the abbreviated unit.
|
|||
|
|
(0,r.__)("%dm","google-site-kit"),n),a=(0,r.sprintf)(
|
|||
|
|
// translators: %s: number of hours with "h" as the abbreviated unit.
|
|||
|
|
// translators: %s: number of hours with "h" as the abbreviated unit.
|
|||
|
|
(0,r.__)("%dh","google-site-kit"),i);return(0,r.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
|||
|
|
(0,r._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?t:"",n?s:"",i?a:"").trim()}}}(e,t);try{return i()}catch{return n()}}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 d(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,n.isPlainObject)(e)&&(t={...e}),t}function g(e,t={}){e=(0,n.isFinite)(e)?e:Number(e),(0,n.isFinite)(e)||(console.warn("Invalid number",e,typeof e),e=0);const i=d(t),{style:o="metric"}=i;return"metric"===o?function(e){const t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?(0,r.sprintf)(
|
|||
|
|
// translators: %s: an abbreviated number in millions.
|
|||
|
|
// translators: %s: an abbreviated number in millions.
|
|||
|
|
(0,r.__)("%sM","google-site-kit"),p(c(e),e%10==0?{}:t)):1e4<=e?(0,r.sprintf)(
|
|||
|
|
// translators: %s: an abbreviated number in thousands.
|
|||
|
|
// translators: %s: an abbreviated number in thousands.
|
|||
|
|
(0,r.__)("%sK","google-site-kit"),p(c(e))):1e3<=e?(0,r.sprintf)(
|
|||
|
|
// translators: %s: an abbreviated number in thousands.
|
|||
|
|
// translators: %s: an abbreviated number in thousands.
|
|||
|
|
(0,r.__)("%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:n}=l(e);return n=("0"+n).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${n}`:`${t}:${i}:${n}`}(e):p(e,i)}const u=s()(console.warn);function p(e,t={}){const{locale:i=h(),...n}=t;try{return new Intl.NumberFormat(i,n).format(e)}catch(t){u(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(n)} ).format( ${typeof e} )`,t.message)}const o={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},s=["signDisplay","compactDisplay"],r={};for(const[e,t]of Object.entries(n))o[e]&&t===o[e]||s.includes(e)||(r[e]=t);try{return new Intl.NumberFormat(i,r).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function m(e,t={}){const{locale:i=h(),style:n="long",type:o="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:n,type:o}).format(e)}
|
|||
|
|
/* translators: used between list items, there is a space after the comma. */const s=(0,r.__)(", ","google-site-kit");return e.join(s)}function h(e=i.g){const t=(0,n.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}},80035:(e,t,i)=>{i.d(t,{A:()=>f});var n,o=i(62688),s=i.n(o),r=i(4452),a=i.n(r),l=i(63696),c=i(19793);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},d.apply(null,arguments)}const warning_notice=e=>l.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=l.createElement("path",{fill:"currentColor",d:"M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1m0 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m-1-2h2V6h-2z"})));var g=i(42343),u=i(49655),p=i(62540);const m={[u.Q.NEW]:g.A,[u.Q.SUCCESS]:c.A,[u.Q.INFO]:warning_notice,[u.Q.WARNING]:warning_notice,[u.Q.ERROR]:warning_notice};function Icon({type:e}){const t=m[e]||warning_notice;return(0,p.jsx)(t,{width:24,height:24})}function Title({className:e,children:t}){return(0,p.jsx)("p",{className:a()("googlesitekit-notice__title",e),children:t})}function Description({className:e,children:t}){return(0,p.jsx)("p",{className:a()("googlesitekit-notice__description",e),children:t})}Icon.propTypes={type:s().oneOf(Object.values(u.Q))},Title.propTypes={className:s().string,children:s().node},Description.propTypes={className:s().string,children:s().node};var h=i(49383),I=i(83366);function CTAButton({label:e,disabled:t,inProgress:i,onClick:n,href:o,external:s=!1,hideExternalIndicator:r=!1}){let a;return s&&!r&&(a=(0,p.jsx)(I.A,{width:14,height:14})),(0,p.jsx)(h.SpinnerButton,{className:"googlesitekit-notice__cta",disabled:t,isSaving:i,onClick:n,href:o,target:s?"_blank":void 0,trailingIcon:a,children:e})}CTAButton.propTypes={label:s().string.isRequired,disabled:s().bool,inProgress:s().bool,onClick:s().func,href:s().string,external:s().bool,hideExternalIndicator:s().bool};var M=i(82871);function DismissButton({label:e=(0,M.__)("Got it","google-site-kit"),onClick:t,disabled:i}){return(0,p.jsx)(h.Button,{onClick:t,disabled:i,tertiary:!0,children:e})}DismissButton.propTypes={label:s().string,onClick:s().func.isRequired,disabled:s().bool};const y=(0,l.forwardRef)(({className:e,title:t,description:i,dismissButton:n,ctaButton:o,type:s=u.Q.INFO,children:r,hideIcon:l},c)=>(0,p.jsxs)("div",{ref:c,className:a()("googlesitekit-notice",`googlesitekit-notice--${s}`,e),children:[!l&&(0,p.jsx)("div",{className:"googlesitekit-notice__icon",children:(0,p.jsx)(Icon,{type:s})}),(0,p.jsxs)("div",{className:"googlesitekit-notice__content",children:[t&&(0,p.jsx)(Title,{children:t}),i&&(0,p.jsx)(Description,{children:i})]}),(n?.label||n?.onClick||o?.label&&(o?.onClick||o?.href)||r)&&(0,p.jsxs)("div",{className:"googlesitekit-notice__action",children:[r,(n?.label||n?.onClick)&&(0,p.jsx)(DismissButton,{label:n.label,onClick:n.onClick,disabled:n.disabled}),o?.label&&(o?.onClick||o?.href)&&(0,p.jsx)(CTAButton,{label:o.label,onClick:o.onClick,inProgress:o.inProgress,disabled:o.disabled,href:o.href,external:o.external,hideExternalIndicator:o.hideExternalIndicator})]})]}));y.TYPES=u.Q,y.propTypes={className:s().string,title:s().oneOfType([s().string,s().object]),description:s().node,type:s().oneOf(Object.values(u.Q)),dismissButton:s().shape(DismissButton.propTypes),ctaButton:s().shape({...CTAButton.propTypes,label:s().string}),children:s().node,hideIcon:s().bool};const f=y},80452:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n,o=i(63696);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},s.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>o.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 9"},e),n||(n=o.createE
|
|||
|
|
(0,l.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:(0,g.jsx)(c.A,{href:t,external:n},"link")})})}SourceLink.propTypes={name:o().string,href:o().string,className:o().string,external:o().bool},SourceLink.defaultProps={name:"",href:"",className:"",external:!1};const u=SourceLink},92473:(e,t,i)=>{i.d(t,{A:()=>MetricTileHeader});var n=i(62688),o=i.n(n),s=i(10953),r=i(16834),a=i(15167),l=i(62540);function MetricTileHeader({title:e,infoTooltip:t,loading:i}){return(0,l.jsxs)("div",{className:"googlesitekit-km-widget-tile__title-container",children:[(0,l.jsx)(a.A,{as:"h3",size:"small",type:"label",className:"googlesitekit-km-widget-tile__title",children:e}),i?(0,l.jsx)(r.A,{children:(0,l.jsx)(s.A,{title:t})}):(0,l.jsx)(s.A,{title:t})]})}MetricTileHeader.propTypes={title:o().string,infoTooltip:o().oneOfType([o().string,o().element]),loading:o().bool}},92698:(e,t,i)=>{i.d(t,{A:()=>u});var n=i(63696),o=i(50539),s=i(93896),r=i(58116),a=i(37226),l=i(45472),c=i(21134),d=i(89318),g=i(77766);function u(e){const t=(0,g.A)(),i=(0,o.useSelect)(t=>t(a.i).getModule(e)),u=(0,o.useSelect)(e=>e(r.oR).hasCapability(r.HD)),{activateModule:p}=(0,o.useDispatch)(a.i),{navigateTo:m}=(0,o.useDispatch)(l.M),{setInternalServerError:h}=(0,o.useDispatch)(s.O4),I=(0,n.useCallback)(async()=>{const{error:i,response:n}=await p(e);i?h({id:`${e}-setup-error`,description:i.message}):(await(0,d.sx)(`${t}_widget-activation-cta`,"activate_module",e),await(0,c.SO)("module_setup",e,{ttl:300}),m(n.moduleReauthURL))},[p,e,m,h,t]);return i?.name&&u?I:null}},93896:(e,t,i)=>{i.d(t,{O4:()=>n,OQ:()=>s,qc:()=>o});const n="core/site",o="primary",s="secondary"},93934:(e,t,i)=>{i.d(t,{Y2:()=>n.Y2,DO:()=>d,c1:()=>g.c1,X9:()=>l,JS:()=>s,T5:()=>u,WP:()=>g.WP});var n=i(15135),o=i(81520);function s(e){return!!e&&e.Component===o.A}function r(e,t){if(9!==t)return[e,t];let i=(e=[...e]).length-1;for(;0!==t&&i>=0;)3===e[i]?(t-=3,e[i]=4):6===e[i]&&(t-=6,e[i]=8),i--;return[e,t]}function a(e,t){return(Array.isArray(t.width)?t.width:[t.width]).map(t=>({counter:e+n.Gr[t],width:t}))}function l(e,t){let i=[];const o=[];if(!e?.length)return{columnWidths:i,rowIndexes:o};let l=0,c=0;function d({counter:e},{counter:t}){return e-t}function g({counter:e},{counter:t}){return t-e}function u({counter:e}){return e<=12}return e.forEach((p,m)=>{if(s(t[p.slug]))return i.push(0),void o.push(c);let h=a(l,p);const I=function(e,t,i){for(;++e<t.length;)if(!s(i[t[e].slug]))return t[e];return null}(m,e,t);if(null===I||0===a(h.sort(d)[0].counter,I).filter(u).length){h.some(u)&&(h=h.sort(g),h=h.filter(u))}const M=h[0].width;o.push(c),l+=n.Gr[M],l>12?(l-=n.Gr[M],o[m]++,9===l&&([i,l]=r(i,l)),l=n.Gr[M],c++):12===l&&(l=0,c++),i.push(n.Gr[M])}),9===l&&([i,l]=r(i,l)),{columnWidths:i,rowIndexes:o}}var c=i(17243);function d(e,t,{columnWidths:i,rowIndexes:o}){const s=[],r=[...i];if(!e?.length)return{gridColumnWidths:r,overrideComponents:s};let a=null,l=-1,d=[];if(function(e,t){const i={};for(let o=0;o<e.length;o++){const s=e[o],r=t?.[s.slug],a=r?.Component,l=r?.metadata?.moduleSlug,c=n.We.includes(a);if(!a||!l||!c)return!1;if(i[l]){if(i[l]!==a)return!1}else i[l]=a}return!(Object.keys(i).length>1)}(e,t)){const i=Array.from({length:e.length-1}).fill(0);return{overrideComponents:[t[e[0].slug]],gridColumnWidths:[12,...i]}}return e.forEach((n,g)=>{if(s.push(null),a=t[n.slug],l=o[g],a)if(u=a,p=t[e[g+1]?.slug],m=l,h=o[g+1],m===h&&(0,c.isEqual)(u,p))d.push(i[g]),r[g]=0;else if(d.length>0){d.push(i[g]);const e=d.reduce((e,t)=>e+t,0);s[g]=a,r[g]=e,d=[]}var u,p,m,h}),{gridColumnWidths:r,overrideComponents:s}}var g=i(35001);function u(e){return(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&e.length>0)}},94468:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(63696),o=i(50539),s=i(58116),r=i(37226),a=i(45472);function l(e){const t=(0,o.useSelect)(e=>e(s.oR).hasCapability(s.HD)),i=(0,o.useSelect)(t=>t(r.i).getModuleStoreName(e)),l=(0,o.useSelect)(e=>e(i)?.getAdminReauthURL()),{navigateTo:c}=(0,o.useDispatch)(a.M),d=(0,n.useCallback)(()=>c(l),[l,c]);return l&&t?d:null}},94552:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(62688),o=i.n(n),s=i(4452),r=
|