38 lines
150 KiB
JavaScript
38 lines
150 KiB
JavaScript
|
|
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[26],{1:function(e,t){e.exports=googlesitekit.i18n},100:function(e,t,n){"use strict";(function(e,r){n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return TourTooltips}));var i=n(6),a=n.n(i),o=n(87),c=n(27),s=n(0),l=n.n(s),u=n(1),d=n(4),g=n.n(d),f=n(28),m=n(7),p=n(33),v=n(116),b=n(19);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var _=g.a.useSelect,k=g.a.useDispatch,O=g.a.useRegistry,E={options:{arrowColor:"#3c7251",backgroundColor:"#3c7251",overlayColor:"rgba(0, 0, 0, 0.6)",textColor:"#fff",zIndex:2e4},spotlight:{border:"2px solid #3c7251",backgroundColor:"#fff"}},y={back:Object(u.__)("Back","google-site-kit"),close:Object(u.__)("Close","google-site-kit"),last:Object(u.__)("Got it","google-site-kit"),next:Object(u.__)("Next","google-site-kit")},S={disableAnimation:!0,styles:{arrow:{length:8,margin:56,spread:16},floater:{filter:"drop-shadow(rgba(60, 64, 67, 0.3) 0px 1px 2px) drop-shadow(rgba(60, 64, 67, 0.15) 0px 2px 6px)"}}},j="feature_tooltip_view",w="feature_tooltip_advance",N="feature_tooltip_return",T="feature_tooltip_dismiss",C="feature_tooltip_complete";function TourTooltips(t){var n=t.steps,i=t.tourID,s=t.gaEventCategory,l=t.callback,u="".concat(i,"-step"),d="".concat(i,"-run"),g=k(f.b).setValue,x=k(m.a).dismissTour,A=O(),R=Object(b.a)(),L=_((function(e){return e(f.b).getValue(u)})),I=_((function(e){return e(f.b).getValue(d)&&!1===e(m.a).isTourDismissed(i)}));Object(o.a)((function(){e.document.body.classList.add("googlesitekit-showing-feature-tour","googlesitekit-showing-feature-tour--".concat(i)),g(d,!0)}));var D=n.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({disableBeacon:!0,isFixed:!0,placement:"auto"},e)}));return r.createElement(c.e,{callback:function(t){!function(e){var t=e.index,n=e.action,r=e.lifecycle,i=e.size,a=e.status,o=e.type,l=t+1,u="function"==typeof s?s(R):s;o===c.b.TOOLTIP&&r===c.c.TOOLTIP?Object(p.b)(u,j,l):n===c.a.CLOSE&&r===c.c.COMPLETE?Object(p.b)(u,T,l):n===c.a.NEXT&&a===c.d.FINISHED&&o===c.b.TOUR_END&&i===l&&Object(p.b)(u,C,l),r===c.c.COMPLETE&&a!==c.d.FINISHED&&(n===c.a.PREV&&Object(p.b)(u,N,l),n===c.a.NEXT&&Object(p.b)(u,w,l))}(t);var n=t.action,r=t.index,a=t.status,o=t.step,d=t.type,f=n===c.a.CLOSE,m=!f&&[c.b.STEP_AFTER,c.b.TARGET_NOT_FOUND].includes(d),v=[c.d.FINISHED,c.d.SKIPPED].includes(a),b=f&&d===c.b.STEP_AFTER,h=v||b;if(c.b.STEP_BEFORE===d){var _,k,O=o.target;"string"==typeof o.target&&(O=e.document.querySelector(o.target)),null===(_=O)||void 0===_||null===(k=_.scrollIntoView)||void 0===k||k.call(_,{block:"center"})}m?function(e,t){g(u,e+(t===c.a.PREV?-1:1))}(r,n):h&&(e.document.body.classList.remove("googlesitekit-showing-feature-tour","googlesitekit-showing-feature-tour--".concat(i)),x(i)),l&&l(t,A)},continuous:!0,disableOverlayClose:!0,disableScrolling:!0,floaterProps:S,locale:y,run:I,showProgress:!0,stepIndex:L,steps:D,styles:E,tooltipComponent:v.a})}TourTooltips.propTypes={steps:l.a.arrayOf(l.a.object).isRequired,tourID:l.a.string.isRequired,gaEventCategory:l.a.oneOfType([l.a.string,l.a.func]).isRequired,callback:l.a.func}}).call(this,n(26),n(2))},1001:function(e,t,n){"use strict";n.r(t),function(e){var t=n(267),r=n(121),i=n(187),a=n(817),o=n(24);Object(t.a)((function(){var t=document.getElementById("js-googlesitekit-user-input");t&&Object(r.render)(e.createElement(i.a,{viewContext:o.q},e.createElement(a.a,null)),t)}))}.call(this,n(2))},102:function(e,t,n){"use strict";(function(e){n(50),n(52)}).call(this,n(26))},103:function(e,t,n){"use strict";(fun
|
|||
|
|
/* translators: %s: source link */
|
|||
|
|
Object(s.__)("Source: %s","google-site-kit"),"<a>".concat(n,"</a>")),{a:e.createElement(l.a,{key:"link",href:r,external:a})}))}SourceLink.propTypes={name:i.a.string,href:i.a.string,className:i.a.string,external:i.a.bool},SourceLink.defaultProps={name:"",href:"",className:"",external:!1},t.a=SourceLink}).call(this,n(2))},129:function(e,t,n){"use strict";var r=n(3);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M2.253 12.252l7.399 5.658A13.055 13.055 0 009 22c0 1.43.229 2.805.652 4.09l-7.4 5.658A22.02 22.02 0 010 22c0-3.506.81-6.814 2.253-9.748z",fill:"#FBBC05"}),r.createElement("path",{d:"M9.652 17.91l-7.4-5.658A21.935 21.935 0 0122 0c5.6 0 10.6 2.1 14.5 5.5l-6.4 6.4C27.9 10.1 25.1 9 22 9c-5.77 0-10.64 3.725-12.348 8.91z",fill:"#EA4335"}),r.createElement("path",{d:"M2.25 31.742l7.396-5.67A12.975 12.975 0 0022 35c6.1 0 10.7-3.1 11.8-8.5H22V18h20.5c.3 1.3.5 2.7.5 4 0 14-10 22-21 22A21.935 21.935 0 012.25 31.742z",fill:"#34A853"}),r.createElement("path",{d:"M36.34 38.52l-7.025-5.437c2.297-1.45 3.895-3.685 4.485-6.583H22V18h20.5c.3 1.3.5 2.7.5 4 0 7.17-2.623 12.767-6.66 16.52z",fill:"#4285F4"}));t.a=function SvgLogoG(e){return r.createElement("svg",i({viewBox:"0 0 43 44"},e),a)}},13:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r="core/site",i="primary",a="secondary"},130:function(e,t,n){"use strict";(function(e){var r=n(0),i=n.n(r),a=n(199),o=n(43),c=n(1),s=n(9),l=n(21),u=function ModalDialog(t){var n=t.dialogActive,r=t.handleDialog,i=t.title,u=t.provides,d=t.handleConfirm,g=t.subtitle,f=t.confirmButton,m=t.dependentModules,p=t.danger,v=t.inProgress,b=void 0!==v&&v,h=Object(a.a)(ModalDialog),_="googlesitekit-dialog-description-".concat(h),k=!(!u||!u.length);return e.createElement(s.Dialog,{open:n,"aria-describedby":k?_:void 0,tabIndex:"-1"},e.createElement(s.DialogTitle,null,i),g?e.createElement("p",{className:"mdc-dialog__lead"},g):[],e.createElement(s.DialogContent,null,k&&e.createElement("section",{id:_,className:"mdc-dialog__provides"},e.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},u.map((function(t){return e.createElement("li",{className:"mdc-list-item",key:t},e.createElement("span",{className:"mdc-list-item__text"},t))})))),m&&e.createElement("p",{className:"mdc-dialog__dependencies"},Object(o.a)(Object(c.sprintf)(
|
|||
|
|
/* translators: %s is replaced with the dependent modules. */
|
|||
|
|
Object(c.__)("<strong>Note:</strong> %s","google-site-kit"),m),{strong:e.createElement("strong",null)}))),e.createElement(s.DialogFooter,null,e.createElement(s.SpinnerButton,{onClick:d,danger:p,disabled:b,isSaving:b},f||Object(c.__)("Disconnect","google-site-kit")),e.createElement(l.a,{className:"googlesitekit-margin-left-auto mdc-dialog__cancel-button",onClick:r,disabled:b},Object(c.__)("Cancel","google-site-kit"))))};u.displayName="Dialog",u.propTypes={dialogActive:i.a.bool,handleDialog:i.a.func,handleConfirm:i.a.func.isRequired,title:i.a.string,description:i.a.string,confirmButton:i.a.string,danger:i.a.bool},u.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null,danger:!1},t.a=u}).call(this,n(2))},132:function(e,t,n){"use strict";var r=n(3),i=Object(r.createContext)(!1);t.a=i},138:function(e,t,n){"use strict";var r=n(3);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=r.createElement("path",{d:"M14 1.41L12.59 0 7 5.59 1.41 0 0 1.41 5.59 7 0 12.59 1.41 14 7 8.41 12.59 14 14 12.59 8.41 7 14 1.41z",fill:"currentColor"});t.a=function SvgClose(e){return r.createElement("svg",i({viewBox:"0 0 14 14",fill:"none"},e),a)}},143:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){return new Array(null!=e?e:0).fill().map((function(e,t){return t}))}},144:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(24),i=function(e){return r.f.includes(e)}},147:function(e,t,n){"use strict";(function(e){var r=n(5),i=n.n(r),a=n(16),o=n.n(a),c=n(0),s=n.n(c),l=n(3),u=n(21),d=n(8),g=n(19);function HelpMenuLink(t){var n=t.children,r=t.href,a=t.gaEventLabel,c=Object(g.a)(),s=Object(l.useCallback)(o()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a){e.next=3;break}return e.next=3,Object(d.A)("".concat(c,"_headerbar_helpmenu"),"click_outgoing_link",a);case 3:case"end":return e.stop()}}),e)}))),[a,c]);return e.createElement("li",{className:"googlesitekit-help-menu-link mdc-list-item",role:"none"},e.createElement(u.a,{className:"mdc-list-item__text",href:r,external:!0,hideExternalIndicator:!0,role:"menuitem",onClick:s},n))}HelpMenuLink.propTypes={children:s.a.node.isRequired,href:s.a.string.isRequired,gaEventLabel:s.a.string},t.a=HelpMenuLink}).call(this,n(2))},148:function(e,t,n){"use strict";var r=n(3);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=r.createElement("path",{d:"M3.332 24.75h21.335c2.182 0 3.542-2.366 2.451-4.25L16.451 2.07C15.36.184 12.64.184 11.549 2.07L.882 20.5c-1.091 1.884.269 4.25 2.45 4.25zM14 14.833a1.42 1.42 0 01-1.417-1.416v-2.834c0-.779.638-1.416 1.417-1.416.78 0 1.417.637 1.417 1.416v2.834A1.42 1.42 0 0114 14.833zm1.417 5.667h-2.834v-2.833h2.834V20.5z",fill:"currentColor",fillRule:"nonzero"});t.a=function SvgError(e){return r.createElement("svg",i({viewBox:"0 0 28 25"},e),a)}},150:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return GenericErrorHandlerActions}));var r=n(0),i=n.n(r),a=n(1),o=n(21),c=n(156);function GenericErrorHandlerActions(t){var n=t.message,r=t.componentStack;return e.createElement("div",{className:"googlesitekit-generic-error-handler-actions"},e.createElement(c.a,{message:n,componentStack:r}),e.createElement(o.a,{href:"https://wordpress.org/support/plugin/google-site-kit/",external:!0},Object(a.__)("Report this problem","google-site-kit")))}GenericErrorHandlerActions.propTypes={message:i.a.string,componentStack:i.a.string}}).call(this,n(2))},151:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ModuleIcon}));var r=n(23),i=n.n(r),a=n(25),o=n.n(a),c=n(0),s=n.n(c),l=n(4),u=n.n(l),d=n(20),g=u.a.useSelect;function ModuleIcon(t){var n=t.slug,r=t.size,a=o()(t,["slug","size"]),c=g((function(e){return e(d.a).getModuleI
|
|||
|
|
/* translators: Account info text. 1: User's (full) name 2: User's email address. */
|
|||
|
|
Object(g.__)("Google Account for %1$s (Email: %2$s)","google-site-kit"),o,n)),o&&!n&&(V=Object(g.sprintf)(
|
|||
|
|
/* translators: Account info text. 1: User's (full) name. */
|
|||
|
|
Object(g.__)("Google Account for %1$s","google-site-kit"),o)),!o&&n&&(V=Object(g.sprintf)(
|
|||
|
|
/* translators: Account info text. 1: User's email address. */
|
|||
|
|
Object(g.__)("Google Account (Email: %1$s)","google-site-kit"),n)),r.createElement(d.Fragment,null,r.createElement("div",{ref:z,className:"googlesitekit-user-selector googlesitekit-dropdown-menu googlesitekit-dropdown-menu__icon-menu mdc-menu-surface--anchor"},r.createElement(v.Button,{ref:B,className:"googlesitekit-header__dropdown mdc-button--dropdown googlesitekit-border-radius-round--tablet googlesitekit-border-radius-round--phone googlesitekit-border-radius-round googlesitekit-button-icon",text:!0,onClick:q,icon:!!i&&r.createElement("i",{className:"mdc-button__icon mdc-button__account","aria-hidden":"true"},r.createElement("img",{className:"mdc-button__icon--image",src:i,alt:Object(g.__)("User Avatar","google-site-kit")})),"aria-haspopup":"menu","aria-expanded":P,"aria-controls":"user-menu","aria-label":Object(g.__)("Account","google-site-kit"),tooltip:!0,tooltipEnterDelayInMS:500,customizedTooltip:r.createElement("span",{"aria-label":V},r.createElement("strong",null,Object(g.__)("Google Account","google-site-kit")),r.createElement("br",null),r.createElement("br",null),o,o&&r.createElement("br",null),n)}),r.createElement(v.Menu,{className:"googlesitekit-user-menu",menuOpen:P,onSelected:W,id:"user-menu"},r.createElement("li",null,r.createElement(O.a,null)),!!t&&r.createElement("li",{id:"manage-sites",className:"mdc-list-item",role:"menuitem"},r.createElement(E.a,{icon:r.createElement(S.a,{width:"22"}),label:Object(g.__)("Manage Sites","google-site-kit")})),r.createElement("li",{id:"disconnect",className:"mdc-list-item",role:"menuitem"},r.createElement(E.a,{icon:r.createElement(y.a,{width:"22"}),label:Object(g.__)("Disconnect","google-site-kit")})))),r.createElement(k.a,null,r.createElement(b.a,{dialogActive:R,handleConfirm:G,handleDialog:F,title:Object(g.__)("Disconnect","google-site-kit"),subtitle:Object(g.__)("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:Object(g.__)("Disconnect","google-site-kit"),danger:!0})))):null}}).call(this,n(26),n(2))},230:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Details}));var r=n(1),i=n(4),a=n.n(i),o=n(7),c=a.a.useSelect;function Details(){var t=c((function(e){return e(o.a).getPicture()})),n=c((function(e){return e(o.a).getFullName()})),i=c((function(e){return e(o.a).getEmail()}));return e.createElement("div",{className:"googlesitekit-user-menu__details","aria-label":Object(r.__)("Google account","google-site-kit")},!!t&&e.createElement("img",{className:"googlesitekit-user-menu__details-avatar",src:t,alt:""}),e.createElement("div",{className:"googlesitekit-user-menu__details-info"},e.createElement("p",{className:"googlesitekit-user-menu__details-info__name"},n),e.createElement("p",{className:"googlesitekit-user-menu__details-info__email","aria-label":Object(r.__)("Email","google-site-kit")},i)))}}).call(this,n(2))},231:function(e,t,n){"use strict";var r=n(3);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=r.createElement("path",{d:"M6.83 2H20a2 2 0 012 2v12c0 .34-.09.66-.23.94L20 15.17V6h-9.17l-4-4zm13.66 19.31L17.17 18H4a2 2 0 01-2-2V4c0-.34.08-.66.23-.94L.69 1.51 2.1.1l19.8 19.8-1.41 1.41zM15.17 16l-10-10H4v10h11.17z",fill:"#6C726E"});t.a=function SvgDisconnect(e){return r.createElement("svg",i({viewBox:"0 0 22 22",fill:"none"},e),a)}},232:function(e,t,n){"use strict";var r=n(3);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=r.createElement("path",{d:"M20 0H2C.9 0 0 .9 0 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 14H2V2h18v12zm-2-9H7v2h11V5zm0 4H7v2h11V9zM6 5H4v2h2V5zm0 4H4v2h2V9z",fill:"#6C726E"});t.a=function SvgManageSites(e){return r.createElement("svg",i({viewBox:"0 0 22 18
|
|||
|
|
/* translators: %s: List of product names */
|
|||
|
|
Object(s.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for: %s – make sure to approve all permissions at the authentication stage.","google-site-kit"),Object(g.s)(l));break;case"single":u=Object(s.sprintf)(
|
|||
|
|
/* translators: %s: Product name */
|
|||
|
|
Object(s.__)("Site Kit can’t access the relevant data from %1$s because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for %1$s – make sure to approve all permissions at the authentication stage.","google-site-kit"),l[0]);break;case"generic":u=Object(s.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup – make sure to approve all permissions at the authentication stage.","google-site-kit")}return r.createElement(d.b,{id:"authentication error",title:w,description:u,format:"small",type:"win-error",isDismissible:!1,ctaLink:S,onCTAClick:function(){_.current=!0},ctaLabel:N})}}).call(this,n(26),n(2))},236:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return UnsatisfiedScopesAlertGTE}));var i=n(1),a=n(4),o=n.n(a),c=n(41),s=n(13),l=n(7),u=n(31),d=n(29),g=o.a.useSelect;function UnsatisfiedScopesAlertGTE(){var t=g((function(e){return e(d.a).getValue(l.c,"permissionsError")})),n=g((function(n){var r;return n(l.a).getConnectURL({additionalScopes:[u.h],redirectURL:(null==t||null===(r=t.data)||void 0===r?void 0:r.redirectURL)||e.location.href})})),a=g((function(e){return e(s.c).getGoogleSupportURL({path:"/tagmanager/answer/11994839"})}));return void 0===n?null:r.createElement(c.b,{id:"authentication-error-gte",title:Object(i.__)("Site Kit needs additional permissions to detect updates to tags on your site","google-site-kit"),description:Object(i.__)("To continue using Analytics with Site Kit, you need to grant permission to check for any changes in your Google tag’s target Analytics property. The Google tag feature was recently updated to allow users to change a tag’s connected Analytics property without editing site code. Because of this change, Site Kit now must regularly check if the tag on your site matches the Analytics property destination.","google-site-kit"),format:"small",type:"win-error",isDismissible:!1,ctaLink:n,ctaLabel:Object(i.__)("Grant permission","google-site-kit"),learnMoreLabel:Object(i.__)("Learn more","google-site-kit"),learnMoreURL:a})}}).call(this,n(26),n(2))},237:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return InternalServerError}));var r=n(4),i=n.n(r),a=n(13),o=n(41),c=i.a.useSelect;function InternalServerError(){var t=c((function(e){return e(a.c).getInternalServerError()}));return t?e.createElement(o.b,t):null}}).call(this,n(2))},238:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return DashboardNavigation}));var r=n(4),i=n.n(r),a=n(7),o=n(38),c=n(239),s=n(94),l=i.a.useSelect;function DashboardNavigation(){var t=Object(o.a)(),n=l((function(e){return t?e(a.a).getViewableModules():null})),r=Object(s.a)("keyMetrics"),i=l((function(e){return r&&e(a.a).getKeyMetrics()}));return void 0===n||void 0===i?null:e.createElement(c.a,null)}}).call(this,n(2))},239:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return Navigation}));var i=n(30),a=n.n(i),o=n(17),c=n.n(o),s=n(12),l=n.n(s),u=n(15),d=n(87),g=n(135),f=n(3),m=n(1),p=n(4),v=n.n(p),b=n(240),h=n(241),_=n(242),k=n(243),O=n(244),E=n(24),y=n(7),S=n(42),j=n(28),w=n(70),N=n(66),T=n(35),C=n(114),x=n(8),A=n(19),R=n(38),L=n(94);function I(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,c=!1;return{s:function(){n=n.call(e)},n:f
|
|||
|
|
/* translators: %s: module owner Google Account email address */
|
|||
|
|
Object(o.__)("Shared by <strong>%s</strong>","google-site-kit"),s.login),{strong:e.createElement("strong",{title:s.login})})))}Service.propTypes={module:i.a.string.isRequired}}).call(this,n(2))},252:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Tracking}));var r=n(43),i=n(1),a=n(181),o=n(19);function Tracking(){var t=Object(o.a)();return e.createElement("li",{className:"googlesitekit-view-only-menu__list-item"},e.createElement("p",null,Object(r.a)(Object(i.__)("Thanks for using Site Kit!<br />Help us make it even better.","google-site-kit"),{br:e.createElement("br",null)})),e.createElement(a.a,{trackEventCategory:"".concat(t,"_headerbar_viewonly"),alignCheckboxLeft:!0}))}}).call(this,n(2))},253:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return SetupErrorNotification}));var r=n(1),i=n(4),a=n.n(i),o=n(41),c=n(13),s=a.a.useSelect;function SetupErrorNotification(){var t=s((function(e){return e(c.c).getSetupErrorMessage()})),n=s((function(e){return e(c.c).getSetupErrorRedoURL()}));return t?e.createElement(o.b,{id:"setup_error",type:"win-error",title:Object(r.__)("Oops! There was a problem during set up. Please try again.","google-site-kit"),description:t,isDismissible:!1,ctaLabel:Object(r.__)("Redo the plugin setup","google-site-kit"),ctaLink:n}):null}}).call(this,n(2))},254:function(e,t,n){"use strict";var r=n(3);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=r.createElement("path",{d:"M9 16h2v-2H9v2zm1-16C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14C7.79 4 6 5.79 6 8h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z",fill:"currentColor"});t.a=function SvgHelp(e){return r.createElement("svg",i({viewBox:"0 0 20 20",fill:"none"},e),a)}},277:function(e,t,n){"use strict";(function(e){var r=n(50),i=n.n(r),a=n(52),o=n.n(a),c=n(67),s=n.n(c),l=n(68),u=n.n(l),d=n(46),g=n.n(d),f=n(0),m=n.n(f),p=n(3),v=n(18),b=n(21);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var i=g()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u()(this,n)}}var _=function(t){s()(LayoutHeader,t);var n=h(LayoutHeader);function LayoutHeader(){return i()(this,LayoutHeader),n.apply(this,arguments)}return o()(LayoutHeader,[{key:"render",value:function(){var t=this.props,n=t.title,r=t.ctaLabel,i=t.ctaLink,a=i?{alignMiddle:!0,smSize:4,lgSize:6}:{alignMiddle:!0,smSize:4,mdSize:8,lgSize:12};return e.createElement("header",{className:"googlesitekit-layout__header"},e.createElement(v.e,null,e.createElement(v.k,null,n&&e.createElement(v.a,a,e.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},n)),i&&e.createElement(v.a,{alignMiddle:!0,mdAlignRight:!0,smSize:4,lgSize:6},e.createElement(b.a,{href:i,external:!0},r)))))}}]),LayoutHeader}(p.Component);_.propTypes={title:m.a.string,ctaLabel:m.a.string,ctaLink:m.a.string},_.defaultProps={title:"",ctaLabel:"",ctaLink:""},t.a=_}).call(this,n(2))},278:function(e,t,n){"use strict";(function(e){var r=n(50),i=n.n(r),a=n(52),o=n.n(a),c=n(67),s=n.n(c),l=n(68),u=n.n(l),d=n(46),g=n.n(d),f=n(0),m=n.n(f),p=n(3),v=n(18),b=n(127);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var i=g()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u()(this,n)}}var _=function(t){s()(LayoutFoot
|
|||
|
|
/* translators: %s: number of answers allowed. */
|
|||
|
|
Object(d._n)("Select only %d answer","Select up to %d answers",a,"google-site-kit"),a))),e.createElement("div",{className:"googlesitekit-user-input__select-options",ref:T},L))}UserInputSelectOptions.propTypes={slug:s.a.string.isRequired,options:s.a.shape({}).isRequired,max:s.a.number,next:s.a.func,showInstructions:s.a.bool,alignLeftOptions:s.a.bool},UserInputSelectOptions.defaultProps={max:1,showInstructions:!1,alignLeftOptions:!1}}).call(this,n(2))},407:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return UserInputPreviewGroup}));var r=n(5),i=n.n(r),a=n(16),o=n.n(a),c=n(6),s=n.n(c),l=n(0),u=n.n(l),d=n(12),g=n.n(d),f=n(3),m=n(1),p=n(9),v=n(4),b=n.n(v),h=n(28),_=n(7),k=n(32),O=n(8),E=n(329),y=n(19),S=n(122),j=n(111),w=n(21),N=n(289),T=n(406),C=n(454),x=n(524),A=b.a.useSelect,R=b.a.useDispatch;function UserInputPreviewGroup(t){var n=t.slug,r=t.title,a=t.values,c=t.options,l=void 0===c?{}:c,u=t.loading,d=void 0!==u&&u,v=t.settingsView,b=void 0!==v&&v,L=Object(y.a)(),I=A((function(e){return e(k.a).isNavigating()})),D=A((function(e){return e(h.b).getValue(S.a)})),P=A((function(e){return e(_.a).hasUserInputSettingChanged(n)})),M=A((function(e){var t=e(_.a).getUserInputSettings();return e(_.a).isSavingUserInputSettings(t)})),z=A((function(e){return e(_.a).getErrorForAction("saveUserInputSettings",[])})),B=R(h.b).setValues,U=R(_.a),H=U.saveUserInputSettings,V=U.resetUserInputSettings,q=D===n,F=M||I,W="".concat(L,"_kmw"),G=Object(f.useCallback)((function(){var e,t;q?(B(s()({},S.a,void 0)),null===(e=Y.current)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e)):(Object(O.A)(W,"question_edit",n),B(s()({},S.a,n)))}),[W,q,B,n]),K=Object(E.a)(a,S.b[n]),X=Object(E.b)(a),Y=Object(f.useRef)(),Q=Object(f.useCallback)(o()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!X){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,H();case 4:e.sent.error||(Object(O.A)(W,"question_update",n),G());case 6:case"end":return e.stop()}}),e)}))),[X,W,H,n,G]),$=Object(f.useCallback)(o()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=6;break}if(!(F||D&&!q)){e.next=3;break}return e.abrupt("return");case 3:if(!q){e.next=6;break}return e.next=6,V();case 6:G();case 7:case"end":return e.stop()}}),e)}))),[b,F,D,q,V,G]),J=Object(f.useCallback)(o()(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!F){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,V();case 4:G();case 5:case"end":return e.stop()}}),e)}))),[F,V,G]);return e.createElement("div",{className:g()("googlesitekit-user-input__preview-group",{"googlesitekit-user-input__preview-group--editing":q,"googlesitekit-user-input__preview-group--individual-cta":b})},e.createElement("div",{className:"googlesitekit-user-input__preview-group-title"},e.createElement(N.a,{loading:d,width:"340px",height:"21px"},e.createElement("p",null,r)),e.createElement(N.a,{loading:d,className:"googlesitekit-margin-left-auto",width:"60px",height:"26px"},e.createElement(w.a,{secondary:!0,onClick:$,ref:Y,disabled:F||!!D&&!q,linkButton:!0},Object(m.__)("Edit","google-site-kit"),e.createElement(x.a,{width:20,height:20})))),!q&&e.createElement("div",{className:"googlesitekit-user-input__preview-answers"},e.createElement(N.a,{loading:d,width:"340px",height:"36px"},K&&e.createElement("p",{className:"googlesitekit-error-text"},K),!K&&a.map((function(t){return e.createElement("div",{key:t,className:"googlesitekit-user-input__preview-answer"},l[t])})))),q&&e.createElement(f.Fragment,null,e.createElement(T.a,{slug:n,max:S.b[n],options:l,alignLeftOptions:!0}),K&&e.createElement("p",{className:"googlesitekit-error-text"},K),b&&e.createElement(f.Fragment,null,e.createElement(C.a,{slug:n}),z&&e.createElement(j.a,{error:z}),e.createElement("div",{className:"googlesitekit-user-input__preview-actions"},e.createElement(p.SpinnerButton,{disabled:!P||X,onClick:P?Q:void 0,isSaving:F},Object(m.__)("Confirm Changes","google-site-kit")),e.createElement(w.a,{disabled:F,onClic
|
|||
|
|
/* translators: %s: number of days */
|
|||
|
|
Object(g._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}}}},64:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return c}));var r=n(110);function i(e){try{return new URL(e).pathname}catch(e){}return null}function a(e,t){try{return new URL(t,e).href}catch(e){}return("string"==typeof e?e:"")+("string"==typeof t?t:"")}function o(e){return"string"!=typeof e?e:e.replace(/^https?:\/\/(www\.)?/i,"").replace(/\/$/,"")}function c(e,t){if(!Object(r.a)(e))return e;if(e.length<=t)return e;var n=new URL(e),i=e.replace(n.origin,"");if(i.length<t)return i;var a=i.length-Math.floor(t)+1;return"…"+i.substr(a)}},65:function(e,t,n){"use strict";(function(e){var r=n(0),i=n.n(r),a=n(12),o=n.n(a),c=n(35);function PreviewBlock(t){var n=t.className,r=t.width,i=t.height,a=t.shape,s=t.padding,l=t.smallWidth,u=t.smallHeight,d=t.tabletWidth,g=t.tabletHeight,f=t.desktopWidth,m=t.desktopHeight,p=Object(c.e)(),v=r,b=i;return c.b===p&&l&&u&&(v=l,b=u),c.c===p&&d&&g&&(v=d,b=g),(c.d===p||c.a===p)&&f&&m&&(v=f,b=m),e.createElement("div",{className:o()("googlesitekit-preview-block",n,{"googlesitekit-preview-block--padding":s}),style:{width:v,height:b}},e.createElement("div",{className:o()("googlesitekit-preview-block__wrapper",{"googlesitekit-preview-block__wrapper--circle":"circular"===a})}))}PreviewBlock.propTypes={className:i.a.string,width:i.a.string,height:i.a.string,shape:i.a.string,padding:i.a.bool,smallWidth:i.a.string,smallHeight:i.a.string,tabletWidth:i.a.string,tabletHeight:i.a.string,desktopWidth:i.a.string,desktopHeight:i.a.string},PreviewBlock.defaultProps={className:void 0,width:"100px",height:"100px",shape:"square",padding:!1,smallWidth:void 0,smallHeight:void 0,tabletWidth:void 0,tabletHeight:void 0,desktopWidth:void 0,desktopHeight:void 0},t.a=PreviewBlock}).call(this,n(2))},66:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return c}));var r=n(24),i=n(19),a=r.l,o=r.j;function c(){var e=Object(i.a)();return e===r.l||e===r.m?a:e===r.j||e===r.k?o:null}},7:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"y",(function(){return c})),n.d(t,"D",(function(){return s})),n.d(t,"F",(function(){return l})),n.d(t,"B",(function(){return u})),n.d(t,"C",(function(){return d})),n.d(t,"A",(function(){return g})),n.d(t,"z",(function(){return f})),n.d(t,"E",(function(){return m})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return v})),n.d(t,"g",(function(){return b})),n.d(t,"i",(function(){return h})),n.d(t,"k",(function(){return _})),n.d(t,"l",(function(){return k})),n.d(t,"m",(function(){return O})),n.d(t,"n",(function(){return E})),n.d(t,"p",(function(){return y})),n.d(t,"q",(function(){return S})),n.d(t,"r",(function(){return j})),n.d(t,"s",(function(){return w})),n.d(t,"u",(function(){return N})),n.d(t,"j",(function(){return T})),n.d(t,"w",(function(){return C})),n.d(t,"t",(function(){return x})),n.d(t,"x",(function(){return A})),n.d(t,"v",(function(){return R})),n.d(t,"h",(function(){return L})),n.d(t,"o",(function(){return I})),n.d(t,"H",(function(){return D})),n.d(t,"G",(function(){return P}));var r="core/user",i="connected_url_mismatch",a="__global",o="temporary_persist_permission_error",c="googlesitekit_authenticate",s="googlesitekit_setup",l="googlesitekit_view_dashboard",u="googlesitekit_manage_options",d="googlesitekit_read_shared_module_data",g="googlesitekit_manage_module_sharing_options",f="googlesitekit_delegate_module_sharing_management",m="googlesitekit_update_plugins",p="kmAnalyticsAdSenseTopEarningContent",v="kmAnalyticsEngagedTrafficSource",b="kmAnalyticsLeastEngagingPages",h="kmAnalyticsNewVis
|
|||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
|||
|
|
Object(m._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),a?w(a,v(v({},o),{},{unit:"second"})):"",i?w(i,v(v({},o),{},{unit:"minute"})):"",r?w(r,v(v({},o),{},{unit:"hour"})):"").trim()},formatDecimal:function(){var t=Object(m.sprintf)(// translators: %s: number of seconds with "s" as the abbreviated unit.
|
|||
|
|
Object(m.__)("%ds","google-site-kit"),a);if(0===e)return t;var n=Object(m.sprintf)(// translators: %s: number of minutes with "m" as the abbreviated unit.
|
|||
|
|
Object(m.__)("%dm","google-site-kit"),i),o=Object(m.sprintf)(// translators: %s: number of hours with "h" as the abbreviated unit.
|
|||
|
|
Object(m.__)("%dh","google-site-kit"),r);return Object(m.sprintf)(
|
|||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
|||
|
|
Object(m._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),a?t:"",i?n:"",r?o:"").trim()}}},O=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},E=function(e){var t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(m.sprintf)(// translators: %s: an abbreviated number in millions.
|
|||
|
|
Object(m.__)("%sM","google-site-kit"),w(O(e),e%10==0?{}:t)):1e4<=e?Object(m.sprintf)(// translators: %s: an abbreviated number in thousands.
|
|||
|
|
Object(m.__)("%sK","google-site-kit"),w(O(e))):1e3<=e?Object(m.sprintf)(// translators: %s: an abbreviated number in thousands.
|
|||
|
|
Object(m.__)("%sK","google-site-kit"),w(O(e),e%10==0?{}:t)):w(e,{signDisplay:"never",maximumFractionDigits:1})};function y(e){var t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:Object(d.isPlainObject)(e)&&(t=v({},e)),t}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object(d.isFinite)(e)?e:Number(e),Object(d.isFinite)(e)||(console.warn("Invalid number",e,o()(e)),e=0);var n=y(t),r=n.style,i=void 0===r?"metric":r;return"metric"===i?E(e):"duration"===i?b(e,n):"durationISO"===i?h(e):w(e,n)}var j=f()(console.warn),w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?T():n,a=u()(t,["locale"]);try{return new Intl.NumberFormat(r,a).format(e)}catch(t){j("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(r),", ").concat(JSON.stringify(a)," ).format( ").concat(o()(e)," )"),t.message)}for(var c={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},s=["signDisplay","compactDisplay"],l={},d=0,g=Object.entries(a);d<g.length;d++){var f=i()(g[d],2),m=f[0],p=f[1];c[m]&&p===c[m]||(s.includes(m)||(l[m]=p))}try{return new Intl.NumberFormat(r,l).format(e)}catch(t){return new Intl.NumberFormat(r).format(e)}},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?T():n,i=t.style,a=void 0===i?"long":i,o=t.type,c=void 0===o?"conjunction":o;if(Intl.ListFormat){var s=new Intl.ListFormat(r,{style:a,type:c});return s.format(e)}
|
|||
|
|
/* translators: used between list items, there is a space after the comma. */var l=Object(m.__)(", ","google-site-kit");return e.join(l)},T=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(d.get)(t,["_googlesitekitLegacyData","locale"]);if(n){var r=n.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,n(26))},74:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={EXTERNAL:"external",INTERNAL:"internal"}},75:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c}));var r=n(34),i=n.n(r),a=n(85),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:a.a.sanitize(e,t)}};function c(e){var t,n="object"===i()(e)?e.toString():e;return null==n||null===(t=n.replace)||void 0===t?void 0:t.call(n,/\/+$/,"")}},8:function(e,t,n){"use strict";n.d(t,"A",(function(){return i.b})),n.d(t,"B",(function(){return i.c})),n.d(t,"x",(function(){return a.a})),n.d(t,"C",(function(){return a.b})),n.d(t,"z",(function(){return u})),n.d(t,"h",(function(){return d.a})),n.d(t,"v",(function(){return d.d})),n.d(t,"w",(function(){return d.e})),n.d(t,"s",(function(){return d.c})),n.d(t,"m",(function(){return d.b})),n.d(t,"t",(function(){return p})),n.d(t,"f",(function(){return v})),n.d(t,"b",(function(){return b.b})),n.d(t,"a",(function(){return b.a})),n.d(t,"c",(function(){return b.e})),n.d(t,"k",(function(){return b.g})),n.d(t,"n",(function(){return b.h})),n.d(t,"i",(function(){return b.f})),n.d(t,"y",(function(){return b.k})),n.d(t,"j",(function(){return h.b})),n.d(t,"e",(function(){return h.a})),n.d(t,"p",(function(){return _.b})),n.d(t,"l",(function(){return _.a})),n.d(t,"u",(function(){return _.c})),n.d(t,"r",(function(){return k})),n.d(t,"q",(function(){return O})),n.d(t,"o",(function(){return E})),n.d(t,"d",(function(){return y})),n.d(t,"D",(function(){return S})),n.d(t,"g",(function(){return j}));var r=n(15),i=n(33),a=n(75),o=n(34),c=n.n(o),s=n(98),l=n.n(s),u=function(e){return l()(JSON.stringify(function e(t){var n={};return Object.keys(t).sort().forEach((function(r){var i=t[r];i&&"object"===c()(i)&&!Array.isArray(i)&&(i=e(i)),n[r]=i})),n}(e)))};n(102);var d=n(73);function g(e){return e.replace(new RegExp("\\[([^\\]]+)\\]\\((https?://[^/]+\\.\\w+/?.*?)\\)","gi"),'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}function f(e){return"<p>".concat(e.replace(/\n{2,}/g,"</p><p>"),"</p>")}function m(e){return e.replace(/\n/gi,"<br>")}function p(e){for(var t=e,n=0,r=[g,f,m];n<r.length;n++){t=(0,r[n])(t)}return t}var v=function(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)]},b=n(63),h=n(103),_=n(64);function k(e){var t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function O(e){if("number"==typeof e)return!0;var t=(e||"").toString();return!!t&&!isNaN(t)}var E=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}};function y(e,t){var n=function(e){return"0"===e||0===e};if(n(e)&&n(t))return 0;if(n(e)||Number.isNaN(e))return null;var r=(t-e)/e;return Number.isNaN(r)||!Number.isFinite(r)?null:r}var S=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},j=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(r.unescape)(t)}},81:function(e,t,n){"use strict";(function(e){var r=n(0),i=n.n(r),a=n(110),o=n(1),c=n(8);function ErrorText(t){var n=t.message,r=t.reconnectURL,i=t.noPrefix;if(!n)return null;var s=n;void 0!==i&&i||(s=Object(o.sprintf)(
|
|||
|
|
/* translators: %s: Error message */
|
|||
|
|
Object(o.__)("Error: %s","google-site-kit"),n)),r&&Object(a.a)(r)&&(s=s+" "+Object(o.sprintf)(
|
|||
|
|
/* translators: %s: Reconnect URL */
|
|||
|
|
Object(o.__)('To fix this, <a href="%s">redo the plugin setup</a>.',"google-site-kit"),r));return e.createElement("div",{className:"googlesitekit-error-text"},e.createElement("p",{dangerouslySetInnerHTML:Object(c.x)(s,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})}))}ErrorText.propTypes={message:i.a.string.isRequired,reconnectURL:i.a.string,noPrefix:i.a.bool},ErrorText.defaultProps={reconnectURL:"",noPrefix:!1},t.a=ErrorText}).call(this,n(2))},817:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return UserInputApp}));var r=n(3),i=n(1),a=n(4),o=n.n(a),c=n(9),s=n(7),l=n(18),u=n(194),d=n(195),g=n(316),f=n(818),m=n(163),p=o.a.useSelect;function UserInputApp(){var t=p((function(e){return e(s.a).getUserInputSettings(),e(s.a).hasFinishedResolution("getUserInputSettings")}));return e.createElement(r.Fragment,null,e.createElement(u.a,null,e.createElement(d.a,null)),e.createElement("div",{className:"googlesitekit-user-input"},e.createElement("div",{className:"googlesitekit-module-page"},!t&&e.createElement(l.e,null,e.createElement(l.k,null,e.createElement(l.a,{lgSize:12,mdSize:8,smSize:4},e.createElement(c.ProgressBar,null)))),t&&e.createElement(l.e,null,e.createElement(m.a,{rounded:!0},e.createElement(l.e,{className:"googlesitekit-user-input__header"},e.createElement(l.k,null,e.createElement(l.a,{lgSize:6,mdSize:8,smSize:4},e.createElement(g.a,{className:"googlesitekit-heading-3 googlesitekit-user-input__heading",title:Object(i.__)("Customize Site Kit to match your goals","google-site-kit"),fullWidth:!0})),e.createElement(l.a,{lgSize:6,mdSize:8,smSize:4},e.createElement("span",{className:"googlesitekit-user-input__subtitle"},Object(i.__)("Get metrics and suggestions that are specific to your site by telling Site Kit more about your site","google-site-kit"))))),e.createElement(l.e,{className:"googlesitekit-user-input__content"},e.createElement(l.k,null,e.createElement(l.a,{lgSize:12,mdSize:8,smSize:4},e.createElement(f.a,null)))))))))}}).call(this,n(2))},818:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return UserInputQuestionnaire}));var i=n(5),a=n.n(i),o=n(16),c=n.n(o),s=n(17),l=n.n(s),u=n(30),d=n.n(u),g=n(3),f=n(1),m=n(4),p=n.n(m),v=n(9),b=n(621),h=n(406),_=n(523),k=n(122),O=n(303),E=n(7),y=n(13),S=n(32),j=n(8),w=n(19),N=p.a.useSelect,T=p.a.useDispatch,C=[].concat(d()(k.d),["preview"]);function UserInputQuestionnaire(){var t=Object(w.a)(),n=Object(O.a)("question",C[0]),i=l()(n,2),o=i[0],s=i[1],u=C.indexOf(o);-1===u&&s(C[0]);var d=T(E.a).saveUserInputSettings,m=T(S.a).navigateTo,p=N((function(e){return e(y.c).getAdminURL("googlesitekit-dashboard")})),x=N((function(e){return e(E.a).getErrorForAction("saveUserInputSettings",[])})),A="".concat(t,"_kmw");Object(g.useEffect)((function(){var e;o===k.e&&(e="site_purpose_question_view"),o===k.f&&(e="content_frequency_question_view"),o===k.c&&(e="site_goals_question_view"),"preview"===o&&(e="summary_view"),e&&Object(j.A)(A,e)}),[o,A,t]);var R=Object(k.g)(),L=R.USER_INPUT_ANSWERS_PURPOSE,I=R.USER_INPUT_ANSWERS_GOALS,D=R.USER_INPUT_ANSWERS_POST_FREQUENCY,P=function(){e.scrollTo({top:0,left:0,behavior:"smooth"})},M=Object(g.useCallback)((function(){Object(j.A)(A,"question_advance",C[u]),s(C[u+1]),P()}),[u,A,s]),z=Object(g.useCallback)((function(){Object(j.A)(A,"question_return",C[u]),s(C[u-1]),P()}),[u,A,s]),B=Object(g.useCallback)(c()(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(j.A)(A,"summary_submit"),e.next=3,d();case 3:e.sent.error||(t=new URL(p),m(t.toString()));case 5:case"end":return e.stop()}}),e)}))),[A,d,p,m]),U=r.createElement(v.ProgressBar,{height:4,indeterminate:!1,progress:(u+1)/(k.d.length+1),className:"googlesitekit-user-input__question--progress"});return r.createElement("div",null,U,u===C.indexOf(k.e)&&r.createElement(b.a,{slug:k.e,questionNumber:1,title:Object(f.__)("What is the main purpose of this site?","google-site-kit"),description:Object(f.__)("Based on your answer, Site Kit will tailor the metrics you see on your dashboard to help you track progress towards your speci
|
|||
|
|
/* translators: %s: the number of the question */
|
|||
|
|
Object(o.__)("%s out of 3","google-site-kit"),c)),e.createElement("h1",null,r),i&&e.createElement("p",{className:"googlesitekit-user-input__question-instructions--description"},i),e.createElement(g.a,{className:"googlesitekit-non-desktop-display-none"})),e.createElement(d.a,{className:"googlesitekit-user-input__question-info",lgSize:5,mdSize:8,smSize:4,smOrder:3},e.createElement(g.a,{className:"googlesitekit-desktop-display-none "}),"site"===p&&s&&e.createElement("p",null,v?Object(o.__)("This answer can be edited by all Site Kit admins.","google-site-kit"):Object(o.__)("Your answer to this question will apply to all Site Kit users. Any other admins with access to Site Kit can see and edit this response.","google-site-kit")),e.createElement(f.a,{slug:n})))}UserInputQuestionInfo.propTypes={slug:i.a.string.isRequired,title:i.a.string.isRequired,description:i.a.string,questionNumber:i.a.number}}).call(this,n(2))},84:function(e,t,n){"use strict";var r=n(123);n.d(t,"a",(function(){return r.a}));var i=n(124);n.d(t,"c",(function(){return i.a}));var a=n(125);n.d(t,"b",(function(){return a.a}))},85:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(136),i=n.n(r)()(e)}).call(this,n(26))},86:function(e,t,n){"use strict";(function(e){var r=n(0),i=n.n(r),a=n(12),o=n.n(a);function ChangeArrow(t){var n=t.direction,r=t.invertColor,i=t.width,a=t.height;return e.createElement("svg",{className:o()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(n),{"googlesitekit-change-arrow--inverted-color":r}),width:i,height:a,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("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:i.a.string,invertColor:i.a.bool,width:i.a.number,height:i.a.number},ChangeArrow.defaultProps={direction:"up",invertColor:!1,width:9,height:9},t.a=ChangeArrow}).call(this,n(2))},9:function(e,t){e.exports=googlesitekit.components},90:function(e,t,n){"use strict";(function(e){var r=n(23),i=n.n(r),a=n(25),o=n.n(a),c=n(0),s=n.n(c),l=n(12),u=n.n(l);function VisuallyHidden(t){var n=t.className,r=t.children,a=o()(t,["className","children"]);return r?e.createElement("span",i()({},a,{className:u()("screen-reader-text",n)}),r):null}VisuallyHidden.propTypes={className:s.a.string,children:s.a.node},VisuallyHidden.defaultProps={className:""},t.a=VisuallyHidden}).call(this,n(2))},93:function(e,t,n){"use strict";var r=n(17),i=n.n(r),a=n(222),o=n(0),c=n.n(o),s=n(3),l=n(121);function Portal(e){var t=e.children,n=e.slug,r=Object(s.useState)(document.createElement("div")),o=i()(r,1)[0];return Object(a.a)((function(){n&&o.classList.add("googlesitekit-portal-".concat(n));var e=document.querySelector(".googlesitekit-plugin")||document.body;return e.appendChild(o),function(){return e.removeChild(o)}})),Object(l.createPortal)(t,o)}Portal.propTypes={slug:c.a.string,children:c.a.node},Portal.defaultProps={slug:"",children:null},t.a=Portal},94:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(109),a=n(49),o=function(e){var t=Object(r.useContext)(i.a);return Object(a.b)(e,t)}},96:function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return _}));var r=n(25),i=n.n(r),a=n(6),o=n.n(a),c=n(5),s=n.n(c),l=n(10),u=n.n(l),d=n(4),g=n.n(d),f=n(39),m=n(8),p=g.a.createRegistryControl,v=function(e){var t;u()(e,"storeName is required to create a snapshot store.");var n={},r={deleteSnapshot:s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"DELETE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})),restoreSnapshot:s.a.mark((function e(){var t,n,r,i,a,o,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},n=t.clearAfterRestore,r=void 0===n||n,e.next=4,{payload:{},type:"RESTORE_SNAPSHOT"};ca
|