41 lines
190 KiB
JavaScript
41 lines
190 KiB
JavaScript
|
|
"use strict";(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[265,290],{80:(e,t,i)=>{i.d(t,{CV:()=>w,Cu:()=>x,K9:()=>s,Kr:()=>m,Lf:()=>p,Oh:()=>r,PW:()=>N,Rx:()=>T,S9:()=>f,TQ:()=>d,Vt:()=>E,Wl:()=>v,ZC:()=>n,ZY:()=>a,_p:()=>M,ag:()=>h,aj:()=>u,bz:()=>I,dq:()=>C,f2:()=>c,fB:()=>j,fV:()=>S,iB:()=>g,kc:()=>l,mo:()=>k,nc:()=>A,rm:()=>b,to:()=>o,wo:()=>_,yn:()=>y});const s="modules/analytics-4",n="account_create",o="property_create",r="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",h="analyticsAccountCreate",m="analyticsCustomDimensionsCreate",f="https://www.googleapis.com/auth/analytics.edit",_="dashboardAllTrafficWidgetDimensionName",k="dashboardAllTrafficWidgetDimensionColor",y="dashboardAllTrafficWidgetDimensionValue",v="dashboardAllTrafficWidgetActiveRowIndex",b="dashboardAllTrafficWidgetLoaded",x={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"}},A={ADD_TO_CART:"add_to_cart",PURCHASE:"purchase",SUBMIT_LEAD_FORM:"submit_lead_form",GENERATE_LEAD:"generate_lead",CONTACT:"contact"},S=[A.CONTACT,A.GENERATE_LEAD,A.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"}}}}]}}]}}}}]}},N="audiencePermissionsSetup",w="audienceTileCustomDimensionCreate",I="audience-selection-panel-expirable-new-badge-",C="audience",E="customDimension",M="property",T=[C,E,M]},4124:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(20697),n=i(62659);function o(){const e=(0,n.A)();return s.Nn.includes(e)}},4169:(e,t,i)=>{i.d(t,{N$:()=>n,aO:()=>o,qB:()=>s});const s={BOXES:"boxes",COMPOSITE:"composite"},n={QUARTER:"quarter",HALF:"half",FULL:"full"},o="core/widgets"},4751:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(62688),n=i.n(s),o=i(4452),r=i.n(o),a=i(97513),l=i(62540);function PreviewBlock({className:e,width:t,height:i,shape:s,padding:n,smallWidth:o,smallHeight:c,tabletWidth:g,tabletHeight:d,desktopWidth:u,desktopHeight:p}){const h=(0,a.dv)(),m={width:{[a.mp]:o,[a.Lg]:g,[a.Fo]:u,[a.Qb]:u},height:{[a.mp]:c,[a.Lg]:d,[a.Fo]:p,[a.Qb]:u}};return(0,l.jsx)("div",{className:r()("googlesitekit-preview-block",e,{"googlesitekit-previe
|
|||
|
|
(0,d.__)("%1$s. <Link><Strong>%2$s</Strong></Link>","google-site-kit"),i,(0,d.__)("Get help","google-site-kit")),{Link:(0,k.jsx)(p.A,{href:t,trailingIcon:(0,k.jsx)(f,{width:15,height:15}),external:!0,hideExternalIndicator:!0}),Strong:(0,k.jsx)("strong",{})}),hideIcon:!0}):null}function AdBlockerWarning({moduleSlug:e,className:t}){const i=(0,r.useSelect)(t=>t(l.i).getModuleStoreName(e)),s=(0,r.useSelect)(e=>e(i)?.getAdBlockerWarningMessage()),n=(0,r.useSelect)(t=>t(a.O4).getDocumentationLinkURL(`${e}-ad-blocker-detected`));return(0,k.jsx)(AdBlockerWarningMessage,{className:t,getHelpLink:n,warningMessage:s})}AdBlockerWarningMessage.propTypes={className:o().string,getHelpLink:o().string,warningMessage:o().string},AdBlockerWarning.propTypes={className:o().string,moduleSlug:o().string.isRequired}},24355:(e,t,i)=>{i.d(t,{SO:()=>a});var s=i(55620),n=i(99123);function o(){return[i.g.innerWidth,i.g.innerHeight]}function r({fps:e=60,leading:t=!1,initialWidth:i=0,initialHeight:r=0}={}){const[a,l]=(0,s._)("undefined"==typeof document?[i,r]:o,e,t);function c(){return l(o)}return(0,n.A)(window,"resize",c),(0,n.A)(window,"orientationchange",c),a}function a(e={}){return r(e)[0]}},24560:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s,n=i(63696);function o(){return o=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},o.apply(null,arguments)}const __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 12"},e),s||(s=n.createElement("g",{fill:"currentColor",fillRule:"evenodd"},n.createElement("path",{d:"M0 6.414 1.415 5l5.292 5.292-1.414 1.415z"}),n.createElement("path",{d:"m14.146.146 1.415 1.414L5.414 11.707 4 10.292z"}))))},25797:(e,t,i)=>{i.d(t,{A:()=>y});var s,n=i(62688),o=i.n(n),r=i(4452),a=i.n(r),l=i(63696),c=i(19793);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)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},g.apply(null,arguments)}const warning_notice=e=>l.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),s||(s=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 d=i(42343),u=i(76984),p=i(62540);const h={[u.Q.NEW]:d.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=h[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:o().oneOf(Object.values(u.Q))},Title.propTypes={className:o().string,children:o().node},Description.propTypes={className:o().string,children:o().node};var m=i(49383),f=i(83366);function CTAButton({label:e,disabled:t,inProgress:i,onClick:s,href:n,external:o=!1,hideExternalIndicator:r=!1}){let l;return o&&!r&&(l=(0,p.jsx)(f.A,{width:14,height:14})),(0,p.jsx)(m.SpinnerButton,{className:a()("googlesitekit-notice__cta",{"googlesitekit-notice__cta--spinner__running":i}),disabled:t,isSaving:i,onClick:s,href:n,target:o?"_blank":void 0,trailingIcon:l,children:e})}CTAButton.propTypes={label:o().string.isRequired,disabled:o().bool,inProgress:o().bool,onClick:o().func,href:o().string,external:o().bool,hideExternalIndicator:o().bool};var _=i(82871);function DismissButton({label:e=(0,_.__)("Got it","google-site-kit"),onClick:t,disabled:i,href:s,external:n=!1}){return(0,p.jsx)(m.Button,{onClick:t,disabled:i,href:s,target:n?"_blank":void 0,tertiary:!0,children:e})}DismissButton.propTypes={label:o().string,onClick:o().func.isRequired,disabled:o().bool,href:o().string,external:o().bool};const k=(0,l.forwardRef)(({className:e,title
|
|||
|
|
(0,s.__)("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,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)=>{i.d(t,{Y:()=>s});const s="search-console"},33052:(e,t,i)=>{i.d(t,{A:()=>Typography});var s=i(62688),n=i.n(s),o=i(4452),r=i.n(o),a=i(8513),l=i(62540);function Typography({className:e,type:t,size:i,as:s="span",children:n,...o}){return(0,l.jsx)(s,{className:r()("googlesitekit-typography",e,{[`googlesitekit-typography--${t}`]:t&&a.tT.includes(t),[`googlesitekit-typography--${i}`]:i&&a.oJ.includes(i)}),...o,children:n})}Typography.propTypes={className:n().string,type:n().oneOf(a.tT),size:n().oneOf(a.oJ),as:n().oneOfType([n().string,n().elementType])}},35952:(e,t,i)=>{i.d(t,{Ap:()=>d,IY:()=>l,J4:()=>h,LE:()=>a,O0:()=>c,OT:()=>u,RR:()=>g,Tt:()=>p,_L:()=>r,f2:()=>n,jb:()=>o,wl:()=>s});const s="modules/adsense",n=0,o="READY",r="NEEDS_ATTENTION",a="REQUIRES_REVIEW",l="GETTING_READY",c="background-submit-suspended",g="adsenseAdBlockingFormSettings",d="googlesitekit-ad-blocking-recovery-setup-create-message-cta-clicked",u="ad-blocking-recovery-notification",p={TAG_PLACED:"tag-placed",SETUP_CONFIRMED:"setup-confirmed"},h={PLACE_TAGS:0,CREATE_MESSAGE:1,COMPLETE:2}},37133:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s=i(63696);const __WEBPACK_DEFAULT_EXPORT__=function(e,t){const[n,o]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(e.current&&"function"==typeof i.g.IntersectionObserver){function s(e){o(e[e.length-1])}const n=new i.g.IntersectionObserver(s,t);return n.observe(e.current),()=>{o(null),n.disconnect()}}return()=>{}},[e.current,t.threshold,t.root,t.rootMargin]),n}},37834:(e,t,i)=>{i.d(t,{A:()=>Notifications});var s=i(62688),n=i.n(s),o=i(50539),r=i(62659),a=i(8732),l=i(84730),c=i(50532),g=i.n(c),d=i(67438),u=i(62540);const p=g()(e=>({id:e,Notification:h(e)(d.A)}));function h(e){return t=>{function WithNotificationID(i){return(0,u.jsx)(t,{...i,id:e})}return WithNotificationID.displayName="WithNotificationID",(t.displayName||t.name)&&(WithNotificationID.displayName+=`(${t.displayName||t.name})`),WithNotificationID}}function Notifications({areaSlug:e,groupID:t=l.He.DEFAULT}){const i=(0,r.A)(),s=(0,o.useSelect)(e=>e(a.D).getQueuedNotifications(i,t));if(void 0===s?.[0]||s?.[0]?.areaSlug!==e)return null;const{id:n,Component:c}=s[0],g={...p(n)};return(0,u.jsx)(c,{...g})}Notifications.propTypes={viewContext:n().string,areaSlug:n().string}},38017:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(62688),n=i.n(s),o=i(4452),r=i.n(o),a=i(62540);function ChangeArrow({direction:e,invertColor:t,width:i,height:s}){return(0,a.jsx)("svg",{className:r()("googlesitekit-change-arrow",`googlesitekit-change-arrow--${e}`,{"googlesitekit-change-arrow--inverted-color":t}),width:i,height:s,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"})})}ChangeArrow.propTypes={direction:n().string,invertColor:n().bool,width:n().number,height:n().number},ChangeArrow.defaultProps={direction:"up",invertColor:!1,width:9,height:9};const l=ChangeArrow},38432:(e,t,i)=>{i.d(t,{A:()=>I});var s,n=i(4452),o=i.n(n),r=i(62688),a=i.n(r),l=i(39941),c=i(63696),g=i(82871);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 s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},d.apply(null,arguments)}const u=e=>c.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13"},e),s||(s=c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("circle",{cx:6.5,cy:6.5,r:6.5,fill:"currentColor"}),c.createElement("path",{fill:"#FFF",d:"M3.461 6.96h5.15L6.36 9.21a.464.464 0 0 0 .325.79.46.46 0 0 0 .325-.135l3.037-3.038a.46.46 0 0 0 0-.65L7.015 3.135a.46.46 0 0 0-.65.65L8.61 6.039H3.461a.
|
|||
|
|
(0,c.__)("Source: %s","google-site-kit"),`<a>${e}</a>`),{a:m.createElement(g.A,{key:"link",href:t,external:s,onClick:_})}))}SourceLink.propTypes={name:n().string,href:n().string,className:n().string,external:n().bool};const f=SourceLink},44436:(e,t,i)=>{i.d(t,{A:()=>d});var s,n=i(82871),o=i(88933),r=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=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 80 21"},e),s||(s=r.createElement("path",{fill:"#5F6368",d:"M62.09 1.664h3.038v.1L58.34 9.593l7.241 10.224v.1H62.7L56.755 11.4 53.95 14.64v5.278h-2.351V1.664h2.35v9.415h.1zM69.985 3.117c0 .454-.167.853-.488 1.175-.322.322-.71.488-1.176.488-.455 0-.854-.166-1.175-.488a1.6 1.6 0 0 1-.488-1.175c0-.466.166-.854.488-1.176s.71-.488 1.175-.488c.455 0 .854.166 1.176.488.332.333.487.72.487 1.176m-.477 4.313v12.498h-2.351V7.43zM77.016 20.128c-1.02 0-1.864-.31-2.54-.943q-1.014-.948-1.031-2.628V9.57h-2.196V7.43h2.196V3.603h2.35V7.43h3.061v2.14h-3.06v6.222c0 .831.166 1.397.488 1.696.321.3.687.444 1.097.444.189 0 .366-.022.555-.067.188-.044.344-.1.499-.166l.743 2.096c-.632.222-1.342.333-2.162.333M2.673 18.952C1.375 18.009.488 16.678 0 14.97l2.883-1.176c.289 1.076.799 1.94 1.542 2.628.732.677 1.619 1.02 2.65 1.02.965 0 1.774-.244 2.45-.742.677-.5 1.01-1.187 1.01-2.052 0-.798-.3-1.453-.887-1.974q-.883-.781-3.094-1.564l-1.22-.432Q3.371 9.997 2.04 8.716C1.153 7.862.71 6.742.71 5.346c0-.966.266-1.853.787-2.673S2.75 1.209 3.693.72C4.624.244 5.678 0 6.864 0c1.708 0 3.072.41 4.081 1.242 1.02.832 1.697 1.752 2.04 2.795L10.236 5.2c-.2-.621-.576-1.164-1.142-1.63-.565-.477-1.286-.71-2.173-.71s-1.641.222-2.251.676-.91 1.032-.91 1.742c0 .676.278 1.22.82 1.663.544.432 1.398.854 2.563 1.253l1.22.41c1.674.577 2.96 1.342 3.88 2.274.921.931 1.376 2.184 1.376 3.748 0 1.275-.322 2.34-.976 3.193a6 6 0 0 1-2.495 1.919 8 8 0 0 1-3.116.621c-1.62 0-3.072-.466-4.358-1.408M15.969 3.449a1.95 1.95 0 0 1-.588-1.43c0-.566.2-1.043.588-1.431A1.95 1.95 0 0 1 17.399 0c.566 0 1.043.2 1.43.588.389.388.588.865.588 1.43 0 .566-.2 1.043-.587 1.43a1.95 1.95 0 0 1-1.43.589c-.566-.012-1.043-.2-1.431-.588m-.067 2.595h2.994v13.883h-2.994zM25.406 19.85c-.544-.2-.987-.466-1.331-.788-.776-.776-1.176-1.84-1.176-3.182V8.683h-2.428v-2.64h2.428V2.13h2.994v3.926h3.372v2.639h-3.372v6.531c0 .743.145 1.276.433 1.575.277.366.743.543 1.42.543.31 0 .576-.044.82-.122q.35-.116.765-.399v2.917c-.599.277-1.32.41-2.173.41a5 5 0 0 1-1.753-.3M33.623 19.407a6.63 6.63 0 0 1-2.529-2.628c-.61-1.12-.909-2.373-.909-3.77 0-1.332.3-2.551.887-3.693.588-1.132 1.409-2.04 2.462-2.706s2.251-1.01 3.593-1.01c1.397 0 2.606.311 3.637.921a6.1 6.1 0 0 1 2.34 2.528c.532 1.076.799 2.274.799 3.627 0 .255-.023.576-.078.953H33.179c.111 1.287.566 2.285 1.375 2.983a4.16 4.16 0 0 0 2.817 1.043c.854 0 1.597-.189 2.218-.588a4.27 4.27 0 0 0 1.508-1.597l2.528 1.198q-.981 1.713-2.561 2.694c-1.054.655-2.318.976-3.782.976q-2.046.033-3.66-.931m7.23-8.051a3.3 3.3 0 0 0-.466-1.453c-.277-.477-.687-.887-1.242-1.208-.554-.322-1.23-.488-2.03-.488-.964 0-1.773.288-2.439.853-.665.566-1.12 1.342-1.375 2.296z"})));var c=i(55989),g=i(62540);const d=function Logo(){return(0,g.jsxs)("div",{className:"googlesitekit-logo","aria-hidden":"true",children:[(0,g.jsx)(o.A,{className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),(0,g.jsx)(l,{className:"googlesitekit-logo__logo-sitekit",height:"26",width:"99"}),(0,g.jsx)(c.A,{children:(0,n.__)("Site Kit by Google Logo","google-site-kit")})]})}},45257:(e,t,i)=>{i.d(t,{A:()=>LoadingWrapper});var s=i(62688),n=i.n(s),o=i(4751),r=i(62540);function LoadingWrapper({loading:e,children:t,...i}){return e?(0,r.jsx)(o.A,{...i}):t}LoadingWrapper.propTypes={loading:n().bool,children:n().node,...o.A.propTypes}},45454:(e,t,i)=>{i.d(t,{Ay:()=>AutoAdExclusionSwitches,BN:()=>u,nk:()=>g,ru:()=>d});var s=i(63696),n=i(82871),o=i(50539),r=i(49383),a=i(83880),l=i(35952),c=i(62540);const g="loggedinUsers",d="conten
|
|||
|
|
(0,r._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),n?p(n,{...l,unit:"second"}):"",s?p(s,{...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"),n);if(0===e)return t;const o=(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"),s),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"),n?t:"",s?o:"",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:n="metric"}=i;return"metric"===n?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"===n?a(e,i):"durationISO"===n?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=o()(console.warn);function p(e,t={}){const{locale:i=m(),...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 n={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},o=["signDisplay","compactDisplay"],r={};for(const[e,t]of Object.entries(s))n[e]&&t===n[e]||o.includes(e)||(r[e]=t);try{return new Intl.NumberFormat(i,r).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function h(e,t={}){const{locale:i=m(),style:s="long",type:n="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:s,type:n}).format(e)}
|
|||
|
|
/* translators: used between list items, there is a space after the comma. */const o=(0,r.__)(", ","google-site-kit");return e.join(o)}function m(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)=>{i.d(t,{Gq:()=>d,IL:()=>m,LD:()=>p,SO:()=>u,a2:()=>n,xD:()=>h});var s=i(13047);const n="googlesitekit_",o=`${n}1.175.0_${i.g._googlesitekitBaseData.storagePrefix}_`,r=["sessionStorage","localStorage"];let a,l=[...r];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(`${o}${e}`);if(i){const e=JSON.parse(i),{timestamp:t,ttl:s,value:n,isError:o}=e;if(t&&(!s||Math.round(Date.now()/1e3)-t<s))return{cacheHit:!0,value:n,isError:o}}}return{cacheHit:!1,value:void 0}}async function u(e,t,{ttl:n=s.Jg,timestamp:r=Math.round(Date.now()/1e3),isError:a=!1}={}){const l=await g();if(l)try{return l.setItem(`${o}${e}`,JSON.stringify({timestamp:r,ttl:n,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(n)?e:`${o}${e}`;return t.removeItem(i),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function h(){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(n)&&t.push(s)}return t}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),[]}return[]}async function m(){if(await g()){const e=await h();for(const t of e)await p(t);return!0}return!1}},50304:(e,t,i)=>{i.d(t,{A:()=>IconWrapper});var s=i(62688),n=i.n(s),o=i(62540);function IconWrapper({children:e,marginLeft:t,marginRight:i}){return(0,o.jsx)("span",{className:"googlesitekit-icon-wrapper",style:{marginLeft:t,marginRight:i},children:e})}IconWrapper.propTypes={children:n().node.isRequired,marginLeft:n().number,marginRight:n().number}},50477:(e,t,i)=>{i.d(t,{C:()=>o,p:()=>n});var s=i(55465);function n(e,t={}){return{__html:s.O.sanitize(e,t)}}function o(e){const t="object"==typeof e?e.toString():e;return t?.replace?.(/\/+$/,"")}},50539:e=>{e.exports=googlesitekit.data},51193:(e,t,i)=>{i.d(t,{Du:()=>p,GH:()=>l,Gp:()=>c,IS:()=>k,Jg:()=>d,N_:()=>v,O5:()=>y,Ql:()=>h,Qr:()=>m,XH:()=>_,r0:()=>g,sq:()=>f,tt:()=>u});var s=i(32091),n=i.n(s),o=i(17243),r=i(82871);const a="Date param must construct to a valid date instance or be a valid date instance itself.",l="Invalid dateString parameter, it must be a string.",c='Invalid date range, it must be a string with the format "last-x-days".',g=60,d=60*g,u=24*d,p=7*u;function h(){function e(e){return(0,r.sprintf)(/* translators: %s: number of days */ /* translators: %s: number of days */
|
|||
|
|
(0,r._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 m(e=""){if(!(0,o.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,o.isDate)(t)&&!isNaN(t)}function f(e){n()((0,o.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 _(e){n()(m(e),l);const[t,i,s]=e.split("-");return new Date(t,i-1,s)}function k(e,t){return f(v(e,t*u))}function y(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){n()(m(e)||(0,o.isDate)(e)&&!isNaN(e),l);const i=m(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}},52696:(e,t,i)=>{i.d(t,{WM:()=>s.WM,wA:()=>s.wA,ws:()=>s.ws});var s=i(49057);void 0===i.g.googlesitekit&&(i.g.googlesitekit={}),i.g.googlesitekit.data=s.Ay},52721:(e,t,i)=>{i.d(t,{w:()=>a});var s=i(35470),n=i(63696),o=i(85097);function r(){}function a(e,t){const i=(0,o.W)({sticky:!0}),a=(0,n.useRef)(),l=(0,n.useCallback)(e,t),c=(0,s.A)(i?l:r);return i&&(a.current=c),a.current}},52735:(e,t,i)=>{i.d(t,{A:()=>s});const s=(0,i(63696).createContext)(!1)},55103:(e,t,i)=>{i.d(t,{A:()=>SupportLink});var s=i(62688),n=i.n(s),o=i(50539),r=i(29785),a=i(38432),l=i(62540);function SupportLink(e){const{path:t,query:i,hash:s,...n}=e,c=(0,o.useSelect)(e=>e(r.O4).getGoogleSupportURL({path:t,query:i,hash:s}));return(0,l.jsx)(a.A,{...n,href:c})}SupportLink.propTypes={path:n().string.isRequired,query:n().object,hash:n().string}},55465:(e,t,i)=>{i.d(t,{O:()=>n});var s=i(31234);const n=i.n(s)()(i.g)},55989:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(62688),n=i.n(s),o=i(4452),r=i.n(o),a=i(62540);function VisuallyHidden({className:e,children:t,...i}){return t?(0,a.jsx)("span",{...i,className:r()("screen-reader-text",e),children:t}):null}VisuallyHidden.propTypes={className:n().string,children:n().node},VisuallyHidden.defaultProps={className:""};const l=VisuallyHidden},58240:(e,t,i)=>{i.d(t,{QB:()=>AccountSelect,gx:()=>AdSenseLinkCTA,Ve:()=>v.Ay,kg:()=>ErrorNotices,TZ:()=>UseSnippetSwitch,Fv:()=>UserProfile});var s=i(63696),n=i(82871),o=i(49383),r=i(50539),a=i(13047),l=i(35952),c=i(62659),g=i(62540);function AccountSelect(){const e=`${(0,c.A)()}_adsense`,t=(0,r.useSelect)(e=>e(l.wl).getAccountID()),i=(0,r.useSelect)(e=>e(l.wl).getAccounts()),d=(0,r.useSelect)(e=>e(l.wl).hasFinishedResolution("getAccounts")),{setAccountID:u}=(0,r.useDispatch)(l.wl),p=(0,s.useCallback)((i,s)=>{const n=s.dataset.value;t!==n&&(u(n),(0,a.sx)(e,"change_account"))},[t,e,u]);return d?(0,g.jsx)(o.Select,{className:"googlesitekit-adsense__select-account",label:(0,n.__)("Account","google-site-kit"),value:t,onEnhancedChange:p,enhanced:!0,outlined:!0,children:(i||[]).map(({_id:e,displayName:t},i)=>(0,g.jsx)(o.Option,{value:e,children:t},i))}):(0,g.jsx)(o.ProgressBar,{small:!0})}var d=i(12317),u=i(29785);function AdSenseLinkCTA({onClick:e=()=>{}}){const t=(0,r.useSelect)(e=>e(u.O4).getGoogleSupportURL({path:"/adsense/answer/6084409"}));return(0,g.jsx)(d.A,{title:(0,n.__)("Link Analytics and AdSense","google-site-kit"),description:(0,n.__)("Get reports for your top earning pages by linking your Analytics and AdSense accounts","google-site-kit"),ctaLink:t,ctaLabel:(0,n.__)("Learn more","google-site-kit"),onClick:e,ctaLinkExternal:!0})}var p=i(78014),h=i(62688),m=i.n(h);function ErrorNotices({hasButton:e=!1}){return(0,g.jsx)(p.A,{hasButton:e,moduleSlug:"adsense",storeName:l.wl})}ErrorNotices.propTypes={hasButton:m().bool};var f=i(97345);function UserProfile(){const e=(0,r.useSelect)(e=>e(f.oR).getEmail()),t=(0,r.useSelect)(e=>e(f.oR).getPicture());return(0,r.useSelect)(e=>e(f.oR).hasFinishedResolution("getUser"))?(0,g.jsxs)("p",{className:"googlesitekit-setup-module__user",children:[(0,g.jsx)("img",{className:"googlesitekit-setup-mod
|
|||
|
|
(0,c.__)("<strong>Note:</strong> %s","google-site-kit"),e),{strong:(0,u.jsx)("strong",{})}),"function"==typeof e&&(0,u.jsx)(e,{})]},`note-${t}`))})]}),(0,u.jsxs)(g.DialogFooter,{children:[(0,u.jsx)(g.Button,{className:"mdc-dialog__cancel-button",onClick:i,disabled:y,tertiary:!0,children:(0,c.__)("Cancel","google-site-kit")}),x?(0,u.jsx)(g.Button,{href:x,onClick:h,target:"_blank",danger:k,children:f}):(0,u.jsx)(g.SpinnerButton,{onClick:h,danger:k,disabled:y,isSaving:y,children:f||(0,c.__)("Disconnect","google-site-kit")})]})]})}ModalDialog.displayName="Dialog",ModalDialog.propTypes={className:n().string,dialogActive:n().bool,handleDialog:n().func,handleConfirm:n().func.isRequired,onOpen:n().func,onClose:n().func,title:n().string,provides:n().arrayOf(n().string),confirmButton:n().string,notes:n().arrayOf(n().oneOfType([n().string,n().elementType])),danger:n().bool,small:n().bool,medium:n().bool,buttonLink:n().string};const p=ModalDialog},61983:(e,t,i)=>{i.d(t,{A:()=>DismissButton});var s=i(62688),n=i.n(s),o=i(82871),r=i(49383),a=i(62540);function DismissButton({className:e,label:t=(0,o.__)("Maybe later","google-site-kit"),onClick:i,disabled:s,tertiary:n=!0}){return i?(0,a.jsx)(r.Button,{className:e,onClick:i,disabled:s,tertiary:n,children:t}):null}DismissButton.propTypes={className:n().string,label:n().string,onClick:n().func,disabled:n().bool,tertiary:n().bool,dismissOptions:n().shape({expiresInSeconds:n().number,skipHidingFromQueue:n().bool})}},62659:(e,t,i)=>{i.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var s=i(63696),n=i(19826);const __WEBPACK_DEFAULT_EXPORT__=function(){return(0,s.useContext)(n.Ay)}},63081:(e,t,i)=>{i.d(t,{A:()=>Root});var s=i(62688),n=i.n(s),o=i(44010),r=i(77105),a=i(63696),l=i(50539),c=i.n(l),g=i(82871),d=i(6730),u=i(19826),p=i(67510),h=i(13047),m=i(62540);class ErrorHandler extends a.Component{constructor(e){super(e),this.state={error:null,info:null,copied:!1}}componentDidCatch(e,t){i.g.console.error("Caught an error:",e,t),this.setState({error:e,info:t}),(0,h.sx)("react_error",`handle_${this.context||"unknown"}_error`,`${e?.message}\n${t?.componentStack}`.slice(0,500))}render(){const{children:e}=this.props,{error:t,info:i}=this.state;return t?(0,m.jsx)(p.A,{notificationID:"googlesitekit-error",className:"googlesitekit-error-handler",type:"error",title:(0,g.__)("Site Kit encountered an error","google-site-kit"),description:(0,m.jsxs)(a.Fragment,{children:[(0,m.jsx)(d.A,{message:t.message,componentStack:i.componentStack}),(0,m.jsxs)("pre",{className:"googlesitekit-overflow-auto",children:[t.message,i.componentStack]})]})}):e}}ErrorHandler.contextType=u.Ay,ErrorHandler.propTypes={children:n().node.isRequired};const f=ErrorHandler;var _=i(79961);const{Consumer:k,Provider:y}=_.A,v=y;var b=i(84895),x=i(82246),A=i(11999),S=i(70301),j=i(97345),N=i(78990),w=i(94656);const I=function AuthenticatedPermissionsModal(){const e=(0,l.useRegistry)(),t=(0,l.useSelect)(e=>e(j.oR).getPermissionScopeError()),s=(0,l.useSelect)(e=>e(j.oR).getUnsatisfiedScopes()),n=(0,l.useSelect)(e=>e(j.oR).getConnectURL({additionalScopes:t?.data?.scopes,redirectURL:t?.data?.redirectURL||i.g.location.href,errorRedirectURL:t?.data?.errorRedirectURL})),{clearPermissionScopeError:o}=(0,l.useDispatch)(j.oR),{navigateTo:r}=(0,l.useDispatch)(S.M),{setValues:c}=(0,l.useDispatch)(A.s),d=(0,a.useCallback)(()=>{o()},[o]),u=(0,a.useCallback)(async()=>{c(j.$8,{permissionsError:t}),await(0,N.mR)(e),r(n)},[e,n,r,t,c]);return(0,a.useEffect)(()=>{!async function(){t?.data?.skipModal&&t?.data?.scopes?.length&&await u()}()},[u,t]),t?t?.data?.scopes?.length?t?.data?.skipModal||s&&t?.data?.scopes.every(e=>s.includes(e))?null:(0,m.jsx)(w.A,{children:(0,m.jsx)(x.A,{title:(0,g.__)("Additional Permissions Required","google-site-kit"),subtitle:t.message,confirmButton:(0,g.__)("Proceed","google-site-kit"),handleConfirm:u,handleCancel:d,onClose:d,dialogActive:!0,medium:!0})}):(i.g.console.warn("permissionsError lacks scopes array to use for redirect, so not showing the PermissionsModal. permissionsError was:",t),null):null};const C=function PermissionsModal(){retur
|
|||
|
|
(0,r.__)("%s (Please try again.)","google-site-kit"),v)),p||(v=(0,r.sprintf)(/* translators: $%s: Error message */ /* translators: $%s: Error message */
|
|||
|
|
(0,r.__)("Error: %s","google-site-kit"),v));const b=t?.data?.reconnectURL;b&&(0,a.m)(b)&&(v=(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"),v,b));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:y?{label:(0,r.__)("Retry","google-site-kit"),onClick:k}:void 0,hideIcon:m})}ErrorNotice.propTypes={className:n().string,error:n().shape({message:n().string}),hasButton:n().bool,storeName:n().string,message:n().string,noPrefix:n().bool,skipRetryMessage:n().bool,hideIcon:n().bool}},75662:(e,t,i)=>{i.d(t,{A:()=>m});var s=i(62688),n=i.n(s),o=i(4452),r=i.n(o),a=i(63696),l=i(10740),c=i(38432),g=i(33052),d=i(62540);class LayoutHeader extends a.Component{render(){const{title:e,badge:t,ctaLabel:i,ctaLink:s}=this.props,n=s?{alignMiddle:!0,smSize:4,lgSize:6}:{alignMiddle:!0,smSize:4,mdSize:8,lgSize:12};return(0,d.jsx)("header",{className:"googlesitekit-layout__header",children:(0,d.jsx)(l.xA,{children:(0,d.jsxs)(l.fI,{children:[e&&(0,d.jsx)(l.fh,{...n,children:(0,d.jsxs)(g.A,{as:"h3",size:"small",type:"title",className:"googlesitekit-subheading-1 googlesitekit-layout__header-title",children:[e,t]})}),s&&(0,d.jsx)(l.fh,{smSize:4,lgSize:6,alignMiddle:!0,mdAlignRight:!0,children:(0,d.jsx)(c.A,{href:s,external:!0,children:i})})]})})})}}LayoutHeader.propTypes={title:n().string,badge:n().node,ctaLabel:n().string,ctaLink:n().string},LayoutHeader.defaultProps={title:"",badge:null,ctaLabel:"",ctaLink:""};const u=LayoutHeader;var p=i(44148);class LayoutFooter extends a.Component{render(){const{ctaLabel:e,ctaLink:t,footerContent:i}=this.props;return(0,d.jsx)("footer",{className:"googlesitekit-layout__footer",children:(0,d.jsx)(l.xA,{children:(0,d.jsx)(l.fI,{children:(0,d.jsxs)(l.fh,{size:12,children:[t&&e&&(0,d.jsx)(p.A,{className:"googlesitekit-data-block__source",name:e,href:t,external:!0}),i]})})})})}}LayoutFooter.propTypes={ctaLabel:n().string,ctaLink:n().string};const h=LayoutFooter;class Layout extends a.Component{render(){const{header:e,footer:t,children:i,title:s,badge:n,headerCTALabel:o,headerCTALink:a,footerCTALabel:l,footerCTALink:c,footerContent:g,className:p,fill:m,relative:f,rounded:_=!1,transparent:k=!1,...y}=this.props;return(0,d.jsxs)("div",{className:r()("googlesitekit-layout",p,{"googlesitekit-layout--fill":m,"googlesitekit-layout--relative":f,"googlesitekit-layout--rounded":_,"googlesitekit-layout--transparent":k}),...y,children:[e&&(0,d.jsx)(u,{title:s,badge:n,ctaLabel:o,ctaLink:a}),i,t&&(0,d.jsx)(h,{ctaLabel:l,ctaLink:c,footerContent:g})]})}}Layout.propTypes={header:n().bool,footer:n().bool,children:n().node.isRequired,title:n().string,badge:n().node,headerCTALabel:n().string,headerCTALink:n().string,footerCTALabel:n().string,footerCTALink:n().string,footerContent:n().node,className:n().string,fill:n().bool,relative:n().bool,rounded:n().bool,transparent:n().bool},Layout.defaultProps={header:!1,footer:!1,title:"",badge:null,headerCTALabel:"",headerCTALink:"",footerCTALabel:"",footerCTALink:"",footerContent:null,className:"",fill:!1,relative:!1};const m=Layout},76353:(e,t,i)=>{var s=i(131),n=i(78325),o=i(20697),r=i(99162),a=i(63081),l=i(62540);(0,s.A)(()=>{const e=document.getElementById("js-googlesitekit-ad-blocking-recovery");e&&(0,n.render)((0,l.jsx)(a.A,{viewContext:o.Y$,children:(0,l.jsx)(r.RR,{})}),e)})},76729:(e,t,i)=>{i.d(t,{Q:()=>s});const s="emailReportingUserSettingsSelectionPanelOpened"},76984:(e,t,i)=>{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)=>{i.d(t,{A:()=>StoreErrorNotices});var s=i(62688),n=i.n(s),o=i(50539),r=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,o.useSelect)(e=>e(i).getErrors()),n=(0,o.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:o}=t;return(0,l.SG)(t)&&(o=(0,c.c)(o,n)),(0,g.jsx)(r.A,{error:t,hasButton:e,storeName:i,message:o},s)}
|
|||
|
|
(0,l.__)("Google Account for %1$s (Email: %2$s)","google-site-kit"),n,i)),n&&!i&&(Z=(0,l.sprintf)(/* translators: Account info text. 1: User's (full) name. */ /* translators: Account info text. 1: User's (full) name. */
|
|||
|
|
(0,l.__)("Google Account for %1$s","google-site-kit"),n)),!n&&i&&(Z=(0,l.sprintf)(/* translators: Account info text. 1: User's email address. */ /* translators: Account info text. 1: User's email address. */
|
|||
|
|
(0,l.__)("Google Account (Email: %1$s)","google-site-kit"),i)),(0,f.jsxs)(c.Fragment,{children:[(0,f.jsxs)("div",{ref:N,className:"googlesitekit-user-selector googlesitekit-dropdown-menu googlesitekit-dropdown-menu__icon-menu mdc-menu-surface--anchor",children:[(0,f.jsx)(h.Button,{disabled:r,ref:w,className:"googlesitekit-header__dropdown mdc-button--dropdown googlesitekit-border-radius-round--tablet googlesitekit-border-radius-round--phone googlesitekit-border-radius-round googlesitekit-button-icon",onClick:F,icon:!!s&&(0,f.jsx)("i",{className:"mdc-button__icon mdc-button__account","aria-hidden":"true",children:(0,f.jsx)("img",{className:"mdc-button__icon--image",src:s,alt:(0,l.__)("User Avatar","google-site-kit")})}),"aria-haspopup":"menu","aria-expanded":A,"aria-controls":"user-menu","aria-label":r?void 0:(0,l.__)("Account","google-site-kit"),tooltipEnterDelayInMS:500,customizedTooltip:r?null:(0,f.jsxs)("span",{"aria-label":Z,children:[(0,f.jsx)("strong",{children:(0,l.__)("Google Account","google-site-kit")}),(0,f.jsx)("br",{}),(0,f.jsx)("br",{}),n,n&&(0,f.jsx)("br",{}),i]}),text:!0,tooltip:!0}),(0,f.jsxs)(h.Menu,{className:"googlesitekit-user-menu",menuOpen:A,onSelected:V,id:"user-menu",children:[(0,f.jsx)(MenuSection,{children:(0,f.jsx)(Details,{})}),e&&(0,f.jsx)(MenuItem,{id:"manage-email-reports",icon:(0,f.jsx)(T.A,{width:"24"}),label:(0,l.__)("Manage email reports","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"}),!!t&&(0,f.jsx)(MenuItem,{id:"manage-sites",icon:(0,f.jsx)(M,{width:"24"}),label:(0,l.__)("Manage Sites","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"}),(0,f.jsx)(MenuItem,{id:"disconnect",icon:(0,f.jsx)(S,{width:"24"}),label:(0,l.__)("Disconnect","google-site-kit"),itemClassName:"googlesitekit-user-menu__item",iconClassName:"googlesitekit-user-menu__item-icon",labelClassName:"googlesitekit-user-menu__item-label"})]})]}),(0,f.jsx)(b.A,{children:(0,f.jsx)(m.A,{dialogActive:_,handleConfirm:W,handleCancel:E,onClose:E,title:(0,l.__)("Disconnect","google-site-kit"),subtitle:(0,l.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:(0,l.__)("Disconnect","google-site-kit"),danger:!0,small:!0})})]})}var G=i(10740),F=i(4124),Y=i(45257),V=i(15844),W=i(31589),Z=i(39525),$=i(30521),Q=i(20697),q=i(7551),X=i(11883),J=i(97513);var K=i(59352),ee=i(4169);const te={[q.Oo]:{[Q.SH]:K.CONTEXT_MAIN_DASHBOARD_KEY_METRICS,[Q.OT]:K.CONTEXT_MAIN_DASHBOARD_TRAFFIC,[Q.en]:K.CONTEXT_MAIN_DASHBOARD_CONTENT,[Q.Ej]:K.CONTEXT_MAIN_DASHBOARD_SPEED,[Q.Gw]:K.CONTEXT_MAIN_DASHBOARD_MONETIZATION},[q.oE]:{[Q.OT]:K.CONTEXT_ENTITY_DASHBOARD_TRAFFIC,[Q.en]:K.CONTEXT_ENTITY_DASHBOARD_CONTENT,[Q.Ej]:K.CONTEXT_ENTITY_DASHBOARD_SPEED,[Q.Gw]:K.CONTEXT_ENTITY_DASHBOARD_MONETIZATION}};var ie;function se(){return se=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},se.apply(null,arguments)}const ne=e=>c.createElement("svg",se({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18"},e),ie||(ie=c.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M18 16V2c0-1.1-1-2-2.222-2H2.222C1 0 0 .9 0 2v14c0 1.1 1 2 2.222 2h13.556C17 18 18 17.1 18 16M9 7h5V5H9zm7-5H2v14h14zM4 4h4v4H4zm10 7H9v2h5zM4 10h4v4H4z",clipRule:"evenodd"})));var oe,re,ae,le;function ce(){return ce=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},ce.apply(null,arguments)}const ge=e=>c.createElement("svg",ce({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 13 12"},e),oe||(oe=c.createElement("rect",{width:5,height:5,x:.5,fill:"currentColor",rx:1})),re||(
|
|||
|
|
(0,l.__)("Step %1$s of %2$s (upcoming).","google-site-kit"),e,n);case y.ACTIVE:return(0,l.sprintf)(/* translators: 1: The number of the current step. 2: The total number of steps. */ /* translators: 1: The number of the current step. 2: The total number of steps. */
|
|||
|
|
(0,l.__)("Step %1$s of %2$s (active).","google-site-kit"),e,n);case y.COMPLETED:return(0,l.sprintf)(/* translators: 1: The number of the current step. 2: The total number of steps. */ /* translators: 1: The number of the current step. 2: The total number of steps. */
|
|||
|
|
(0,l.__)("Step %1$s of %2$s (completed).","google-site-kit"),e,n);default:return""}}return(0,v.jsx)("ol",{className:_()("googlesitekit-stepper",i),children:s.Children.map(e,(e,i)=>{const r=function(e=-1){return e<t?y.COMPLETED:e===t?y.ACTIVE:y.UPCOMING}(i),a=i+1;return(0,v.jsxs)("li",{className:_()("googlesitekit-stepper__step",`googlesitekit-stepper__step--${r}`,e.props.className),children:[(0,v.jsxs)("div",{className:"googlesitekit-stepper__step-progress",children:[(0,v.jsx)("span",{className:"googlesitekit-stepper__step-number",title:o(a,r),children:r===y.COMPLETED?(0,v.jsx)(k.A,{}):a}),a<n&&(0,v.jsx)("div",{className:"googlesitekit-stepper__step-progress-line"})]}),(0,s.cloneElement)(e,{stepStatus:r})]})})})}Stepper.propTypes={children:m().node.isRequired,activeStep:m().number,className:m().string};var b=i(33052);function Step({children:e,title:t,stepStatus:i}){return(0,v.jsxs)("div",{className:"googlesitekit-stepper__step-info",children:[(0,v.jsx)(b.A,{as:"h2",className:"googlesitekit-stepper__step-title",size:"medium",type:"title",children:t}),(0,v.jsx)("div",{className:"googlesitekit-stepper__step-content-container",children:i===y.ACTIVE&&(0,v.jsx)("div",{className:"googlesitekit-stepper__step-content",children:e})})]})}Step.propTypes={children:m().node.isRequired,title:m().string.isRequired,stepStatus:m().oneOf(Object.values(y))};var x,A,S,j,N,w,I,C,E,M,T,D,O,R,L,z,P,B,H,U,G=i(75662),F=i(70301),Y=i(29785),V=i(7972),W=i(62659),Z=i(13047),$=i(35952);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 q=e=>s.createElement("svg",Q({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 390 273"},e),x||(x=s.createElement("path",{fill:"#F3F5F7",d:"M22.56 28.885a85 85 0 0 1 8.606-7.899C60.044-2.097 83.903-2.06 116.934 2.153 139.265 5 158.642 18.5 182.13 17.185 205.617 15.871 238.088 7.743 264 9.5c29.5 2 37 5.5 63.227 19.385 24.273 12.85 46.312 35.426 57.388 65.284 18.985 51.177-14.865 143.285-60.259 147.628-32.893 3.148-60.039-33.973-93.239-25.376-20.452 5.297-32.583 27.515-48.362 42.177-18.409 17.107-48.199 16.032-69.755 6.902-20.542-8.699-35.63-25.926-42.338-51.32-5.107-19.338-4.595-38.709-16.86-53.857C36.497 138.947 9.432 134 1.281 94.168c-5.16-25.213 5.942-49.13 21.279-65.283"})),A||(A=s.createElement("g",{filter:"url(#ad-blocking-recovery-setup_svg__a)"},s.createElement("rect",{width:257.906,height:176.087,x:50.837,y:42.913,fill:"#fff",rx:14.086}),s.createElement("rect",{width:259.302,height:177.484,x:50.139,y:42.214,stroke:"#CBD0D3",strokeWidth:1.396,rx:14.785}))),S||(S=s.createElement("rect",{width:78,height:126.285,x:65,y:78.486,fill:"#EE92DA",rx:5.282})),j||(j=s.createElement("circle",{cx:104.5,cy:139.528,r:11,stroke:"#fff",strokeWidth:3})),N||(N=s.createElement("path",{stroke:"#fff",strokeWidth:3,d:"m112 132.028-15.5 15.5"})),w||(w=s.createElement("path",{fill:"#EBEEF0",d:"M50.837 56.999c0-7.78 6.307-14.086 14.087-14.086h229.733c7.78 0 14.086 6.306 14.086 14.086v7.258H50.837z"})),I||(I=s.createElement("rect",{width:7.115,height:7.115,x:61.509,y:50.027,fill:"#CBD0D3",rx:3.557})),C||(C=s.createElement("rect",{width:7.115,height:7.115,x:72.181,y:50.027,fill:"#CBD0D3",rx:3.557})),E||(E=s.createElement("rect",{width:125.396,height:42.688,x:164,y:78.486,fill:"#EBEEF0",rx:5.585})),M||(M=s.createElement("rect",{width:92.49,height:14.229,x:164,y:129,fill:"#EBEEF0",rx:7.115})),T||(T=s.createElement("rect",{width:108.498,height:5.585,x:164,y:151,fill:"#EBEEF0",rx:2.793})),D||(D=s.createElement("rect",{width:92.49,height:5.585,x:164,y:165,fill:"#EBEEF0",rx:2.793})),O||(O=s.createElement("rect",{width:125.396,height:5.585,x:164,y:179,fill:"#EBEEF0",rx:2.793})),R||(R=s.createElement("g",{filter:"url(#ad-blocking-recovery-setup_svg__b)"},s.createElement("path",{fill:"#fff",d:"M199 163c0-6.075 4.925-11 11-11h126c6.075 0 11 4.925 11 11v83.038c0 6.076-4.925 11-11 11H210c-6.075 0-11-4.924-11-11z"}),s.createElement("path",{stroke:"#CBD0D3",d:"M199.5 163c0-5
|
|||
|
|
(0,l.__)("Site Kit detected AdSense code for a different account %1$s on your site. In order to configure AdSense for your current account %2$s, we recommend you use Site Kit to place the code instead.","google-site-kit"),(0,ie.c)(t),(0,ie.c)(i)),a=`${g} ${d}`):a=d,(0,v.jsx)(se.TZ,{checkedMessage:a,uncheckedMessage:g,saveOnChange:!0})}var ne=i(79257),oe=i(93431),re=i(68728),ae=i(19826);function SetupAccountSiteUI({heading:e,description:t,primaryButton:i,secondaryButton:n}){const o=(0,c.useSelect)(e=>e($.wl).isDoingSubmitChanges()||e(F.M).isNavigating());return(0,v.jsxs)(s.Fragment,{children:[(0,v.jsx)(b.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:e}),(0,v.jsx)(se.kg,{}),(0,v.jsx)(p.A,{children:t}),(0,v.jsx)(SetupUseSnippetSwitch,{}),(0,v.jsxs)("div",{className:"googlesitekit-setup-module__action",children:[(0,v.jsx)(g.SpinnerButton,{onClick:i.onClick,href:i.href,disabled:o,isSaving:o,children:i.label}),n&&(0,v.jsx)("div",{className:"googlesitekit-setup-module__sub-action",children:(0,v.jsx)(g.Button,{onClick:n.onClick,tertiary:!0,children:n.label})})]})]})}function NeedsAttention(){const e=(0,s.useContext)(ae.Ay),t=(0,c.useSelect)(e=>e($.wl).getServiceAccountManageSitesURL()),n=(0,s.useCallback)(s=>{s.preventDefault(),(0,Z.sx)(`${e}_adsense`,"review_site_state","needs_attention"),i.g.open(t,"_blank")},[t,e]),o=(0,l.__)("Your site isn’t ready to show ads yet","google-site-kit"),r=(0,l.__)("You need to fix some things with this site before we can connect Site Kit to your AdSense account","google-site-kit"),a={label:(0,l.__)("Review site in AdSense","google-site-kit"),href:t,onClick:n};return(0,v.jsx)(SetupAccountSiteUI,{heading:o,description:r,primaryButton:a})}function GettingReady(){const e=(0,s.useContext)(ae.Ay),t=(0,c.useSelect)(e=>e($.wl).getServiceAccountManageSitesURL()),n=(0,s.useCallback)(s=>{s.preventDefault(),(0,Z.sx)(`${e}_adsense`,"review_site_state","getting_ready"),i.g.open(t,"_blank")},[t,e]),o=(0,l.__)("Your site is getting ready","google-site-kit"),r=(0,l.__)("This usually takes a few days, but in some cases can take a few weeks. You’ll get an email from AdSense as soon as they have run some checks on your site.","google-site-kit"),a={label:(0,l.__)("Review site in AdSense","google-site-kit"),href:t,onClick:n};return(0,v.jsx)(SetupAccountSiteUI,{heading:o,description:r,primaryButton:a})}function RequiresReview(){const e=(0,s.useContext)(ae.Ay),t=(0,c.useSelect)(e=>e($.wl).getServiceAccountManageSitesURL()),n=(0,s.useCallback)(s=>{s.preventDefault(),(0,Z.sx)(`${e}_adsense`,"review_site_state","requires_review"),i.g.open(t,"_blank")},[t,e]),o=(0,l.__)("Your site requires review","google-site-kit"),r=(0,l.__)("To start serving ads, your site needs to be approved first. Go to AdSense to request the review.","google-site-kit"),a={label:(0,l.__)("Request review in AdSense","google-site-kit"),href:t,onClick:n};return(0,v.jsx)(SetupAccountSiteUI,{heading:o,description:r,primaryButton:a})}function Ready({site:e,finishSetup:t}){const[n,o]=(0,s.useState)(!1),r=(0,s.useContext)(ae.Ay),a=(0,c.useSelect)(e=>e($.wl).getExistingTag()),g=(0,c.useSelect)(e=>e($.wl).getServiceAccountSiteAdsPreviewURL()),d=(0,c.useSelect)(e=>e($.wl).isDoingSubmitChanges()),{completeSiteSetup:u,completeAccountSetup:p}=(0,c.useDispatch)($.wl),{setValue:h}=(0,c.useDispatch)(V.n),m=(0,s.useCallback)(e=>{e.preventDefault(),(0,Z.sx)(`${r}_adsense`,"enable_auto_ads"),i.g.open(g,"_blank")},[g,r]),f=(0,s.useCallback)(e=>{e.preventDefault(),(0,Z.sx)(`${r}_adsense`,"disable_auto_ads"),o(!0)},[r]),_=(0,s.useCallback)(async()=>{if(d)return;h($.O0,!0);const e=await u(),i=await p();h($.O0,!1),e&&i&&"function"==typeof t&&t()},[d,h,u,p,t]),k={};return e.autoAdsEnabled||n?(k.heading=a?(0,l.__)("Your AdSense account is ready to connect to Site Kit","google-site-kit"):(0,l.__)("Your site is ready to use AdSense","google-site-kit"),k.description=a?(0,l.__)("Connect your AdSense account to see stats on your overall earnings, page CTR, and top earning pages","google-site-kit"):(0,l.__)("Site Kit has placed AdSe
|
|||
|
|
(0,l.__)("Invalid site state %s","google-site-kit"),n),skipRetryMessage:!0})}}SetupAccountSiteUI.propTypes={heading:m().string.isRequired,description:m().string.isRequired,primaryButton:m().shape({label:m().string,href:m().string,onClick:m().func}).isRequired,secondaryButton:m().shape({label:m().string,onClick:m().func})},SetupAccountSite.propTypes={site:m().shape({autoAdsEnabled:m().bool,state:m().string}).isRequired,finishSetup:m().func};var le=i(55103);function SetupAccountNoClient(){const e=(0,W.A)(),t=(0,s.useCallback)(()=>{(0,Z.sx)(`${e}_adsense`,"apply_afc")},[e]);return(0,v.jsxs)(s.Fragment,{children:[(0,v.jsx)(b.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:(0,l.__)("Looks like you need to upgrade your AdSense account","google-site-kit")}),(0,v.jsx)(se.kg,{}),(0,v.jsx)(p.A,{children:(0,ee.A)((0,l.__)("To start using AdSense on your website, you need to upgrade your account to add “AdSense for content”. <a>Learn more</a>","google-site-kit"),{a:(0,v.jsx)(le.A,{path:"/adsense/answer/6023158","aria-label":(0,l.__)("Learn more about updating your AdSense account","google-site-kit"),external:!0})})}),(0,v.jsx)("div",{className:"googlesitekit-setup-module__action",children:(0,v.jsx)(g.Button,{href:"https://www.google.com/adsense",target:"_blank","aria-label":(0,l.__)("Learn more about updating your AdSense account","google-site-kit"),onClick:t,children:(0,l.__)("Apply now","google-site-kit")})})]})}function SetupAccountCreateSite(){const e=(0,W.A)(),t=(0,c.useSelect)(e=>e($.wl).getServiceAccountManageSiteURL()),n=(0,s.useCallback)(s=>{s.preventDefault(),(0,Z.sx)(`${e}_adsense`,"create_site"),i.g.open(t,"_blank")},[t,e]);return(0,v.jsxs)(s.Fragment,{children:[(0,v.jsx)(b.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:(0,l.__)("Add this site to your AdSense account","google-site-kit")}),(0,v.jsx)(se.kg,{}),(0,v.jsx)(p.A,{children:(0,l.__)("We’ve detected that you haven’t added this site to your AdSense account yet","google-site-kit")}),(0,v.jsx)("div",{className:"googlesitekit-setup-module__action",children:(0,v.jsx)(g.Button,{onClick:n,href:t,children:(0,l.__)("Add site to AdSense","google-site-kit")})})]})}function SetupAccountPendingTasks(){const e=(0,W.A)(),t=(0,s.useCallback)(()=>{(0,Z.sx)(`${e}_adsense`,"review_tasks")},[e]),i=(0,c.useSelect)(e=>e($.wl).getServiceAccountURL());return(0,v.jsxs)(s.Fragment,{children:[(0,v.jsx)(b.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:(0,l.__)("Your account isn’t ready to show ads yet","google-site-kit")}),(0,v.jsx)(se.kg,{}),(0,v.jsx)(p.A,{children:(0,l.__)("You need to fix some things before we can connect Site Kit to your AdSense account","google-site-kit")}),(0,v.jsx)(SetupUseSnippetSwitch,{}),(0,v.jsx)("div",{className:"googlesitekit-setup-module__action",children:(0,v.jsx)(g.Button,{onClick:t,href:i,children:(0,l.__)("Review AdSense account","google-site-kit")})})]})}function SetupAccount({account:e,finishSetup:t}){const{_id:i,state:n}=e,o=(0,c.useSelect)(e=>e($.wl).getClientID()),r=(0,c.useSelect)(e=>e($.wl).getCurrentSite(i)),a=(0,c.useSelect)(e=>e($.wl).getAFCClient(i)),{setClientID:l,setAccountStatus:d,setSiteStatus:u}=(0,c.useDispatch)($.wl);return(0,s.useEffect)(()=>{a?._id&&o!==a._id?l(a._id):null===a&&o&&l("")},[a,o,l]),(0,s.useEffect)(()=>{null===r&&u(re.SG)},[u,r]),(0,s.useEffect)(()=>{void 0!==r&&(o?n===$._L?d(re.gV):a?.state===$.LE?d(re.bF):a?.state===$.IY?d(re.Yb):d(re.pJ):d(re.ze))},[n,a,o,d,r]),void 0===r?(0,v.jsx)(g.ProgressBar,{}):o?null===r?(0,v.jsx)(SetupAccountCreateSite,{}):n===$._L||a?.state===$.LE||a?.state===$.IY?(0,v.jsx)(SetupAccountPendingTasks,{}):(0,v.jsx)(SetupAccountSite,{site:r,finishSetup:t}):(0,v.jsx)(SetupAccountNoClient,{})}SetupAccount.propTypes={account:m().shape({_id:m().string,state:m().string}),finishSetup:m().func};var ce=i(97345);function SetupCreateAccount(){const e=`${(0,W.A)()}_adsense`,t=(0,c.useSelect)(e=>e(ce.oR).getEmail()),n=(0,c.useSelect)(e=>e($.wl).getExistingTag()),o=(0,c.
|
|||
|
|
(0,l.__)("Site Kit detected AdSense code %1$s on your page. We recommend you remove that code or add %2$s as a user to the AdSense account %3$s.","google-site-kit"),n,t,(0,ie.c)(n)),!n&&(0,ee.A)((0,l.sprintf)(/* translators: %s: user email address */ /* translators: %s: user email address */
|
|||
|
|
(0,l.__)("Already use AdSense? Add %s as a user to an existing AdSense account. <a>Learn more</a>","google-site-kit"),t),{a:(0,v.jsx)(le.A,{path:"/adsense/answer/2659101","aria-label":(0,l.__)("Learn more about adding a user to an existing AdSense account","google-site-kit"),external:!0})})]})]})}function SetupSelectAccount(){return(0,v.jsxs)(s.Fragment,{children:[(0,v.jsx)(b.A,{as:"h3",type:"title",size:"large",className:"googlesitekit-setup-module__title",children:(0,l.__)("Select your AdSense account","google-site-kit")}),(0,v.jsx)(se.kg,{}),(0,v.jsx)(p.A,{children:(0,l.__)("Looks like you have multiple AdSense accounts associated with your Google account. Select the account to use with Site Kit below.","google-site-kit")}),(0,v.jsx)("div",{className:"googlesitekit-setup-module__inputs",children:(0,v.jsx)(se.QB,{})})]})}var ge=i(23955),de=i(5664);function SetupMain_SetupMain({finishSetup:e}){const t=`${(0,W.A)()}_adsense`,{resetAccounts:i,resetClients:n,resetSites:o,setAccountID:r,setAccountStatus:a,submitChanges:d}=(0,c.useDispatch)($.wl),[u,p]=(0,s.useState)(!1),[h,m]=(0,s.useState)(!1),f=(0,c.useSelect)(e=>!!e(V.n).getValue($.O0)),_=(0,c.useSelect)(e=>e(ce.oR).isAdBlockerActive()),k=(0,c.useSelect)(e=>e($.wl).getAccounts()),y=(0,c.useSelect)(e=>e($.wl).getAccountID()),x=(0,c.useSelect)(e=>e($.wl).hasSettingChanged("accountID")),A=(0,c.useSelect)(e=>e($.wl).hasSettingChanged("clientID")),S=(0,c.useSelect)(e=>e($.wl).canSubmitChanges()),j=(0,c.useSelect)(e=>e($.wl).getClientID()),N=(0,c.useSelect)(e=>e($.wl).getAccountStatus()),w=(0,c.useSelect)(e=>e($.wl).hasSettingChanged("accountStatus")),I=(0,c.useSelect)(e=>e($.wl).getSiteStatus()),C=(0,c.useSelect)(e=>e($.wl).hasSettingChanged("siteStatus")),E=(0,c.useSelect)(e=>e($.wl).hasErrors()),M=(0,c.useSelect)(e=>e($.wl).hasFinishedResolution("getAccounts")),T=(0,c.useSelect)(e=>e(ce.oR).getEmail()),D=(0,c.useSelect)(e=>e(Y.O4).getReferenceSiteURL()),O=(0,c.useSelect)(e=>e($.wl).getExistingTag()),R=k?.find(({_id:e})=>e===y);(0,ne.A)(()=>{(x&&void 0!==y||A&&void 0!==j||w&&void 0!==N||C&&void 0!==I)&&p(!0)},[y,x,j,A,N,w,I,C]),(0,s.useEffect)(()=>{if(!Array.isArray(k))return;let e;1!==k.length||y&&k[0]._id===y?0===k.length&&y&&(e=""):e=k[0]._id,void 0!==e&&(r(e),p(!0))},[k,y,r]),(0,s.useEffect)(()=>{0===k?.length?a(re.uP):k?.length>1&&!y&&a(re.Sw)},[a,y,k]),(0,s.useEffect)(()=>{u&&!h&&S&&!f&&(p(!1),(async()=>{m(!0),await d(),m(!1)})())},[u,h,S,d,f]);const L=(0,s.useCallback)(()=>{void 0!==N&&re.pJ!==N&&(i(),n(),o())},[N,i,n,o]);let z;return(0,de.$)(L,15e3),(0,s.useEffect)(()=>{void 0!==N&&(0,Z.sx)(t,"receive_account_state",N)},[t,N]),(0,s.useEffect)(()=>{void 0!==I&&(0,Z.sx)(t,"receive_site_state",I)},[t,I]),z=M&&void 0!==y&&void 0!==T&&void 0!==D&&void 0!==O?E?(0,v.jsx)(se.kg,{hasButton:!0}):k?.length?y?(0,v.jsx)(SetupAccount,{account:R,finishSetup:e}):(0,v.jsx)(SetupSelectAccount,{}):(0,v.jsx)(SetupCreateAccount,{}):(0,v.jsx)(g.ProgressBar,{}),(0,v.jsxs)("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense",children:[(0,v.jsxs)("div",{className:"googlesitekit-setup-module__step",children:[(0,v.jsx)("div",{className:"googlesitekit-setup-module__logo",children:(0,v.jsx)(oe.A,{width:"40",height:"40"})}),(0,v.jsx)(b.A,{as:"h3",className:"googlesitekit-setup-module__title",size:"small",type:"headline",children:(0,l._x)("AdSense","Service name","google-site-kit")})]}),(0,v.jsxs)("div",{className:"googlesitekit-setup-module__step",children:[(0,v.jsx)(ge.A,{moduleSlug:"adsense"}),!_&&z]})]})}SetupMain_SetupMain.propTypes={finishSetup:m().func}}},e=>{e.O(0,[660],()=>{return t=76353,e(e.s=t);var t});e.O()}]);
|