Version Description
Download this release
Release Info
Developer | flixos90 |
Plugin | Site Kit by Google |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- dist/assets/js/ads.js +1 -1
- dist/assets/js/allmodules.js +5 -5
- dist/assets/js/chunk-googlesitekit-adminbar.js +1 -1
- dist/assets/js/chunk-googlesitekit-setup-wizard-proxy.js +2 -2
- dist/assets/js/chunk-googlesitekit-setup-wizard.js +2 -2
- dist/assets/js/chunk-googlesitekit-setup-wrapper.js +1 -1
- dist/assets/js/commons.js +1 -1
- dist/assets/js/googlesitekit-admin.js +1 -1
- dist/assets/js/googlesitekit-adminbar-loader.js +1 -1
- dist/assets/js/googlesitekit-dashboard-details.js +1 -1
- dist/assets/js/googlesitekit-dashboard-splash.js +1 -1
- dist/assets/js/googlesitekit-dashboard.js +1 -1
- dist/assets/js/googlesitekit-module.js +1 -1
- dist/assets/js/googlesitekit-settings.js +1 -1
- dist/assets/js/googlesitekit-tests.js +1 -1
- dist/assets/js/googlesitekit-wp-dashboard.js +1 -1
- dist/assets/js/vendor.js +0 -1
dist/assets/js/ads.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var _={};function __webpack_require__(r){if(_[r])return _[r].exports;var t=_[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}__webpack_require__.m=e,__webpack_require__.c=_,__webpack_require__.d=function(e,_,r){__webpack_require__.o(e,_)||Object.defineProperty(e,_,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,_){if(1&_&&(e=__webpack_require__(e)),8&_)return e;if(4&_&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&_&&"string"!=typeof e)for(var t in e)__webpack_require__.d(r,t,function(_){return e[_]}.bind(null,t));return r},__webpack_require__.n=function(e){var _=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(_,"a",_),_},__webpack_require__.o=function(e,_){return Object.prototype.hasOwnProperty.call(e,_)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=
|
1 |
+
!function(e){var _={};function __webpack_require__(r){if(_[r])return _[r].exports;var t=_[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}__webpack_require__.m=e,__webpack_require__.c=_,__webpack_require__.d=function(e,_,r){__webpack_require__.o(e,_)||Object.defineProperty(e,_,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,_){if(1&_&&(e=__webpack_require__(e)),8&_)return e;if(4&_&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&_&&"string"!=typeof e)for(var t in e)__webpack_require__.d(r,t,function(_){return e[_]}.bind(null,t));return r},__webpack_require__.n=function(e){var _=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(_,"a",_),_},__webpack_require__.o=function(e,_){return Object.prototype.hasOwnProperty.call(e,_)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=186)}({186:function(e,_){window.googlesitekit=window.googlesitekit||{},googlesitekit.canAdsRun=!0}});
|
dist/assets/js/allmodules.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
!function(e){function t(t){for(var n,c,s=t[0],r=t[1],d=t[2],u=0,g=[];u<s.length;u++)c=s[u],i[c]&&g.push(i[c][0]),i[c]=0;for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);for(l&&l(t);g.length;)g.shift()();return o.push.apply(o,d||[]),a()}function a(){for(var e,t=0;t<o.length;t++){for(var a=o[t],n=!0,c=1;c<a.length;c++){var s=a[c];0!==i[s]&&(n=!1)}n&&(o.splice(t--,1),e=__webpack_require__(__webpack_require__.s=a[0]))}return e}var n={},i={3:0},o=[];function __webpack_require__(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,__webpack_require__),a.l=!0,a.exports}__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,a){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(__webpack_require__.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(a,n,function(t){return e[t]}.bind(null,n));return a},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var r=0;r<c.length;r++)t(c[r]);var l=s;o.push([186,0,1]),a()}([function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.element},,,,,,,,,function(e,t){e.exports=wp.hooks},function(e,t){e.exports=lodash},,,,,,,function(e,t){e.exports=React},function(e,t,a){"use strict";var n=a(68),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(11),b=a(55),f=a(45),k=a(89),y=a(10),v=a(0);t.a=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{inGrid:!1,fullWidth:!1,createGrid:!1},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){if(e&&e.error)return e.error.message?e.error.message:e.error.errors&&e.error.errors[0]&&e.error.errors[0].message?e.error.errors[0].message:Object(v.__)("Unidentified error","google-site-kit");if(e&&e.errors&&e.errors[0]&&e.errors[0].message)return e.errors[0].message;if(e&&e.error_data){var t=Object.values(e.error_data);if(t[0]&&"RateLimitExceeded"===t[0].reason)return Object(v.__)("Too many requests have been sent within a given time span. Please reload this page again in a few seconds","google-site-kit")}if(e&&e.errors){var a=Object.values(e.errors);if(a[0]&&a[0][0])return a[0][0]}return!1};return function(l){function u(e){var a;c()(this,u),(a=d()(this,g()(u).call(this,e))).state={data:!1,zeroData:!1,error:!1},Object(y.addAction)("googlesitekit.moduleDataReset","googlesitekit.moduleDataResetHandler",(function(){a.setState({data:!1})}));var n=function(e,t){var n=a.props,i=n.handleDataError,c=n.handleDataSuccess,r=t.datapoint,l=t.identifier,d=t.toState,u=s(e);u?(a.setState({error:u,module:l}),i&&i(u)):o(e,r,t)?(i&&i(u),a.setState({zeroData:!0})):c&&c(),a.setState({requestDataToState:d,data:e,datapoint:r,module:l})};return Object(_.each)(t,(function(e){Array.isArray(e.context)?Object(_.each)(e.context,(function(t){Object(y.addFilter)("googlesitekit.module".concat(t,"DataRequest"),"googlesitekit.data".concat(t),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})):Object(y.addFilter)("googlesitekit.module".concat(e.context,"DataRequest"),"googlesitekit.data".concat(e.context),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})),a}return m()(u,l),r()(u,[{key:"render",value:function(){var t=this.state,o=t.data,c=t.datapoint,s=t.module,r=t.zeroData,l=t.error,d=t.requestDataToState;if(!o)return a;var u=s?googlesitekit.modules[s].name:Object(v.__)("Site Kit","google-site-kit");return s&&googlesitekit.modules[s].active&&!googlesitekit.modules[s].setupComplete?Object(k.a)(s,n.inGrid,n.fullWidth,n.createGrid):l?"string"!=typeof l?l:Object(f.a)(u,l,n.inGrid,n.fullWidth,n.createGrid):r?Object(b.a)(u,n.inGrid,n.fullWidth,n.createGrid):React.createElement(e,i()({data:o,datapoint:c,requestDataToState:d},this.props))}}]),u}(h.Component)}},,,,function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(8),h=a.n(m),_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,n=e.shape,i=e.padding;return React.createElement("div",{className:"\n\t\t\t\t\tgooglesitekit-preview-block\n\t\t\t\t\t".concat(i?"googlesitekit-preview-block--padding":"","\n\t\t\t\t"),style:{width:t,height:a}},React.createElement("div",{className:"\n\t\t\t\t\tgooglesitekit-preview-block__wrapper\n\t\t\t\t\t".concat("circular"===n?"googlesitekit-preview-block__wrapper--circle":"","\n\t\t\t\t")}))}}]),t}(p.Component);_.propTypes={width:h.a.string,height:h.a.string,shape:h.a.string,padding:h.a.bool},_.defaultProps={width:"100px",height:"100px",shape:"square",padding:!1},t.a=_},,,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return v})),a.d(t,"a",(function(){return O}));var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(8),b=a.n(_),f=a(60),k=a(14),y=a(11),v=function(e,t,a){var n=[],i=a.links,o=a.source,c=a.showURLs;return a.cap&&(e=e.slice(0,a.cap)),Object(y.each)(e,(function(e,t){var a=[],o=i&&i[t];Object(y.each)(e,(function(t,n){"string"==typeof t&&(t=t.replace(/\(none\)/gi,"direct")),a.push(React.createElement("td",{key:"cell-"+n,className:"googlesitekit-table__body-item"},e[0]===t&&o?React.createElement("div",{className:"googlesitekit-table__body-item-content"},React.createElement(k.a,{className:"googlesitekit-table__body-item-link",href:o,external:!0,inherit:!0},t),c&&""!==Object(y.trim)(o,"/")&&React.createElement(k.a,{className:"googlesitekit-table__body-item-url",href:o,inherit:!0,external:!0},Object(y.trim)(o,"/"))):React.createElement("div",{className:"googlesitekit-table__body-item-content"},t)))})),n.push(React.createElement("tr",{key:"tr-"+t,className:"googlesitekit-table__body-row"},a))})),React.createElement("div",{className:"googlesitekit-table".concat(a&&a.disableListMode?"":" googlesitekit-table--with-list")},React.createElement("table",{className:"\n\t\t\t\t\tgooglesitekit-table__wrapper\n\t\t\t\t\tgooglesitekit-table__wrapper--".concat(e&&e[0]?e[0].length:1,"-col\n\t\t\t\t")},React.createElement("thead",{className:"googlesitekit-table__head"},React.createElement("tr",{key:"gksc_data_row_header-wrap",style:a&&a.hideHeader?{display:"none"}:{},className:"googlesitekit-table__head-row"},t.map((function(e,t){return React.createElement("th",{key:"gksc_data_row_header-".concat(t),className:"\n\t\t\t\t\t\t\t\t\tgooglesitekit-table__head-item\n\t\t\t\t\t\t\t\t\t".concat(e.primary?"googlesitekit-table__head-item--primary":"","\n\t\t\t\t\t\t\t\t"),"data-tooltip":e.tooltip},e.title)})))),React.createElement("tbody",{className:"googlesitekit-table__body"},n)),o&&React.createElement(f.a,{className:"googlesitekit-table__source",name:o.name,href:o.link}))},O=function(e){function t(){var e;return i()(this,t),(e=r()(this,d()(t).call(this))).state={isScrolling:!1},e.scrollRef=Object(h.createRef)(),e.updateFadeOnScroll=e.updateFadeOnScroll.bind(g()(e)),e}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this;e.updateFadeOnScroll(),this.resize=Object(y.debounce)((function(){e.updateFadeOnScroll()}),100),window.addEventListener("resize",this.resize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"updateFadeOnScroll",value:function(){var e=this.scrollRef.current,t=e.scrollLeft,a=e.scrollWidth-e.offsetWidth,n=t<a-16&&0<a-16;this.setState({isScrolling:n})}},{key:"render",value:function(){var e=this.props.children,t=this.state.isScrolling;return React.createElement("div",{onScroll:Object(y.debounce)(this.updateFadeOnScroll,100),className:"\n\t\t\t\t\tgooglesitekit-table-overflow\n\t\t\t\t\t".concat(t?"googlesitekit-table-overflow--gradient":"","\n\t\t\t\t")},React.createElement("div",{ref:this.scrollRef,className:"googlesitekit-table-overflow__container"},e))}}]),t}(h.Component);O.propTypes={children:b.a.element}},,,,,,,function(e,t){e.exports=wp.apiFetch},function(e,t){e.exports=wp.url},,function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(23),h=a(8),_=a.n(h),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){for(var e=this.props,t=e.rows,a=e.rowHeight,n=e.padding,i=[],o=0;t>o;o++)i.push(React.createElement("div",{className:"googlesitekit-preview-table__row",key:"table-row-"+o},React.createElement(m.a,{width:"100%",height:a+"px"})));return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-preview-table\n\t\t\t\t".concat(n?"googlesitekit-preview-table--padding":"","\n\t\t\t")},i)}}]),t}(p.Component);b.propTypes={rows:_.a.number,rowHeight:_.a.number,padding:_.a.bool},b.defaultProps={rows:11,rowHeight:35,padding:!1},t.a=b},,,function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(8),h=a.n(m),_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.title,a=e.description;return React.createElement("header",{className:"googlesitekit-dashboard-module-header"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-dashboard-module-header__title "},t),a&&React.createElement("p",{className:"googlesitekit-dashboard-module-header__description"},a))))}}]),t}(p.Component);_.propTypes={title:h.a.string,description:h.a.string},_.defaultProps={title:"",description:""},t.a=_},,,function(e,t,a){"use strict";a.r(t),a.d(t,"reduceAdSenseData",(function(){return d})),a.d(t,"getAdSenseAccountStatus",(function(){return u})),a.d(t,"isAdsenseConnectedAnalytics",(function(){return g})),a.d(t,"isDataZeroAdSense",(function(){return p}));var n=a(12),i=a.n(n),o=a(9),c=a(2),s=a(11),r=a(0),l=a(15);function d(e){var t=[[{type:"date",label:"Day"},{type:"number",label:"RPM"},{type:"number",label:"Earnings"},{type:"number",label:"Impressions"}]];return Object(s.each)(e,(function(e){var a=new Date(e[0]);t.push([a,e[2],e[1],e[3]])})),{dataMap:t}}var u=function(){var e,t,a,n,l,d,u,g,p,m,h,_,b,f,k,y,v,O,R,E,S,j,w,D,C,x,N,A,P,L=arguments;return i.a.async((function(M){for(;;)switch(M.prev=M.next){case 0:return e=L.length>0&&void 0!==L[0]&&L[0],t=L.length>1&&void 0!==L[1]?L[1]:function(){},n=!1,M.prev=3,t(Object(r.__)("Locating accounts…","google-site-kit")),M.next=7,i.a.awrap(o.c.get(o.b,"adsense","accounts").then((function(e){return e})).catch((function(e){return e})));case 7:if(l=M.sent,!(1<(d=!l.data||l.data.status&&200!==l.data.status?l:l.data).length)){M.next=42;break}t(Object(r.__)("Searching for domain…","google-site-kit")),u=!0,g=!1,p=void 0,M.prev=14,m=d[Symbol.iterator]();case 16:if(u=(h=m.next()).done){M.next=28;break}return _=h.value,b=_.id,M.next=21,i.a.awrap(o.c.get(o.b,"adsense","urlchannels",{clientID:b}).then((function(e){return e})).catch((function(e){return e})));case 21:f=M.sent,k=new URL(googlesitekit.admin.siteURL),(y=f&&f.length?Object(s.filter)(f,{urlPattern:k.hostname}):[])&&0!==y.length?(O=y[0].id,Object(c.v)("adsense_setup","adsense_account_detected")):(a="account-pending-review",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status account-pending-review"));case 25:u=!0,M.next=16;break;case 28:M.next=34;break;case 30:M.prev=30,M.t0=M.catch(14),g=!0,p=M.t0;case 34:M.prev=34,M.prev=35,u||null==m.return||m.return();case 37:if(M.prev=37,!g){M.next=40;break}throw p;case 40:return M.finish(37);case 41:return M.finish(34);case 42:if(v=d&&d.message&&d.message.error,O=!!(d&&d.length&&d[0])&&d[0].id,d&&O&&!v){M.next=50;break}R=(v||{}).errors,"noAdSenseAccount"!==(E=R[0].reason)&&d&&O||(a="disapprovedAccount"===E?"disapproved-account":e?"no-account-tag-found":"no-account"),M.next=118;break;case 50:return googlesitekit.modules.adsense.accountURL=Object(r.sprintf)("https://www.google.com/adsense/new/%s/home",O),t(Object(r.__)("Account found, checking account status…","google-site-kit")),M.next=54,i.a.awrap(o.c.get(o.b,"adsense","alerts",{accountID:O}).then((function(e){return e})).catch((function(e){return e})));case 54:if(S=M.sent,j=!S.data||S.data.status&&200!==S.data.status?S:S.data,w=j&&j.message&&j.message.error,!Object(s.find)(S,{type:"GRAYLISTED_PUBLISHER"})){M.next=62;break}a="ads-display-pending",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status ads-display-pending"),M.next=118;break;case 62:return M.next=64,i.a.awrap(o.c.get(o.b,"adsense","clients").then((function(e){return e})).catch((function(e){return e})));case 64:if(D=M.sent,C=!D.data||D.data.status&&200!==D.data.status?D:D.data,x=C&&C.message&&C.message.error,!(N=!(!C||!C.length)&&Object(s.find)(C,{productCode:"AFC"}))){M.next=72;break}return n=N.id,M.next=72,i.a.awrap(o.c.set(o.b,"adsense","client-id",{clientID:n}).then((function(e){return e})).catch((function(e){return e})));case 72:if(!w){M.next=77;break}"accountPendingReview"===j.message.error.errors[0].reason&&(a="ads-display-pending",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status ads-display-pending")),M.next=118;break;case 77:if(t(Object(r.__)("Looking for AdSense client…","google-site-kit")),!x){M.next=83;break}a="account-required-action",Object(c.v)("adsense_setup","adsense_required_action","accountRequiredAction status"),M.next=118;break;case 83:if(!N){M.next=117;break}return n=N.id,t(Object(r.__)("Looking for site domain…","google-site-kit")),M.next=88,i.a.awrap(o.c.get(o.b,"adsense","urlchannels",{clientID:n}).then((function(e){return e})).catch((function(e){return e})));case 88:if(A=M.sent,P=A&&A.length&&Object(s.filter)(A,(function(e){return 0<googlesitekit.admin.siteURL.indexOf(e.urlPattern)})),0!==A.length){M.next=95;break}a="ads-display-pending",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status ads-display-pending"),M.next=115;break;case 95:if(P&&0!==P.length){M.next=100;break}a="account-pending-review",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status account-pending-review"),M.next=115;break;case 100:if(!e||n!==e){M.next=105;break}a="account-connected",Object(c.v)("adsense_setup","adsense_account_connected","existing_matching_tag"),M.next=115;break;case 105:if(!e||n===e){M.next=110;break}a="account-connected-nonmatching",Object(c.v)("adsense_setup","adsense_account_connected","existing_non_matching_tag"),M.next=115;break;case 110:return a="account-connected",t(Object(r.__)("Connecting…","google-site-kit")),Object(c.v)("adsense_setup","adsense_account_connected"),M.next=115,i.a.awrap(o.c.set(o.b,"adsense","setup-complete",{clientID:n}).then((function(e){return e})).catch((function(e){return e})));case 115:M.next=118;break;case 117:a="disapproved-account-afc";case 118:return M.next=120,i.a.awrap(o.c.set(o.b,"adsense","account-status",{accountStatus:a}).then((function(e){return e})).catch((function(e){return e})));case 120:return M.abrupt("return",{accountStatus:a,clientID:n});case 123:return M.prev=123,M.t1=M.catch(3),M.abrupt("return",{isLoading:!1,error:M.t1.code,message:M.t1.message});case 126:case"end":return M.stop()}}),null,null,[[3,123],[14,30,34,42],[35,,37,41]])},g=function(){var e,t,a;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=googlesitekit.modules.adsense.active,t=googlesitekit.modules.analytics.active,a=!0,!e||!t){n.next=6;break}return n.next=6,i.a.awrap(o.c.get(o.b,"analytics","report",l.analyticsAdsenseReportDataDefaults).then((function(e){e&&(a=!0)})).catch((function(e){400===e.code&&"INVALID_ARGUMENT"===e.message&&(a=!1)})));case 6:return n.abrupt("return",new Promise((function(e){e(a)})));case 7:case"end":return n.stop()}}))},p=function(e,t,a){if(!a.data||!a.data.dateRange||"last-28-days"!==a.data.dateRange)return!1;var n=[];return e.totals&&(n=e.totals),0===(n=n.filter((function(e){return 0<e}))).length}},function(e,t,a){"use strict";var n=a(1),i=a(32),o=a(71),c=a(2),s=a(3),r=a.n(s),l=a(4),d=a.n(l),u=a(5),g=a.n(u),p=a(6),m=a.n(p),h=a(7),_=a.n(h),b=a(26),f=a(0),k=function(e){function t(){return r()(this,t),g()(this,m()(t).apply(this,arguments))}return _()(t,e),d()(t,[{key:"render",value:function(){return React.createElement(b.a,{id:"notification-id",title:Object(f.__)("Security Token Error","google-site-kit"),description:Object(f.__)("We’re unable to retrieve your data because your security token is expired or revoked. Please ","google-site-kit"),learnMoreURL:googlesitekit.admin.connectURL,learnMoreLabel:Object(f.__)("reauthenticate your account","google-site-kit"),format:"small",type:"win-error"})}}]),t}(n.Component);t.a=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=React.createElement(i.a,{title:Object(f.sprintf)(Object(f.__)("Data error in %s","google-site-kit"),e),description:t,error:!0});return"Invalid Credentials"===t&&Object(c.w)(k),Object(o.a)(r,a,n,s)}},,,,,function(e,t){e.exports=ReactDOM},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(56),h=a(8),_=a.n(h),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.change,n=e.id,i=e.loadSmall,o=e.loadCompressed,c=e.loadHeight,s=e.loadText;if(!t)return"loading...";var r={title:"",backgroundColor:"transparent",curveType:"line",width:"100%",height:"50",enableInteractivity:!1,chartArea:{height:"100%",width:"100%"},legend:{position:"none"},axisFontSize:0,hAxis:{baselineColor:"none",ticks:[]},vAxis:{baselineColor:"none",ticks:[]},axes:[],colors:[0<=+a?"green":"red"]};return React.createElement("div",{className:"googlesitekit-analytics-sparkline-chart-wrap"},React.createElement(m.a,{data:t,options:r,id:n,loadSmall:i,loadCompressed:o,loadHeight:c,loadText:s}))}}]),t}(p.Component);b.propTypes={loadSmall:_.a.bool,loadCompressed:_.a.bool,loadHeight:_.a.number,loadText:_.a.bool},b.defaultProps={loadSmall:!0,loadCompressed:!0,loadHeight:46,loadText:!1},t.a=b},,,,function(e,t,a){"use strict";a(1);var n=a(32),i=a(71),o=a(0);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=React.createElement(n.a
|
2 |
/* translators: %s: Module name */,{title:Object(o.sprintf)(Object(o.__)("%s Gathering Data","google-site-kit"),e)
|
3 |
-
/* translators: %s: Module name */,description:Object(o.sprintf)(Object(o.__)("%s data is not yet available, please check back later.","google-site-kit"),e)});return Object(i.a)(s,t,a,c)}},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(31),b=a(8),f=a.n(b),k=a(0),y=a(10),v=a(11),O=function(e){function t(e){var a;if(i()(this,t),(a=r()(this,d()(t).call(this,e))).state={loading:!0,chart:null},a.waitForChart=a.waitForChart.bind(g()(a)),a.getData=a.getData.bind(g()(a)),a.prepareChart=a.prepareChart.bind(g()(a)),a.drawChart=a.drawChart.bind(g()(a)),a.updateChart=a.updateChart.bind(g()(a)),a.chartRef=Object(h.createRef)(),window.google||window.googleChartLoaded)window.google&&window.google.charts?window.google.charts.setOnLoadCallback((function(){a.getData(),a.prepareChart(),a.drawChart()})):Object(y.addAction)("googlesitekit.ChartLoaderLoaded","googlesitekit.HandleChartLoaderLoaded",(function(){window.google.charts.setOnLoadCallback((function(){a.getData(),a.prepareChart(),a.drawChart()}))}));else{window.googleChartLoaded=!0;var n=document.createElement("script");n.type="text/javascript",n.onload=function(){n.onload=null,window.google.charts.load("visualization","1",{packages:["corechart"]}),window.google.charts.setOnLoadCallback((function(){a.getData(),a.prepareChart(),a.drawChart(),a.setState({loading:!1})})),Object(y.doAction)("googlesitekit.ChartLoaderLoaded")},document.getElementsByTagName("head")[0].appendChild(n),n.src="https://www.gstatic.com/charts/loader.js"}return a}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this;this.resize=Object(v.debounce)((function(){e.drawChart()}),100),window.addEventListener("resize",this.resize)}},{key:"componentDidUpdate",value:function(e){var t=this.props.selectedStats;0!==t.length&&JSON.stringify(t)!==JSON.stringify(e.selectedStats)&&this.updateChart()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"waitForChart",value:function(e){setTimeout((function(){e()}),500)}},{key:"getData",value:function(){return window.google&&window.google.visualization&&window.google.visualization.arrayToDataTable(this.props.data)}},{key:"prepareChart",value:function(){if(window.google){var e=this.chartRef.current,t="pie"===this.props.chartType?new window.google.visualization.PieChart(e):new window.google.visualization.LineChart(e);this.setState({chart:t})}else this.waitForChart(this.prepareChart)}},{key:"drawChart",value:function(){var e=this.state.chart,t=this.props,a=t.selectedStats,n=t.options,i=this.getData();null!==i&&null!==e?(e.draw(i,n),0!==a.length&&this.updateChart()):this.waitForChart(this.drawChart)}},{key:"updateChart",value:function(){var e=this.state.chart,t=this.props,a=t.selectedStats,n=t.options,i=t.singleStat,o=this.getData();if(null!==o&&null!==e){var c=new window.google.visualization.DataView(o);if(!i){var s=[0];s=s.concat(a.map((function(e){return e+1}))),c.setColumns(s)}e.draw(c,n)}else this.waitForChart(this.drawChart)}},{key:"render",value:function(){var e=this.state.loading,t=this.props,a=t.className,n=t.loadSmall,i=t.loadCompressed,o=t.loadHeight,c=t.loadText;return React.createElement("div",{className:"googlesitekit-graph-wrapper"},React.createElement("div",{ref:this.chartRef,className:"googlesitekit-line-chart"},React.createElement("div",{className:"googlesitekit-chart-loading"},e&&React.createElement("div",{className:"googlesitekit-chart-loading__wrapper"},c&&React.createElement("p",null,Object(k.__)("Loading chart...","google-site-kit")),React.createElement(_.a,{className:a,small:n,compress:i,height:o})))))}}]),t}(h.Component);O.propTypes={selectedStats:f.a.array,options:f.a.object.isRequired,id:f.a.string,singleStat:f.a.bool,className:f.a.string,loadSmall:f.a.bool,loadCompressed:f.a.bool,loadHeight:f.a.number,loadText:f.a.bool},O.defaultProps={selectedStats:[],id:"",singleStat:!0,className:"",loadSmall:!1,loadCompressed:!1,loadHeight:null,loadText:!0},t.a=O},,,function(e,t){e.exports=wp.compose},,,,,function(e,t,a){"use strict";a.r(t),a.d(t,"getScoreCategoryLabel",(function(){return o})),a.d(t,"PageSpeedReportScoreCategoryWrapper",(function(){return c})),a.d(t,"PageSpeedReportScoreGauge",(function(){return s})),a.d(t,"PageSpeedReportScale",(function(){return r}));a(1);var n=a(0);function i(e){return.9<=e?"fast":.5<=e?"average":"slow"}var o=function(e){var t=i(e);return"fast"===t?Object(n.__)("Fast","google-site-kit"):"average"===t?Object(n.__)("Average","google-site-kit"):Object(n.__)("Slow","google-site-kit")},c=function(e){var t=e.score,a=e.children,n="googlesitekit-pagespeed-report__score-category-wrapper googlesitekit-pagespeed-report__score-category-wrapper--".concat(i(t)),o="googlesitekit-pagespeed-report__score-icon googlesitekit-pagespeed-report__score-icon--".concat(i(t));return React.createElement("span",{className:n},a," ",React.createElement("span",{className:o}))},s=function(e){var t=e.score,a=parseInt(100*t,10),o="\n\t\tgooglesitekit-percentage-circle\n\t\tgooglesitekit-percentage-circle--".concat(i(t),"\n\t\tgooglesitekit-percentage-circle--percent-").concat(a,"\n\t");return React.createElement("div",{className:"googlesitekit-pagespeed-report__score-gauge"},React.createElement("div",{className:o},React.createElement("div",{className:"googlesitekit-percentage-circle__text"},a),React.createElement("div",{className:"googlesitekit-percentage-circle__slice"},React.createElement("div",{className:"googlesitekit-percentage-circle__bar"}),React.createElement("div",{className:"googlesitekit-percentage-circle__fill"}))),React.createElement("span",{className:"googlesitekit-pagespeed-report__score-gauge-label screen-reader-only"},Object(n.__)("Performance","google-site-kit")))},r=function(){return React.createElement("div",{className:"googlesitekit-pagespeed-report__scale"},React.createElement("span",null,Object(n.__)("Scale:","google-site-kit")),React.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--fast"},Object(n.__)("90-100 (fast)","google-site-kit")),React.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--average"},Object(n.__)("50-89 (average)","google-site-kit")),React.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--slow"},Object(n.__)("0-49 (slow)","google-site-kit")))}},,function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(56),b=a(2),f=a(19),k=a(9),y=a(0),v=a(8),O=a.n(v),R=a(14),E=a(23),S=a(15);function j(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var w=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.source;if(!t||t.error||!t.length)return null;var n=Object(S.extractAnalyticsDataForTrafficChart)(t);return React.createElement("div",{className:"googlesitekit-chart googlesitekit-chart--pie"},React.createElement(_.a,{data:n,options:{chartArea:{width:"100%",height:"100%"},backgroundColor:"transparent",height:250,legend:{alignment:"center",textStyle:{color:"#5b5b61",fontSize:12}},slices:{0:{color:"#178EC5"},1:{color:"#54B23B"},2:{color:"#EB5729"},3:{color:"#ECED33"},4:{color:"#34CBE3"},5:{color:"#82E88E"}},title:null,width:"100%"},chartType:"pie",id:"overview-piechart",loadHeight:205}),a&&React.createElement("div",{className:"googlesitekit-chart__source"},[Object(y.__)("Source:","google-site-kit")," ",React.createElement(R.a,{key:"link",href:Object(b.n)("googlesitekit-module-analytics"),inherit:!0},Object(y._x)("Analytics","Service name","google-site-kit"))]))}}]),t}(h.Component);w.defaultProps={source:!1},w.propTypes={source:O.a.bool},t.default=Object(f.a)(w,[{type:k.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?j(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},S.trafficSourcesReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(b.p)("day"),context:["Dashboard","Single"]}],React.createElement(E.a,{width:"282px",height:"282px",shape:"circular"}),{},S.isDataZeroForReporting,S.getAnalyticsErrorMessageFromData)},,,,,function(e,t,a){"use strict";var n=a(1),i=a(17);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return React.createElement(n.Fragment,null,t&&a&&o&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(i.a,{fill:!0},React.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},e))))),t&&!a&&o&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(i.a,{fill:!0},React.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},e))))),t&&a&&!o&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e),t&&!a&&!o&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e),!t&&!a&&o&&React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},e))),!t&&!a&&!o&&e)}},function(e,t,a){"use strict";var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(9),b=a(26),f=a(8),k=a.n(f),y=a(0),v=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={isLoading:!0,alerts:[],error:!1,message:""},a}return m()(t,e),r()(t,[{key:"componentDidMount",value:function(){this.getAlert()}},{key:"getAlert",value:function(){var e,t;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.props.module,a.next=4,i.a.awrap(_.c.getNotifications(e,3600));case 4:t=a.sent,this.setState({isLoading:!1,error:!1,alerts:t}),a.next=11;break;case 8:a.prev=8,a.t0=a.catch(0),this.setState({isLoading:!1,error:a.t0.code});case 11:case"end":return a.stop()}}),null,this,[[0,8]])}},{key:"render",value:function(){var e=this.state,t=e.alerts,a=e.error,n=e.isLoading;if(a||n||!t||!t.length)return null;var i=t.map((function(e){return React.createElement(b.a,{id:e.id,key:e.id,title:e.title,description:e.message||e.description,dismiss:Object(y.__)("Dismiss","google-site-kit"),isDismissable:e.isDismissible,format:"small",ctaLink:e.ctaURL,ctaLabel:e.ctaLabel,ctaTarget:e.ctaTarget,type:e.severity})}));return React.createElement(h.Fragment,null,i)}}]),t}(h.Component);v.propTypes={module:k.a.string.isRequired},t.a=v},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(8),h=a.n(m),_=a(14),b=a(87),f=a(31),k=a(0),y=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.ctaLink,a=e.ctaLinkText,n=e.header,i=e.incomplete,o=e.loadingMessage,c=e.subHeader,s=e.required,r=new URL(googlesitekit.admin.siteURL),l="https://www.google.com/adsense/new/sites?url=".concat(r.hostname,"&source=site-kit"),d=[{id:1,
|
4 |
/* translators: %s: Site URL */
|
5 |
-
text:Object(k.sprintf)(Object(k.__)("Added your site %s in ","google-site-kit"),r.hostname),linkText:Object(k.__)("Sites","google-site-kit"),linkURL:l},{id:2,text:Object(k.__)("Enabled ads in","google-site-kit"),linkText:Object(k.__)("Ads","google-site-kit"),linkURL:"https://www.google.com/adsense/new/myads/auto-ads"}];return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense"},s&&React.createElement(b.a,null),o&&React.createElement(p.Fragment,null,o,React.createElement(f.a,null)),n&&React.createElement("h3",{className:" googlesitekit-heading-4 googlesitekit-setup-module__title "},n),c&&React.createElement("p",null,c),i&&React.createElement("div",{className:"googlesitekit-setup-module__list-wrapper"},React.createElement("ol",{className:"googlesitekit-setup-module__list"},d.map((function(e){return React.createElement("li",{className:"googlesitekit-setup-module__list-item",key:e.id},e.text," ",React.createElement(_.a,{href:e.linkURL,external:!0,inherit:!0},e.linkText))})))),t&&a&&React.createElement("div",{className:"googlesitekit-setup-module__cta"},React.createElement(_.a,{className:"googlesitekit-setup-module__cta-link",href:t,external:!0},a)))}}]),t}(p.Component);y.propTypes={status:h.a.string,module:h.a.string},t.default=y},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(79),b=a(9),f=a(8),k=a.n(f),y=a(2),v=a(0),O=a(10),R=function(e){function t(e){var a;i()(this,t),a=r()(this,d()(t).call(this,e));var n=googlesitekit.modules.adsense.settings.useSnippet,o=void 0===n||n;return a.state={useSnippet:!!o,disabled:!1},a.handleUseSnippetSwitch=a.handleUseSnippetSwitch.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0,Object(O.addFilter)("googlekit.SettingsConfirmed","googlekit.AdSenseSettingsConfirmed",(function(t,a){return"adsense"!==a.replace("-module","")?t:e.save()})),this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(O.removeFilter)("googlekit.SettingsConfirmed","googlekit.AdSenseSettingsConfirmed")}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"save",value:function(){var e=this.state.useSnippet;this._isMounted&&this.setState({useSnippet:e});var t={useSnippet:e||!1};return googlesitekit.modules.adsense.settings&&(googlesitekit.modules.adsense.settings.useSnippet=e),b.c.set(b.b,"adsense","use-snippet",t).then((function(e){return e})).catch((function(e){return e}))}},{key:"handleUseSnippetSwitch",value:function(){var e=this.props.saveOnChange,t=this.state.useSnippet;t=!t,this._isMounted&&this.setState({useSnippet:t}),Object(y.v)("adsense_setup",t?"adsense_tag_enabled":"adsense_tag_disabled"),e&&b.c.set(b.b,"adsense","use-snippet",{useSnippet:t}).then((function(e){return e})).catch((function(e){return e}))}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){Object(y.y)("adsense",{useSnippet:"useSnippet"},this.state)}}},{key:"render",value:function(){var e=this.state.useSnippet,t=this.props,a=t.isEditing,n=t.switchLabel,i=t.switchOnMessage,o=t.switchOffMessage;return React.createElement(h.Fragment,null,a?React.createElement(h.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__switch"},React.createElement(_.a,{id:"enableAutoAds",label:n,onClick:this.handleUseSnippetSwitch,checked:e,hideLabel:!1})," ",React.createElement("span",{className:"googlesitekit-recommended"},Object(v.__)("RECOMMENDED","google-site-kit"))),e&&i&&React.createElement("div",{className:"googlesitekit-settings-notice googlesitekit-settings-notice--suggestion"},React.createElement("div",{className:"googlesitekit-settings-notice__text"},i)),!e&&o&&React.createElement("div",{className:"googlesitekit-settings-notice"},React.createElement("div",{className:"googlesitekit-settings-notice__text"},o))):React.createElement(h.Fragment,null,Object(v.__)("The AdSense code has","google-site-kit")," ",e?Object(v.__)("been placed on your site.","google-site-kit"):Object(v.__)("not been placed on your site.","google-site-kit")))}}]),t}(h.Component);R.propTypes={isEditing:k.a.bool,accountTagMatch:k.a.bool,existingTag:k.a.oneOfType([k.a.bool,k.a.string]),switchLabel:k.a.string,switchOnMessage:k.a.string,switchOffMessage:k.a.string},R.defaultProps={isEditing:!1,accountTagMatch:!1,existingTag:!1,switchLabel:Object(v.__)("Let Site Kit place code on your site","google-site-kit"),switchOnMessage:"",switchOffMessage:""},t.default=R},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(20),h=a(29),_=a(0),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=googlesitekit.modules.adsense.accountURL;return React.createElement("section",{className:"googlesitekit-module-outro"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-module-outro__logo"},React.createElement(m.a,{id:"adsense",height:"36",width:"42"}),React.createElement(m.a,{id:"plus",height:"13",width:"13"}),React.createElement(m.a,{id:"analytics",height:"36",width:"34"})),React.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-module-outro__title "},Object(_.__)("Connect Analytics with AdSense to create a powerful team that shows robust metrics for your site.","google-site-kit")),React.createElement("div",{className:"googlesitekit-module-outro__button"},React.createElement(h.a,{href:e,target:"_blank"},Object(_.__)("Connect Accounts","google-site-kit")))))))}}]),t}(p.Component);t.default=b},function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(2),k=a(28),y=a(38),v=a(94),O=a(11),R=a(0),E=a(15);function S(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var j=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=Object(f.i)().dateRangeFrom,a=[{title:Object(R.__)("Medium","google-site-kit"),tooltip:Object(R.__)("Medium refers to where your traffic originated from","google-site-kit")},{title:Object(R.__)("Users","google-site-kit"),tooltip:Object(R.__)("Number of users that originated from that traffic","google-site-kit")},{title:Object(R.__)("New Users","google-site-kit"),tooltip:Object(R.sprintf)(Object(R.__)("Number of new users to visit your page over %s","google-site-kit"),t)},{title:Object(R.__)("Sessions","google-site-kit"),tooltip:Object(R.sprintf)(Object(R.__)("Number of sessions users had on your website over %s","google-site-kit"),t)},{title:Object(R.__)("Percentage","google-site-kit"),tooltip:Object(R.__)("Percentage of sessions","google-site-kit")}],n=e[0].data.totals[0].values[0],i=Object(O.map)(e[0].data.rows,(function(e,t){var a=e.metrics[0].values[0]/n*100;return!(1>a)&&[e.dimensions[0],Object(f.r)(e.metrics[0].values[0]),Object(f.r)(e.metrics[0].values[1]),Object(f.r)(e.metrics[0].values[2]),React.createElement(h.Fragment,{key:"minichart-analytics-top-as-"+t},React.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(a.toFixed(2),"%")," ",React.createElement(v.a,{percent:a.toFixed(1),index:t})))]})),o=Object(k.b)(i,a,{hideHeader:!1,chartsEnabled:!1});return React.createElement("div",{className:"googlesitekit-details-widget"},React.createElement(k.a,null,o))}}]),t}(h.Component);t.default=Object(_.a)(j,[{type:b.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?S(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):S(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},E.trafficSourcesReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(f.p)("day"),context:["Single","Dashboard"]}],React.createElement(y.a,{rows:4,rowHeight:50}))},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(2),b=a(28),f=a(38),k=a(11),y=a(0),v=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=[{title:Object(y.__)("Keyword","google-site-kit"),tooltip:Object(y.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0},{title:Object(y.__)("Clicks","google-site-kit"),tooltip:Object(y.__)("Number of times users clicked on your content in search results","google-site-kit")},{title:Object(y.__)("Impressions","google-site-kit"),tooltip:Object(y.__)("Counted each time your content appears in search results","google-site-kit")}],a=googlesitekit.admin.siteURL,n=[],i=Object(k.map)(e,(function(e,t){var i=e.keys[0];return n[t]=Object(y.sprintf)("https://search.google.com/search-console/performance/search-analytics?resource_id=%s&query=!%s&num_of_days=28",a,i),[i,Object(_.r)(e.clicks),Object(_.r)(e.impressions)]})),o={hideHeader:!1,chartsEnabled:!1,links:n},c=Object(b.b)(i,t,o);return React.createElement(b.a,null,c)}}]),t}(p.Component);t.default=Object(m.a)(v,[{type:h.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:googlesitekit.permaLink,dimensions:"query",limit:10},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"]}],React.createElement(f.a,{padding:!0}),{createGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.DashboardSearchFunnel")(h)},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(22),h=a(8),_=a.n(h),b=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).switchRef=Object(p.createRef)(),a}return g()(t,e),c()(t,[{key:"componentDidMount",value:function(){new m.i(this.switchRef.current)}},{key:"render",value:function(){var e=this.props,t=e.id,a=e.onClick,n=e.label,i=e.checked,o=e.hideLabel;return React.createElement(p.Fragment,null,React.createElement("div",{"aria-checked":i?"true":"false",className:"mdc-switch ".concat(i?"mdc-switch--checked":""),onClick:a,onKeyPress:function(e){"function"==typeof a&&"Enter"===e.code&&a(e)},role:"switch",ref:this.switchRef,tabIndex:0},React.createElement("div",{className:"mdc-switch__track"}," "),React.createElement("div",{className:"mdc-switch__thumb-underlay"},React.createElement("div",{className:"mdc-switch__thumb"},React.createElement("input",{type:"checkbox",id:t,className:"mdc-switch__native-control",role:"switch",checked:i,onChange:function(){}})))),React.createElement("label",{className:o?"screen-reader-only":"",htmlFor:t},n))}}]),t}(p.Component);b.propTypes={id:_.a.string.isRequired,onClick:_.a.func,label:_.a.string.isRequired,checked:_.a.bool,hideLabel:_.a.bool},b.defaultProps={checked:!1,hideLabel:!0},t.a=b},,,,,,,,,,function(e,t,a){"use strict";a(1);var n=a(32),i=a(71),o=a(2),c=a(0);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=googlesitekit.modules[e].name,l=React.createElement(n.a
|
6 |
/* translators: %s: Module name */,{title:Object(c.sprintf)(Object(c.__)("%s activation","google-site-kit"),r)
|
7 |
/* translators: %s: Module name */,description:Object(c.sprintf)(Object(c.__)("%s module needs to be configured","google-site-kit"),r),ctaLabel:Object(c.__)("Complete activation","google-site-kit"),onClick:function(){window.location=Object(o.m)(e,!0)}});return Object(i.a)(l,t,a,s)}},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(23),h=a(8),_=a.n(h),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){for(var e=this.props,t=e.width,a=e.height,n=e.shape,i=e.count,o=[],c=0;c++<i;)o.push(React.createElement(m.a,{width:t,height:a,shape:n,key:c}));return o}}]),t}(p.Component);b.propTypes={width:_.a.string,height:_.a.string,shape:_.a.string,count:_.a.number},b.defaultProps={width:"100px",height:"100px",shape:"square",count:1},t.a=b},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(13),m=a.n(p),h=a(7),_=a.n(h),b=a(1),f=a(29),k=a(14),y=a(9),v=a(22),O=a(20),R=a(8),E=a.n(R),S=a(2),j=a(0),w=a(10),D=function(e){function t(e){var a;c()(this,t),a=d()(this,g()(t).call(this,e));var n=googlesitekit.modules.optimize.settings,i=n.optimizeID,o=n.ampClientIDOptIn,s=n.ampExperimentJSON,r=(googlesitekit.modules.analytics||{}).settings,l=googlesitekit.modules.tagmanager||{},u=l.active,p=l.settings,h=!!r&&r.useSnippet,_=!(!u||!p)&&p.useSnippet;return a.state={optimizeID:i||"",analyticsUseSnippet:h,gtmUseSnippet:_,errorCode:!1,errorMsg:"",ampClientIDOptIn:o||!1,ampExperimentJSON:s||"",ampExperimentJSONValidated:!0,OptimizeIDValidated:!0},a.handleOptimizeIDEntry=a.handleOptimizeIDEntry.bind(m()(a)),a.handleSubmit=a.handleSubmit.bind(m()(a)),a.renderInstructionInfo=a.renderInstructionInfo.bind(m()(a)),a.handleAMPOptimizeEntry=a.handleAMPOptimizeEntry.bind(m()(a)),a}return _()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0,Object(w.addFilter)("googlekit.SettingsConfirmed","googlekit.OptimizeSettingsConfirmed",(function(t,a){return"optimize"!==a.replace("-module","")?t:e.props.isEditing?e.handleSubmit():void 0})),this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(w.removeFilter)("googlekit.SettingsConfirmed","googlekit.OptimizeSettingsConfirmed")}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){Object(S.y)("optimize",{optimizeID:"optimizeID",ampExperimentJSON:"ampExperimentJSON"},this.state)}}},{key:"handleSubmit",value:function(){var e,t,a,n,o,c,s=this;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=this.state,t=e.optimizeID,a=e.ampExperimentJSON,n=e.OptimizeIDValidated,o=this.props.finishSetup,n&&0!==t.length){r.next=4;break}return r.abrupt("return",!1);case 4:return c={optimizeID:t,ampExperimentJSON:a},r.next=7,i.a.awrap(y.c.set(y.b,"optimize","settings",c).then((function(){o&&o(),googlesitekit.modules.optimize.settings.optimizeID=t,s._isMounted&&s.setState({isSaving:!1})})).catch((function(e){s._isMounted&&s.setState({errorCode:!0,errorMsg:e.errorMsg})})));case 7:return r.abrupt("return",r.sent);case 8:case"end":return r.stop()}}),null,this)}},{key:"handleOptimizeIDEntry",value:function(e){var t=Object(S.A)(e.target.value);this._isMounted&&this.setState({optimizeID:e.target.value,OptimizeIDValidated:t})}},{key:"handleAMPOptimizeEntry",value:function(e){var t=Object(S.z)(e.target.value);this._isMounted&&this.setState({ampExperimentJSON:e.target.value,ampExperimentJSONValidated:t})}},{key:"renderInfo",value:function(){var e=this.state.optimizeID;return React.createElement(b.Fragment,null,e?React.createElement("div",null,Object(j.__)("Your Optimize Container ID","google-site-kit"),": ",React.createElement("strong",null,e)):React.createElement("div",null,Object(j.__)('Optimize Container ID missing, press "edit" to add',"google-site-kit"),"."))}},{key:"renderInstructionInfo",value:function(){var e=this.state,t=e.analyticsUseSnippet,a=e.gtmUseSnippet,n=e.optimizeID;return!t&&a?React.createElement(b.Fragment,null,React.createElement("p",null,Object(j.__)("You are using auto insert snippet with Tag Manager","google-site-kit")),React.createElement("p",null,React.createElement("a",{href:"https://support.google.com/optimize/answer/6314801"},Object(j.__)("Click here","google-site-kit"))," ",Object(j.__)("for how to implement Optimize tag through your Tag Manager","google-site-kit"))):t?null:React.createElement(b.Fragment,null,React.createElement("p",null,Object(j.__)("You disabled analytics auto insert snippet. If You are using Google Analytics code snippet, add the code below:","google-site-kit")),React.createElement("pre",null,'ga("require", "',n||"GTM-XXXXXXX",'");'),React.createElement("p",null,React.createElement("a",{href:"https://support.google.com/optimize/answer/6262084"},Object(j.__)("Click here","google-site-kit"))," ",Object(j.__)("for how to implement Optimize tag in Google Analytics Code Snippet","google-site-kit")))}},{key:"renderAMPSnippet",value:function(){var e=this.state,t=e.analyticsUseSnippet,a=e.ampClientIDOptIn,n=e.ampExperimentJSON,i=e.ampExperimentJSONValidated,o=window.googlesitekit.admin.ampEnabled;return t&&o?React.createElement(b.Fragment,null,a&&React.createElement(b.Fragment,null,React.createElement("p",null,Object(j.__)("Please input your AMP experiment settings in JSON format below.","google-site-kit")," ",React.createElement(k.a,{href:"https://developers.google.com/optimize/devguides/amp-experiments",external:!0,inherit:!0},Object(j.__)("Learn More.","google-site-kit"))),React.createElement(v.l,{className:"\n\t\t\t\t\t\t\t\tmdc-text-field\n\t\t\t\t\t\t\t\t".concat(i?"":"mdc-text-field--error","\n\t\t\t\t\t\t\t"),name:"amp-experiment",onChange:this.handleAMPOptimizeEntry,textarea:!0},React.createElement(v.b,{inputType:"textarea",value:null===n?"":n})),!i&&React.createElement("p",{className:"googlesitekit-error-text"},Object(j.__)("Error: AMP experiment settings are not in a valid JSON format.","google-site-kit")))):null}},{key:"renderForm",value:function(){var e=this.state,t=e.optimizeID,a=e.errorCode,n=e.errorMsg,i=e.OptimizeIDValidated;return React.createElement(b.Fragment,null,React.createElement("p",null,Object(j.__)("Please copy and paste your Optimize ID to complete your setup.","google-site-kit")," ",React.createElement(k.a,{href:"https://support.google.com/optimize/answer/6211921",external:!0,inherit:!0},Object(j.__)("You can locate this here.","google-site-kit"))),a&&0<n.length&&React.createElement("p",{className:"googlesitekit-error-text"},Object(j.__)("Error:","google-site-kit")," ",n),React.createElement("div",{className:"googlesitekit-setup-module__inputs"},React.createElement(v.l,{className:"\n\t\t\t\t\t\t\tmdc-text-field\n\t\t\t\t\t\t\t".concat(a?"mdc-text-field--error":"","\n\t\t\t\t\t\t\t").concat(i?"":"mdc-text-field--error","\n\t\t\t\t\t\t"),label:Object(j.__)("Optimize Container ID","google-site-kit"),name:"optimizeID",onChange:this.handleOptimizeIDEntry,helperText:React.createElement(v.a,null,Object(j.__)("Format: GTM-XXXXXXX.","google-site-kit")),outlined:!0,required:!0},React.createElement(v.b,{value:t}))),!i&&React.createElement("p",{className:"googlesitekit-error-text"},Object(j.__)("Error: Not a valid Optimize ID.","google-site-kit")),this.renderAMPSnippet(),this.renderInstructionInfo())}},{key:"render",value:function(){var e=this.props,t=e.onSettingsPage,a=e.isEditing;return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--optimize"},!t&&React.createElement(b.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__logo"},React.createElement(O.a,{id:"optimize",width:"33",height:"33"})),React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(j._x)("Optimize","Service name","google-site-kit"))),a&&this.renderForm(),!a&&this.renderInfo(),!t&&React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(f.a,{onClick:this.handleSubmit},Object(j.__)("Configure Optimize","google-site-kit"))))}}]),t}(b.Component);D.propTypes={onSettingsPage:E.a.bool,finishSetup:E.a.func,isEditing:E.a.bool},D.defaultProps={onSettingsPage:!0,isEditing:!1},t.default=D},function(e,t,a){"use strict";a.r(t),a.d(t,"PageSpeedInsightsDashboardWidgetHomepageSpeedMobile",(function(){return O})),a.d(t,"PageSpeedInsightsDashboardWidgetHomepageSpeedDesktop",(function(){return R}));var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(45),_=a(9),b=a(2),f=a(28),k=a(0),y=a(64),v=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.data,a=e.handleDataLoaded;t&&a&&a()}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.title;if(!t||t.error)return null;if(function(e){return 0===e.categories.performance.score}(t))return Object(h.a)(Object(k._x)("PageSpeed Insights","Service name","google-site-kit"),Object(k.__)("An unknown error occurred while trying to fetch PageSpeed Insights data. Please try again later.","google-site-kit"),!0);var n=t.categories.performance.score,i=Object(y.getScoreCategoryLabel)(n),o=t.audits.interactive.displayValue,c=Object(f.b)([[Object(k.__)("Real user speed data","google-site-kit"),React.createElement(y.PageSpeedReportScoreCategoryWrapper,{key:"0",score:n},i)],[Object(k.__)("Time to become fully interactive","google-site-kit"),React.createElement(y.PageSpeedReportScoreCategoryWrapper,{key:"0",score:n},o)]],[],{hideHeader:!0,disableListMode:!0,chartsEnabled:!1,links:[]});return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement("div",{className:"googlesitekit-pagespeed-report__heading-wrapper"},React.createElement("h3",{className:" googlesitekit-subheading-1 "},a),React.createElement(y.PageSpeedReportScoreGauge,{score:n})),React.createElement(f.a,null,c))}}]),t}(p.Component),O=Object(m.a)(v,[{type:_.b,identifier:"pagespeed-insights",datapoint:"pagespeed",data:{url:googlesitekit.permaLink,strategy:"mobile"},priority:10,maxAge:Object(b.p)("day"),context:["Single","Dashboard"]}],null,{inGrid:!0}),R=Object(m.a)(v,[{type:_.b,identifier:"pagespeed-insights",datapoint:"pagespeed",data:{url:googlesitekit.permaLink,strategy:"desktop"},priority:10,maxAge:Object(b.p)("day"),context:["Single","Dashboard"]}],null,{inGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(12),c=a.n(o),s=a(3),r=a.n(s),l=a(4),d=a.n(l),u=a(5),g=a.n(u),p=a(6),m=a.n(p),h=a(13),_=a.n(h),b=a(7),f=a.n(b),k=a(1),y=a(29),v=a(14),O=a(9),R=a(31),E=a(22),S=a(20),j=a(8),w=a.n(j),D=a(2),C=a(11),x=a(0),N=a(10),A=function(e){function t(e){var a;r()(this,t),a=g()(this,m()(t).call(this,e));var n=googlesitekit.modules.tagmanager.settings,i="primary"===googlesitekit.admin.ampMode?"amp":"web",o="amp"===i?"ampContainerID":"containerID";return a.state={isLoading:!0,accounts:[],containers:[],errorCode:!1,errorMsg:"",refetch:!1,selectedAccount:n.accountID,selectedContainer:n[o],containersLoading:!1,usageContext:i,containerKey:o},a.handleSubmit=a.handleSubmit.bind(_()(a)),a.renderAccountDropdownForm=a.renderAccountDropdownForm.bind(_()(a)),a.handleAccountChange=a.handleAccountChange.bind(_()(a)),a.handleContainerChange=a.handleContainerChange.bind(_()(a)),a.refetchAccount=a.refetchAccount.bind(_()(a)),a}return f()(t,e),d()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,a=t.isOpen,n=t.onSettingsPage;this._isMounted=!0,n&&!a||(this.requestTagManagerAccounts(),Object(N.addFilter)("googlekit.SettingsConfirmed","googlekit.TagmanagerSettingsConfirmed",(function(t,a){return"tagmanager"!==a.replace("-module","")?t:e.props.isEditing?e.handleSubmit():void 0})),this.toggleConfirmChangesButton())}},{key:"componentDidUpdate",value:function(){this.state.refetch&&this.requestTagManagerAccounts(),this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(N.removeFilter)("googlekit.SettingsConfirmed","googlekit.TagmanagerSettingsConfirmed")}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){var e={selectedContainer:this.state.containerKey,selectedAccount:"selectedAccount"};Object(D.y)("tagmanager",e,this.state)}}},{key:"requestTagManagerAccounts",value:function(){var e,t,a,n,i,o,s,r,l,d;return c.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,e=this.state,t=e.selectedAccount,a=e.usageContext,n=this.state.selectedContainer,i={accountID:t,usageContext:a},o=!1,s="",u.next=8,c.a.awrap(O.c.get(O.b,"tagmanager","accounts-containers",i));case 8:r=u.sent,l=r.accounts,d=r.containers,t||0!==l.length||(o="accountEmpty",s=Object(x.__)("We didn’t find an associated Google Tag Manager account, would you like to set it up now? If you’ve just set up an account please re-fetch your account to sync it with Site Kit.","google-site-kit")),t&&!l.find((function(e){return e.accountId===t}))&&(O.c.invalidateCacheGroup(O.b,"tagmanager","accounts-containers"),o="insufficientPermissions",s=Object(x.__)("You currently don't have access to this Google Tag Manager account. You can either request access from your team, or remove this Google Tag Manager snippet and connect to a different account.","google-site-kit")),n&&!d.find((function(e){return e.publicId===n}))&&(n=null),this._isMounted&&this.setState({isLoading:!1,accounts:l,selectedAccount:t||Object(C.get)(d,[0,"accountId"]),containers:d,selectedContainer:n||Object(C.get)(d,[0,"publicId"]),refetch:!1,errorCode:o,errorMsg:s}),u.next=20;break;case 17:u.prev=17,u.t0=u.catch(0),this._isMounted&&this.setState({isLoading:!1,errorCode:u.t0.code,errorMsg:u.t0.message,refetch:!1});case 20:case"end":return u.stop()}}),null,this,[[0,17]])}},{key:"requestTagManagerContainers",value:function(e){var t,a;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,t={accountID:e,usageContext:this.state.usageContext},n.next=4,c.a.awrap(O.c.get(O.b,"tagmanager","containers",t));case 4:a=n.sent,this._isMounted&&this.setState({containersLoading:!1,containers:a,selectedContainer:Object(C.get)(a,[0,"publicId"]),errorCode:!1}),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),this._isMounted&&this.setState({errorCode:n.t0.code,errorMsg:n.t0.message});case 11:case"end":return n.stop()}}),null,this,[[0,8]])}},{key:"handleSubmit",value:function(){var e,t,a,n,o,s,r,l,d;return c.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return e=this.state,t=e.selectedAccount,a=e.selectedContainer,n=e.usageContext,o=e.containerKey,s=this.props.finishSetup,u.prev=2,r={accountID:t},i()(r,o,a),i()(r,"usageContext",n),l=r,u.next=6,c.a.awrap(O.c.set(O.b,"tagmanager","settings",l));case 6:d=u.sent,s&&s(),googlesitekit.modules.tagmanager.settings=d,this._isMounted&&this.setState({isSaving:!1}),u.next=16;break;case 12:return u.prev=12,u.t0=u.catch(2),this._isMounted&&this.setState({isLoading:!1,errorCode:u.t0.code,errorMsg:u.t0.message}),u.abrupt("return",new Promise((function(e,t){t(u.t0)})));case 16:case"end":return u.stop()}}),null,this,[[2,12]])}},{key:"handleAccountChange",value:function(e,t){var a=this.state.selectedAccount,n=t.getAttribute("data-value");n!==a&&(this._isMounted&&this.setState({containersLoading:!0,selectedAccount:n}),this.requestTagManagerContainers(n))}},{key:"handleContainerChange",value:function(e,t){var a=this.state.selectedContainer,n=t.getAttribute("data-value");n!==a&&this._isMounted&&this.setState({selectedContainer:n})}},{key:"refetchAccount",value:function(e){e.preventDefault(),this._isMounted&&this.setState({isLoading:!0,refetch:!0,errorCode:!1})}},{key:"renderSettingsInfo",value:function(){var e=this.state,t=e.isLoading,a=e.selectedAccount,n=e.selectedContainer;return t?React.createElement(R.a,null):React.createElement(k.Fragment,null,React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(x.__)("Account","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},a||!1)),React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(x.__)("Container ID","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},n||!1))))}},{key:"renderAccountDropdownForm",value:function(){var e=this.state,a=e.accounts,n=e.selectedAccount,i=e.containers,o=e.selectedContainer,c=e.isLoading,s=e.containersLoading,r=this.props.onSettingsPage;return c?React.createElement(R.a,null):0>=a.length?React.createElement(k.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(y.a,{onClick:t.createNewAccount},Object(x.__)("Create an account","google-site-kit")),React.createElement("div",{className:"googlesitekit-setup-module__sub-action"},React.createElement(v.a,{onClick:this.refetchAccount},Object(x.__)("Re-fetch My Account","google-site-kit"))))):React.createElement(k.Fragment,null,React.createElement("p",null,Object(x.__)("Please select your Tag Manager account and container below, the snippet will be inserted automatically into your site.","google-site-kit")),React.createElement("div",{className:"googlesitekit-setup-module__inputs"},React.createElement(E.k,{enhanced:!0,name:"accounts",label:Object(x.__)("Account","google-site-kit"),value:n,onEnhancedChange:this.handleAccountChange,outlined:!0},a.map((function(e){return React.createElement(E.j,{key:e.accountId,value:e.accountId},e.name)}))),s?React.createElement(R.a,{small:!0}):React.createElement(E.k,{enhanced:!0,name:"containers",label:Object(x.__)("Container","google-site-kit"),value:o,onEnhancedChange:this.handleContainerChange,outlined:!0},i.concat({name:Object(x.__)("Set up a new container","google-site-kit"),publicId:0}).map((function(e,t){var a=e.name,n=e.publicId;return React.createElement(E.j,{key:t,value:n},a)})))),!r&&React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(y.a,{onClick:this.handleSubmit},Object(x.__)("Confirm & Continue","google-site-kit"))))}},{key:"renderErrorOrNotice",value:function(){var e=this.state,t=e.errorCode,a=e.errorMsg,n=this.props.onSettingsPage;if(0===a.length)return null;var i=!n||"insufficientPermissions"!==t;return React.createElement("div",{className:i?"googlesitekit-error-text":""},React.createElement("p",null,i?
|
8 |
/* translators: %s: Error message */
|
9 |
-
Object(x.sprintf)(Object(x.__)("Error: %s","google-site-kit"),a):a))}},{key:"render",value:function(){var e=this.props,t=e.onSettingsPage,a=e.isEditing;return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--tag-manager"},!t&&React.createElement(k.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__logo"},React.createElement(S.a,{id:"tagmanager",width:"33",height:"33"})),React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(x._x)("Tag Manager","Service name","google-site-kit"))),this.renderErrorOrNotice(),a&&this.renderAccountDropdownForm(),!a&&this.renderSettingsInfo())}}],[{key:"createNewAccount",value:function(e){e.preventDefault(),window.open("https://marketingplatform.google.com/about/tag-manager/","_blank")}}]),t}(k.Component);A.propTypes={onSettingsPage:w.a.bool,finishSetup:w.a.func,isEditing:w.a.bool},A.defaultProps={onSettingsPage:!0,isEditing:!1},t.default=A},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(56),h=["#178EC5","#54B23B","#EB5729","#ECED33","#34CBE3","#82E88E"],_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.index,a=e.percent,n={backgroundColor:"transparent",chartArea:{width:"100%",height:"100%"},enableInteractivity:!1,height:28,legend:{position:"none"},slices:{0:{color:h[t]},1:{color:"#e6e6e6"}},title:null,tooltip:{trigger:"none"},width:28},i=[["source","percent"],["",+a],["",100-a]];return React.createElement("div",{className:"googlesitekit-mini-chart"},React.createElement(m.a,{data:i,options:n,chartType:"pie",loadSmall:!0,loadCompressed:!0,loadHeight:24,loadText:!1,id:"minichart"+t}))}}]),t}(p.Component);t.a=_},function(e,t,a){"use strict";a.r(t);var n=a(168),i=a.n(n),o=a(12),c=a.n(o),s=a(3),r=a.n(s),l=a(4),d=a.n(l),u=a(5),g=a.n(u),p=a(6),m=a.n(p),h=a(13),_=a.n(h),b=a(7),f=a.n(b),k=a(27),y=a.n(k),v=a(1),O=a(9),R=a(8),E=a.n(R),S=a(29),j=a(31),w=a(14),D=a(22),C=function(e){function t(e){var a;return r()(this,t),(a=g()(this,m()(t).call(this,e))).formFieldRef=Object(v.createRef)(),a.radioRef=Object(v.createRef)(),a}return f()(t,e),d()(t,[{key:"componentDidMount",value:function(){new D.e(this.formFieldRef.current).input=new D.g(this.radioRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onClick,a=e.id,n=e.name,i=e.value,o=e.checked,c=e.disabled,s=e.children;return React.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},React.createElement("div",{className:"\n\t\t\t\t\t\tmdc-radio\n\t\t\t\t\t\t".concat(c?"mdc-radio--disabled":"","\n\t\t\t\t\t"),ref:this.radioRef},React.createElement("input",{className:"mdc-radio__native-control",onClick:t,type:"radio",id:a,name:n,value:i,checked:o,disabled:c,onChange:function(){}}),React.createElement("div",{className:"mdc-radio__background"},React.createElement("div",{className:"mdc-radio__outer-circle"}),React.createElement("div",{className:"mdc-radio__inner-circle"}))),React.createElement("label",{htmlFor:a},s))}}]),t}(v.Component);C.propTypes={onClick:E.a.func,id:E.a.string.isRequired,name:E.a.string.isRequired,value:E.a.string.isRequired,checked:E.a.bool,disabled:E.a.bool,children:E.a.string.isRequired},C.defaultProps={onClick:null,checked:!1,disabled:!1};var x=C,N=a(79),A=a(20),P=a(2),L=a(0),M=a(10);function I(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function F(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?I(a,!0).forEach((function(t){y()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):I(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var T=y()({},"loggedinUsers",Object(L.__)("Logged-in users","google-site-kit")),U=function(e){function t(e){var a;r()(this,t),a=g()(this,m()(t).call(this,e));var n=googlesitekit.modules.analytics.settings,i=n.accountID,o=n.internalWebPropertyID,c=n.profileID,s=n.propertyID,l=n.useSnippet,d=n.ampClientIDOptIn,u=n.trackingDisabled;return a.state={isLoading:!0,isSaving:!1,propertiesLoading:!1,profilesLoading:!1,useSnippet:l||!1,errorCode:!1,errorMsg:"",errorReason:!1,accounts:[],properties:[],profiles:[],selectedAccount:i,selectedProperty:s,selectedProfile:c,selectedinternalWebProperty:o,ampClientIDOptIn:d,existingTag:!1,trackingDisabled:u||[]},a.handleAccountChange=a.handleAccountChange.bind(_()(a)),a.handlePropertyChange=a.handlePropertyChange.bind(_()(a)),a.handleProfileChange=a.handleProfileChange.bind(_()(a)),a.processAccountChange=a.processAccountChange.bind(_()(a)),a.processPropertyChange=a.processPropertyChange.bind(_()(a)),a.handleSubmit=a.handleSubmit.bind(_()(a)),a.handleRadioClick=a.handleRadioClick.bind(_()(a)),a.handleAMPClientIDSwitch=a.handleAMPClientIDSwitch.bind(_()(a)),a.handleRefetchAccount=a.handleRefetchAccount.bind(_()(a)),a.handleExclusionsChange=a.handleExclusionsChange.bind(_()(a)),a}return f()(t,e),d()(t,[{key:"componentDidMount",value:function(){var e,t,a,n,i,o=this;return c.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(e=this.props,t=e.isOpen,a=e.onSettingsPage,this._isMounted=!0,!a||t){s.next=4;break}return s.abrupt("return");case 4:return s.next=6,c.a.awrap(Object(P.k)("analytics"));case 6:if(!(n=s.sent)||!n.length){s.next=21;break}return s.prev=8,s.next=11,c.a.awrap(O.c.get(O.b,"analytics","tag-permission",{tag:n}));case 11:return i=s.sent,s.next=14,c.a.awrap(this.getAccounts(i));case 14:s.next=19;break;case 16:s.prev=16,s.t0=s.catch(8),this.setState({isLoading:!1,errorCode:s.t0.code,errorMsg:s.t0.message,errorReason:!(!s.t0.data||!s.t0.data.reason)&&s.t0.data.reason});case 19:s.next=23;break;case 21:return s.next=23,c.a.awrap(this.getAccounts());case 23:Object(M.addFilter)("googlekit.SettingsConfirmed","googlekit.AnalyticsSettingsConfirmed",(function(e,t){return"analytics"!==t.replace("-module","")?e:o.props.isEditing?o.handleSubmit():void 0}));case 24:case"end":return s.stop()}}),null,this,[[8,16]])}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(M.removeFilter)("googlekit.SettingsConfirmed","googlekit.AnalyticsSettingsConfirmed")}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){Object(P.y)("analytics",{selectedAccount:"accountID",selectedProperty:"propertyID",selectedProfile:"profileID",selectedinternalWebProperty:"internalWebPropertyID",useSnippet:"useSnippet",ampClientIDOptIn:"ampClientIDOptIn",trackingDisabled:"trackingDisabled"},this.state)}}},{key:"handleAccountChange",value:function(e,t){var a=this.state.selectedAccount,n=t.getAttribute("data-value");n!==a&&("0"!==n?(this.setState({propertiesLoading:!0,profilesLoading:!0,selectedAccount:n}),Object(P.v)("analytics_setup","account_change",n),this.processAccountChange(n)):this.setState({selectedAccount:n,selectedProperty:"-1",selectedProfile:"-1",properties:[{id:"-1",name:Object(L.__)("Select an account","google-site-kit")}],profiles:[{id:"-1",name:Object(L.__)("Select an account","google-site-kit")}]}))}},{key:"handlePropertyChange",value:function(e,t){var a=this.state.selectedProperty,n=t.getAttribute("data-value");n!==a&&("0"!==n?(this.setState({profilesLoading:!0,selectedProperty:n}),Object(P.v)("analytics_setup","property_change",n),this.processPropertyChange(n)):this.setState({selectedProperty:n,selectedProfile:n,profiles:[{id:0,name:Object(L.__)("Setup a New Profile","google-site-kit")}]}))}},{key:"handleProfileChange",value:function(e,t){var a=t.getAttribute("data-value");this.setState({selectedProfile:a}),Object(P.v)("analytics_setup","profile_change",a)}},{key:"getAccounts",value:function(){var e,t,a,n,i,o,s,r,l,d,u,g,p,m,h,_,b=this,f=arguments;return c.a.async((function(k){for(;;)switch(k.prev=k.next){case 0:return e=f.length>0&&void 0!==f[0]&&f[0],t=this.state,a=t.selectedAccount,n=t.selectedProperty,i=t.selectedProfile,o=t.useSnippet,s=this.props,r=s.isEditing,l=s.onSettingsPage,d=this.state.errorCode,u={},k.prev=5,g=e?{existingAccountID:e.accountId,existingPropertyID:e.propertyId}:{},k.next=9,c.a.awrap(O.c.get(O.b,"analytics","accounts-properties-profiles",g));case 9:0===(p=k.sent).accounts.length?(u=F({},u,{errorCode:"no_account",errorReason:"noAccount"}),O.c.invalidateCacheGroup(O.b,"analytics","accounts-properties-profiles")):a?a&&!p.accounts.find((function(e){return e.id===a}))&&(O.c.invalidateCacheGroup(O.b,"analytics","accounts-properties-profiles"),p.accounts.unshift({id:0,name:Object(L.__)("Select one...","google-site-kit")}),r&&(a="0",n="-1",i="-1"),u=F({},u,{errorCode:"insufficient_permissions",errorReason:"insufficientPermissions"})):(m=null,p.matchedProperty&&(m=p.matchedProperty),m?(a=m.accountId,n=m.id,(h=p.profiles.find((function(e){return e.accountId===a})))&&(i=h.id)):p.accounts.unshift({id:0,name:Object(L.__)("Select one...","google-site-kit")})),_={id:"-1",name:Object(L.__)("Select an account","google-site-kit")},this.state.existingTag||p.properties.push({id:0,name:Object(L.__)("Setup a New Property","google-site-kit")}),p.profiles.push({id:0,name:Object(L.__)("Setup a New Profile","google-site-kit")}),l||(o=!e),u=F({},u,{isLoading:!1,accounts:p.accounts,errorCode:d||u.errorCode,selectedAccount:a,selectedProperty:n,selectedProfile:i,properties:[_],profiles:[_],existingTag:!!e&&e.propertyID,useSnippet:o}),a&&"0"!==a&&(u=Object.assign(u,{properties:p.properties,profiles:p.profiles,selectedinternalWebProperty:p.properties[0]?p.properties[0].internalWebPropertyID:0})),k.next=22;break;case 19:k.prev=19,k.t0=k.catch(5),u={isLoading:!1,errorCode:k.t0.code,errorMsg:k.t0.message,errorReason:!(!k.t0.data||!k.t0.data.reason)&&k.t0.data.reason};case 22:return k.abrupt("return",new Promise((function(e){b._isMounted?b.setState(u,e):e()})));case 23:case"end":return k.stop()}}),null,this,[[5,19]])}},{key:"processAccountChange",value:function(e){var t,a,n,i;return c.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,t={accountID:e},o.next=4,c.a.awrap(O.c.get(O.b,"analytics","properties-profiles",t));case 4:a=o.sent,n={id:0,name:Object(L.__)("Setup a New Property","google-site-kit")},a.properties.push(n),i={id:0,name:Object(L.__)("Setup a New Profile","google-site-kit")},a.profiles.push(i),this.setState({propertiesLoading:!1,profilesLoading:!1,properties:a.properties,profiles:a.profiles,selectedAccount:e,selectedProperty:a.properties[0].id,selectedinternalWebProperty:a.properties[0].internalWebPropertyID,selectedProfile:a.profiles[0].id,errorCode:!1}),o.next=15;break;case 12:o.prev=12,o.t0=o.catch(0),this.setState({errorCode:o.t0.code,errorMsg:o.t0.message});case 15:case"end":return o.stop()}}),null,this,[[0,12]])}},{key:"processPropertyChange",value:function(e){var t,a,n;return c.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return t=this.state.selectedAccount,i.prev=1,a={accountID:t,propertyID:e},i.next=5,c.a.awrap(O.c.get(O.b,"analytics","profiles",a));case 5:n=i.sent,this.setState({profilesLoading:!1,profiles:n,selectedProperty:e,selectedinternalWebProperty:n[0].internalWebPropertyID,selectedProfile:n[0].id,errorCode:!1}),i.next=12;break;case 9:i.prev=9,i.t0=i.catch(1),this.setState({errorCode:i.t0.code,errorMsg:i.t0.message});case 12:case"end":return i.stop()}}),null,this,[[1,9]])}},{key:"handleSubmit",value:function(e){var t,a,n,i,o,s,r,l,d,u,g,p,m,h,_,b,f;return c.a.async((function(k){for(;;)switch(k.prev=k.next){case 0:if(e&&e.preventDefault(),this.state.selectedAccount&&"-1"!==this.state.selectedAccount){k.next=3;break}return k.abrupt("return");case 3:return t=this.state,a=t.selectedAccount,n=t.selectedProperty,i=t.selectedProfile,o=t.useSnippet,s=t.selectedinternalWebProperty,r=t.accounts,l=t.properties,d=t.profiles,u=t.ampClientIDOptIn,g=t.trackingDisabled,this.setState({isSaving:!0}),p=this.props.finishSetup,m=i||(d[0].id||0===d[0].id?d[0].id.toString():null),h=n||(l[0].id||0===l[0].id?l[0].id.toString():null),_="0"===h?"0":s||(l[0].internalWebPropertyId||0===l[0].internalWebPropertyId?l[0].internalWebPropertyId.toString():null),b={accountID:a||r[0].id||null,profileID:m,propertyID:h,internalWebPropertyID:_,useSnippet:o||!1,ampClientIDOptIn:u||!1,trackingDisabled:g},k.prev=10,k.next=13,c.a.awrap(O.c.set(O.b,"analytics","settings",b));case 13:return f=k.sent,O.c.invalidateCacheGroup(O.b,"analytics","accounts-properties-profiles"),k.next=17,c.a.awrap(this.getAccounts());case 17:googlesitekit.modules.analytics.settings=f,Object(P.v)("analytics_setup","analytics_configured"),p&&p(),this._isMounted&&this.setState({isSaving:!1,selectedAccount:f.accountID,selectedProfile:f.profileID,selectedProperty:f.propertyID,selectedinternalWebProperty:f.internalWebPropertyID}),k.next=26;break;case 23:k.prev=23,k.t0=k.catch(10),this.setState({isSaving:!1,errorCode:k.t0.code,errorMsg:k.t0.message});case 26:case"end":return k.stop()}}),null,this,[[10,23]])}},{key:"handleRadioClick",value:function(e){var t="1"===e.target.value;this.setState({useSnippet:t}),Object(P.v)("analytics_setup",t?"analytics_tag_enabled":"analytics_tag_disabled")}},{key:"handleAMPClientIDSwitch",value:function(){this.setState({ampClientIDOptIn:!this.state.ampClientIDOptIn})}},{key:"handleRefetchAccount",value:function(){this.setState({isLoading:!0,errorCode:!1,errorMsg:""}),this.getAccounts()}},{key:"handleExclusionsChange",value:function(e){var t=this.state.trackingDisabled,a=e.target,n=a.id,o=a.checked,c=Object.assign.apply(Object,[{}].concat(i()(t.map((function(e){return y()({},e,!0)}))),[y()({},n,o)]));this.setState({trackingDisabled:Object.keys(c).filter((function(e){return c[e]}))})}},{key:"renderAutoInsertSnippetForm",value:function(){var e=this.state,t=e.useSnippet,a=e.isSaving,n=e.ampClientIDOptIn,i=e.existingTag,o=this.props,c=o.isEditing,s=o.onSettingsPage,r=!c,l=window.googlesitekit.admin.ampEnabled,d=window.googlesitekit.modules.analytics.settings.useSnippet;return React.createElement("div",{className:"googlesitekit-setup-module__inputs googlesitekit-setup-module__inputs--multiline"},(c||a)&&React.createElement(v.Fragment,null,s&&React.createElement(v.Fragment,null,!d&&!i&&React.createElement(v.Fragment,null,React.createElement("p",{className:"googlesitekit-setup-module__text--no-margin"},Object(L.__)("Currently there is no Analytics snippet placed on your site, so no stats are being gathered. Would you like Site Kit to insert the Analytics snippet? You can change this setting later.","google-site-kit"))),d&&React.createElement("p",{className:"googlesitekit-setup-module__text--no-margin"},Object(L.__)("Do you want to remove the Analytics snippet inserted by Site Kit?","google-site-kit"))),s&&!i&&!t&&d&&React.createElement("p",null,Object(L.__)("If the code snippet is removed, you will no longer be able to gather Analytics insights about your site.","google-site-kit"))),s&&React.createElement(v.Fragment,null,i&&React.createElement("p",null,Object(L.__)("Placing two tags at the same time is not recommended.","google-site-kit")),React.createElement(x,{onClick:this.handleRadioClick,id:"useSnippetTrue",name:"useSnippet",value:"1",checked:t,disabled:r},d?Object(L.__)("Not at this time","google-site-kit"):Object(L.__)("Insert snippet","google-site-kit")),React.createElement(x,{onClick:this.handleRadioClick,id:"useSnippetFalse",name:"useSnippet",value:"0",checked:!t,disabled:r},d?Object(L.__)("Remove snippet","google-site-kit"):Object(L.__)("Not at this time","google-site-kit"))),t&&l&&React.createElement("div",{className:"googlesitekit-setup-module__input"},React.createElement(N.a,{id:"ampClientIDOptIn",label:Object(L.__)("Opt in AMP Client ID","google-site-kit"),onClick:this.handleAMPClientIDSwitch,checked:n,hideLabel:!1}),React.createElement("p",null,n?Object(L.__)("Sessions will be combined across AMP/non-AMP pages.","google-site-kit")+" ":Object(L.__)("Sessions will be tracked separately between AMP/non-AMP pages.","google-site-kit")+" ",React.createElement(w.a,{href:"https://support.google.com/analytics/answer/7486764",external:!0,inherit:!0},Object(L.__)("Learn more","google-site-kit")))))}},{key:"accountsDropdown",value:function(){var e=this.state,t=e.accounts,a=e.selectedAccount,n=e.existingTag,i=!this.props.isEditing;return n&&a&&(i=!0),React.createElement(D.k,{enhanced:!0,name:"accounts",value:a||"0",onEnhancedChange:this.handleAccountChange,label:Object(L.__)("Account","google-site-kit"),disabled:i,outlined:!0},t.map((function(e,t){return React.createElement(D.j,{key:t,value:e.id},e.name)})))}},{key:"hasAccessToExistingTagProperty",value:function(){var e=this.state,t=e.existingTag,a=e.selectedProfile;return t&&a}},{key:"renderForm",value:function(){var e=this.state,a=e.isLoading,n=e.propertiesLoading,i=e.profilesLoading,o=e.accounts,c=e.properties,s=e.profiles,r=e.selectedAccount,l=e.selectedProperty,d=e.selectedProfile,u=e.useSnippet,g=e.existingTag,p=e.errorCode,m=e.trackingDisabled,h=this.props,_=h.onSettingsPage,b=h.isEditing,f=!b,k=!b;g&&l&&(k=!0);var y=googlesitekit.modules.analytics.setupComplete;if(a)return React.createElement(j.a,null);if("google_analytics_existing_tag_permission"===p)return null;if(0>=o.length){if(!b)return Object(L.__)("No account found.","google-site-kit");if(!y||b)return React.createElement(v.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(S.a,{onClick:t.createNewAccount},Object(L.__)("Create an account","google-site-kit")),React.createElement("div",{className:"googlesitekit-setup-module__sub-action"},React.createElement(w.a,{onClick:this.handleRefetchAccount},Object(L.__)("Re-fetch My Account","google-site-kit")))))}if(!b){var O=u?Object(L.__)("Snippet is inserted","google-site-kit"):Object(L.__)("Snippet is not inserted","google-site-kit");return g&&(O=Object(L.__)("Inserted by another plugin or theme","google-site-kit")),React.createElement(v.Fragment,null,React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("Account","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},r||o[0].name||!1)),React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("Property","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},l||c[0].name||!1)),React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("View","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},d||s[0].name||!1))),React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:" googlesitekit-settings-module__meta-item "},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("Analytics Code Snippet","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},O))),React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:" googlesitekit-settings-module__meta-item "},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("Excluded from Analytics","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},!!m.length&&m.map((function(e){return T[e]})).join(Object(L._x)(", ","list separator","google-site-kit")),!m.length&&Object(L.__)("Analytics is currently enabled for all visitors.","google-site-kit")))))}return React.createElement(v.Fragment,null,!_&&0<o.length&&!g&&React.createElement("p",null,Object(L.__)("Please select the account information below. You can change this view later in your settings.","google-site-kit")),React.createElement("div",{className:"googlesitekit-setup-module__inputs"},this.accountsDropdown(),n?React.createElement(j.a,{small:!0}):React.createElement(D.k,{enhanced:!0,name:"properties",value:l||0===l?l.toString():"-1",onEnhancedChange:this.handlePropertyChange,label:Object(L.__)("Property","google-site-kit"),disabled:k,outlined:!0},c.map((function(e,t){return React.createElement(D.j,{key:t,value:e.id},e.name)}))),i?React.createElement(j.a,{small:!0}):React.createElement(D.k,{enhanced:!0,name:"profiles",value:d||0===d?d.toString():"-1",onEnhancedChange:this.handleProfileChange,label:Object(L.__)("View","google-site-kit"),disabled:f,outlined:!0},s.map((function(e,t){return React.createElement(D.j,{key:t,value:e.id},e.name)})))),this.renderAutoInsertSnippetForm(),_&&this.renderExclusionsForm(),!_&&React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(S.a,{disabled:!this.state.selectedAccount,onClick:this.handleSubmit},Object(L.__)("Configure Analytics","google-site-kit"))))}},{key:"renderExclusionsForm",value:function(){var e=this.state.trackingDisabled;return React.createElement("div",null,React.createElement("p",{className:"googlesitekit-setup-module__text"},Object(L.__)("Exclude from Analytics","google-site-kit")),React.createElement("div",{className:"mdc-form-field"},React.createElement(N.a,{id:"loggedinUsers",label:T.loggedinUsers,onClick:this.handleExclusionsChange,checked:e.includes("loggedinUsers"),hideLabel:!1})),React.createElement("p",null,e.includes("loggedinUsers")?Object(L.__)("Logged-in users will be excluded from Analytics tracking.","google-site-kit"):Object(L.__)("Logged-in users will be included in Analytics tracking.","google-site-kit")))}},{key:"renderErrorOrNotice",value:function(){var e=this.state,t=e.errorCode,a=e.errorMsg,n=e.errorReason,i=e.accounts,o=this.props.onSettingsPage;if(!t)return null;var c=!0,s=a;switch(!0){case"google_analytics_existing_tag_permission"===t:c=!1;break;case o&&t&&"insufficientPermissions"===n:c=!1,s=Object(L.__)("You currently don't have access to this Google Analytics account. You can either request access from your team, or remove this Google Analytics snippet and connect to a different account.","google-site-kit");break;case!o&&0===i.length:c=!1,s=Object(L.__)('Looks like you don\'t have an Analytics account yet. Once you create it, click on "Re-fetch my account" and Site Kit will locate it.',"google-site-kit")}return 0===s.length?null:React.createElement("div",{className:c?"googlesitekit-error-text":""},React.createElement("p",null,c?
|
10 |
/* translators: %s: Error message */
|
11 |
-
Object(L.sprintf)(Object(L.__)("Error: %s","google-site-kit"),s):s))}},{key:"render",value:function(){var e=this.props.onSettingsPage,t=this.state.existingTag;return e||Object(P.v)("analytics_setup","configure_analytics_screen"),React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--analytics"},!e&&React.createElement(v.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__logo"},React.createElement(A.a,{id:"analytics",width:"33",height:"33"})),React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(L._x)("Analytics","Service name","google-site-kit"))),this.hasAccessToExistingTagProperty()&&t!==googlesitekit.admin.trackingID&&React.createElement("p",null,Object(L.sprintf)(Object(L.__)("An existing analytics tag was found on your site with the id %s. If later on you decide to replace this tag, Site Kit can place the new tag for you. Make sure you remove the old tag first.","google-site-kit"),t)),this.renderErrorOrNotice(),this.renderForm())}}],[{key:"createNewAccount",value:function(e){e.preventDefault(),Object(P.v)("analytics_setup","new_analytics_account"),window.open("https://analytics.google.com/analytics/web/?#/provision/SignUp","_blank")}}]),t}(v.Component);U.propTypes={onSettingsPage:E.a.bool,finishSetup:E.a.func,isEditing:E.a.bool},U.defaultProps={onSettingsPage:!0,isEditing:!1};t.default=U},,function(e,t,a){"use strict";a.r(t);var n=a(68),i=a.n(n),o=a(27),c=a.n(o),s=a(12),r=a.n(s),l=a(3),d=a.n(l),u=a(4),g=a.n(u),p=a(5),m=a.n(p),h=a(6),_=a.n(h),b=a(7),f=a.n(b),k=a(1),y=a(167),v=a(8),O=a.n(v),R=a(20),E=a(0),S=a(98),j=a(73),w=a(2),D=a(44);function C(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function x(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?C(a,!0).forEach((function(t){c()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):C(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var N=function(e){function t(e){var a;return d()(this,t),(a=m()(this,_()(t).call(this,e))).state={accountStatus:void 0,loadingMessage:Object(E.__)("Loading…","google-site-kit"),instructionProps:{}},a}return f()(t,e),g()(t,[{key:"componentDidMount",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.a.awrap(this.updateAccountStatus());case 2:case"end":return e.stop()}}),null,this)}},{key:"componentDidUpdate",value:function(e,t){var a=this.state.accountStatus;if(t.accountStatus!==a){var n=function(e,t){var a,n,i,o,c,s,r,l,d,u,g,p,m,h=!1,_=!1,b=!1,f=!1,k=!1,v=!1,O=googlesitekit.modules.adsense,R=O.accountURL,S=O.signupURL,j=Object(w.n)("googlesitekit-module-adsense",{}),D=new URL(googlesitekit.admin.siteURL);switch(e){case"account-connected":t?(l=!1,r="alert",d=Object(E.__)("Site Kit will place AdSense code to your site","google-site-kit"),u=Object(E.__)("This means Google will automatically place ads for you in all the best places.","google-site-kit"),n=Object(E.__)("Continue","google-site-kit"),a=j,h=!0,g=Object(E.__)("Let Site Kit place code on your site","google-site-kit"),p=Object(E.__)("If you don’t let Site Kit place the code you may not get the best ads experience. You can set this up later on the Site Kit settings page.","google-site-kit"),m=Object(E.__)("If you’ve already set up ads on your site, it may change how they appear. You can customize this later in AdSense.","google-site-kit")):(l=!1,r=!1,d=Object(E.__)("Looks like you’re already using AdSense","google-site-kit"),u=Object(E.__)("Site Kit will place AdSense code on your site to connect your site to AdSense and help you get the most out of ads. This means Google will automatically place ads for you in all the best places.","google-site-kit"),n=Object(E.__)("Continue","google-site-kit"),a=j,v={eventCategory:"adsense_setup",eventName:"complete_adsense_setup"},g=Object(E.__)("Let Site Kit place code on your site to get your site approved","google-site-kit"),p=Object(E.__)("If you’ve already got some AdSense code on your site, we recommend you use Site Kit to place code to get the most out of AdSense.","google-site-kit"));break;case"account-connected-nonmatching":l=!1,r=!1,d=Object(E.__)("Your site has code from another AdSense account","google-site-kit"),u=Object(E.__)("We’ve found some AdSense code on your site, but it’s not linked to this AdSense account.","google-site-kit"),f=!1,n=Object(E.__)("Switch Google account","google-site-kit"),a=Object(w.m)("adsense",!0),_={accountStatus:"account-connected",continueText:Object(E.__)("Continue anyway","google-site-kit"),statusHeadline:Object(E.__)("Site Kit will place AdSense code on your site","google-site-kit"),statusMessage:Object(E.__)("To connect your site to your AdSense account, Site Kit will place AdSense code on your site. For a better ads experience, you should remove AdSense code that’s not linked to this AdSense account.","google-site-kit"),profile:!0,ctaLink:j,ctaLinkText:Object(E.__)("Continue","google-site-kit"),continueAction:!1,switchLabel:Object(E.__)("Let Site Kit place code on your site","google-site-kit"),switchOffMessage:Object(E.__)("You can let Site Kit do this later.","google-site-kit")};break;case"ads-display-pending":var C=Object(y.parse)(D.hostname).domain;d=Object(E.__)("Let’s get your site ready for ads","google-site-kit"),u=Object(E.__)("After you’ve finished setting up your account, we’ll let you know when your site is ready to show ads. This usually takes less than a day, but it can sometimes take a bit longer.","google-site-kit"),n=Object(E.__)("Go to your AdSense account to check on your site’s status or to complete setting up","google-site-kit"),a="https://www.google.com/adsense/new/sites?url=".concat(C||D.hostname,"&source=site-kit");break;case"account-pending-review":d=Object(E.__)("We’re getting your site ready for ads","google-site-kit"),u=Object(E.__)("AdSense is reviewing your site. Meanwhile, make sure you’ve completed these steps in AdSense.","google-site-kit"),n=Object(E.__)("Go to your AdSense account to check on your site’s status","google-site-kit"),a="https://www.google.com/adsense/new/sites?url=".concat(D.hostname,"&source=site-kit"),b=!0;break;case"account-required-action":k=!0;break;case"disapproved-account":a=R,n=Object(E.__)("Go to AdSense to find out how to fix the issue","google-site-kit"),d=Object(E.__)("Your site isn’t ready to show ads yet","google-site-kit"),u=Object(E.__)("You need to fix some things before we can connect Site Kit to your AdSense account.","google-site-kit");break;case"disapproved-account-afc":l=Object(E.__)("There is an AdSense account, but the AFC account is disapproved","google-site-kit"),r="error",d=Object(E.__)("Create Account","google-site-kit"),u=Object(E.__)("Create an AdMob account, then open AdSense and try to upgrade.","google-site-kit"),n=Object(E.__)("Create an AdMob Account","google-site-kit"),a="https://google.com/admob";break;case"no-account":d=Object(E.__)("Create your AdSense account","google-site-kit"),u=Object(E.__)("Site Kit will place AdSense code on every page across your site. This means Google will automatically place ads for you in all the best places.","google-site-kit"),f=!0,n=Object(E.__)("Create AdSense Account","google-site-kit"),a=S,s=Object(E.__)("Already have an AdSense account?","google-site-kit"),i=Object(E.__)("to connect to it","google-site-kit"),o=Object(E.__)("Switch Google account","google-site-kit"),c=Object(w.m)("adsense",!0),v={eventCategory:"adsense_setup",eventName:"create_adsense_account"};break;case"no-account-tag-found":d=Object(E.__)("Looks like you’re already using AdSense","google-site-kit"),u=Object(E.__)("We’ve found some AdSense code on your site, but it’s not linked to this Google account.","google-site-kit"),f=!1,n=Object(E.__)("Switch Google account","google-site-kit"),a=Object(w.m)("adsense",!0),g=Object(E.__)("Let Site Kit place code on your site to get your site approved","google-site-kit"),_={statusHeadline:Object(E.__)("Create a new AdSense account","google-site-kit"),statusMessage:Object(E.__)("Site Kit will place additional AdSense code on every page across your site after you create an account. This means Google will automatically place ads for you in all the best places.","google-site-kit"),notice:Object(E.__)("We recommend you remove the old AdSense code from this site.","google-site-kit"),icon:"warning",continueText:Object(E.__)("Continue anyway","google-site-kit"),ctaLinkText:Object(E.__)("Create AdSense Account","google-site-kit"),ctaLink:S,ctaTarget:"_blank",continueAction:!1}}return{accountTagMatch:h,continueAction:_,ctaLink:a,ctaLinkText:n,footerAppendedText:i,footerCTA:o,footerCTALink:c,footerText:s,icon:r,incomplete:b,issue:l,profile:f,required:k,setupComplete:!1,statusHeadline:d,statusMessage:u,switchLabel:g,switchOffMessage:p,switchOnMessage:m,tracking:v}}(a);this.setState({instructionProps:n})}}},{key:"continueSetup",value:function(e){var t=this.state.instructionProps;e.existingState=x({},t),this.setState({instructionProps:e})}},{key:"goBack",value:function(){var e=x({},this.state.instructionProps).existingState;e&&(e.existingState=!1,this.setState({instructionProps:e}))}},{key:"updateAccountStatus",value:function(){var e,t,a,n=this;return r.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.a.awrap(Object(w.k)("adsense"));case 2:return e=i.sent,t=function(e){n.setState({loadingMessage:e})},i.next=6,r.a.awrap(Object(D.getAdSenseAccountStatus)(e,t));case 6:a=i.sent,this.setState({accountStatus:a.accountStatus});case 8:case"end":return i.stop()}}),null,this)}},{key:"render",value:function(){var e=this.state,t=e.accountStatus,a=e.loadingMessage,n=e.instructionProps,o=!t||!googlesitekit.modules.adsense.setupComplete||["ads-display-pending","account-pending-review","account-required-action"].includes(t);return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense"},React.createElement("div",{className:"googlesitekit-setup-module__step"},React.createElement("div",{className:"googlesitekit-setup-module__logo"},React.createElement(R.a,{id:"adsense",width:"33",height:"33"})),React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(E._x)("AdSense","Service name","google-site-kit"))),React.createElement("div",{className:"googlesitekit-setup-module__step"},!googlesitekit.canAdsRun&&!googlesitekit.modules.adsense.setupComplete&&React.createElement("div",{className:"googlesitekit-settings-module-warning"},React.createElement(R.a,{id:"error",height:"20",width:"23"}),Object(E.__)("Ad blocker detected, you need to disable it in order to setup AdSense.","google-site-kit")),o&&React.createElement(j.default,{ctaLink:n.ctaLink,ctaLinkText:n.ctaLinkText,header:n.statusHeadline,subHeader:n.statusMessage,incomplete:n.incomplete,required:n.required,loadingMessage:!t&&a}),googlesitekit.canAdsRun&&googlesitekit.modules.adsense.setupComplete&&t&&React.createElement(S.default,i()({},n,{accountStatus:t,continueSetup:this.continueSetup,goBack:this.goBack}))))}}]),t}(k.Component);N.propTypes={status:O.a.string,module:O.a.string},t.default=N},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(20),h=a(14),_=a(29),b=a(74),f=a(9),k=a(62),y=a(18),v=a(2),O=a(0),R=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={isSaving:!1},a}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this,t=this.props,a=t.error,n=t.message,i=t.issue,o=t.notice,c=t.statusHeadline,s=t.statusMessage,r=t.profile,l=t.ctaLinkText,d=t.ctaLink,u=t.footerText,g=t.footerAppendedText,p=t.footerCTA,R=t.footerCTALink,E=t.continueAction,S=t.continueSetup,j=t.accountStatus,w=t.accountTagMatch,D=t.clientId,C=t.existingTag,x=t.switchLabel,N=t.tracking,A=t.switchOffMessage,P=t.switchOnMessage,L=t.goBack,M=t.existingState,I=this.state.isSaving,F=googlesitekit.admin.userData,T=F.email,U=void 0===T?"":T,z=F.picture,q=void 0===z?"":z;return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense"},React.createElement("div",{className:"googlesitekit-setup-module__step"},i&&React.createElement("p",{className:"googlesitekit-setup__notice"},React.createElement(m.a,{id:"error",height:"20",width:"23"}),React.createElement("span",{className:"googlesitekit-setup__notice-text"},i)),React.createElement("h2",{className:" googlesitekit-heading-4 googlesitekit-setup-module__title "},c),React.createElement("p",null,s),r&&React.createElement("p",{className:"googlesitekit-setup-module__user"},q&&React.createElement("img",{className:"googlesitekit-setup-module__user-image",src:q,alt:Object(O.__)("User Avatar","google-site-kit")}),React.createElement("span",{className:"googlesitekit-setup-module__user-email"},U)),"account-connected"===j&&React.createElement(b.default,{isEditing:!0,accountTagMatch:w,existingTag:C,saveOnChange:!0,switchLabel:x,switchOffMessage:A,switchOnMessage:P}),o&&React.createElement("div",{className:"googlesitekit-settings-notice"},React.createElement("div",{className:"googlesitekit-settings-notice__text"},o)),a&&0<n.length&&React.createElement("div",{className:"googlesitekit-error-text"},React.createElement("p",null,Object(O.__)("Error:","google-site-kit")," ",n)),React.createElement("div",{className:"googlesitekit-setup-module__action"},"account-connected"===j&&D&&React.createElement(y.Fragment,null,React.createElement(_.a,{disabled:I,onClick:function(){N&&Object(v.v)(N.eventCategory,N.eventName),e.setState({isSaving:!0});var t=document.getElementById("enableAutoAds"),a=t&&t.checked;f.c.set(f.b,"adsense","setup-complete",{clientId:D,useSnippet:a}).then((function(){document.location=d})).catch((function(){e.setState({isSaving:!1})}))}},l),React.createElement(k.a,{isSaving:I})),(!1===j||!D)&&React.createElement(h.a,{className:"googlesitekit-setup-module__cta-link",external:!0,inherit:!0,href:d},l),E&&React.createElement("div",{className:"googlesitekit-setup-module__sub-action"},React.createElement(h.a,{inherit:!0,onClick:function(){S(E)}},E.continueText)),M&&React.createElement("div",{className:"googlesitekit-setup-module__sub-action"},React.createElement(h.a,{inherit:!0,onClick:function(){L()}},Object(O.__)("Back","google-site-kit")))),u&&React.createElement("p",{className:"googlesitekit-setup-module__footer-text"},u," ",p&&React.createElement(h.a,{href:R,inherit:!0,external:!0},p)," ",g)))}}]),t}(p.Component);t.default=R},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.AnalyticsAdSenseTopPagesTableSmall")(h)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.AnalyticsAdSenseTopPagesTable")(h)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(41),h=a(99),_=a(102),b=a(53),f=a(0),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(m.a,{title:Object(f.__)("Earnings","google-site-kit"),description:Object(f.__)("How much you’re earning from your content through AdSense.","google-site-kit"),timePeriod:Object(f.__)("Last 28 days","google-site-kit")}),React.createElement(b.a,{slug:"adsense",context:"module-sitekit-dashboard"})),React.createElement(_.default,null),React.createElement(h.default,null))}}]),t}(p.Component);t.default=k},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(23),b=a(2),f=a(25),k=a(51),y=a(0),v=a(44),O=a(17),R=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={today:!1,period:!1,daily:!1},a}return g()(t,e),c()(t,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,t=e.today,a=e.period,n=e.daily;if(!(t&&a&&n&&a.totals))return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(O.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},React.createElement(_.a,{width:"100%",height:"276px",padding:!0})));var i=Object(v.reduceAdSenseData)(n.rows),o=Object(b.n)("googlesitekit-module-adsense",{}),c=a.headers.find((function(e){return null!==e.currency&&0<e.currency.length})),s=!!c&&c.currency;return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(O.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,{className:"overview-adsense-rpm",title:Object(y.__)("RPM","google-site-kit"),datapoint:Object(b.t)(a.totals[1],s),source:{name:Object(y._x)("AdSense","Service name","google-site-kit"),link:o},sparkline:n&&React.createElement(k.a,{data:Object(b.f)(i.dataMap,2),change:1,id:"adsense-rpm-sparkline",loadSmall:!1}),context:"compact"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,{className:"overview-adsense-earnings",title:Object(y.__)("Total Earnings","google-site-kit"),datapoint:Object(b.t)(a.totals[0],s),source:{name:Object(y._x)("AdSense","Service name","google-site-kit"),link:o},change:t.totals[0],changeDataUnit:"$",sparkline:n&&React.createElement(k.a,{data:Object(b.f)(i.dataMap,1),change:1,id:"adsense-earnings-sparkline",loadSmall:!1}),context:"compact"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,{className:"overview-adsense-impressions",title:Object(y.__)("Ad Impressions","google-site-kit"),datapoint:Object(b.t)(a.totals[2]),source:{name:Object(y._x)("AdSense","Service name","google-site-kit"),link:o},sparkline:n&&React.createElement(k.a,{data:Object(b.f)(i.dataMap,3),change:1,id:"adsense-impressions-sparkline",loadSmall:!1}),context:"compact"})))))))}}]),t}(p.Component);t.default=Object(m.a)(R,[{type:h.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"today"},priority:1,maxAge:Object(b.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.today)return{today:a}}},{type:h.b,identifier:"adsense",datapoint:"earnings",data:{},priority:1,maxAge:Object(b.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.period)return{period:a}}},{type:h.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month",dimensions:["DATE"]},priority:1,maxAge:Object(b.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.daily)return{daily:a}}}],React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(O.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},React.createElement(_.a,{width:"100%",height:"276px",padding:!0}))),{inGrid:!0,createGrid:!0},v.isDataZeroAdSense)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(23),_=a(2),b=a(19),f=a(9),k=a(44),y=a(0),v=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={refetch:!1,today:!1,yesterday:!1,sevenDays:!1,month:!1,twentyEightDays:!1,sameDayLastWeek:!1,prev7Days:!1,monthLastYear:!1,prev28Days:!1,error:!1,message:""},a}return g()(t,e),c()(t,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,a=e.today,n=e.yesterday,i=e.sevenDays,o=e.month,c=e.twentyEightDays,s=e.sameDayLastWeek,r=e.prev7Days,l=e.monthLastYear,d=e.prev28Days;if(!(a&&n&&i&&o&&c&&s&&r&&l&&d))return null;var u=a.headers.find((function(e){return null!==e.currency&&0<e.currency.length})),g=!!u&&u.currency,p=a.totals?[{className:"googlesitekit-data-block--today",title:Object(y.__)("Today so far","google-site-kit"),datapoint:Object(_.t)(a.totals[0],g)},{className:"googlesitekit-data-block--yesterday",title:Object(y.__)("Yesterday","google-site-kit"),datapoint:Object(_.t)(n.totals[0],g),change:s.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--7days",title:Object(y.__)("Last 7 days","google-site-kit"),datapoint:Object(_.t)(i.totals[0],g),change:r.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--month",title:Object(y.__)("This month","google-site-kit"),datapoint:Object(_.t)(o.totals[0],g),change:l.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--28days",title:Object(y.__)("Last 28 days","google-site-kit"),datapoint:Object(_.t)(c.totals[0],g),change:d.totals[0],changeDataUnit:"%"}]:[];return t.renderLayout(p)}}],[{key:"renderLayout",value:function(e){return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},e.map((function(e,t){return React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement(m.a,{stat:t,className:e.className,title:e.title,datapoint:e.datapoint,change:e.change,changeDataUnit:e.changeDataUnit,context:e.context,selected:e.selected,handleStatSelection:e.handleStatSelection}))}))))}},{key:"renderPreviews",value:function(){for(var e=[],t=0;5>t;t++)e.push(React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement(h.a,{width:"100%",height:"104px"})));return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},e))}}]),t}(p.Component);t.default=Object(b.a)(v,[{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"today"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.today)return{today:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"yesterday"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.yesterday)return{yesterday:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"same-day-last-week"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.sameDayLastWeek)return{sameDayLastWeek:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-7-days"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.sevenDays)return{sevenDays:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-7-days"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev7Days)return{prev7Days:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.month)return{month:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month-last-year"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.monthLastYear)return{monthLastYear:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-28-days"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.twentyEightDays)return{twentyEightDays:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-28-days"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev28Days)return{prev28Days:a}}}],v.renderPreviews(),{createGrid:!0},k.isDataZeroAdSense)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(9),h=a(25),_=a(23),b=a(2),f=a(44),k=a(19),y=a(0),v=a(11),O=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={twentyEightDays:!1,prev28Days:!1},a}return g()(t,e),c()(t,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,t=e.twentyEightDays,a=e.prev28Days,n=t.totals?[{className:"googlesitekit-data-block--page-rpm",title:Object(y.__)("Page RPM","google-site-kit"),datapoint:Object(b.t)(t.totals[1]),change:Object(v.isUndefined)(a.totals)?0:a.totals[1],changeDataUnit:"%"},{className:"googlesitekit-data-block--impression",title:Object(y.__)("Impressions","google-site-kit"),datapoint:Object(b.t)(t.totals[2]),change:Object(v.isUndefined)(a.totals)?0:a.totals[2],changeDataUnit:"%"}]:[];return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},n.map((function(e,t){return React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement(h.a,{stat:t,className:e.className,title:e.title,datapoint:e.datapoint,change:e.change,changeDataUnit:e.changeDataUnit,context:e.context,selected:e.selected,handleStatSelection:e.handleStatSelection}))}))))}}]),t}(p.Component);t.default=Object(k.a)(O,[{type:m.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-28-days"},priority:1,maxAge:Object(b.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.twentyEightDays)return{twentyEightDays:a}}},{type:m.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-28-days"},priority:1,maxAge:Object(b.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev28Days)return{prev28Days:a}}}],React.createElement(_.a,{width:"100%",height:"250px"}),{},f.isDataZeroAdSense)},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(13),m=a.n(p),h=a(7),_=a.n(h),b=a(1),f=a(43),k=a(47),y=a(17),v=a(0),O=a(103),R=a(104),E=a(72),S=a(100),j=a(55),w=a(45),D=a(31),C=a(75),x=a(44),N=a(53),A=a(73),P=a(42),L=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={receivingData:!0,error:!1,loading:!0,isAdSenseConnected:!0,zeroData:!1},a.handleDataError=a.handleDataError.bind(m()(a)),a.handleDataSuccess=a.handleDataSuccess.bind(m()(a)),a.handleZeroData=a.handleZeroData.bind(m()(a)),a}return _()(t,e),r()(t,[{key:"componentDidMount",value:function(){this.isAdSenseConnected()}},{key:"isAdSenseConnected",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(x.isAdsenseConnectedAnalytics)());case 2:e.sent?this.setState({isAdSenseConnected:!0}):this.setState({isAdSenseConnected:!1});case 4:case"end":return e.stop()}}),null,this)}},{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e,loading:!1})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"handleZeroData",value:function(){this.setState({zeroData:!0,loading:!1})}},{key:"render",value:function(){var e=this,t=this.state,a=t.receivingData,n=t.error,i=t.loading,o=t.isAdSenseConnected,c=t.zeroData,s=googlesitekit.modules.adsense.homepage,r=i||!a||c?"googlesitekit-nodata":"";return React.createElement(b.Fragment,null,React.createElement(f.a,null),React.createElement("div",{className:"".concat(r)},React.createElement(E.a,{module:"adsense"})),React.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--adsense"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},!n&&googlesitekit.modules.adsense.setupComplete?React.createElement(k.a,{title:Object(v._x)("AdSense","Service name","google-site-kit"),icon:!0,iconWidth:"30",iconHeight:"26",iconID:"adsense",status:"connected",statusText:Object(v.__)("AdSense is connected","google-site-kit")}):React.createElement(k.a,{title:Object(v._x)("AdSense","Service name","google-site-kit"),icon:!0,iconWidth:"30",iconHeight:"26",iconID:"adsense",status:"not-connected",statusText:Object(v.__)("AdSense is not connected","google-site-kit")}),i&&React.createElement(D.a,null)),c&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(y.a,{fill:!0},React.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(A.default,{status:"incomplete"})))))),!a&&(n?Object(w.a)(Object(v._x)("AdSense","Service name","google-site-kit"),n,!0,!0,!0):Object(j.a)(Object(v._x)("AdSense","Service name","google-site-kit"),!0,!0,!0)),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t\t")},React.createElement(N.a,{slug:"adsense",context:"module-dashboard"}),React.createElement(y.a,{header:!0,title:Object(v.__)("Estimated earnings","google-site-kit"),headerCtaLabel:Object(v.__)("Advanced Settings","google-site-kit"),headerCtaLink:s},React.createElement(O.default,{handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t\t")},React.createElement(y.a,{header:!0,title:Object(v.__)("Performance over previous 28 days","google-site-kit"),headerCtaLabel:Object(v.__)("Advanced Settings","google-site-kit"),headerCtaLink:s},React.createElement(R.default,{handleDataError:function(t){t||e.handleZeroData()}}))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t\t")},React.createElement(S.default,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(P.a,null))))),!o&&React.createElement(C.default,null))}}]),t}(b.Component);t.default=L},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(2),h=a(14),_=a(0),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.slug,a=e.screenID,n=e.OriginalComponent,i=googlesitekit.modules.adsense.settings.accountStatus;return i&&"adsense"===t&&("account-pending-review"===i||"ads-display-pending"===i)?React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},Object(_.__)("Site Kit has placed the code on your site, ","google-site-kit"),React.createElement(h.a,{className:"googlesitekit-settings-module__edit-button",onClick:function(){var e=a||"googlesitekit-dashboard";window.location=Object(m.n)(e,{reAuth:!0,slug:t})},inherit:!0},Object(_.__)("check module page","google-site-kit"))):React.createElement(n,this.props)}}]),t}(p.Component);t.default=b},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(20),h=a(0),_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.slug,a=e.context,n=e.OriginalComponent;if("adsense"!==t)return React.createElement(n,this.props);var i=googlesitekit.modules.adsense,o=i.active,c=i.setupComplete,s=Object(h.__)("Ad blocker detected, you need to disable it in order to setup AdSense.","google-site-kit");return o&&c&&(s=Object(h.__)("Ad blocker detected, You need to disable it to get the AdSense latest data.","google-site-kit")),googlesitekit.canAdsRun?React.createElement(n,this.props):React.createElement("div",{className:"googlesitekit-settings-module-warning googlesitekit-settings-module-warning--".concat(a)},React.createElement(m.a,{id:"error",height:"20",width:"23"})," ",s)}}]),t}(p.Component);t.default=_},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(29),b=a(0),f=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).renderAccountSetup=a.renderAccountSetup.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"renderAccountSetup",value:function(){if("no-account"===this.props.accountStatus)return React.createElement(_.a,{onClick:t.createNewAccount},Object(b.__)("Sign up for AdSense","google-site-kit"))}},{key:"render",value:function(){return React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},this.renderAccountSetup()))}}],[{key:"createNewAccount",value:function(e){e.preventDefault();var t=googlesitekit.modules.adsense.signupURL;window.open(t,"_blank")}}]),t}(h.Component);t.default=f},function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(25),b=a(19),f=a(9),k=a(2),y=a(15),v=a(23),O=a(0);function R(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var E=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||e.error||!e.length)return null;var t=Object(y.calculateOverviewData)(e);if(!t)return null;var a=t.totalUsers,n=t.totalSessions,i=t.totalUsersChange,o=t.totalSessionsChange;return React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(_.a,{className:"overview-total-users",title:Object(O.__)("Total Users","google-site-kit"),datapoint:Object(k.t)(a),change:i,changeDataUnit:"%"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(_.a,{className:"overview-total-sessions",title:Object(O.__)("Total Sessions","google-site-kit"),datapoint:Object(k.t)(n),change:o,changeDataUnit:"%"})))}}]),t}(h.Component);t.default=Object(b.a)(E,[{type:f.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?R(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):R(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},y.overviewReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(k.p)("day"),context:"Adminbar"}],React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(v.a,{width:"auto",height:"59px"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(v.a,{width:"auto",height:"59px"}))),{inGrid:!0},y.isDataZeroForReporting,y.getAnalyticsErrorMessageFromData)},function(e,t,a){"use strict";a.r(t);var n=a(49),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(109),b=a(63),f=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){return"undefined"!==i()(googlesitekit.permaLink)&&""===googlesitekit.permaLink?null:googlesitekit.modules.analytics.active?React.createElement(_.default,null):React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(b.a,null)))}}]),t}(h.Component);t.default=f},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(41),h=a(17),_=a(0),b=a(76),f=a(66),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(m.a,{title:Object(_.__)("All Traffic","google-site-kit"),description:Object(_.__)("How people found your page.","google-site-kit")})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{className:"googlesitekit-analytics-acquisition-sources",footer:!0,headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(_.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(_._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(f.default,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(b.default,null)))))))}}]),t}(p.Component);t.default=k},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(2),b=a(28),f=a(94),k=a(38),y=a(11),v=a(0),O=a(15),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=[{title:Object(v.__)("Source","google-site-kit"),primary:!0},{title:Object(v.__)("Percent","google-site-kit")}],a=e[0].data.totals[0].values[0],n=Object(y.map)(e[0].data.rows,(function(e,t){var n=e.metrics[0].values[0]/a*100;return!(1>n)&&[e.dimensions[0],React.createElement(p.Fragment,{key:"minichart-"+t},React.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(n.toFixed(2),"%")," ",React.createElement(f.a,{percent:n.toFixed(1),index:t})))]})),i=Object(b.b)(n,t,{hideHeader:!0,chartsEnabled:!0});return React.createElement("div",{className:"googlesitekit-alltraffic-widget"},React.createElement(b.a,null,i))}}]),t}(p.Component);t.default=Object(m.a)(R,[{type:h.b,identifier:"analytics",datapoint:"report",data:O.trafficSourcesReportDataDefaults,priority:1,maxAge:Object(_.p)("day"),context:"Dashboard"}],React.createElement(k.a,{rows:3,rowHeight:50}))},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(66),b=a(112),f=a(0),k=a(17),y=a(41),v=a(55),O=a(45),R=a(89),E=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={receivingData:!0,error:!1},a.handleDataError=a.handleDataError.bind(g()(a)),a.handleDataSuccess=a.handleDataSuccess.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0})}},{key:"getErrorDataComponent",value:function(){var e=googlesitekit.modules.analytics,t=e.active,a=e.setupComplete,n=this.state,i=n.error,o=n.receivingData;return t&&!a?Object(R.a)("analytics",!0,!0,!0):o?null:i?Object(O.a)(Object(f._x)("Analytics","Service name","google-site-kit"),i,!0,!0,!0):Object(v.a)(Object(f._x)("Analytics","Service name","google-site-kit"),!0,!0,!0)}},{key:"render",value:function(){var e=this.state,t=e.error,a=e.receivingData,n=t||!a?"googlesitekit-nodata":"";return React.createElement(h.Fragment,null,React.createElement("div",{className:"\n\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t"},React.createElement(y.a,{timePeriod:Object(f.__)("Last 28 days","google-site-kit"),description:Object(f.__)("How people found your site.","google-site-kit"),title:Object(f.__)("All Traffic","google-site-kit")})),this.getErrorDataComponent(),React.createElement("div",{className:"\n\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t".concat(n,"\n\t\t\t\t")},React.createElement(k.a,{className:"googlesitekit-dashboard-all-traffic"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(_.default,{source:!0,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(b.default,null)))))))}}]),t}(h.Component);t.default=E},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(2),b=a(28),f=a(17),k=a(38),y=a(11),v=a(0),O=a(15),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var a=[{title:Object(v.__)("Page Title","google-site-kit"),tooltip:Object(v.__)("Page Title","google-site-kit"),primary:!0},{title:Object(v.__)("Earnings","google-site-kit"),tooltip:Object(v.__)("Earnings","google-site-kit")},{title:Object(v.__)("Page RPM","google-site-kit"),tooltip:Object(v.__)("Page RPM","google-site-kit")},{title:Object(v.__)("Impressions","google-site-kit"),tooltip:Object(v.__)("Impressions","google-site-kit")}],n=Object(y.map)(e[0].data.rows,(function(e){return[e.dimensions[0],Number(e.metrics[0].values[0]).toFixed(2),Number(e.metrics[0].values[1]).toFixed(2),Object(_.r)(e.metrics[0].values[2])]})),i=googlesitekit.modules.analytics.settings,o=i.accountID,c=i.internalWebPropertyID,s=i.profileID,r="https://analytics.google.com/analytics/web/?pli=1#/report/content-pages/a".concat(o,"w").concat(c,"p").concat(s,"/explorer-table.plotKeys=%5B%5D&_r.drilldown=analytics.pagePath:~2F"),l={hideHeader:!1,chartsEnabled:!1,links:Object(y.map)(e[0].data.rows,(function(e){var t=e.dimensions[1].replace(/\//g,"~2F");return r+t}))},d=Object(b.b)(n,a,l);return t.renderLayout(React.createElement(b.a,null,d))}}],[{key:"renderLayout",value:function(e){var t=googlesitekit.modules.adsense.accountURL;return React.createElement(f.a,{header:!0,title:Object(v.__)("Performance over previous 28 days","google-site-kit"),headerCtaLabel:Object(v.__)("Advanced Settings","google-site-kit"),headerCtaLink:t},e)}}]),t}(p.Component);t.default=Object(m.a)(R,[{type:h.b,identifier:"analytics",datapoint:"report",data:O.analyticsAdsenseReportDataDefaults,priority:1,maxAge:Object(_.p)("day"),context:"Single"}],R.renderLayout(React.createElement(k.a,{padding:!0})),{inGrid:!0,fullWidth:!0,createGrid:!0},(function(){return!1}),(function(e){return!(!e||!e.error)&&(400===e.error.code&&"INVALID_ARGUMENT"===e.error.status&&googlesitekit.modules.analytics.active?null:e.error.message?e.error.message:e.error.errors&&e.error.errors[0]&&e.error.errors[0].message?e.error.errors[0].message:Object(v.__)("Unidentified error","google-site-kit"))}))},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(19),_=a(9),b=a(2),f=a(15),k=a(23),y=a(8),v=a.n(y),O=a(0),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats,n=e.handleStatSelection;if(!t||!t.length)return null;var i=Object(f.calculateOverviewData)(t);if(!i)return null;var o=i.totalUsers,c=i.totalSessions,s=i.averageBounceRate,r=i.averageSessionDuration,l=i.totalUsersChange,d=i.totalSessionsChange,u=i.averageBounceRateChange,g=i.averageSessionDurationChange,p=[{className:"googlesitekit-data-block--users googlesitekit-data-block--button-1",title:Object(O.__)("Users","google-site-kit"),datapoint:Object(b.t)(o),change:l,changeDataUnit:"%",context:"button",selected:a.includes(0),handleStatSelection:n},{className:"googlesitekit-data-block--sessions googlesitekit-data-block--button-2",title:Object(O.__)("Sessions","google-site-kit"),datapoint:Object(b.t)(c),change:d,changeDataUnit:"%",context:"button",selected:a.includes(1),handleStatSelection:n},{className:"googlesitekit-data-block--bounce googlesitekit-data-block--button-3",title:Object(O.__)("Bounce Rate","google-site-kit"),datapoint:Number(s).toFixed(2),change:u,changeDataUnit:"%",context:"button",selected:a.includes(2),handleStatSelection:n,datapointUnit:"%",reverseArrowDirection:!0},{className:"googlesitekit-data-block--duration googlesitekit-data-block--button-4",title:Object(O.__)("Session Duration","google-site-kit"),datapoint:Object(b.s)(r),change:g,changeDataUnit:"%",context:"button",selected:a.includes(3),handleStatSelection:n}];return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner",role:"toolbar","aria-label":"Line Chart Options"},p.map((function(e,t){return React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{stat:t,className:e.className,title:e.title,datapoint:e.datapoint,change:e.change,changeDataUnit:e.changeDataUnit,context:e.context,selected:e.selected,handleStatSelection:e.handleStatSelection,datapointUnit:e.datapointUnit,reverseArrowDirection:e.reverseArrowDirection}))}))))}}]),t}(p.Component);R.propTypes={handleDataError:v.a.func.isRequired},t.default=Object(h.a)(R,[{type:_.b,identifier:"analytics",datapoint:"report",data:f.overviewReportDataDefaults,priority:1,maxAge:Object(b.p)("day"),context:["Single","Dashboard"]}],React.createElement(k.a,{width:"100%",height:"190px",padding:!0}),{createGrid:!0},f.isDataZeroForReporting,f.getAnalyticsErrorMessageFromData)},function(e,t,a){"use strict";a.r(t);var n=a(61),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(2),k=a(28),y=a(38),v=a(17),O=a(11),R=a(0),E=a(15),S=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.data,a=googlesitekit.admin.siteURL;if(!e||!e.length)return null;var n=[{title:Object(R.__)("Most popular content","google-site-kit"),primary:!0},{title:Object(R.__)("Views","google-site-kit")}],o=[],c=Object(O.map)(e[0].data.rows,(function(e,t){var n=i()(e.dimensions,2),c=n[0],s=n[1];return o[t]=a+s,[c,Object(f.r)(e.metrics[0].values[0])]})),s={hideHeader:!1,chartsEnabled:!1,links:o,showURLs:!0},r=Object(k.b)(c,n,s);return t.renderLayout(React.createElement(k.a,null,r))}}],[{key:"renderLayout",value:function(e){return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(v.a,{className:"googlesitekit-popular-content",footer:!0,footerCtaLabel:Object(R._x)("Analytics","Service name","google-site-kit"),footerCtaLink:googlesitekit.modules.analytics.homepage,fill:!0},e))}}]),t}(h.Component);t.default=Object(_.a)(S,[{type:b.b,identifier:"analytics",datapoint:"report",data:Object(E.getTopPagesReportDataDefaults)(),priority:1,maxAge:Object(f.p)("day"),context:["Single","Dashboard"]}],S.renderLayout(React.createElement(y.a,{padding:!0})),{inGrid:!0,createGrid:!0},E.isDataZeroForReporting)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(56),b=a(2),f=a(19),k=a(9),y=a(15),v=a(23),O=a(0),R=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).setOptions=a.setOptions.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"setOptions",value:function(){var e=this.props,t=e.series,a=e.vAxes,n={chart:{title:""===googlesitekit.pageTitle?"":Object(O.__)("Users Traffic Summary","google-site-kit")},curveType:"line",height:270,width:"100%",chartArea:{height:"80%",width:"87%"},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"M/d/yy",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1}}};return n.series=t,n.vAxes=a,n}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats,n=e.dateRangeFrom;if(!t||!t.length)return null;var i=n?n.match(/\d+/).map(Number)[0]:28,o=Object(y.extractAnalyticsDashboardData)(t,a,i);if(!o)return null;var c=this.setOptions();return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(_.a,{selectedStats:a,data:o,options:c}))))}}]),t}(h.Component);t.default=Object(f.a)(R,[{type:k.b,identifier:"analytics",datapoint:"report",data:y.siteAnalyticsReportDataDefaults,priority:1,maxAge:Object(b.p)("day"),context:"Single"}],React.createElement(v.a,{width:"100%",height:"270px",padding:!0}),{createGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(11),h=a(19),_=a(9),b=a(2),f=a(28),k=a(38),y=a(17),v=a(32),O=a(0),R=a(15),E=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var a=[{title:Object(O.__)("Top Earning Pages","google-site-kit"),tooltip:Object(O.__)("Top Earning Pages","google-site-kit"),primary:!0},{title:Object(O.__)("Revenue","google-site-kit"),tooltip:Object(O.__)("Revenue","google-site-kit")}],n=[],i=Object(m.map)(e[0].data.rows,(function(e,t){return n[t]=e.dimensions[1],[e.dimensions[0],Number(e.metrics[0].values[0]).toFixed(2)]})),o={hideHeader:!1,chartsEnabled:!1,cap:5,links:n},c=Object(f.b)(i,a,o);return t.renderLayout(React.createElement(f.a,null,c))}}],[{key:"renderLayout",value:function(e){return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(y.a,{className:"googlesitekit-top-earnings-pages",footer:!0,footerCtaLabel:Object(O._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"http://analytics.google.com",fill:!0},e))}}]),t}(p.Component);t.default=Object(h.a)(E,[{type:_.b,identifier:"analytics",datapoint:"report",data:R.analyticsAdsenseReportDataDefaults,priority:1,maxAge:Object(b.p)("day"),context:"Dashboard"}],E.renderLayout(React.createElement(k.a,{rows:5,padding:!0})),{inGrid:!0,createGrid:!0},(function(){return!1}),(function(e){if(e&&e.error_data){var t=Object.values(e.error_data);if(t[0]&&"badRequest"===t[0].reason)return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(y.a,{className:"googlesitekit-top-earnings-pages",fill:!0},React.createElement(v.a,{title:Object(O.__)("Restricted metric(s)","google-site-kit"),description:Object(O.__)("You need to link Analytics and AdSense to get report for your top earning pages. Learn more: https://support.google.com/adsense/answer/6084409 ","google-site-kit")})))}if(e&&e.errors){var a=Object.values(e.errors);if(a[0]&&a[0][0])return a[0][0]}return!1}))},function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(25),b=a(19),f=a(9),k=a(51),y=a(32),v=a(23),O=a(2),R=a(11),E=a(0),S=a(15);function j(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function w(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?j(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var D=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={accounts:!1,goals:!1},a}return m()(t,e),r()(t,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,t=e.overview,a=e.extractedAnalytics,n=e.goals,i=googlesitekit.permaLink,o=Object(O.n)("googlesitekit-module-analytics",{}),c="",s="",r="",l="",d="",u="";return t&&(c=t.totalUsers,s=t.totalUsersChange,r=t.goalCompletions,l=t.goalCompletionsChange,d=t.averageBounceRate,u=t.averageBounceRateChange),React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(_.a,{className:"overview-total-users",title:Object(E.__)("Unique Visitors from Search","google-site-kit"),datapoint:Object(O.t)(c),change:s,changeDataUnit:"%",source:{name:Object(E._x)("Analytics","Service name","google-site-kit"),link:o},sparkline:a&&React.createElement(k.a,{data:Object(O.f)(a,1),change:s,id:"analytics-users-sparkline"})})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},i&&React.createElement(_.a,{className:"overview-bounce-rate",title:Object(E.__)("Bounce Rate","google-site-kit"),datapoint:Number(d).toFixed(2),datapointUnit:Object(E.__)("%","google-site-kit"),change:u,changeDataUnit:"%",reverseArrowDirection:!0,source:{name:Object(E._x)("Analytics","Service name","google-site-kit"),link:o},sparkline:a&&React.createElement(k.a,{data:Object(O.f)(a,2),change:u,id:"analytics-sessions-sparkline"})}),!i&&n&&Object(R.isEmpty)(n.items)&&React.createElement(y.a,{title:Object(E.__)("Use goals to measure success.","google-site-kit"),description:Object(E.__)("Goals measure how well your site or app fulfills your target objectives.","google-site-kit"),ctaLink:"https://support.google.com/analytics/answer/1032415?hl=en#create_or_edit_goals",ctaLabel:Object(E.__)("Create a new goal","google-site-kit")}),!i&&n&&!Object(R.isEmpty)(n.items)&&React.createElement(_.a,{className:"overview-goals-completed",title:Object(E.__)("Goals Completed","google-site-kit"),datapoint:Object(O.t)(r),change:l,changeDataUnit:"%",source:{name:Object(E._x)("Analytics","Service name","google-site-kit"),link:o},sparkline:a&&React.createElement(k.a,{data:Object(O.f)(a,3),change:l,id:"analytics-sessions-sparkline"})}),!i&&!n&&React.createElement(v.a,{width:"100%",height:"202px"})))}}]),t}(h.Component);t.default=Object(b.a)(D,[{type:f.b,identifier:"analytics",datapoint:"report",data:w({},S.overviewReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(O.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.overview)return{overview:Object(S.calculateOverviewData)(a)}}},{type:f.b,identifier:"analytics",datapoint:"report",data:w({},S.siteAnalyticsReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(O.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.extractedAnalytics)return{extractedAnalytics:Object(S.extractAnalyticsDashboardSparklineData)(a)}}},{type:f.b,identifier:"analytics",datapoint:"goals",data:{url:googlesitekit.permaLink},priority:1,maxAge:Object(O.p)("hour"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.goals)return{goals:a}}}],React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(v.a,{width:"100%",height:"202px"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(v.a,{width:"100%",height:"202px"}))),{inGrid:!0},(function(e,t){return"report"===t&&Object(S.isDataZeroForReporting)(e)}),S.getAnalyticsErrorMessageFromData)},function(e,t,a){"use strict";a.r(t);var n=a(61),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(2),k=a(28),y=a(38),v=a(11),O=a(8),R=a.n(O),E=a(0),S=a(15),j=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,a=e.data,n=e.colspan;if(!a||!a.length)return null;var o=[{title:Object(E.__)("Title","google-site-kit"),tooltip:Object(E.__)("Page Title","google-site-kit"),primary:!0},{title:Object(E.__)("Pageviews","google-site-kit"),tooltip:Object(E.__)("Pageviews","google-site-kit")},{title:Object(E.__)("Unique Pageviews","google-site-kit"),tooltip:Object(E.__)("Unique Pageviews","google-site-kit")},{title:Object(E.__)("Bounce Rate","google-site-kit"),tooltip:Object(E.__)("Bounce Rate","google-site-kit")}],c=[],s=Object(v.map)(a[0].data.rows,(function(e,a){var n=Number(e.metrics[0].values[2]),o=i()(e.dimensions,2),s=o[0],r=o[1];return c[a]=t.addDeepLink(r),[s,Object(f.r)(e.metrics[0].values[0]),Object(f.r)(e.metrics[0].values[1]),React.createElement(h.Fragment,{key:"minichart-"+a},React.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(n.toFixed(2),"%")))]})),r={hideHeader:!1,chartsEnabled:!1,links:c},l=Object(k.b)(s,o,r);return React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-".concat(n)},React.createElement(k.a,null,l))}}],[{key:"addDeepLink",value:function(e){var t=googlesitekit.modules.analytics.settings,a=t.accountID,n=t.internalWebPropertyID,i=t.profileID;return a?"https://analytics.google.com/analytics/web/#/report/content-drilldown/a".concat(a,"w").concat(n,"p").concat(i,"/explorer-table.plotKeys=%5B%5D&_r.drilldown=analytics.pagePath:").concat(encodeURIComponent(e.replace(/\//g,"~2F"))):"https://analytics.google.com/analytics/web/"}}]),t}(h.Component);j.propTypes={data:R.a.array,colspan:R.a.number},j.defaultProps={data:null,colspan:12},t.default=Object(_.a)(j,[{type:b.b,identifier:"analytics",datapoint:"report",data:Object(S.getTopPagesReportDataDefaults)(),priority:1,maxAge:Object(f.p)("day"),context:["Single","Dashboard"]}],React.createElement(y.a,{padding:!0}),{createGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(13),m=a.n(p),h=a(7),_=a.n(h),b=a(1),f=a(43),k=a(0),y=a(117),v=a(120),O=a(115),R=a(76),E=a(17),S=a(47),j=a(66),w=a(72),D=a(31),C=a(55),x=a(45),N=a(75),A=a(44),P=a(2),L=a(42),M=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={selectedStats:[0],receivingData:!0,error:!1,loading:!0,isAdSenseConnected:!0},a.handleStatSelection=a.handleStatSelection.bind(m()(a)),a.buildSeries=a.buildSeries.bind(m()(a)),a.handleDataError=a.handleDataError.bind(m()(a)),a.handleDataSuccess=a.handleDataSuccess.bind(m()(a)),a}return _()(t,e),r()(t,[{key:"componentDidMount",value:function(){this.isAdSenseConnected()}},{key:"isAdSenseConnected",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(A.isAdsenseConnectedAnalytics)());case 2:e.sent?this.setState({isAdSenseConnected:!0}):this.setState({isAdSenseConnected:!1});case 4:case"end":return e.stop()}}),null,this)}},{key:"handleStatSelection",value:function(e){this.setState({selectedStats:[e]})}},{key:"handleDataError",value:function(e){this.setState({receivingData:!1,loading:!1,error:e})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"buildSeries",value:function(){var e=this.state.selectedStats,t={0:"#4285f4",1:"#27bcd4",2:"#1b9688",3:"#673ab7"};return{0:{color:t[e],targetAxisIndex:0},1:{color:t[e],targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}}},{key:"render",value:function(){var e=this.state,t=e.selectedStats,a=e.error,n=e.receivingData,i=e.loading,o=e.isAdSenseConnected,c=this.buildSeries(),s=!i&&n?"":"googlesitekit-nodata",r=Object(P.i)();return React.createElement(b.Fragment,null,React.createElement(f.a,null),React.createElement(w.a,{module:"analytics"}),React.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--analytics"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(S.a,{title:Object(k._x)("Analytics","Service name","google-site-kit"),icon:!0,iconWidth:"24",iconHeight:"26",iconID:"analytics",status:"connected",statusText:Object(k.__)("Analytics is connected","google-site-kit")}),i&&React.createElement(D.a,null)),!n&&(a?Object(x.a)(Object(k._x)("Analytics","Service name","google-site-kit"),a,!0,!0,!0):Object(C.a)(Object(k._x)("Analytics","Service name","google-site-kit"),!0,!0,!0)),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(E.a,{header:!0,title:Object(k.sprintf)(Object(k.__)("Audience overview for the last %s","google-site-kit"),r),headerCtaLabel:Object(k.__)("See full stats in Analytics","google-site-kit"),headerCtaLink:"http://analytics.google.com"},React.createElement(O.default,{selectedStats:t,handleStatSelection:this.handleStatSelection,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}),React.createElement(y.default,{selectedStats:t,series:c,vAxes:null,dateRangeFrom:r}))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(E.a,{header:!0,footer:!0,title:Object(k.sprintf)(Object(k.__)("Top content over the last %s","google-site-kit"),r),headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(k.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(k._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},React.createElement(v.default,null))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(E.a,{header:!0,footer:!0,title:Object(k.sprintf)(Object(k.__)("Top acquisition sources over the last %s","google-site-kit"),r),headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(k.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(k._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(j.default,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(R.default,null)))))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(L.a,null))))),!i&&!o&&React.createElement(N.default,null))}}]),t}(b.Component);t.default=M},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(90),h=a(25),_=a(32),b=a(19),f=a(9),k=a(2),y=a(15),v=a(0),O=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=Object(y.calculateOverviewData)(e);if(!t)return null;var a=t.totalUsers,n=t.averageSessionDuration,i=t.totalUsersChange,o=t.averageSessionDurationChange;return React.createElement(p.Fragment,null,e.length?React.createElement(p.Fragment,null,React.createElement(h.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-users",title:Object(v.__)("Total Unique Visitors","google-site-kit"),datapoint:Object(k.t)(a),change:i,changeDataUnit:"%"}),React.createElement(h.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-average-session-duration",title:Object(v.__)("Avg. Time on Page","google-site-kit"),datapoint:Object(k.s)(n),change:o,changeDataUnit:"%"})):React.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},React.createElement(_.a,{title:Object(v.__)("Analytics Gathering Data","google-site-kit"),description:Object(v.__)("Analytics data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""})))}}]),t}(p.Component);t.default=Object(b.a)(O,[{type:f.b,identifier:"analytics",datapoint:"report",data:y.overviewReportDataDefaults,priority:1,maxAge:Object(k.p)("day"),context:["WPDashboard"]}],React.createElement(m.a,{width:"23%",height:"94px",count:2}),{},y.isDataZeroForReporting,y.getAnalyticsErrorMessageFromData)},function(e,t,a){"use strict";a.r(t);var n=a(61),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(2),k=a(28),y=a(38),v=a(11),O=a(0),R=a(15),E=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.data,t=googlesitekit.admin.siteURL;if(Object(R.isDataZeroForReporting)(e))return null;var a=[],n=Object(v.map)(e[0].data.rows,(function(e,n){var o=i()(e.dimensions,2),c=o[0],s=o[1];return a[n]=t+s,[c,Object(f.r)(e.metrics[0].values[0])]})),o=[{title:Object(O.__)("Title","google-site-kit"),tooltip:Object(O.__)("Page Title","google-site-kit"),primary:!0},{title:Object(O.__)("Pageviews","google-site-kit"),tooltip:Object(O.__)("Pageviews","google-site-kit")}],c={chartsEnabled:!0,links:a,cap:5,showURLs:!0},s=Object(k.b)(n,o,c);return React.createElement("div",{className:"googlesitekit-search-console-widget"},React.createElement("h2",{className:"googlesitekit-search-console-widget__title"},Object(O.__)("Top content over the last 28 days","google-site-kit")),React.createElement(k.a,null,s))}}]),t}(h.Component);t.default=Object(_.a)(E,[{type:b.b,identifier:"analytics",datapoint:"report",data:Object(R.getTopPagesReportDataDefaults)(),priority:1,maxAge:Object(f.p)("day"),context:"WPDashboard"}],React.createElement(y.a,{rows:6}))},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=(a(1),a(32)),c=a(9),s=a(54),r=a(2),l=a(0);t.default=function(){var e=googlesitekit.modules["pagespeed-insights"],t=e.active,a=e.setupComplete;if(!googlesitekit.permissions.canManageOptions&&!a)return null;return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(o.a,{title:!a&&t?Object(l.__)("Complete PageSpeed Insights activation.","google-site-kit"):Object(l.__)("Activate PageSpeed Insights.","google-site-kit"),description:Object(l.__)("Google PageSpeed Insights gives you metrics about performance, accessibility, SEO and PWA.","google-site-kit"),ctaLink:"#",ctaLabel:!a&&t?Object(l.__)("Complete activation","google-site-kit"):Object(l.__)("Activate PageSpeed Insights","google-site-kit"),onClick:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.a.awrap(Object(r.a)(c.c,"pagespeed-insights",!0));case 3:window.location=Object(r.m)("pagespeed-insights"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),Object(r.w)(s.a,{id:"pagespeed-insights-setup-error",title:Object(l.__)("Internal Server Error","google-site-kit"),description:e.t0.message,format:"small",type:"win-error"});case 9:case"end":return e.stop()}}),null,null,[[0,6]])}}))}},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(60),b=a(31),f=a(45),k=a(0),y=a(92),v=a(64),O=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={loading:!0,error:!1},a.handleDataLoaded=a.handleDataLoaded.bind(g()(a)),a.handleDataError=a.handleDataError.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"handleDataLoaded",value:function(){this.setState({loading:!1})}},{key:"handleDataError",value:function(e){this.setState({error:e})}},{key:"render",value:function(){var e=this.state,t=e.loading,a=e.error,n={name:Object(k._x)("PageSpeed Insights","Service name","google-site-kit"),link:Object(k.sprintf)("https://developers.google.com/speed/pagespeed/insights/?url=%s",googlesitekit.permaLink||googlesitekit.admin.siteURL)};return a?React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},Object(f.a)(Object(k._x)("PageSpeed Insights","Service name","google-site-kit"),a,!0,!0,!1)):React.createElement(h.Fragment,null,t&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-pagespeed-report__loading"},React.createElement(b.a,null),React.createElement("p",null,Object(k.__)("PageSpeed Insights is preparing data…","google-site-kit")))),React.createElement(y.PageSpeedInsightsDashboardWidgetHomepageSpeedMobile,{handleDataLoaded:this.handleDataLoaded,handleDataError:this.handleDataError,title:Object(k.__)("Mobile","google-site-kit")}),React.createElement(y.PageSpeedInsightsDashboardWidgetHomepageSpeedDesktop,{title:Object(k.__)("Desktop","google-site-kit")}),!t&&React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(_.a,{name:n.name,href:n.link,external:!0})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--align-right-tablet "},React.createElement(v.PageSpeedReportScale,null))))}}]),t}(h.Component);t.default=O},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.DashboardSpeed")(h)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(126),h=a(17),_=a(41),b=a(0),f=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=googlesitekit.permaLink?Object(b.__)("How fast this page is.","google-site-kit"):Object(b.__)("How fast your home page is.","google-site-kit");return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(_.a,{title:Object(b.__)("Speed","google-site-kit"),description:e})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{className:"googlesitekit-pagespeed-report"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement(m.default,null))))))}}]),t}(p.Component);t.default=f},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(19),_=a(9),b=a(2),f=a(33),k=a(23),y=a(0),v=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||e.error)return null;var t=Object(f.extractSearchConsoleDashboardData)(e),a=t.totalClicks,n=t.totalImpressions,i=t.totalClicksChange,o=t.totalImpressionsChange;return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{className:"overview-total-clicks",title:Object(y.__)("Total Clicks","google-site-kit"),datapoint:a,change:i,changeDataUnit:"%"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{className:"overview-total-impressions",title:Object(y.__)("Total Impressions","google-site-kit"),datapoint:n,change:o,changeDataUnit:"%"})))}}]),t}(p.Component);t.default=Object(h.a)(v,[{type:_.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:googlesitekit.permaLink,dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(b.p)("day"),context:"Adminbar"}],React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(k.a,{width:"auto",height:"59px"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(k.a,{width:"auto",height:"59px"}))),{inGrid:!0},f.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(49),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(128),b=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){return"undefined"!==i()(googlesitekit.permaLink)&&""===googlesitekit.permaLink?null:React.createElement(_.default,null)}}]),t}(h.Component);t.default=b},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(41),h=a(17),_=a(0),b=a(77),f=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(m.a,{title:Object(_.__)("Top Queries","google-site-kit"),description:Object(_.__)("What people searched for to find your page.","google-site-kit")})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{footer:!0,footerCtaLabel:Object(_._x)("Search Console","Service name","google-site-kit"),footerCtaLink:Object(_.sprintf)("https://search.google.com/u/1/search-console?resource_id=%s",googlesitekit.admin.siteURL)},React.createElement(b.default,null))))}}]),t}(p.Component);t.default=f},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(63),h=a(41),_=a(17),b=a(0),f=a(78),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{description:Object(b.__)("How your site appeared in Search results and how many visitors you got from Search.","google-site-kit"),title:Object(b.__)("Search Funnel","google-site-kit")})),React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(_.a,{className:"googlesitekit-analytics-search-funnel"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement(f.default,null),!googlesitekit.modules.analytics.active&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(m.a,null)))))))}}]),t}(p.Component);t.default=k},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(19),_=a(9),b=a(23),f=a(2),k=a(33),y=a(8),v=a.n(y),O=a(0),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats,n=e.handleStatSelection;if(!t||!t.length)return null;var i=Object(k.extractSearchConsoleDashboardData)(t),o=i.totalClicks,c=i.totalImpressions,s=i.averageCTR,r=i.averagePosition,l=i.totalClicksChange,d=i.totalImpressionsChange,u=i.averageCTRChange,g=i.averagePositionChange,h=[{className:"googlesitekit-data-block--clicks googlesitekit-data-block--button-1",title:Object(O.__)("Total Clicks","google-site-kit"),datapoint:o,change:l,changeDataUnit:"%",context:"button",selected:a.includes(0),handleStatSelection:n},{className:"googlesitekit-data-block--impressions googlesitekit-data-block--button-2",title:Object(O.__)("Total Impressions","google-site-kit"),datapoint:c,change:d,changeDataUnit:"%",context:"button",selected:a.includes(1),handleStatSelection:n},{className:"googlesitekit-data-block--ctr googlesitekit-data-block--button-3",title:Object(O.__)("Average CTR","google-site-kit"),datapoint:s+"%",change:u,changeDataUnit:"%",context:"button",selected:a.includes(2),handleStatSelection:n},{className:"googlesitekit-data-block--position googlesitekit-data-block--button-4",title:Object(O.__)("Average Position","google-site-kit"),datapoint:r,change:g,changeDataUnit:"%",context:"button",selected:a.includes(3),handleStatSelection:n}];return React.createElement(p.Fragment,null,React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner",role:"toolbar","aria-label":"Line Chart Options"},h.map((function(e,t){return React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{stat:t,className:e.className,title:e.title,datapoint:e.datapoint,change:e.change,changeDataUnit:e.changeDataUnit,context:e.context,selected:e.selected,handleStatSelection:e.handleStatSelection}))})))))}}]),t}(p.Component);R.propTypes={handleDataError:v.a.func.isRequired},t.default=Object(h.a)(R,[{type:_.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(f.p)("day"),context:["Single","Dashboard"]}],React.createElement(b.a,{width:"100%",height:"190px",padding:!0}),{createGrid:!0},k.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(2),b=a(28),f=a(38),k=a(17),y=a(11),v=a(0),O=a(33),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var a=[{title:Object(v.__)("Top search queries for your site","google-site-kit"),tooltip:Object(v.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0},{title:Object(v.__)("Clicks","google-site-kit"),tooltip:Object(v.__)("Number of times users clicked on your content in search results","google-site-kit")},{title:Object(v.__)("Impressions","google-site-kit"),tooltip:Object(v.__)("Counted each time your content appears in search results","google-site-kit")}],n=googlesitekit.admin.siteURL,i=[],o=Object(y.map)(e,(function(e,t){var a=e.keys[0];return i[t]=Object(v.sprintf)("https://search.google.com/search-console/performance/search-analytics?resource_id=%s&query=!%s&num_of_days=28",n,a),[a,Object(_.r)(e.clicks),Object(_.r)(e.impressions)]})),c={hideHeader:!1,chartsEnabled:!1,links:i},s=Object(b.b)(o,a,c);return t.renderLayout(React.createElement(b.a,null,s))}}],[{key:"renderLayout",value:function(e){return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(k.a,{className:"googlesitekit-popular-content",footer:!0,footerCtaLabel:Object(v._x)("Search Console","Service name","google-site-kit"),footerCtaLink:Object(v.sprintf)("https://search.google.com/u/1/search-console?resource_id=%s",googlesitekit.admin.siteURL),fill:!0},e))}}]),t}(p.Component);t.default=Object(m.a)(R,[{type:h.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"query",limit:10},priority:1,maxAge:Object(_.p)("day"),context:["Dashboard"]}],R.renderLayout(React.createElement(f.a,{padding:!0})),{inGrid:!0,createGrid:!0},O.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.DashboardPopularity")(h)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(134),h=a(41),_=a(0),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{title:Object(_.__)("Popularity","google-site-kit"),description:Object(_.__)("Your most popular pages and how people found them from Search.","google-site-kit"),timePeriod:Object(_.__)("Last 28 days","google-site-kit")})),React.createElement(m.default,null))}}]),t}(p.Component);t.default=b},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(78),h=a(17),_=a(41),b=a(63),f=a(0),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=googlesitekit.permissions.canManageOptions,t=googlesitekit.modules.analytics.active||e?12:6;return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(_.a,{title:Object(f.__)("Search Funnel","google-site-kit"),description:Object(f.__)("How your site appeared in Search results and how many visitors you got from Search.","google-site-kit"),timePeriod:Object(f.__)("Last 28 days","google-site-kit")})),React.createElement("div",{className:"\n\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\tmdc-layout-grid__cell--span-".concat(t,"\n\t\t\t\t")},React.createElement(h.a,{className:"googlesitekit-analytics-search-funnel"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement(m.default,null),!googlesitekit.modules.analytics.active&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(b.a,null)))))))}}]),t}(p.Component);t.default=k},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(56),k=a(23),y=a(2),v=a(33),O=a(0),R=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).setOptions=a.setOptions.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"setOptions",value:function(){var e=this.props,t=e.selectedStats,a=e.series,n=e.vAxes,i={chart:{title:""===googlesitekit.pageTitle?"":Object(O.sprintf)(Object(O.__)("Search Traffic Summary for %s","google-site-kit"),Object(y.e)(googlesitekit.pageTitle))},curveType:"line",height:270,width:"100%",chartArea:{height:"80%",width:"87%"},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"M/d/yy",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1}}};return i.series=a,i.vAxes=n,3<=t.length&&(i.vAxis.textPosition="none",i.vAxis.gridlines.color="#fff",i.vAxis.minorGridlines.color="#fff",i.vAxes={},i.chartArea.width="98%"),i}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats;if(!t||!t.length)return null;var n=this.setOptions(),i=Object(v.extractSearchConsoleDashboardData)(t);return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(f.a,{selectedStats:a,data:i.dataMap,options:n,singleStat:!1}))))}}]),t}(h.Component);t.default=Object(_.a)(R,[{type:b.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(y.p)("day"),context:"Single"}],React.createElement(k.a,{width:"100%",height:"270px",padding:!0}),{createGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(19),_=a(9),b=a(0),f=a(33),k=a(51),y=a(23),v=a(2),O=a(32),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data,t=e.error;if(t)return Object(v.v)("plugin_setup","search_console_error",t.message),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(O.a,{title:Object(b.__)("Something went wrong","google-site-kit"),description:t.message,error:!0}));if(!e)return null;if(!e.length)return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(O.a,{title:Object(b.__)("Search Console Data Empty","google-site-kit"),description:Object(b.__)("Search Console data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""}));var a=Object(f.extractSearchConsoleDashboardData)(e),n=Object(v.n)("googlesitekit-module-search-console",{}),i=a.totalClicks,o=a.totalImpressions,c=a.totalClicksChange,s=a.totalImpressionsChange;return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{className:"overview-total-impressions",title:Object(b.__)("Impressions","google-site-kit"),datapoint:o,change:c,changeDataUnit:"%",source:{name:Object(b._x)("Search Console","Service name","google-site-kit"),link:n},sparkline:React.createElement(k.a,{data:Object(v.f)(a.dataMap,1),change:c,id:"search-console-impressions-sparkline"})})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{className:"overview-total-clicks",title:Object(b.__)("Clicks","google-site-kit"),datapoint:i,change:s,changeDataUnit:"%",source:{name:Object(b._x)("Search Console","Service name","google-site-kit"),link:n},sparkline:React.createElement(k.a,{data:Object(v.f)(a.dataMap,2),change:s,id:"search-console-clicks-sparkline"})})))}}]),t}(p.Component);t.default=Object(h.a)(R,[{type:_.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:googlesitekit.permaLink,dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(v.p)("day"),context:["Single","Dashboard"]}],React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(y.a,{width:"100%",height:"202px"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(y.a,{width:"100%",height:"202px"}))),{inGrid:!0},f.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(43),b=a(0),f=a(137),k=a(77),y=a(132),v=a(47),O=a(17),R=a(72),E=a(31),S=a(55),j=a(45),w=a(2),D=a(42),C=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={selectedStats:[0,1],receivingData:!0,error:!1,loading:!0},a.handleStatSelection=a.handleStatSelection.bind(g()(a)),a.buildSeries=a.buildSeries.bind(g()(a)),a.buildVAxes=a.buildVAxes.bind(g()(a)),a.handleDataError=a.handleDataError.bind(g()(a)),a.handleDataSuccess=a.handleDataSuccess.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e,loading:!1})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"handleStatSelection",value:function(e){var t=this.state.selectedStats,a=t.slice();t.includes(e)?a=t.filter((function(t){return e!==t})):a.push(e),0!==a.length&&this.setState({selectedStats:a})}},{key:"buildSeries",value:function(){var e=this.state.selectedStats,t={0:"#4285f4",1:"#27bcd4",2:"#1b9688",3:"#673ab7"};return e.map((function(e,a){return{color:t[e],targetAxisIndex:a}}))}},{key:"buildVAxes",value:function(){var e=this.state.selectedStats,t={0:"Clicks",1:"Impressions",2:"Average CTR",3:"Average Position"};return e.map((function(e){return{title:t[e]}}))}},{key:"render",value:function(){var e=this.state,t=e.selectedStats,a=e.receivingData,n=e.error,i=e.loading,o=this.buildSeries(),c=this.buildVAxes(),s=!i&&a?"":"googlesitekit-nodata",r=Object(w.i)(),l=Object(b.sprintf)("https://search.google.com/u/1/search-console?resource_id=%s",googlesitekit.admin.siteURL);return React.createElement(h.Fragment,null,React.createElement(_.a,null),React.createElement(R.a,{module:"search-console"}),React.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--search-console"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(v.a,{title:Object(b._x)("Search Console","Service name","google-site-kit"),icon:!0,iconWidth:"23",iconHeight:"21",iconID:"search-console",status:"connected",statusText:Object(b.__)("Search Console is connected","google-site-kit")}),i&&React.createElement(E.a,null)),!a&&(n?Object(j.a)(Object(b._x)("Search Console","Service name","google-site-kit"),n,!0,!0,!0):Object(S.a)(Object(b._x)("Search Console","Service name","google-site-kit"),!0,!0,!0)),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(O.a,{header:!0,title:Object(b.sprintf)(Object(b.__)("Overview for the last %s","google-site-kit"),r),headerCtaLabel:Object(b.__)("See full stats in Search Console","google-site-kit"),headerCtaLink:l},React.createElement(y.default,{selectedStats:t,handleStatSelection:this.handleStatSelection,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}),React.createElement(f.default,{selectedStats:t,series:o,vAxes:c}))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(O.a,{title:Object(b.sprintf)(Object(b.__)("Top search queries over the last %s","google-site-kit"),r),header:!0,footer:!0,headerCtaLabel:Object(b.__)("See full stats in Search Console","google-site-kit"),headerCtaLink:l,footerCtaLabel:Object(b._x)("Search Console","Service name","google-site-kit"),footerCtaLink:l},React.createElement(k.default,null))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(D.a,null))))))}}]),t}(h.Component);t.default=C},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(141),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement(m.default,null))}}]),t}(p.Component);t.default=h},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(90),h=a(25),_=a(19),b=a(9),f=a(2),k=a(33),y=a(32),v=a(0),O=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=Object(k.extractSearchConsoleDashboardData)(e),a=t.totalClicks,n=t.totalImpressions,i=t.totalClicksChange,o=t.totalImpressionsChange;return React.createElement(p.Fragment,null,e.length?React.createElement(p.Fragment,null,React.createElement(h.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-impressions",title:Object(v.__)("Total Impressions","google-site-kit"),datapoint:n,change:o,changeDataUnit:"%"}),React.createElement(h.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-clicks",title:Object(v.__)("Total Clicks","google-site-kit"),datapoint:a,change:i,changeDataUnit:"%"})):React.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},React.createElement(y.a,{title:Object(v.__)("Search Console Data Empty","google-site-kit"),description:Object(v.__)("Search Console data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""})))}}]),t}(p.Component);t.default=Object(_.a)(O,[{type:b.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(f.p)("day"),context:["WPDashboard"]}],React.createElement(m.a,{width:"23%",height:"94px",count:2}),{},k.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(0),h=googlesitekit.admin.siteURL,_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-settings-module__meta-item-type"},Object(m.__)("Connected URL","google-site-kit")),React.createElement("div",{className:"googlesitekit-settings-module__meta-item-data"},h))}}]),t}(p.Component);t.default=_},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){a(73),a(97),a(99),a(100),a(101),a(75),a(103),a(102),a(104),a(105),a(190),a(106),a(107),a(74),a(98),a(191),a(108),a(44),a(109),a(110),a(111),a(112),a(66),a(113),a(114),a(115),a(116),a(117),a(76),a(118),a(119),a(120),a(121),a(192),a(95),a(15),a(122),a(123),a(196),a(91),a(124),a(92),a(125),a(126),a(127),a(64),a(197),a(128),a(129),a(130),a(131),a(77),a(132),a(133),a(134),a(135),a(78),a(136),a(137),a(138),a(139),a(33),a(206),a(142),a(141),a(140),a(199),e.exports=a(93)},,,,function(e,t,a){"use strict";a.r(t);a(1);var n=a(24),i=a(2),o=a(105),c=a(101),s=a(74),r=a(97),l=a(106),d=a(107),u=a(10),g="adsense";if(Object(u.addFilter)("googlesitekit.ModuleSettingsWarning","googlesitekit.adsenseSettingsWarning",Object(i.g)(d.default,{})),Object(u.addFilter)("googlesitekit.SetupModuleShowLink","googlesitekit.adsenseSetupModuleShowLink",(function(e,t){return!("adsense"===t&&!googlesitekit.canAdsRun)&&e})),googlesitekit.modules.adsense.active){var p=Object(n.a)(React.createElement(o.default,null)),m=Object(n.a)(React.createElement(c.default,null));if(googlesitekit.modules[g].setupComplete)Object(u.addFilter)("googlesitekit.ModuleApp-".concat(g),"googlesitekit.ModuleApp",p),Object(u.addFilter)("googlesitekit.DashboardModule","googlesitekit.DashboardEarningModule",m,50);else{var h=googlesitekit.admin,_=h.reAuth,b=h.currentScreen,f=b?b.id:null;_||"site-kit_page_googlesitekit-module-adsense"!==f||(window.location=Object(i.n)("googlesitekit-module-".concat(g),{reAuth:!0,slug:g})),Object(u.addFilter)("googlesitekit.Connected-".concat(g),"googlesitekit.AdSenseModuleConnected",(function(e){var t=googlesitekit.modules[g].settings;return!(e||void 0===t||"account-pending-review"!==t.accountStatus&&"ads-display-pending"!==t.accountStatus)||e}))}Object(u.addFilter)("googlesitekit.ModuleSettingsDetails-".concat(g),"googlesitekit.AdSenseModuleSettingsDetails",Object(i.g)(s.default,{onSettingsPage:!0})),Object(u.addFilter)("googlesitekit.ModuleSetup-".concat(g),"googlesitekit.TagmanagerModuleSetupWizard",Object(i.g)(r.default,{onSettingsPage:!1})),Object(u.addFilter)("googlesitekit.autoRefreshModules","googlesitekit.AdSenseAutoRefresh",(function(e){return e.push({identifier:"adsense",toRefresh:function(){var e="";return googlesitekit.modules.adsense&&googlesitekit.modules.adsense["account-status"]&&(e=googlesitekit.modules.adsense["account-status"].accountStatus),!(e&&-1<e.indexOf("account-connected"))}}),e})),Object(u.addFilter)("googlesitekit.ModulesNotificationsRequest","googlesitekit.adsenseNotifications",(function(e){return e.push({identifier:"adsense"}),e})),Object(u.addFilter)("googlesitekit.ModuleSetupIncomplete","googlesitekit.adsenseSettingStatus",Object(i.g)(l.default,{}))}},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(9),b=a(108),f=a(62),k=a(0),y=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={isLoading:!0,error:!1,message:"",accounts:[],accountStatus:""},a}return m()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isOpen;e.onSettingsPage&&!t||this.getAccounts()}},{key:"getAccounts",value:function(){var e,t,a;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i.a.awrap(_.c.get(_.b,"adsense","accounts"));case 3:e=n.sent,t="",e&&e.length||(t="no-account"),a=e,this.setState({isLoading:!1,accountStatus:t,accounts:a,error:!1}),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(0),this.setState({isLoading:!1,error:n.t0.code,message:n.t0.message});case 13:case"end":return n.stop()}}),null,this,[[0,10]])}},{key:"renderErrorMessage",value:function(){var e=this.state,t=e.error,a=e.message;return t&&0<a.length?React.createElement("div",{className:"googlesitekit-error-text"},React.createElement("p",null,Object(k.__)("Error:","google-site-kit")," ",a)):null}},{key:"render",value:function(){var e=this.state,t=e.isLoading,a=e.accounts,n=e.accountStatus;return React.createElement(h.Fragment,null,React.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--adsense"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},t?React.createElement(f.a,{isSaving:t}):React.createElement(b.default,{accountStatus:n,accounts:a}),t?null:this.renderErrorMessage()))))}}]),t}(h.Component);t.default=y},function(e,t,a){"use strict";a.r(t);a(1);var n=a(2),i=a(24),o=a(121),c=a(110),s=a(113),r=a(119),l=a(122),d=a(111),u=a(123),g=a(114),p=a(116),m=a(118),h=a(95),_=a(10),b="analytics",f=Object(i.a)(React.createElement(c.default,null));if(Object(_.addFilter)("googlesitekit.AdminbarModules","googlesitekit.Analytics",f,11),!googlesitekit.modules[b].setupComplete){var k=googlesitekit.admin,y=k.reAuth,v=k.currentScreen,O=v?v.id:null;y||"site-kit_page_googlesitekit-module-analytics"!==O||(window.location=Object(n.n)("googlesitekit-module-".concat(b),{reAuth:!0,slug:b}))}if(googlesitekit.modules.analytics.active){var R=Object(i.a)(React.createElement(o.default,null)),E=Object(i.a)(React.createElement(s.default,null)),S=Object(i.a)(React.createElement(l.default,null)),j=Object(i.a)(React.createElement(u.default,null)),w=Object(i.a)(React.createElement(r.default,null)),D=Object(i.a)(React.createElement(d.default,null)),C=Object(i.a)(React.createElement(g.default,null)),x=Object(i.a)(React.createElement(p.default,null)),N=Object(i.a)(React.createElement(m.default,null));Object(_.addFilter)("googlesitekit.DashboardModule","googlesitekit.Analytics",E,9),Object(_.addFilter)("googlesitekit.DashboardSearchFunnel","googlesitekit.Analytics",w,11),Object(_.addFilter)("googlesitekit.DashboardPopularity","googlesitekit.Analytics",x,20),Object(_.addFilter)("googlesitekit.AnalyticsAdSenseTopPagesTableSmall","googlesitekit.Analytics",N,20),Object(_.addFilter)("googlesitekit.DashboardDetailsModule","googlesitekit.Analytics",D,20),Object(_.addFilter)("googlesitekit.WPDashboardHeader","googlesitekit.Analytics",S),Object(_.addFilter)("googlesitekit.WPDashboardModule","googlesitekit.Analytics",j),Object(_.addFilter)("googlesitekit.ModuleApp-"+b,"googlesitekit.Analytics",R),Object(_.addFilter)("googlesitekit.AnalyticsAdSenseTopPagesTable","googlesitekit.Analytics",C,11),Object(_.addFilter)("googlesitekit.ModuleSettingsDetails-".concat(b),"googlesitekit.AnalyticsModuleSettingsDetails",Object(n.g)(h.default,{onSettingsPage:!0})),Object(_.addFilter)("googlesitekit.showDateRangeSelector-".concat(b),"googlesitekit.analyticsShowDateRangeSelector",(function(){return!0})),Object(_.addFilter)("googlesitekit.ModuleSetup-".concat(b),"googlesitekit.AnalyticsModuleSetupWizard",Object(n.g)(h.default,{onSettingsPage:!1}))}},,,,function(e,t,a){"use strict";a.r(t);var n=a(2),i=a(91),o=a(10),c=a(0),s="optimize";googlesitekit.modules.optimize.active&&(Object(o.addFilter)("googlesitekit.ModuleSettingsDetails-".concat(s),"googlesitekit.OptimizeModuleSettingsDetails",Object(n.g)(i.default,{onSettingsPage:!0})),Object(o.addFilter)("googlesitekit.ModuleSetup-".concat(s),"googlesitekit.OptimizeModuleSetupWizard",Object(n.g)(i.default,{onSettingsPage:!1})),Object(o.addFilter)("googlesitekit.SetupWinNotification-".concat(s),"googlesitekit.OptimizeSetupWinNotification",(function(e){return e.description=Object(c.__)("To set up experiments and see the results, go to ","google-site-kit"),e.learnMore.label="Optimize",e.learnMore.url="https://optimize.withgoogle.com/",e})))},function(e,t,a){"use strict";a.r(t);a(1);var n=a(24),i=a(127),o=a(125),c=a(124),s=a(10),r=googlesitekit.modules["pagespeed-insights"],l=r.active,d=r.setupComplete;if(l&&d){var u=Object(n.a)(React.createElement(i.default,null)),g=Object(n.a)(React.createElement(o.default,null));Object(s.addFilter)("googlesitekit.DashboardModule","googlesitekit.PageSpeedInsights",u,45),Object(s.addFilter)("googlesitekit.DashboardDetailsModule","googlesitekit.PageSpeedInsights",u,45),Object(s.addFilter)("googlesitekit.DashboardSpeed","googlesitekit.PageSpeedInsightsHomepageSpeed",g)}else{var p=Object(n.a)(React.createElement(c.default,null));Object(s.addFilter)("googlesitekit.DashboardModule","googlesitekit.PageSpeedInsights",p,45)}},,function(e,t,a){"use strict";a.r(t);var n=a(2),i=a(93),o=a(10);googlesitekit.modules.tagmanager.active&&(Object(o.addFilter)("googlesitekit.ModuleSettingsDetails-".concat("tagmanager"),"googlesitekit.TagmanagerModuleSettingsDetails",Object(n.g)(i.default,{onSettingsPage:!0})),Object(o.addFilter)("googlesitekit.ModuleSetup-".concat("tagmanager"),"googlesitekit.TagmanagerModuleSetupWizard",Object(n.g)(i.default,{onSettingsPage:!1})))},,,,,,,function(e,t,a){"use strict";a.r(t);var n=a(1),i=a(139),o=a(129),c=a(140),s=a(136),r=a(138),l=a(130),d=a(133),u=a(131),g=a(135),p=a(12),m=a.n(p),h=a(3),_=a.n(h),b=a(4),f=a.n(b),k=a(5),y=a.n(k),v=a(6),O=a.n(v),R=a(13),E=a.n(R),S=a(7),j=a.n(S),w=a(11),D=a(169),C=a.n(D),x=a(9),N=a(29),A=a(17),P=a(2),L=a(0),M=function(e){function t(e){var a;return _()(this,t),(a=y()(this,O()(t).call(this,e))).state={isSearching:!1,results:[],error:!1,message:""},a.postSearch=a.postSearch.bind(E()(a)),a.onClick=a.onClick.bind(E()(a)),a.onConfirm=a.onConfirm.bind(E()(a)),a}return j()(t,e),f()(t,[{key:"postSearch",value:function(e,t){var a;return m.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t([Object(L.__)("Loading...","google-site-kit")]),n.prev=1,n.next=4,m.a.awrap(x.c.get(x.a,"search","post-search",{query:encodeURIComponent(e)}));case 4:0<(a=n.sent).length?t(Object(w.map)(a,(function(e){return e.post_title}))):t([Object(L.__)("No results found","google-site-kit")]),this.setState({isSearching:!0,results:a,error:!1,message:""}),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(1),t([Object(L.__)("No results found","google-site-kit")]),this.setState({isSearching:!1,error:n.t0.code,message:n.t0.message});case 13:case"end":return n.stop()}}),null,this,[[1,9]])}},{key:"getURLPathname",value:function(e){try{var t=new URL(e);return Object(w.trim)(t.pathname,"/")}catch(e){return!1}}},{key:"onConfirm",value:function(e){this.setState({selection:e})}},{key:"onClick",value:function(){var e=this.state,t=e.results,a=e.selection,n=Object(w.find)(t,(function(e){return e.post_title===a}));document.location=Object(P.n)("googlesitekit-dashboard",{id:n.id,permaLink:n.permalink,pageTitle:a})}},{key:"render",value:function(){var e=googlesitekit.modules,t=e.analytics&&e.analytics.active?"mdc-layout-grid__cell mdc-layout-grid__cell--span-12":"mdc-layout-grid__cell mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop";return React.createElement("div",{className:t},React.createElement(A.a,{title:Object(L.__)("Search for individual page or post information","google-site-kit"),header:!0},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement("div",{className:"googlesitekit-post-searcher"},React.createElement("label",{className:"googlesitekit-post-searcher__label",htmlFor:"autocomplete"},Object(L.__)("Title or URL","google-site-kit")),React.createElement(C.a,{id:"autocomplete",source:Object(w.debounce)(this.postSearch,200),minLength:2,onConfirm:this.onConfirm,showNoOptionsFound:!1}),React.createElement("div",{className:"googlesitekit-post-searcher__button-wrapper"},React.createElement(N.a,{onClick:this.onClick,className:"googlesitekit-post-searcher__button"},Object(L.__)("View Data","google-site-kit")))))))))}}]),t}(n.Component),I=a(142),F=a(24),T=a(10),U="search-console",z=Object(F.a)(React.createElement(i.default,null)),q=Object(F.a)(React.createElement(o.default,null)),W=Object(F.a)(React.createElement(c.default,null)),G=Object(F.a)(React.createElement(s.default,null)),H=Object(F.a)(React.createElement(r.default,null)),B=Object(F.a)(React.createElement(u.default,null)),K=Object(F.a)(React.createElement(l.default,null)),Y=Object(F.a)(React.createElement(d.default,null)),V=Object(F.a)(React.createElement(g.default,null)),Z=Object(F.a)(React.createElement(M,null));Object(T.addFilter)("googlesitekit.ModuleSettingsDetails-".concat(U),"googlesitekit.SearchConsoleModuleSettingsDetails",Object(P.g)(I.default,{onSettingsPage:!0})),Object(T.addFilter)("googlesitekit.DashboardModule","googlesitekit.SearchConsole",G,11),Object(T.addFilter)("googlesitekit.DashboardModule","googlesitekit.DashboardPopularityModule",V,40),Object(T.addFilter)("googlesitekit.DashboardSearchFunnel","googlesitekit.SearchConsoleSearchFunnel",H),Object(T.addFilter)("googlesitekit.DashboardDetailsModule","googlesitekit.SearchConsole",B),Object(T.addFilter)("googlesitekit.DashboardDetailsModule","googlesitekit.SearchConsole",K,40),Object(T.addFilter)("googlesitekit.DashboardPopularity","googlesitekit.SearchConsoleDashboardPopularity",Y),Object(T.addFilter)("googlesitekit.DashboardPopularity","googlesitekit.DashboardPPostSearcherModule",Z,30),Object(T.addFilter)("googlesitekit.WPDashboardHeader","googlesitekit.SearchConsole",W,11),Object(T.addFilter)("googlesitekit.ModuleApp-"+U,"googlesitekit.ModuleApp",z),Object(T.addFilter)("googlesitekit.showDateRangeSelector-".concat(U),"googlesitekit.searchConsoleShowDateRangeSelector",(function(){return!0})),Object(T.addFilter)("googlesitekit.AdminbarModules","googlesitekit.SearchConsole",q)}]);
|
1 |
+
!function(e){function t(t){for(var n,c,s=t[0],r=t[1],d=t[2],u=0,g=[];u<s.length;u++)c=s[u],i[c]&&g.push(i[c][0]),i[c]=0;for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);for(l&&l(t);g.length;)g.shift()();return o.push.apply(o,d||[]),a()}function a(){for(var e,t=0;t<o.length;t++){for(var a=o[t],n=!0,c=1;c<a.length;c++){var s=a[c];0!==i[s]&&(n=!1)}n&&(o.splice(t--,1),e=__webpack_require__(__webpack_require__.s=a[0]))}return e}var n={},i={3:0},o=[];function __webpack_require__(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,__webpack_require__),a.l=!0,a.exports}__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,a){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(__webpack_require__.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(a,n,function(t){return e[t]}.bind(null,n));return a},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var r=0;r<c.length;r++)t(c[r]);var l=s;o.push([187,0,1]),a()}([function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.element},,,,,,,,,function(e,t){e.exports=wp.hooks},function(e,t){e.exports=lodash},,,,,,,function(e,t){e.exports=React},function(e,t,a){"use strict";var n=a(68),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(11),b=a(55),f=a(45),k=a(90),y=a(10),v=a(0);t.a=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{inGrid:!1,fullWidth:!1,createGrid:!1},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){if(e&&e.error)return e.error.message?e.error.message:e.error.errors&&e.error.errors[0]&&e.error.errors[0].message?e.error.errors[0].message:Object(v.__)("Unidentified error","google-site-kit");if(e&&e.errors&&e.errors[0]&&e.errors[0].message)return e.errors[0].message;if(e&&e.error_data){var t=Object.values(e.error_data);if(t[0]&&"RateLimitExceeded"===t[0].reason)return Object(v.__)("Too many requests have been sent within a given time span. Please reload this page again in a few seconds","google-site-kit")}if(e&&e.errors){var a=Object.values(e.errors);if(a[0]&&a[0][0])return a[0][0]}return!1};return function(l){function u(e){var a;c()(this,u),(a=d()(this,g()(u).call(this,e))).state={data:!1,zeroData:!1,error:!1},Object(y.addAction)("googlesitekit.moduleDataReset","googlesitekit.moduleDataResetHandler",(function(){a.setState({data:!1})}));var n=function(e,t){var n=a.props,i=n.handleDataError,c=n.handleDataSuccess,r=t.datapoint,l=t.identifier,d=t.toState,u=s(e);u?(a.setState({error:u,module:l}),i&&i(u)):o(e,r,t)?(i&&i(u),a.setState({zeroData:!0})):c&&c(),a.setState({requestDataToState:d,data:e,datapoint:r,module:l})};return Object(_.each)(t,(function(e){Array.isArray(e.context)?Object(_.each)(e.context,(function(t){Object(y.addFilter)("googlesitekit.module".concat(t,"DataRequest"),"googlesitekit.data".concat(t),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})):Object(y.addFilter)("googlesitekit.module".concat(e.context,"DataRequest"),"googlesitekit.data".concat(e.context),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})),a}return m()(u,l),r()(u,[{key:"render",value:function(){var t=this.state,o=t.data,c=t.datapoint,s=t.module,r=t.zeroData,l=t.error,d=t.requestDataToState;if(!o)return a;var u=s?googlesitekit.modules[s].name:Object(v.__)("Site Kit","google-site-kit");return s&&googlesitekit.modules[s].active&&!googlesitekit.modules[s].setupComplete?Object(k.a)(s,n.inGrid,n.fullWidth,n.createGrid):l?"string"!=typeof l?l:Object(f.a)(u,l,n.inGrid,n.fullWidth,n.createGrid):r?Object(b.a)(u,n.inGrid,n.fullWidth,n.createGrid):React.createElement(e,i()({data:o,datapoint:c,requestDataToState:d},this.props))}}]),u}(h.Component)}},,,,function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(8),h=a.n(m),_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.width,a=e.height,n=e.shape,i=e.padding;return React.createElement("div",{className:"\n\t\t\t\t\tgooglesitekit-preview-block\n\t\t\t\t\t".concat(i?"googlesitekit-preview-block--padding":"","\n\t\t\t\t"),style:{width:t,height:a}},React.createElement("div",{className:"\n\t\t\t\t\tgooglesitekit-preview-block__wrapper\n\t\t\t\t\t".concat("circular"===n?"googlesitekit-preview-block__wrapper--circle":"","\n\t\t\t\t")}))}}]),t}(p.Component);_.propTypes={width:h.a.string,height:h.a.string,shape:h.a.string,padding:h.a.bool},_.defaultProps={width:"100px",height:"100px",shape:"square",padding:!1},t.a=_},,,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return v})),a.d(t,"a",(function(){return O}));var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(8),b=a.n(_),f=a(60),k=a(14),y=a(11),v=function(e,t,a){var n=[],i=a.links,o=a.source,c=a.showURLs;return a.cap&&(e=e.slice(0,a.cap)),Object(y.each)(e,(function(e,t){var a=[],o=i&&i[t];Object(y.each)(e,(function(t,n){"string"==typeof t&&(t=t.replace(/\(none\)/gi,"direct")),a.push(React.createElement("td",{key:"cell-"+n,className:"googlesitekit-table__body-item"},e[0]===t&&o?React.createElement("div",{className:"googlesitekit-table__body-item-content"},React.createElement(k.a,{className:"googlesitekit-table__body-item-link",href:o,external:!0,inherit:!0},t),c&&""!==Object(y.trim)(o,"/")&&React.createElement(k.a,{className:"googlesitekit-table__body-item-url",href:o,inherit:!0,external:!0},Object(y.trim)(o,"/"))):React.createElement("div",{className:"googlesitekit-table__body-item-content"},t)))})),n.push(React.createElement("tr",{key:"tr-"+t,className:"googlesitekit-table__body-row"},a))})),React.createElement("div",{className:"googlesitekit-table".concat(a&&a.disableListMode?"":" googlesitekit-table--with-list")},React.createElement("table",{className:"\n\t\t\t\t\tgooglesitekit-table__wrapper\n\t\t\t\t\tgooglesitekit-table__wrapper--".concat(e&&e[0]?e[0].length:1,"-col\n\t\t\t\t")},React.createElement("thead",{className:"googlesitekit-table__head"},React.createElement("tr",{key:"gksc_data_row_header-wrap",style:a&&a.hideHeader?{display:"none"}:{},className:"googlesitekit-table__head-row"},t.map((function(e,t){return React.createElement("th",{key:"gksc_data_row_header-".concat(t),className:"\n\t\t\t\t\t\t\t\t\tgooglesitekit-table__head-item\n\t\t\t\t\t\t\t\t\t".concat(e.primary?"googlesitekit-table__head-item--primary":"","\n\t\t\t\t\t\t\t\t"),"data-tooltip":e.tooltip},e.title)})))),React.createElement("tbody",{className:"googlesitekit-table__body"},n)),o&&React.createElement(f.a,{className:"googlesitekit-table__source",name:o.name,href:o.link}))},O=function(e){function t(){var e;return i()(this,t),(e=r()(this,d()(t).call(this))).state={isScrolling:!1},e.scrollRef=Object(h.createRef)(),e.updateFadeOnScroll=e.updateFadeOnScroll.bind(g()(e)),e}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this;e.updateFadeOnScroll(),this.resize=Object(y.debounce)((function(){e.updateFadeOnScroll()}),100),window.addEventListener("resize",this.resize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"updateFadeOnScroll",value:function(){var e=this.scrollRef.current,t=e.scrollLeft,a=e.scrollWidth-e.offsetWidth,n=t<a-16&&0<a-16;this.setState({isScrolling:n})}},{key:"render",value:function(){var e=this.props.children,t=this.state.isScrolling;return React.createElement("div",{onScroll:Object(y.debounce)(this.updateFadeOnScroll,100),className:"\n\t\t\t\t\tgooglesitekit-table-overflow\n\t\t\t\t\t".concat(t?"googlesitekit-table-overflow--gradient":"","\n\t\t\t\t")},React.createElement("div",{ref:this.scrollRef,className:"googlesitekit-table-overflow__container"},e))}}]),t}(h.Component);O.propTypes={children:b.a.element}},,,,,,,function(e,t){e.exports=wp.apiFetch},function(e,t){e.exports=wp.url},,function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(23),h=a(8),_=a.n(h),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){for(var e=this.props,t=e.rows,a=e.rowHeight,n=e.padding,i=[],o=0;t>o;o++)i.push(React.createElement("div",{className:"googlesitekit-preview-table__row",key:"table-row-"+o},React.createElement(m.a,{width:"100%",height:a+"px"})));return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-preview-table\n\t\t\t\t".concat(n?"googlesitekit-preview-table--padding":"","\n\t\t\t")},i)}}]),t}(p.Component);b.propTypes={rows:_.a.number,rowHeight:_.a.number,padding:_.a.bool},b.defaultProps={rows:11,rowHeight:35,padding:!1},t.a=b},,,function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(8),h=a.n(m),_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.title,a=e.description;return React.createElement("header",{className:"googlesitekit-dashboard-module-header"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-dashboard-module-header__title "},t),a&&React.createElement("p",{className:"googlesitekit-dashboard-module-header__description"},a))))}}]),t}(p.Component);_.propTypes={title:h.a.string,description:h.a.string},_.defaultProps={title:"",description:""},t.a=_},,,function(e,t,a){"use strict";a.r(t),a.d(t,"reduceAdSenseData",(function(){return d})),a.d(t,"getAdSenseAccountStatus",(function(){return u})),a.d(t,"isAdsenseConnectedAnalytics",(function(){return g})),a.d(t,"isDataZeroAdSense",(function(){return p}));var n=a(12),i=a.n(n),o=a(9),c=a(2),s=a(11),r=a(0),l=a(15);function d(e){var t=[[{type:"date",label:"Day"},{type:"number",label:"RPM"},{type:"number",label:"Earnings"},{type:"number",label:"Impressions"}]];return Object(s.each)(e,(function(e){var a=new Date(e[0]);t.push([a,e[2],e[1],e[3]])})),{dataMap:t}}var u=function(){var e,t,a,n,l,d,u,g,p,m,h,_,b,f,k,y,v,O,R,E,S,j,w,D,C,x,N,A,P,L=arguments;return i.a.async((function(M){for(;;)switch(M.prev=M.next){case 0:return e=L.length>0&&void 0!==L[0]&&L[0],t=L.length>1&&void 0!==L[1]?L[1]:function(){},n=!1,M.prev=3,t(Object(r.__)("Locating accounts…","google-site-kit")),M.next=7,i.a.awrap(o.c.get(o.b,"adsense","accounts").then((function(e){return e})).catch((function(e){return e})));case 7:if(l=M.sent,!(1<(d=!l.data||l.data.status&&200!==l.data.status?l:l.data).length)){M.next=42;break}t(Object(r.__)("Searching for domain…","google-site-kit")),u=!0,g=!1,p=void 0,M.prev=14,m=d[Symbol.iterator]();case 16:if(u=(h=m.next()).done){M.next=28;break}return _=h.value,b=_.id,M.next=21,i.a.awrap(o.c.get(o.b,"adsense","urlchannels",{clientID:b}).then((function(e){return e})).catch((function(e){return e})));case 21:f=M.sent,k=new URL(googlesitekit.admin.siteURL),(y=f&&f.length?Object(s.filter)(f,{urlPattern:k.hostname}):[])&&0!==y.length?(O=y[0].id,Object(c.v)("adsense_setup","adsense_account_detected")):(a="account-pending-review",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status account-pending-review"));case 25:u=!0,M.next=16;break;case 28:M.next=34;break;case 30:M.prev=30,M.t0=M.catch(14),g=!0,p=M.t0;case 34:M.prev=34,M.prev=35,u||null==m.return||m.return();case 37:if(M.prev=37,!g){M.next=40;break}throw p;case 40:return M.finish(37);case 41:return M.finish(34);case 42:if(v=d&&d.message&&d.message.error,O=!!(d&&d.length&&d[0])&&d[0].id,d&&O&&!v){M.next=50;break}R=(v||{}).errors,"noAdSenseAccount"!==(E=R[0].reason)&&d&&O||(a="disapprovedAccount"===E?"disapproved-account":e?"no-account-tag-found":"no-account"),M.next=118;break;case 50:return googlesitekit.modules.adsense.accountURL=Object(r.sprintf)("https://www.google.com/adsense/new/%s/home",O),t(Object(r.__)("Account found, checking account status…","google-site-kit")),M.next=54,i.a.awrap(o.c.get(o.b,"adsense","alerts",{accountID:O}).then((function(e){return e})).catch((function(e){return e})));case 54:if(S=M.sent,j=!S.data||S.data.status&&200!==S.data.status?S:S.data,w=j&&j.message&&j.message.error,!Object(s.find)(S,{type:"GRAYLISTED_PUBLISHER"})){M.next=62;break}a="ads-display-pending",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status ads-display-pending"),M.next=118;break;case 62:return M.next=64,i.a.awrap(o.c.get(o.b,"adsense","clients").then((function(e){return e})).catch((function(e){return e})));case 64:if(D=M.sent,C=!D.data||D.data.status&&200!==D.data.status?D:D.data,x=C&&C.message&&C.message.error,!(N=!(!C||!C.length)&&Object(s.find)(C,{productCode:"AFC"}))){M.next=72;break}return n=N.id,M.next=72,i.a.awrap(o.c.set(o.b,"adsense","client-id",{clientID:n}).then((function(e){return e})).catch((function(e){return e})));case 72:if(!w){M.next=77;break}"accountPendingReview"===j.message.error.errors[0].reason&&(a="ads-display-pending",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status ads-display-pending")),M.next=118;break;case 77:if(t(Object(r.__)("Looking for AdSense client…","google-site-kit")),!x){M.next=83;break}a="account-required-action",Object(c.v)("adsense_setup","adsense_required_action","accountRequiredAction status"),M.next=118;break;case 83:if(!N){M.next=117;break}return n=N.id,t(Object(r.__)("Looking for site domain…","google-site-kit")),M.next=88,i.a.awrap(o.c.get(o.b,"adsense","urlchannels",{clientID:n}).then((function(e){return e})).catch((function(e){return e})));case 88:if(A=M.sent,P=A&&A.length&&Object(s.filter)(A,(function(e){return 0<googlesitekit.admin.siteURL.indexOf(e.urlPattern)})),0!==A.length){M.next=95;break}a="ads-display-pending",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status ads-display-pending"),M.next=115;break;case 95:if(P&&0!==P.length){M.next=100;break}a="account-pending-review",Object(c.v)("adsense_setup","adsense_account_pending","accountPendingReview status account-pending-review"),M.next=115;break;case 100:if(!e||n!==e){M.next=105;break}a="account-connected",Object(c.v)("adsense_setup","adsense_account_connected","existing_matching_tag"),M.next=115;break;case 105:if(!e||n===e){M.next=110;break}a="account-connected-nonmatching",Object(c.v)("adsense_setup","adsense_account_connected","existing_non_matching_tag"),M.next=115;break;case 110:return a="account-connected",t(Object(r.__)("Connecting…","google-site-kit")),Object(c.v)("adsense_setup","adsense_account_connected"),M.next=115,i.a.awrap(o.c.set(o.b,"adsense","setup-complete",{clientID:n}).then((function(e){return e})).catch((function(e){return e})));case 115:M.next=118;break;case 117:a="disapproved-account-afc";case 118:return M.next=120,i.a.awrap(o.c.set(o.b,"adsense","account-status",{accountStatus:a}).then((function(e){return e})).catch((function(e){return e})));case 120:return M.abrupt("return",{accountStatus:a,clientID:n});case 123:return M.prev=123,M.t1=M.catch(3),M.abrupt("return",{isLoading:!1,error:M.t1.code,message:M.t1.message});case 126:case"end":return M.stop()}}),null,null,[[3,123],[14,30,34,42],[35,,37,41]])},g=function(){var e,t,a;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=googlesitekit.modules.adsense.active,t=googlesitekit.modules.analytics.active,a=!0,!e||!t){n.next=6;break}return n.next=6,i.a.awrap(o.c.get(o.b,"analytics","report",l.analyticsAdsenseReportDataDefaults).then((function(e){e&&(a=!0)})).catch((function(e){400===e.code&&"INVALID_ARGUMENT"===e.message&&(a=!1)})));case 6:return n.abrupt("return",new Promise((function(e){e(a)})));case 7:case"end":return n.stop()}}))},p=function(e,t,a){if(!a.data||!a.data.dateRange||"last-28-days"!==a.data.dateRange)return!1;var n=[];return e.totals&&(n=e.totals),0===(n=n.filter((function(e){return 0<e}))).length}},function(e,t,a){"use strict";var n=a(1),i=a(32),o=a(71),c=a(2),s=a(3),r=a.n(s),l=a(4),d=a.n(l),u=a(5),g=a.n(u),p=a(6),m=a.n(p),h=a(7),_=a.n(h),b=a(26),f=a(0),k=function(e){function t(){return r()(this,t),g()(this,m()(t).apply(this,arguments))}return _()(t,e),d()(t,[{key:"render",value:function(){return React.createElement(b.a,{id:"notification-id",title:Object(f.__)("Security Token Error","google-site-kit"),description:Object(f.__)("We’re unable to retrieve your data because your security token is expired or revoked. Please ","google-site-kit"),learnMoreURL:googlesitekit.admin.connectURL,learnMoreLabel:Object(f.__)("reauthenticate your account","google-site-kit"),format:"small",type:"win-error"})}}]),t}(n.Component);t.a=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=React.createElement(i.a,{title:Object(f.sprintf)(Object(f.__)("Data error in %s","google-site-kit"),e),description:t,error:!0});return"Invalid Credentials"===t&&Object(c.w)(k),Object(o.a)(r,a,n,s)}},,,,,function(e,t){e.exports=ReactDOM},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(56),h=a(8),_=a.n(h),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.change,n=e.id,i=e.loadSmall,o=e.loadCompressed,c=e.loadHeight,s=e.loadText;if(!t)return"loading...";var r={title:"",backgroundColor:"transparent",curveType:"line",width:"100%",height:"50",enableInteractivity:!1,chartArea:{height:"100%",width:"100%"},legend:{position:"none"},axisFontSize:0,hAxis:{baselineColor:"none",ticks:[]},vAxis:{baselineColor:"none",ticks:[]},axes:[],colors:[0<=+a?"green":"red"]};return React.createElement("div",{className:"googlesitekit-analytics-sparkline-chart-wrap"},React.createElement(m.a,{data:t,options:r,id:n,loadSmall:i,loadCompressed:o,loadHeight:c,loadText:s}))}}]),t}(p.Component);b.propTypes={loadSmall:_.a.bool,loadCompressed:_.a.bool,loadHeight:_.a.number,loadText:_.a.bool},b.defaultProps={loadSmall:!0,loadCompressed:!0,loadHeight:46,loadText:!1},t.a=b},,,,function(e,t,a){"use strict";a(1);var n=a(32),i=a(71),o=a(0);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=React.createElement(n.a
|
2 |
/* translators: %s: Module name */,{title:Object(o.sprintf)(Object(o.__)("%s Gathering Data","google-site-kit"),e)
|
3 |
+
/* translators: %s: Module name */,description:Object(o.sprintf)(Object(o.__)("%s data is not yet available, please check back later.","google-site-kit"),e)});return Object(i.a)(s,t,a,c)}},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(31),b=a(8),f=a.n(b),k=a(0),y=a(10),v=a(11),O=function(e){function t(e){var a;if(i()(this,t),(a=r()(this,d()(t).call(this,e))).state={loading:!0,chart:null},a.waitForChart=a.waitForChart.bind(g()(a)),a.getData=a.getData.bind(g()(a)),a.prepareChart=a.prepareChart.bind(g()(a)),a.drawChart=a.drawChart.bind(g()(a)),a.updateChart=a.updateChart.bind(g()(a)),a.chartRef=Object(h.createRef)(),window.google||window.googleChartLoaded)window.google&&window.google.charts?window.google.charts.setOnLoadCallback((function(){a.getData(),a.prepareChart(),a.drawChart()})):Object(y.addAction)("googlesitekit.ChartLoaderLoaded","googlesitekit.HandleChartLoaderLoaded",(function(){window.google.charts.setOnLoadCallback((function(){a.getData(),a.prepareChart(),a.drawChart()}))}));else{window.googleChartLoaded=!0;var n=document.createElement("script");n.type="text/javascript",n.onload=function(){n.onload=null,window.google.charts.load("visualization","1",{packages:["corechart"]}),window.google.charts.setOnLoadCallback((function(){a.getData(),a.prepareChart(),a.drawChart(),a.setState({loading:!1})})),Object(y.doAction)("googlesitekit.ChartLoaderLoaded")},document.getElementsByTagName("head")[0].appendChild(n),n.src="https://www.gstatic.com/charts/loader.js"}return a}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this;this.resize=Object(v.debounce)((function(){e.drawChart()}),100),window.addEventListener("resize",this.resize)}},{key:"componentDidUpdate",value:function(e){var t=this.props.selectedStats;0!==t.length&&JSON.stringify(t)!==JSON.stringify(e.selectedStats)&&this.updateChart()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"waitForChart",value:function(e){setTimeout((function(){e()}),500)}},{key:"getData",value:function(){return window.google&&window.google.visualization&&window.google.visualization.arrayToDataTable(this.props.data)}},{key:"prepareChart",value:function(){if(window.google){var e=this.chartRef.current,t="pie"===this.props.chartType?new window.google.visualization.PieChart(e):new window.google.visualization.LineChart(e);this.setState({chart:t})}else this.waitForChart(this.prepareChart)}},{key:"drawChart",value:function(){var e=this.state.chart,t=this.props,a=t.selectedStats,n=t.options,i=this.getData();null!==i&&null!==e?(e.draw(i,n),0!==a.length&&this.updateChart()):this.waitForChart(this.drawChart)}},{key:"updateChart",value:function(){var e=this.state.chart,t=this.props,a=t.selectedStats,n=t.options,i=t.singleStat,o=this.getData();if(null!==o&&null!==e){var c=new window.google.visualization.DataView(o);if(!i){var s=[0];s=s.concat(a.map((function(e){return e+1}))),c.setColumns(s)}e.draw(c,n)}else this.waitForChart(this.drawChart)}},{key:"render",value:function(){var e=this.state.loading,t=this.props,a=t.className,n=t.loadSmall,i=t.loadCompressed,o=t.loadHeight,c=t.loadText;return React.createElement("div",{className:"googlesitekit-graph-wrapper"},React.createElement("div",{ref:this.chartRef,className:"googlesitekit-line-chart"},React.createElement("div",{className:"googlesitekit-chart-loading"},e&&React.createElement("div",{className:"googlesitekit-chart-loading__wrapper"},c&&React.createElement("p",null,Object(k.__)("Loading chart...","google-site-kit")),React.createElement(_.a,{className:a,small:n,compress:i,height:o})))))}}]),t}(h.Component);O.propTypes={selectedStats:f.a.array,options:f.a.object.isRequired,id:f.a.string,singleStat:f.a.bool,className:f.a.string,loadSmall:f.a.bool,loadCompressed:f.a.bool,loadHeight:f.a.number,loadText:f.a.bool},O.defaultProps={selectedStats:[],id:"",singleStat:!0,className:"",loadSmall:!1,loadCompressed:!1,loadHeight:null,loadText:!0},t.a=O},,,function(e,t){e.exports=wp.compose},,,,,function(e,t,a){"use strict";a.r(t),a.d(t,"getScoreCategoryLabel",(function(){return o})),a.d(t,"PageSpeedReportScoreCategoryWrapper",(function(){return c})),a.d(t,"PageSpeedReportScoreGauge",(function(){return s})),a.d(t,"PageSpeedReportScale",(function(){return r}));a(1);var n=a(0);function i(e){return.9<=e?"fast":.5<=e?"average":"slow"}var o=function(e){var t=i(e);return"fast"===t?Object(n.__)("Fast","google-site-kit"):"average"===t?Object(n.__)("Average","google-site-kit"):Object(n.__)("Slow","google-site-kit")},c=function(e){var t=e.score,a=e.children,n="googlesitekit-pagespeed-report__score-category-wrapper googlesitekit-pagespeed-report__score-category-wrapper--".concat(i(t)),o="googlesitekit-pagespeed-report__score-icon googlesitekit-pagespeed-report__score-icon--".concat(i(t));return React.createElement("span",{className:n},a," ",React.createElement("span",{className:o}))},s=function(e){var t=e.score,a=parseInt(100*t,10),o="\n\t\tgooglesitekit-percentage-circle\n\t\tgooglesitekit-percentage-circle--".concat(i(t),"\n\t\tgooglesitekit-percentage-circle--percent-").concat(a,"\n\t");return React.createElement("div",{className:"googlesitekit-pagespeed-report__score-gauge"},React.createElement("div",{className:o},React.createElement("div",{className:"googlesitekit-percentage-circle__text"},a),React.createElement("div",{className:"googlesitekit-percentage-circle__slice"},React.createElement("div",{className:"googlesitekit-percentage-circle__bar"}),React.createElement("div",{className:"googlesitekit-percentage-circle__fill"}))),React.createElement("span",{className:"googlesitekit-pagespeed-report__score-gauge-label screen-reader-only"},Object(n.__)("Performance","google-site-kit")))},r=function(){return React.createElement("div",{className:"googlesitekit-pagespeed-report__scale"},React.createElement("span",null,Object(n.__)("Scale:","google-site-kit")),React.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--fast"},Object(n.__)("90-100 (fast)","google-site-kit")),React.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--average"},Object(n.__)("50-89 (average)","google-site-kit")),React.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--slow"},Object(n.__)("0-49 (slow)","google-site-kit")))}},,function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(56),b=a(2),f=a(19),k=a(9),y=a(0),v=a(8),O=a.n(v),R=a(14),E=a(23),S=a(15);function j(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var w=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.source;if(!t||t.error||!t.length)return null;var n=Object(S.extractAnalyticsDataForTrafficChart)(t);return React.createElement("div",{className:"googlesitekit-chart googlesitekit-chart--pie"},React.createElement(_.a,{data:n,options:{chartArea:{width:"100%",height:"100%"},backgroundColor:"transparent",height:250,legend:{alignment:"center",textStyle:{color:"#5b5b61",fontSize:12}},slices:{0:{color:"#178EC5"},1:{color:"#54B23B"},2:{color:"#EB5729"},3:{color:"#ECED33"},4:{color:"#34CBE3"},5:{color:"#82E88E"}},title:null,width:"100%"},chartType:"pie",id:"overview-piechart",loadHeight:205}),a&&React.createElement("div",{className:"googlesitekit-chart__source"},[Object(y.__)("Source:","google-site-kit")," ",React.createElement(R.a,{key:"link",href:Object(b.n)("googlesitekit-module-analytics"),inherit:!0},Object(y._x)("Analytics","Service name","google-site-kit"))]))}}]),t}(h.Component);w.defaultProps={source:!1},w.propTypes={source:O.a.bool},t.default=Object(f.a)(w,[{type:k.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?j(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},S.trafficSourcesReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(b.p)("day"),context:["Dashboard","Single"]}],React.createElement(E.a,{width:"282px",height:"282px",shape:"circular"}),{},S.isDataZeroForReporting,S.getAnalyticsErrorMessageFromData)},,,,,function(e,t,a){"use strict";var n=a(1),i=a(17);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return React.createElement(n.Fragment,null,t&&a&&o&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(i.a,{fill:!0},React.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},e))))),t&&!a&&o&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(i.a,{fill:!0},React.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},e))))),t&&a&&!o&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e),t&&!a&&!o&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e),!t&&!a&&o&&React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},e))),!t&&!a&&!o&&e)}},function(e,t,a){"use strict";var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(9),b=a(26),f=a(8),k=a.n(f),y=a(0),v=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={isLoading:!0,alerts:[],error:!1,message:""},a}return m()(t,e),r()(t,[{key:"componentDidMount",value:function(){this.getAlert()}},{key:"getAlert",value:function(){var e,t;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.props.module,a.next=4,i.a.awrap(_.c.getNotifications(e,3600));case 4:t=a.sent,this.setState({isLoading:!1,error:!1,alerts:t}),a.next=11;break;case 8:a.prev=8,a.t0=a.catch(0),this.setState({isLoading:!1,error:a.t0.code});case 11:case"end":return a.stop()}}),null,this,[[0,8]])}},{key:"render",value:function(){var e=this.state,t=e.alerts,a=e.error,n=e.isLoading;if(a||n||!t||!t.length)return null;var i=t.map((function(e){return React.createElement(b.a,{id:e.id,key:e.id,title:e.title,description:e.message||e.description,dismiss:Object(y.__)("Dismiss","google-site-kit"),isDismissable:e.isDismissible,format:"small",ctaLink:e.ctaURL,ctaLabel:e.ctaLabel,ctaTarget:e.ctaTarget,type:e.severity})}));return React.createElement(h.Fragment,null,i)}}]),t}(h.Component);v.propTypes={module:k.a.string.isRequired},t.a=v},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(8),h=a.n(m),_=a(14),b=a(88),f=a(31),k=a(0),y=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.ctaLink,a=e.ctaLinkText,n=e.header,i=e.incomplete,o=e.loadingMessage,c=e.subHeader,s=e.required,r=new URL(googlesitekit.admin.siteURL),l="https://www.google.com/adsense/new/sites?url=".concat(r.hostname,"&source=site-kit"),d=[{id:1,
|
4 |
/* translators: %s: Site URL */
|
5 |
+
text:Object(k.sprintf)(Object(k.__)("Added your site %s in ","google-site-kit"),r.hostname),linkText:Object(k.__)("Sites","google-site-kit"),linkURL:l},{id:2,text:Object(k.__)("Enabled ads in","google-site-kit"),linkText:Object(k.__)("Ads","google-site-kit"),linkURL:"https://www.google.com/adsense/new/myads/auto-ads"}];return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense"},s&&React.createElement(b.a,null),o&&React.createElement(p.Fragment,null,o,React.createElement(f.a,null)),n&&React.createElement("h3",{className:" googlesitekit-heading-4 googlesitekit-setup-module__title "},n),c&&React.createElement("p",null,c),i&&React.createElement("div",{className:"googlesitekit-setup-module__list-wrapper"},React.createElement("ol",{className:"googlesitekit-setup-module__list"},d.map((function(e){return React.createElement("li",{className:"googlesitekit-setup-module__list-item",key:e.id},e.text," ",React.createElement(_.a,{href:e.linkURL,external:!0,inherit:!0},e.linkText))})))),t&&a&&React.createElement("div",{className:"googlesitekit-setup-module__cta"},React.createElement(_.a,{className:"googlesitekit-setup-module__cta-link",href:t,external:!0},a)))}}]),t}(p.Component);y.propTypes={status:h.a.string,module:h.a.string},t.default=y},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(79),b=a(9),f=a(8),k=a.n(f),y=a(2),v=a(0),O=a(10),R=function(e){function t(e){var a;i()(this,t),a=r()(this,d()(t).call(this,e));var n=googlesitekit.modules.adsense.settings.useSnippet,o=void 0===n||n;return a.state={useSnippet:!!o,disabled:!1},a.handleUseSnippetSwitch=a.handleUseSnippetSwitch.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0,Object(O.addFilter)("googlekit.SettingsConfirmed","googlekit.AdSenseSettingsConfirmed",(function(t,a){return"adsense"!==a.replace("-module","")?t:e.save()})),this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(O.removeFilter)("googlekit.SettingsConfirmed","googlekit.AdSenseSettingsConfirmed")}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"save",value:function(){var e=this.state.useSnippet;this._isMounted&&this.setState({useSnippet:e});var t={useSnippet:e||!1};return googlesitekit.modules.adsense.settings&&(googlesitekit.modules.adsense.settings.useSnippet=e),b.c.set(b.b,"adsense","use-snippet",t).then((function(e){return e})).catch((function(e){return e}))}},{key:"handleUseSnippetSwitch",value:function(){var e=this.props.saveOnChange,t=this.state.useSnippet;t=!t,this._isMounted&&this.setState({useSnippet:t}),Object(y.v)("adsense_setup",t?"adsense_tag_enabled":"adsense_tag_disabled"),e&&b.c.set(b.b,"adsense","use-snippet",{useSnippet:t}).then((function(e){return e})).catch((function(e){return e}))}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){Object(y.y)("adsense",{useSnippet:"useSnippet"},this.state)}}},{key:"render",value:function(){var e=this.state.useSnippet,t=this.props,a=t.isEditing,n=t.switchLabel,i=t.switchOnMessage,o=t.switchOffMessage;return React.createElement(h.Fragment,null,a?React.createElement(h.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__switch"},React.createElement(_.a,{id:"enableAutoAds",label:n,onClick:this.handleUseSnippetSwitch,checked:e,hideLabel:!1})," ",React.createElement("span",{className:"googlesitekit-recommended"},Object(v.__)("RECOMMENDED","google-site-kit"))),e&&i&&React.createElement("div",{className:"googlesitekit-settings-notice googlesitekit-settings-notice--suggestion"},React.createElement("div",{className:"googlesitekit-settings-notice__text"},i)),!e&&o&&React.createElement("div",{className:"googlesitekit-settings-notice"},React.createElement("div",{className:"googlesitekit-settings-notice__text"},o))):React.createElement(h.Fragment,null,Object(v.__)("The AdSense code has","google-site-kit")," ",e?Object(v.__)("been placed on your site.","google-site-kit"):Object(v.__)("not been placed on your site.","google-site-kit")))}}]),t}(h.Component);R.propTypes={isEditing:k.a.bool,accountTagMatch:k.a.bool,existingTag:k.a.oneOfType([k.a.bool,k.a.string]),switchLabel:k.a.string,switchOnMessage:k.a.string,switchOffMessage:k.a.string},R.defaultProps={isEditing:!1,accountTagMatch:!1,existingTag:!1,switchLabel:Object(v.__)("Let Site Kit place code on your site","google-site-kit"),switchOnMessage:"",switchOffMessage:""},t.default=R},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(20),h=a(29),_=a(0),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=googlesitekit.modules.adsense.accountURL;return React.createElement("section",{className:"googlesitekit-module-outro"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-module-outro__logo"},React.createElement(m.a,{id:"adsense",height:"36",width:"42"}),React.createElement(m.a,{id:"plus",height:"13",width:"13"}),React.createElement(m.a,{id:"analytics",height:"36",width:"34"})),React.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-module-outro__title "},Object(_.__)("Connect Analytics with AdSense to create a powerful team that shows robust metrics for your site.","google-site-kit")),React.createElement("div",{className:"googlesitekit-module-outro__button"},React.createElement(h.a,{href:e,target:"_blank"},Object(_.__)("Connect Accounts","google-site-kit")))))))}}]),t}(p.Component);t.default=b},function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(2),k=a(28),y=a(38),v=a(95),O=a(11),R=a(0),E=a(15);function S(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var j=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=Object(f.i)().dateRangeFrom,a=[{title:Object(R.__)("Medium","google-site-kit"),tooltip:Object(R.__)("Medium refers to where your traffic originated from","google-site-kit")},{title:Object(R.__)("Users","google-site-kit"),tooltip:Object(R.__)("Number of users that originated from that traffic","google-site-kit")},{title:Object(R.__)("New Users","google-site-kit"),tooltip:Object(R.sprintf)(Object(R.__)("Number of new users to visit your page over %s","google-site-kit"),t)},{title:Object(R.__)("Sessions","google-site-kit"),tooltip:Object(R.sprintf)(Object(R.__)("Number of sessions users had on your website over %s","google-site-kit"),t)},{title:Object(R.__)("Percentage","google-site-kit"),tooltip:Object(R.__)("Percentage of sessions","google-site-kit")}],n=e[0].data.totals[0].values[0],i=Object(O.map)(e[0].data.rows,(function(e,t){var a=e.metrics[0].values[0]/n*100;return!(1>a)&&[e.dimensions[0],Object(f.r)(e.metrics[0].values[0]),Object(f.r)(e.metrics[0].values[1]),Object(f.r)(e.metrics[0].values[2]),React.createElement(h.Fragment,{key:"minichart-analytics-top-as-"+t},React.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(a.toFixed(2),"%")," ",React.createElement(v.a,{percent:a.toFixed(1),index:t})))]})),o=Object(k.b)(i,a,{hideHeader:!1,chartsEnabled:!1});return React.createElement("div",{className:"googlesitekit-details-widget"},React.createElement(k.a,null,o))}}]),t}(h.Component);t.default=Object(_.a)(j,[{type:b.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?S(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):S(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},E.trafficSourcesReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(f.p)("day"),context:["Single","Dashboard"]}],React.createElement(y.a,{rows:4,rowHeight:50}))},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(2),b=a(28),f=a(38),k=a(11),y=a(0),v=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=[{title:Object(y.__)("Keyword","google-site-kit"),tooltip:Object(y.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0},{title:Object(y.__)("Clicks","google-site-kit"),tooltip:Object(y.__)("Number of times users clicked on your content in search results","google-site-kit")},{title:Object(y.__)("Impressions","google-site-kit"),tooltip:Object(y.__)("Counted each time your content appears in search results","google-site-kit")}],a=googlesitekit.admin.siteURL,n=[],i=Object(k.map)(e,(function(e,t){var i=e.keys[0];return n[t]=Object(y.sprintf)("https://search.google.com/search-console/performance/search-analytics?resource_id=%s&query=!%s&num_of_days=28",a,i),[i,Object(_.r)(e.clicks),Object(_.r)(e.impressions)]})),o={hideHeader:!1,chartsEnabled:!1,links:n},c=Object(b.b)(i,t,o);return React.createElement(b.a,null,c)}}]),t}(p.Component);t.default=Object(m.a)(v,[{type:h.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:googlesitekit.permaLink,dimensions:"query",limit:10},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"]}],React.createElement(f.a,{padding:!0}),{createGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.DashboardSearchFunnel")(h)},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(22),h=a(8),_=a.n(h),b=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).switchRef=Object(p.createRef)(),a}return g()(t,e),c()(t,[{key:"componentDidMount",value:function(){new m.i(this.switchRef.current)}},{key:"render",value:function(){var e=this.props,t=e.id,a=e.onClick,n=e.label,i=e.checked,o=e.hideLabel;return React.createElement(p.Fragment,null,React.createElement("div",{"aria-checked":i?"true":"false",className:"mdc-switch ".concat(i?"mdc-switch--checked":""),onClick:a,onKeyPress:function(e){"function"==typeof a&&"Enter"===e.code&&a(e)},role:"switch",ref:this.switchRef,tabIndex:0},React.createElement("div",{className:"mdc-switch__track"}," "),React.createElement("div",{className:"mdc-switch__thumb-underlay"},React.createElement("div",{className:"mdc-switch__thumb"},React.createElement("input",{type:"checkbox",id:t,className:"mdc-switch__native-control",role:"switch",checked:i,onChange:function(){}})))),React.createElement("label",{className:o?"screen-reader-only":"",htmlFor:t},n))}}]),t}(p.Component);b.propTypes={id:_.a.string.isRequired,onClick:_.a.func,label:_.a.string.isRequired,checked:_.a.bool,hideLabel:_.a.bool},b.defaultProps={checked:!1,hideLabel:!0},t.a=b},,,,,,,,,,,function(e,t,a){"use strict";a(1);var n=a(32),i=a(71),o=a(2),c=a(0);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=googlesitekit.modules[e].name,l=React.createElement(n.a
|
6 |
/* translators: %s: Module name */,{title:Object(c.sprintf)(Object(c.__)("%s activation","google-site-kit"),r)
|
7 |
/* translators: %s: Module name */,description:Object(c.sprintf)(Object(c.__)("%s module needs to be configured","google-site-kit"),r),ctaLabel:Object(c.__)("Complete activation","google-site-kit"),onClick:function(){window.location=Object(o.m)(e,!0)}});return Object(i.a)(l,t,a,s)}},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(23),h=a(8),_=a.n(h),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){for(var e=this.props,t=e.width,a=e.height,n=e.shape,i=e.count,o=[],c=0;c++<i;)o.push(React.createElement(m.a,{width:t,height:a,shape:n,key:c}));return o}}]),t}(p.Component);b.propTypes={width:_.a.string,height:_.a.string,shape:_.a.string,count:_.a.number},b.defaultProps={width:"100px",height:"100px",shape:"square",count:1},t.a=b},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(13),m=a.n(p),h=a(7),_=a.n(h),b=a(1),f=a(29),k=a(14),y=a(9),v=a(22),O=a(20),R=a(8),E=a.n(R),S=a(2),j=a(0),w=a(10),D=function(e){function t(e){var a;c()(this,t),a=d()(this,g()(t).call(this,e));var n=googlesitekit.modules.optimize.settings,i=n.optimizeID,o=n.ampClientIDOptIn,s=n.ampExperimentJSON,r=(googlesitekit.modules.analytics||{}).settings,l=googlesitekit.modules.tagmanager||{},u=l.active,p=l.settings,h=!!r&&r.useSnippet,_=!(!u||!p)&&p.useSnippet;return a.state={optimizeID:i||"",analyticsUseSnippet:h,gtmUseSnippet:_,errorCode:!1,errorMsg:"",ampClientIDOptIn:o||!1,ampExperimentJSON:s||"",ampExperimentJSONValidated:!0,OptimizeIDValidated:!0},a.handleOptimizeIDEntry=a.handleOptimizeIDEntry.bind(m()(a)),a.handleSubmit=a.handleSubmit.bind(m()(a)),a.renderInstructionInfo=a.renderInstructionInfo.bind(m()(a)),a.handleAMPOptimizeEntry=a.handleAMPOptimizeEntry.bind(m()(a)),a}return _()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0,Object(w.addFilter)("googlekit.SettingsConfirmed","googlekit.OptimizeSettingsConfirmed",(function(t,a){return"optimize"!==a.replace("-module","")?t:e.props.isEditing?e.handleSubmit():void 0})),this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(w.removeFilter)("googlekit.SettingsConfirmed","googlekit.OptimizeSettingsConfirmed")}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){Object(S.y)("optimize",{optimizeID:"optimizeID",ampExperimentJSON:"ampExperimentJSON"},this.state)}}},{key:"handleSubmit",value:function(){var e,t,a,n,o,c,s=this;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=this.state,t=e.optimizeID,a=e.ampExperimentJSON,n=e.OptimizeIDValidated,o=this.props.finishSetup,n&&0!==t.length){r.next=4;break}return r.abrupt("return",!1);case 4:return c={optimizeID:t,ampExperimentJSON:a},r.next=7,i.a.awrap(y.c.set(y.b,"optimize","settings",c).then((function(){o&&o(),googlesitekit.modules.optimize.settings.optimizeID=t,s._isMounted&&s.setState({isSaving:!1})})).catch((function(e){s._isMounted&&s.setState({errorCode:!0,errorMsg:e.errorMsg})})));case 7:return r.abrupt("return",r.sent);case 8:case"end":return r.stop()}}),null,this)}},{key:"handleOptimizeIDEntry",value:function(e){var t=Object(S.A)(e.target.value);this._isMounted&&this.setState({optimizeID:e.target.value,OptimizeIDValidated:t})}},{key:"handleAMPOptimizeEntry",value:function(e){var t=Object(S.z)(e.target.value);this._isMounted&&this.setState({ampExperimentJSON:e.target.value,ampExperimentJSONValidated:t})}},{key:"renderInfo",value:function(){var e=this.state.optimizeID;return React.createElement(b.Fragment,null,e?React.createElement("div",null,Object(j.__)("Your Optimize Container ID","google-site-kit"),": ",React.createElement("strong",null,e)):React.createElement("div",null,Object(j.__)('Optimize Container ID missing, press "edit" to add',"google-site-kit"),"."))}},{key:"renderInstructionInfo",value:function(){var e=this.state,t=e.analyticsUseSnippet,a=e.gtmUseSnippet,n=e.optimizeID;return!t&&a?React.createElement(b.Fragment,null,React.createElement("p",null,Object(j.__)("You are using auto insert snippet with Tag Manager","google-site-kit")),React.createElement("p",null,React.createElement("a",{href:"https://support.google.com/optimize/answer/6314801"},Object(j.__)("Click here","google-site-kit"))," ",Object(j.__)("for how to implement Optimize tag through your Tag Manager","google-site-kit"))):t?null:React.createElement(b.Fragment,null,React.createElement("p",null,Object(j.__)("You disabled analytics auto insert snippet. If You are using Google Analytics code snippet, add the code below:","google-site-kit")),React.createElement("pre",null,'ga("require", "',n||"GTM-XXXXXXX",'");'),React.createElement("p",null,React.createElement("a",{href:"https://support.google.com/optimize/answer/6262084"},Object(j.__)("Click here","google-site-kit"))," ",Object(j.__)("for how to implement Optimize tag in Google Analytics Code Snippet","google-site-kit")))}},{key:"renderAMPSnippet",value:function(){var e=this.state,t=e.analyticsUseSnippet,a=e.ampClientIDOptIn,n=e.ampExperimentJSON,i=e.ampExperimentJSONValidated,o=window.googlesitekit.admin.ampEnabled;return t&&o?React.createElement(b.Fragment,null,a&&React.createElement(b.Fragment,null,React.createElement("p",null,Object(j.__)("Please input your AMP experiment settings in JSON format below.","google-site-kit")," ",React.createElement(k.a,{href:"https://developers.google.com/optimize/devguides/amp-experiments",external:!0,inherit:!0},Object(j.__)("Learn More.","google-site-kit"))),React.createElement(v.l,{className:"\n\t\t\t\t\t\t\t\tmdc-text-field\n\t\t\t\t\t\t\t\t".concat(i?"":"mdc-text-field--error","\n\t\t\t\t\t\t\t"),name:"amp-experiment",onChange:this.handleAMPOptimizeEntry,textarea:!0},React.createElement(v.b,{inputType:"textarea",value:null===n?"":n})),!i&&React.createElement("p",{className:"googlesitekit-error-text"},Object(j.__)("Error: AMP experiment settings are not in a valid JSON format.","google-site-kit")))):null}},{key:"renderForm",value:function(){var e=this.state,t=e.optimizeID,a=e.errorCode,n=e.errorMsg,i=e.OptimizeIDValidated;return React.createElement(b.Fragment,null,React.createElement("p",null,Object(j.__)("Please copy and paste your Optimize ID to complete your setup.","google-site-kit")," ",React.createElement(k.a,{href:"https://support.google.com/optimize/answer/6211921",external:!0,inherit:!0},Object(j.__)("You can locate this here.","google-site-kit"))),a&&0<n.length&&React.createElement("p",{className:"googlesitekit-error-text"},Object(j.__)("Error:","google-site-kit")," ",n),React.createElement("div",{className:"googlesitekit-setup-module__inputs"},React.createElement(v.l,{className:"\n\t\t\t\t\t\t\tmdc-text-field\n\t\t\t\t\t\t\t".concat(a?"mdc-text-field--error":"","\n\t\t\t\t\t\t\t").concat(i?"":"mdc-text-field--error","\n\t\t\t\t\t\t"),label:Object(j.__)("Optimize Container ID","google-site-kit"),name:"optimizeID",onChange:this.handleOptimizeIDEntry,helperText:React.createElement(v.a,null,Object(j.__)("Format: GTM-XXXXXXX.","google-site-kit")),outlined:!0,required:!0},React.createElement(v.b,{value:t}))),!i&&React.createElement("p",{className:"googlesitekit-error-text"},Object(j.__)("Error: Not a valid Optimize ID.","google-site-kit")),this.renderAMPSnippet(),this.renderInstructionInfo())}},{key:"render",value:function(){var e=this.props,t=e.onSettingsPage,a=e.isEditing;return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--optimize"},!t&&React.createElement(b.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__logo"},React.createElement(O.a,{id:"optimize",width:"33",height:"33"})),React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(j._x)("Optimize","Service name","google-site-kit"))),a&&this.renderForm(),!a&&this.renderInfo(),!t&&React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(f.a,{onClick:this.handleSubmit},Object(j.__)("Configure Optimize","google-site-kit"))))}}]),t}(b.Component);D.propTypes={onSettingsPage:E.a.bool,finishSetup:E.a.func,isEditing:E.a.bool},D.defaultProps={onSettingsPage:!0,isEditing:!1},t.default=D},function(e,t,a){"use strict";a.r(t),a.d(t,"PageSpeedInsightsDashboardWidgetHomepageSpeedMobile",(function(){return O})),a.d(t,"PageSpeedInsightsDashboardWidgetHomepageSpeedDesktop",(function(){return R}));var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(45),_=a(9),b=a(2),f=a(28),k=a(0),y=a(64),v=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.data,a=e.handleDataLoaded;t&&a&&a()}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.title;if(!t||t.error)return null;if(function(e){return 0===e.categories.performance.score}(t))return Object(h.a)(Object(k._x)("PageSpeed Insights","Service name","google-site-kit"),Object(k.__)("An unknown error occurred while trying to fetch PageSpeed Insights data. Please try again later.","google-site-kit"),!0);var n=t.categories.performance.score,i=Object(y.getScoreCategoryLabel)(n),o=t.audits.interactive.displayValue,c=Object(f.b)([[Object(k.__)("Real user speed data","google-site-kit"),React.createElement(y.PageSpeedReportScoreCategoryWrapper,{key:"0",score:n},i)],[Object(k.__)("Time to become fully interactive","google-site-kit"),React.createElement(y.PageSpeedReportScoreCategoryWrapper,{key:"0",score:n},o)]],[],{hideHeader:!0,disableListMode:!0,chartsEnabled:!1,links:[]});return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement("div",{className:"googlesitekit-pagespeed-report__heading-wrapper"},React.createElement("h3",{className:" googlesitekit-subheading-1 "},a),React.createElement(y.PageSpeedReportScoreGauge,{score:n})),React.createElement(f.a,null,c))}}]),t}(p.Component),O=Object(m.a)(v,[{type:_.b,identifier:"pagespeed-insights",datapoint:"pagespeed",data:{url:googlesitekit.permaLink,strategy:"mobile"},priority:10,maxAge:Object(b.p)("day"),context:["Single","Dashboard"]}],null,{inGrid:!0}),R=Object(m.a)(v,[{type:_.b,identifier:"pagespeed-insights",datapoint:"pagespeed",data:{url:googlesitekit.permaLink,strategy:"desktop"},priority:10,maxAge:Object(b.p)("day"),context:["Single","Dashboard"]}],null,{inGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(12),c=a.n(o),s=a(3),r=a.n(s),l=a(4),d=a.n(l),u=a(5),g=a.n(u),p=a(6),m=a.n(p),h=a(13),_=a.n(h),b=a(7),f=a.n(b),k=a(1),y=a(29),v=a(14),O=a(9),R=a(31),E=a(22),S=a(20),j=a(8),w=a.n(j),D=a(2),C=a(11),x=a(0),N=a(10),A=function(e){function t(e){var a;r()(this,t),a=g()(this,m()(t).call(this,e));var n=googlesitekit.modules.tagmanager.settings,i="primary"===googlesitekit.admin.ampMode?"amp":"web",o="amp"===i?"ampContainerID":"containerID";return a.state={isLoading:!0,accounts:[],containers:[],errorCode:!1,errorMsg:"",refetch:!1,selectedAccount:n.accountID,selectedContainer:n[o],containersLoading:!1,usageContext:i,containerKey:o},a.handleSubmit=a.handleSubmit.bind(_()(a)),a.renderAccountDropdownForm=a.renderAccountDropdownForm.bind(_()(a)),a.handleAccountChange=a.handleAccountChange.bind(_()(a)),a.handleContainerChange=a.handleContainerChange.bind(_()(a)),a.refetchAccount=a.refetchAccount.bind(_()(a)),a}return f()(t,e),d()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,a=t.isOpen,n=t.onSettingsPage;this._isMounted=!0,n&&!a||(this.requestTagManagerAccounts(),Object(N.addFilter)("googlekit.SettingsConfirmed","googlekit.TagmanagerSettingsConfirmed",(function(t,a){return"tagmanager"!==a.replace("-module","")?t:e.props.isEditing?e.handleSubmit():void 0})),this.toggleConfirmChangesButton())}},{key:"componentDidUpdate",value:function(){this.state.refetch&&this.requestTagManagerAccounts(),this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(N.removeFilter)("googlekit.SettingsConfirmed","googlekit.TagmanagerSettingsConfirmed")}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){var e={selectedContainer:this.state.containerKey,selectedAccount:"selectedAccount"};Object(D.y)("tagmanager",e,this.state)}}},{key:"requestTagManagerAccounts",value:function(){var e,t,a,n,i,o,s,r,l,d;return c.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,e=this.state,t=e.selectedAccount,a=e.usageContext,n=this.state.selectedContainer,i={accountID:t,usageContext:a},o=!1,s="",u.next=8,c.a.awrap(O.c.get(O.b,"tagmanager","accounts-containers",i));case 8:r=u.sent,l=r.accounts,d=r.containers,t||0!==l.length||(o="accountEmpty",s=Object(x.__)("We didn’t find an associated Google Tag Manager account, would you like to set it up now? If you’ve just set up an account please re-fetch your account to sync it with Site Kit.","google-site-kit")),t&&!l.find((function(e){return e.accountId===t}))&&(O.c.invalidateCacheGroup(O.b,"tagmanager","accounts-containers"),o="insufficientPermissions",s=Object(x.__)("You currently don't have access to this Google Tag Manager account. You can either request access from your team, or remove this Google Tag Manager snippet and connect to a different account.","google-site-kit")),n&&!d.find((function(e){return e.publicId===n}))&&(n=null),this._isMounted&&this.setState({isLoading:!1,accounts:l,selectedAccount:t||Object(C.get)(d,[0,"accountId"]),containers:d,selectedContainer:n||Object(C.get)(d,[0,"publicId"]),refetch:!1,errorCode:o,errorMsg:s}),u.next=20;break;case 17:u.prev=17,u.t0=u.catch(0),this._isMounted&&this.setState({isLoading:!1,errorCode:u.t0.code,errorMsg:u.t0.message,refetch:!1});case 20:case"end":return u.stop()}}),null,this,[[0,17]])}},{key:"requestTagManagerContainers",value:function(e){var t,a;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,t={accountID:e,usageContext:this.state.usageContext},n.next=4,c.a.awrap(O.c.get(O.b,"tagmanager","containers",t));case 4:a=n.sent,this._isMounted&&this.setState({containersLoading:!1,containers:a,selectedContainer:Object(C.get)(a,[0,"publicId"]),errorCode:!1}),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),this._isMounted&&this.setState({errorCode:n.t0.code,errorMsg:n.t0.message});case 11:case"end":return n.stop()}}),null,this,[[0,8]])}},{key:"handleSubmit",value:function(){var e,t,a,n,o,s,r,l,d;return c.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return e=this.state,t=e.selectedAccount,a=e.selectedContainer,n=e.usageContext,o=e.containerKey,s=this.props.finishSetup,u.prev=2,r={accountID:t},i()(r,o,a),i()(r,"usageContext",n),l=r,u.next=6,c.a.awrap(O.c.set(O.b,"tagmanager","settings",l));case 6:d=u.sent,s&&s(),googlesitekit.modules.tagmanager.settings=d,this._isMounted&&this.setState({isSaving:!1}),u.next=16;break;case 12:return u.prev=12,u.t0=u.catch(2),this._isMounted&&this.setState({isLoading:!1,errorCode:u.t0.code,errorMsg:u.t0.message}),u.abrupt("return",new Promise((function(e,t){t(u.t0)})));case 16:case"end":return u.stop()}}),null,this,[[2,12]])}},{key:"handleAccountChange",value:function(e,t){var a=this.state.selectedAccount,n=t.getAttribute("data-value");n!==a&&(this._isMounted&&this.setState({containersLoading:!0,selectedAccount:n}),this.requestTagManagerContainers(n))}},{key:"handleContainerChange",value:function(e,t){var a=this.state.selectedContainer,n=t.getAttribute("data-value");n!==a&&this._isMounted&&this.setState({selectedContainer:n})}},{key:"refetchAccount",value:function(e){e.preventDefault(),this._isMounted&&this.setState({isLoading:!0,refetch:!0,errorCode:!1})}},{key:"renderSettingsInfo",value:function(){var e=this.state,t=e.isLoading,a=e.selectedAccount,n=e.selectedContainer;return t?React.createElement(R.a,null):React.createElement(k.Fragment,null,React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(x.__)("Account","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},a||!1)),React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(x.__)("Container ID","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},n||!1))))}},{key:"renderAccountDropdownForm",value:function(){var e=this.state,a=e.accounts,n=e.selectedAccount,i=e.containers,o=e.selectedContainer,c=e.isLoading,s=e.containersLoading,r=this.props.onSettingsPage;return c?React.createElement(R.a,null):0>=a.length?React.createElement(k.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(y.a,{onClick:t.createNewAccount},Object(x.__)("Create an account","google-site-kit")),React.createElement("div",{className:"googlesitekit-setup-module__sub-action"},React.createElement(v.a,{onClick:this.refetchAccount},Object(x.__)("Re-fetch My Account","google-site-kit"))))):React.createElement(k.Fragment,null,React.createElement("p",null,Object(x.__)("Please select your Tag Manager account and container below, the snippet will be inserted automatically into your site.","google-site-kit")),React.createElement("div",{className:"googlesitekit-setup-module__inputs"},React.createElement(E.k,{enhanced:!0,name:"accounts",label:Object(x.__)("Account","google-site-kit"),value:n,onEnhancedChange:this.handleAccountChange,outlined:!0},a.map((function(e){return React.createElement(E.j,{key:e.accountId,value:e.accountId},e.name)}))),s?React.createElement(R.a,{small:!0}):React.createElement(E.k,{enhanced:!0,name:"containers",label:Object(x.__)("Container","google-site-kit"),value:o,onEnhancedChange:this.handleContainerChange,outlined:!0},i.concat({name:Object(x.__)("Set up a new container","google-site-kit"),publicId:0}).map((function(e,t){var a=e.name,n=e.publicId;return React.createElement(E.j,{key:t,value:n},a)})))),!r&&React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(y.a,{onClick:this.handleSubmit},Object(x.__)("Confirm & Continue","google-site-kit"))))}},{key:"renderErrorOrNotice",value:function(){var e=this.state,t=e.errorCode,a=e.errorMsg,n=this.props.onSettingsPage;if(0===a.length)return null;var i=!n||"insufficientPermissions"!==t;return React.createElement("div",{className:i?"googlesitekit-error-text":""},React.createElement("p",null,i?
|
8 |
/* translators: %s: Error message */
|
9 |
+
Object(x.sprintf)(Object(x.__)("Error: %s","google-site-kit"),a):a))}},{key:"render",value:function(){var e=this.props,t=e.onSettingsPage,a=e.isEditing;return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--tag-manager"},!t&&React.createElement(k.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__logo"},React.createElement(S.a,{id:"tagmanager",width:"33",height:"33"})),React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(x._x)("Tag Manager","Service name","google-site-kit"))),this.renderErrorOrNotice(),a&&this.renderAccountDropdownForm(),!a&&this.renderSettingsInfo())}}],[{key:"createNewAccount",value:function(e){e.preventDefault(),window.open("https://marketingplatform.google.com/about/tag-manager/","_blank")}}]),t}(k.Component);A.propTypes={onSettingsPage:w.a.bool,finishSetup:w.a.func,isEditing:w.a.bool},A.defaultProps={onSettingsPage:!0,isEditing:!1},t.default=A},function(e,t,a){"use strict";var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(56),h=["#178EC5","#54B23B","#EB5729","#ECED33","#34CBE3","#82E88E"],_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.index,a=e.percent,n={backgroundColor:"transparent",chartArea:{width:"100%",height:"100%"},enableInteractivity:!1,height:28,legend:{position:"none"},slices:{0:{color:h[t]},1:{color:"#e6e6e6"}},title:null,tooltip:{trigger:"none"},width:28},i=[["source","percent"],["",+a],["",100-a]];return React.createElement("div",{className:"googlesitekit-mini-chart"},React.createElement(m.a,{data:i,options:n,chartType:"pie",loadSmall:!0,loadCompressed:!0,loadHeight:24,loadText:!1,id:"minichart"+t}))}}]),t}(p.Component);t.a=_},function(e,t,a){"use strict";a.r(t);var n=a(169),i=a.n(n),o=a(12),c=a.n(o),s=a(3),r=a.n(s),l=a(4),d=a.n(l),u=a(5),g=a.n(u),p=a(6),m=a.n(p),h=a(13),_=a.n(h),b=a(7),f=a.n(b),k=a(27),y=a.n(k),v=a(1),O=a(9),R=a(8),E=a.n(R),S=a(29),j=a(31),w=a(14),D=a(22),C=function(e){function t(e){var a;return r()(this,t),(a=g()(this,m()(t).call(this,e))).formFieldRef=Object(v.createRef)(),a.radioRef=Object(v.createRef)(),a}return f()(t,e),d()(t,[{key:"componentDidMount",value:function(){new D.e(this.formFieldRef.current).input=new D.g(this.radioRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onClick,a=e.id,n=e.name,i=e.value,o=e.checked,c=e.disabled,s=e.children;return React.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},React.createElement("div",{className:"\n\t\t\t\t\t\tmdc-radio\n\t\t\t\t\t\t".concat(c?"mdc-radio--disabled":"","\n\t\t\t\t\t"),ref:this.radioRef},React.createElement("input",{className:"mdc-radio__native-control",onClick:t,type:"radio",id:a,name:n,value:i,checked:o,disabled:c,onChange:function(){}}),React.createElement("div",{className:"mdc-radio__background"},React.createElement("div",{className:"mdc-radio__outer-circle"}),React.createElement("div",{className:"mdc-radio__inner-circle"}))),React.createElement("label",{htmlFor:a},s))}}]),t}(v.Component);C.propTypes={onClick:E.a.func,id:E.a.string.isRequired,name:E.a.string.isRequired,value:E.a.string.isRequired,checked:E.a.bool,disabled:E.a.bool,children:E.a.string.isRequired},C.defaultProps={onClick:null,checked:!1,disabled:!1};var x=C,N=a(79),A=a(20),P=a(2),L=a(0),M=a(10);function I(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function T(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?I(a,!0).forEach((function(t){y()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):I(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var F=y()({},"loggedinUsers",Object(L.__)("Logged-in users","google-site-kit")),U=function(e){function t(e){var a;r()(this,t),a=g()(this,m()(t).call(this,e));var n=googlesitekit.modules.analytics.settings,i=n.accountID,o=n.internalWebPropertyID,c=n.profileID,s=n.propertyID,l=n.useSnippet,d=n.ampClientIDOptIn,u=n.trackingDisabled;return a.state={isLoading:!0,isSaving:!1,propertiesLoading:!1,profilesLoading:!1,useSnippet:l||!1,errorCode:!1,errorMsg:"",errorReason:!1,accounts:[],properties:[],profiles:[],selectedAccount:i,selectedProperty:s,selectedProfile:c,selectedinternalWebProperty:o,ampClientIDOptIn:d,existingTag:!1,trackingDisabled:u||[]},a.handleAccountChange=a.handleAccountChange.bind(_()(a)),a.handlePropertyChange=a.handlePropertyChange.bind(_()(a)),a.handleProfileChange=a.handleProfileChange.bind(_()(a)),a.processAccountChange=a.processAccountChange.bind(_()(a)),a.processPropertyChange=a.processPropertyChange.bind(_()(a)),a.handleSubmit=a.handleSubmit.bind(_()(a)),a.handleRadioClick=a.handleRadioClick.bind(_()(a)),a.handleAMPClientIDSwitch=a.handleAMPClientIDSwitch.bind(_()(a)),a.handleRefetchAccount=a.handleRefetchAccount.bind(_()(a)),a.handleExclusionsChange=a.handleExclusionsChange.bind(_()(a)),a}return f()(t,e),d()(t,[{key:"componentDidMount",value:function(){var e,t,a,n,i,o=this;return c.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(e=this.props,t=e.isOpen,a=e.onSettingsPage,this._isMounted=!0,!a||t){s.next=4;break}return s.abrupt("return");case 4:return s.next=6,c.a.awrap(Object(P.k)("analytics"));case 6:if(!(n=s.sent)||!n.length){s.next=21;break}return s.prev=8,s.next=11,c.a.awrap(O.c.get(O.b,"analytics","tag-permission",{tag:n}));case 11:return i=s.sent,s.next=14,c.a.awrap(this.getAccounts(i));case 14:s.next=19;break;case 16:s.prev=16,s.t0=s.catch(8),this.setState({isLoading:!1,errorCode:s.t0.code,errorMsg:s.t0.message,errorReason:!(!s.t0.data||!s.t0.data.reason)&&s.t0.data.reason});case 19:s.next=23;break;case 21:return s.next=23,c.a.awrap(this.getAccounts());case 23:Object(M.addFilter)("googlekit.SettingsConfirmed","googlekit.AnalyticsSettingsConfirmed",(function(e,t){return"analytics"!==t.replace("-module","")?e:o.props.isEditing?o.handleSubmit():void 0}));case 24:case"end":return s.stop()}}),null,this,[[8,16]])}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(M.removeFilter)("googlekit.SettingsConfirmed","googlekit.AnalyticsSettingsConfirmed")}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){Object(P.y)("analytics",{selectedAccount:"accountID",selectedProperty:"propertyID",selectedProfile:"profileID",selectedinternalWebProperty:"internalWebPropertyID",useSnippet:"useSnippet",ampClientIDOptIn:"ampClientIDOptIn",trackingDisabled:"trackingDisabled"},this.state)}}},{key:"handleAccountChange",value:function(e,t){var a=this.state.selectedAccount,n=t.getAttribute("data-value");n!==a&&("0"!==n?(this.setState({propertiesLoading:!0,profilesLoading:!0,selectedAccount:n}),Object(P.v)("analytics_setup","account_change",n),this.processAccountChange(n)):this.setState({selectedAccount:n,selectedProperty:"-1",selectedProfile:"-1",properties:[{id:"-1",name:Object(L.__)("Select an account","google-site-kit")}],profiles:[{id:"-1",name:Object(L.__)("Select an account","google-site-kit")}]}))}},{key:"handlePropertyChange",value:function(e,t){var a=this.state.selectedProperty,n=t.getAttribute("data-value");n!==a&&("0"!==n?(this.setState({profilesLoading:!0,selectedProperty:n}),Object(P.v)("analytics_setup","property_change",n),this.processPropertyChange(n)):this.setState({selectedProperty:n,selectedProfile:n,profiles:[{id:0,name:Object(L.__)("Setup a New Profile","google-site-kit")}]}))}},{key:"handleProfileChange",value:function(e,t){var a=t.getAttribute("data-value");this.setState({selectedProfile:a}),Object(P.v)("analytics_setup","profile_change",a)}},{key:"getAccounts",value:function(){var e,t,a,n,i,o,s,r,l,d,u,g,p,m,h,_,b=this,f=arguments;return c.a.async((function(k){for(;;)switch(k.prev=k.next){case 0:return e=f.length>0&&void 0!==f[0]&&f[0],t=this.state,a=t.selectedAccount,n=t.selectedProperty,i=t.selectedProfile,o=t.useSnippet,s=this.props,r=s.isEditing,l=s.onSettingsPage,d=this.state.errorCode,u={},k.prev=5,g=e?{existingAccountID:e.accountId,existingPropertyID:e.propertyId}:{},k.next=9,c.a.awrap(O.c.get(O.b,"analytics","accounts-properties-profiles",g));case 9:0===(p=k.sent).accounts.length?(u=T({},u,{errorCode:"no_account",errorReason:"noAccount"}),O.c.invalidateCacheGroup(O.b,"analytics","accounts-properties-profiles")):a?a&&!p.accounts.find((function(e){return e.id===a}))&&(O.c.invalidateCacheGroup(O.b,"analytics","accounts-properties-profiles"),p.accounts.unshift({id:0,name:Object(L.__)("Select one...","google-site-kit")}),r&&(a="0",n="-1",i="-1"),u=T({},u,{errorCode:"insufficient_permissions",errorReason:"insufficientPermissions"})):(m=null,p.matchedProperty&&(m=p.matchedProperty),m?(a=m.accountId,n=m.id,(h=p.profiles.find((function(e){return e.accountId===a})))&&(i=h.id)):p.accounts.unshift({id:0,name:Object(L.__)("Select one...","google-site-kit")})),_={id:"-1",name:Object(L.__)("Select an account","google-site-kit")},this.state.existingTag||p.properties.push({id:0,name:Object(L.__)("Setup a New Property","google-site-kit")}),p.profiles.push({id:0,name:Object(L.__)("Setup a New Profile","google-site-kit")}),l||(o=!e),u=T({},u,{isLoading:!1,accounts:p.accounts,errorCode:d||u.errorCode,selectedAccount:a,selectedProperty:n,selectedProfile:i,properties:[_],profiles:[_],existingTag:!!e&&e.propertyID,useSnippet:o}),a&&"0"!==a&&(u=Object.assign(u,{properties:p.properties,profiles:p.profiles,selectedinternalWebProperty:p.properties[0]?p.properties[0].internalWebPropertyID:0})),k.next=22;break;case 19:k.prev=19,k.t0=k.catch(5),u={isLoading:!1,errorCode:k.t0.code,errorMsg:k.t0.message,errorReason:!(!k.t0.data||!k.t0.data.reason)&&k.t0.data.reason};case 22:return k.abrupt("return",new Promise((function(e){b._isMounted?b.setState(u,e):e()})));case 23:case"end":return k.stop()}}),null,this,[[5,19]])}},{key:"processAccountChange",value:function(e){var t,a,n,i;return c.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,t={accountID:e},o.next=4,c.a.awrap(O.c.get(O.b,"analytics","properties-profiles",t));case 4:a=o.sent,n={id:0,name:Object(L.__)("Setup a New Property","google-site-kit")},a.properties.push(n),i={id:0,name:Object(L.__)("Setup a New Profile","google-site-kit")},a.profiles.push(i),this.setState({propertiesLoading:!1,profilesLoading:!1,properties:a.properties,profiles:a.profiles,selectedAccount:e,selectedProperty:a.properties[0].id,selectedinternalWebProperty:a.properties[0].internalWebPropertyID,selectedProfile:a.profiles[0].id,errorCode:!1}),o.next=15;break;case 12:o.prev=12,o.t0=o.catch(0),this.setState({errorCode:o.t0.code,errorMsg:o.t0.message});case 15:case"end":return o.stop()}}),null,this,[[0,12]])}},{key:"processPropertyChange",value:function(e){var t,a,n;return c.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return t=this.state.selectedAccount,i.prev=1,a={accountID:t,propertyID:e},i.next=5,c.a.awrap(O.c.get(O.b,"analytics","profiles",a));case 5:n=i.sent,this.setState({profilesLoading:!1,profiles:n,selectedProperty:e,selectedinternalWebProperty:n[0].internalWebPropertyID,selectedProfile:n[0].id,errorCode:!1}),i.next=12;break;case 9:i.prev=9,i.t0=i.catch(1),this.setState({errorCode:i.t0.code,errorMsg:i.t0.message});case 12:case"end":return i.stop()}}),null,this,[[1,9]])}},{key:"handleSubmit",value:function(e){var t,a,n,i,o,s,r,l,d,u,g,p,m,h,_,b,f;return c.a.async((function(k){for(;;)switch(k.prev=k.next){case 0:if(e&&e.preventDefault(),this.state.selectedAccount&&"-1"!==this.state.selectedAccount){k.next=3;break}return k.abrupt("return");case 3:return t=this.state,a=t.selectedAccount,n=t.selectedProperty,i=t.selectedProfile,o=t.useSnippet,s=t.selectedinternalWebProperty,r=t.accounts,l=t.properties,d=t.profiles,u=t.ampClientIDOptIn,g=t.trackingDisabled,this.setState({isSaving:!0}),p=this.props.finishSetup,m=i||(d[0].id||0===d[0].id?d[0].id.toString():null),h=n||(l[0].id||0===l[0].id?l[0].id.toString():null),_="0"===h?"0":s||(l[0].internalWebPropertyId||0===l[0].internalWebPropertyId?l[0].internalWebPropertyId.toString():null),b={accountID:a||r[0].id||null,profileID:m,propertyID:h,internalWebPropertyID:_,useSnippet:o||!1,ampClientIDOptIn:u||!1,trackingDisabled:g},k.prev=10,k.next=13,c.a.awrap(O.c.set(O.b,"analytics","settings",b));case 13:return f=k.sent,O.c.invalidateCacheGroup(O.b,"analytics","accounts-properties-profiles"),k.next=17,c.a.awrap(this.getAccounts());case 17:googlesitekit.modules.analytics.settings=f,Object(P.v)("analytics_setup","analytics_configured"),p&&p(),this._isMounted&&this.setState({isSaving:!1,selectedAccount:f.accountID,selectedProfile:f.profileID,selectedProperty:f.propertyID,selectedinternalWebProperty:f.internalWebPropertyID}),k.next=26;break;case 23:k.prev=23,k.t0=k.catch(10),this.setState({isSaving:!1,errorCode:k.t0.code,errorMsg:k.t0.message});case 26:case"end":return k.stop()}}),null,this,[[10,23]])}},{key:"handleRadioClick",value:function(e){var t="1"===e.target.value;this.setState({useSnippet:t}),Object(P.v)("analytics_setup",t?"analytics_tag_enabled":"analytics_tag_disabled")}},{key:"handleAMPClientIDSwitch",value:function(){this.setState({ampClientIDOptIn:!this.state.ampClientIDOptIn})}},{key:"handleRefetchAccount",value:function(){this.setState({isLoading:!0,errorCode:!1,errorMsg:""}),this.getAccounts()}},{key:"handleExclusionsChange",value:function(e){var t=this.state.trackingDisabled,a=e.target,n=a.id,o=a.checked,c=Object.assign.apply(Object,[{}].concat(i()(t.map((function(e){return y()({},e,!0)}))),[y()({},n,o)]));this.setState({trackingDisabled:Object.keys(c).filter((function(e){return c[e]}))})}},{key:"renderAutoInsertSnippetForm",value:function(){var e=this.state,t=e.useSnippet,a=e.isSaving,n=e.ampClientIDOptIn,i=e.existingTag,o=this.props,c=o.isEditing,s=o.onSettingsPage,r=!c,l=window.googlesitekit.admin.ampEnabled,d=window.googlesitekit.modules.analytics.settings.useSnippet;return React.createElement("div",{className:"googlesitekit-setup-module__inputs googlesitekit-setup-module__inputs--multiline"},(c||a)&&React.createElement(v.Fragment,null,s&&React.createElement(v.Fragment,null,!d&&!i&&React.createElement(v.Fragment,null,React.createElement("p",{className:"googlesitekit-setup-module__text--no-margin"},Object(L.__)("Currently there is no Analytics snippet placed on your site, so no stats are being gathered. Would you like Site Kit to insert the Analytics snippet? You can change this setting later.","google-site-kit"))),d&&React.createElement("p",{className:"googlesitekit-setup-module__text--no-margin"},Object(L.__)("Do you want to remove the Analytics snippet inserted by Site Kit?","google-site-kit"))),s&&!i&&!t&&d&&React.createElement("p",null,Object(L.__)("If the code snippet is removed, you will no longer be able to gather Analytics insights about your site.","google-site-kit"))),s&&React.createElement(v.Fragment,null,i&&React.createElement("p",null,Object(L.__)("Placing two tags at the same time is not recommended.","google-site-kit")),React.createElement(x,{onClick:this.handleRadioClick,id:"useSnippetTrue",name:"useSnippet",value:"1",checked:t,disabled:r},d?Object(L.__)("Not at this time","google-site-kit"):Object(L.__)("Insert snippet","google-site-kit")),React.createElement(x,{onClick:this.handleRadioClick,id:"useSnippetFalse",name:"useSnippet",value:"0",checked:!t,disabled:r},d?Object(L.__)("Remove snippet","google-site-kit"):Object(L.__)("Not at this time","google-site-kit"))),t&&l&&React.createElement("div",{className:"googlesitekit-setup-module__input"},React.createElement(N.a,{id:"ampClientIDOptIn",label:Object(L.__)("Opt in AMP Client ID","google-site-kit"),onClick:this.handleAMPClientIDSwitch,checked:n,hideLabel:!1}),React.createElement("p",null,n?Object(L.__)("Sessions will be combined across AMP/non-AMP pages.","google-site-kit")+" ":Object(L.__)("Sessions will be tracked separately between AMP/non-AMP pages.","google-site-kit")+" ",React.createElement(w.a,{href:"https://support.google.com/analytics/answer/7486764",external:!0,inherit:!0},Object(L.__)("Learn more","google-site-kit")))))}},{key:"accountsDropdown",value:function(){var e=this.state,t=e.accounts,a=e.selectedAccount,n=e.existingTag,i=!this.props.isEditing;return n&&a&&(i=!0),React.createElement(D.k,{enhanced:!0,name:"accounts",value:a||"0",onEnhancedChange:this.handleAccountChange,label:Object(L.__)("Account","google-site-kit"),disabled:i,outlined:!0},t.map((function(e,t){return React.createElement(D.j,{key:t,value:e.id},e.name)})))}},{key:"hasAccessToExistingTagProperty",value:function(){var e=this.state,t=e.existingTag,a=e.selectedProfile;return t&&a}},{key:"renderForm",value:function(){var e=this.state,a=e.isLoading,n=e.propertiesLoading,i=e.profilesLoading,o=e.accounts,c=e.properties,s=e.profiles,r=e.selectedAccount,l=e.selectedProperty,d=e.selectedProfile,u=e.useSnippet,g=e.existingTag,p=e.errorCode,m=e.trackingDisabled,h=this.props,_=h.onSettingsPage,b=h.isEditing,f=!b,k=!b;g&&l&&(k=!0);var y=googlesitekit.modules.analytics.setupComplete;if(a)return React.createElement(j.a,null);if("google_analytics_existing_tag_permission"===p)return null;if(0>=o.length){if(!b)return Object(L.__)("No account found.","google-site-kit");if(!y||b)return React.createElement(v.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(S.a,{onClick:t.createNewAccount},Object(L.__)("Create an account","google-site-kit")),React.createElement("div",{className:"googlesitekit-setup-module__sub-action"},React.createElement(w.a,{onClick:this.handleRefetchAccount},Object(L.__)("Re-fetch My Account","google-site-kit")))))}if(!b){var O=u?Object(L.__)("Snippet is inserted","google-site-kit"):Object(L.__)("Snippet is not inserted","google-site-kit");return g&&(O=Object(L.__)("Inserted by another plugin or theme","google-site-kit")),React.createElement(v.Fragment,null,React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("Account","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},r||o[0].name||!1)),React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("Property","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},l||c[0].name||!1)),React.createElement("div",{className:"googlesitekit-settings-module__meta-item"},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("View","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},d||s[0].name||!1))),React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:" googlesitekit-settings-module__meta-item "},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("Analytics Code Snippet","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},O))),React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:" googlesitekit-settings-module__meta-item "},React.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(L.__)("Excluded from Analytics","google-site-kit")),React.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},!!m.length&&m.map((function(e){return F[e]})).join(Object(L._x)(", ","list separator","google-site-kit")),!m.length&&Object(L.__)("Analytics is currently enabled for all visitors.","google-site-kit")))))}return React.createElement(v.Fragment,null,!_&&0<o.length&&!g&&React.createElement("p",null,Object(L.__)("Please select the account information below. You can change this view later in your settings.","google-site-kit")),React.createElement("div",{className:"googlesitekit-setup-module__inputs"},this.accountsDropdown(),n?React.createElement(j.a,{small:!0}):React.createElement(D.k,{enhanced:!0,name:"properties",value:l||0===l?l.toString():"-1",onEnhancedChange:this.handlePropertyChange,label:Object(L.__)("Property","google-site-kit"),disabled:k,outlined:!0},c.map((function(e,t){return React.createElement(D.j,{key:t,value:e.id},e.name)}))),i?React.createElement(j.a,{small:!0}):React.createElement(D.k,{enhanced:!0,name:"profiles",value:d||0===d?d.toString():"-1",onEnhancedChange:this.handleProfileChange,label:Object(L.__)("View","google-site-kit"),disabled:f,outlined:!0},s.map((function(e,t){return React.createElement(D.j,{key:t,value:e.id},e.name)})))),this.renderAutoInsertSnippetForm(),_&&this.renderExclusionsForm(),!_&&React.createElement("div",{className:"googlesitekit-setup-module__action"},React.createElement(S.a,{disabled:!this.state.selectedAccount,onClick:this.handleSubmit},Object(L.__)("Configure Analytics","google-site-kit"))))}},{key:"renderExclusionsForm",value:function(){var e=this.state.trackingDisabled;return React.createElement("div",null,React.createElement("p",{className:"googlesitekit-setup-module__text"},Object(L.__)("Exclude from Analytics","google-site-kit")),React.createElement("div",{className:"mdc-form-field"},React.createElement(N.a,{id:"loggedinUsers",label:F.loggedinUsers,onClick:this.handleExclusionsChange,checked:e.includes("loggedinUsers"),hideLabel:!1})),React.createElement("p",null,e.includes("loggedinUsers")?Object(L.__)("Logged-in users will be excluded from Analytics tracking.","google-site-kit"):Object(L.__)("Logged-in users will be included in Analytics tracking.","google-site-kit")))}},{key:"renderErrorOrNotice",value:function(){var e=this.state,t=e.errorCode,a=e.errorMsg,n=e.errorReason,i=e.accounts,o=this.props.onSettingsPage;if(!t)return null;var c=!0,s=a;switch(!0){case"google_analytics_existing_tag_permission"===t:c=!1;break;case o&&t&&"insufficientPermissions"===n:c=!1,s=Object(L.__)("You currently don't have access to this Google Analytics account. You can either request access from your team, or remove this Google Analytics snippet and connect to a different account.","google-site-kit");break;case!o&&0===i.length:c=!1,s=Object(L.__)('Looks like you don\'t have an Analytics account yet. Once you create it, click on "Re-fetch my account" and Site Kit will locate it.',"google-site-kit")}return 0===s.length?null:React.createElement("div",{className:c?"googlesitekit-error-text":""},React.createElement("p",null,c?
|
10 |
/* translators: %s: Error message */
|
11 |
+
Object(L.sprintf)(Object(L.__)("Error: %s","google-site-kit"),s):s))}},{key:"render",value:function(){var e=this.props.onSettingsPage,t=this.state.existingTag;return e||Object(P.v)("analytics_setup","configure_analytics_screen"),React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--analytics"},!e&&React.createElement(v.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__logo"},React.createElement(A.a,{id:"analytics",width:"33",height:"33"})),React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(L._x)("Analytics","Service name","google-site-kit"))),this.hasAccessToExistingTagProperty()&&t!==googlesitekit.admin.trackingID&&React.createElement("p",null,Object(L.sprintf)(Object(L.__)("An existing analytics tag was found on your site with the id %s. If later on you decide to replace this tag, Site Kit can place the new tag for you. Make sure you remove the old tag first.","google-site-kit"),t)),this.renderErrorOrNotice(),this.renderForm())}}],[{key:"createNewAccount",value:function(e){e.preventDefault(),Object(P.v)("analytics_setup","new_analytics_account"),window.open("https://analytics.google.com/analytics/web/?#/provision/SignUp","_blank")}}]),t}(v.Component);U.propTypes={onSettingsPage:E.a.bool,finishSetup:E.a.func,isEditing:E.a.bool},U.defaultProps={onSettingsPage:!0,isEditing:!1};t.default=U},,function(e,t,a){"use strict";a.r(t);var n=a(68),i=a.n(n),o=a(27),c=a.n(o),s=a(12),r=a.n(s),l=a(3),d=a.n(l),u=a(4),g=a.n(u),p=a(5),m=a.n(p),h=a(6),_=a.n(h),b=a(7),f=a.n(b),k=a(1),y=a(168),v=a(8),O=a.n(v),R=a(20),E=a(0),S=a(99),j=a(73),w=a(2),D=a(44);function C(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function x(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?C(a,!0).forEach((function(t){c()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):C(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var N=function(e){function t(e){var a;return d()(this,t),(a=m()(this,_()(t).call(this,e))).state={accountStatus:void 0,loadingMessage:Object(E.__)("Loading…","google-site-kit"),instructionProps:{}},a}return f()(t,e),g()(t,[{key:"componentDidMount",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.a.awrap(this.updateAccountStatus());case 2:case"end":return e.stop()}}),null,this)}},{key:"componentDidUpdate",value:function(e,t){var a=this.state.accountStatus;if(t.accountStatus!==a){var n=function(e,t){var a,n,i,o,c,s,r,l,d,u,g,p,m,h=!1,_=!1,b=!1,f=!1,k=!1,v=!1,O=googlesitekit.modules.adsense,R=O.accountURL,S=O.signupURL,j=Object(w.n)("googlesitekit-module-adsense",{}),D=new URL(googlesitekit.admin.siteURL);switch(e){case"account-connected":t?(l=!1,r="alert",d=Object(E.__)("Site Kit will place AdSense code to your site","google-site-kit"),u=Object(E.__)("This means Google will automatically place ads for you in all the best places.","google-site-kit"),n=Object(E.__)("Continue","google-site-kit"),a=j,h=!0,g=Object(E.__)("Let Site Kit place code on your site","google-site-kit"),p=Object(E.__)("If you don’t let Site Kit place the code you may not get the best ads experience. You can set this up later on the Site Kit settings page.","google-site-kit"),m=Object(E.__)("If you’ve already set up ads on your site, it may change how they appear. You can customize this later in AdSense.","google-site-kit")):(l=!1,r=!1,d=Object(E.__)("Looks like you’re already using AdSense","google-site-kit"),u=Object(E.__)("Site Kit will place AdSense code on your site to connect your site to AdSense and help you get the most out of ads. This means Google will automatically place ads for you in all the best places.","google-site-kit"),n=Object(E.__)("Continue","google-site-kit"),a=j,v={eventCategory:"adsense_setup",eventName:"complete_adsense_setup"},g=Object(E.__)("Let Site Kit place code on your site to get your site approved","google-site-kit"),p=Object(E.__)("If you’ve already got some AdSense code on your site, we recommend you use Site Kit to place code to get the most out of AdSense.","google-site-kit"));break;case"account-connected-nonmatching":l=!1,r=!1,d=Object(E.__)("Your site has code from another AdSense account","google-site-kit"),u=Object(E.__)("We’ve found some AdSense code on your site, but it’s not linked to this AdSense account.","google-site-kit"),f=!1,n=Object(E.__)("Switch Google account","google-site-kit"),a=Object(w.m)("adsense",!0),_={accountStatus:"account-connected",continueText:Object(E.__)("Continue anyway","google-site-kit"),statusHeadline:Object(E.__)("Site Kit will place AdSense code on your site","google-site-kit"),statusMessage:Object(E.__)("To connect your site to your AdSense account, Site Kit will place AdSense code on your site. For a better ads experience, you should remove AdSense code that’s not linked to this AdSense account.","google-site-kit"),profile:!0,ctaLink:j,ctaLinkText:Object(E.__)("Continue","google-site-kit"),continueAction:!1,switchLabel:Object(E.__)("Let Site Kit place code on your site","google-site-kit"),switchOffMessage:Object(E.__)("You can let Site Kit do this later.","google-site-kit")};break;case"ads-display-pending":var C=Object(y.parse)(D.hostname).domain;d=Object(E.__)("Let’s get your site ready for ads","google-site-kit"),u=Object(E.__)("After you’ve finished setting up your account, we’ll let you know when your site is ready to show ads. This usually takes less than a day, but it can sometimes take a bit longer.","google-site-kit"),n=Object(E.__)("Go to your AdSense account to check on your site’s status or to complete setting up","google-site-kit"),a="https://www.google.com/adsense/new/sites?url=".concat(C||D.hostname,"&source=site-kit");break;case"account-pending-review":d=Object(E.__)("We’re getting your site ready for ads","google-site-kit"),u=Object(E.__)("AdSense is reviewing your site. Meanwhile, make sure you’ve completed these steps in AdSense.","google-site-kit"),n=Object(E.__)("Go to your AdSense account to check on your site’s status","google-site-kit"),a="https://www.google.com/adsense/new/sites?url=".concat(D.hostname,"&source=site-kit"),b=!0;break;case"account-required-action":k=!0;break;case"disapproved-account":a=R,n=Object(E.__)("Go to AdSense to find out how to fix the issue","google-site-kit"),d=Object(E.__)("Your site isn’t ready to show ads yet","google-site-kit"),u=Object(E.__)("You need to fix some things before we can connect Site Kit to your AdSense account.","google-site-kit");break;case"disapproved-account-afc":l=Object(E.__)("There is an AdSense account, but the AFC account is disapproved","google-site-kit"),r="error",d=Object(E.__)("Create Account","google-site-kit"),u=Object(E.__)("Create an AdMob account, then open AdSense and try to upgrade.","google-site-kit"),n=Object(E.__)("Create an AdMob Account","google-site-kit"),a="https://google.com/admob";break;case"no-account":d=Object(E.__)("Create your AdSense account","google-site-kit"),u=Object(E.__)("Site Kit will place AdSense code on every page across your site. This means Google will automatically place ads for you in all the best places.","google-site-kit"),f=!0,n=Object(E.__)("Create AdSense Account","google-site-kit"),a=S,s=Object(E.__)("Already have an AdSense account?","google-site-kit"),i=Object(E.__)("to connect to it","google-site-kit"),o=Object(E.__)("Switch Google account","google-site-kit"),c=Object(w.m)("adsense",!0),v={eventCategory:"adsense_setup",eventName:"create_adsense_account"};break;case"no-account-tag-found":d=Object(E.__)("Looks like you’re already using AdSense","google-site-kit"),u=Object(E.__)("We’ve found some AdSense code on your site, but it’s not linked to this Google account.","google-site-kit"),f=!1,n=Object(E.__)("Switch Google account","google-site-kit"),a=Object(w.m)("adsense",!0),g=Object(E.__)("Let Site Kit place code on your site to get your site approved","google-site-kit"),_={statusHeadline:Object(E.__)("Create a new AdSense account","google-site-kit"),statusMessage:Object(E.__)("Site Kit will place additional AdSense code on every page across your site after you create an account. This means Google will automatically place ads for you in all the best places.","google-site-kit"),notice:Object(E.__)("We recommend you remove the old AdSense code from this site.","google-site-kit"),icon:"warning",continueText:Object(E.__)("Continue anyway","google-site-kit"),ctaLinkText:Object(E.__)("Create AdSense Account","google-site-kit"),ctaLink:S,ctaTarget:"_blank",continueAction:!1}}return{accountTagMatch:h,continueAction:_,ctaLink:a,ctaLinkText:n,footerAppendedText:i,footerCTA:o,footerCTALink:c,footerText:s,icon:r,incomplete:b,issue:l,profile:f,required:k,setupComplete:!1,statusHeadline:d,statusMessage:u,switchLabel:g,switchOffMessage:p,switchOnMessage:m,tracking:v}}(a);this.setState({instructionProps:n})}}},{key:"continueSetup",value:function(e){var t=this.state.instructionProps;e.existingState=x({},t),this.setState({instructionProps:e})}},{key:"goBack",value:function(){var e=x({},this.state.instructionProps).existingState;e&&(e.existingState=!1,this.setState({instructionProps:e}))}},{key:"updateAccountStatus",value:function(){var e,t,a,n=this;return r.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.a.awrap(Object(w.k)("adsense"));case 2:return e=i.sent,t=function(e){n.setState({loadingMessage:e})},i.next=6,r.a.awrap(Object(D.getAdSenseAccountStatus)(e,t));case 6:a=i.sent,this.setState({accountStatus:a.accountStatus});case 8:case"end":return i.stop()}}),null,this)}},{key:"render",value:function(){var e=this.state,t=e.accountStatus,a=e.loadingMessage,n=e.instructionProps,o=!t||!googlesitekit.modules.adsense.setupComplete||["ads-display-pending","account-pending-review","account-required-action"].includes(t);return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense"},React.createElement("div",{className:"googlesitekit-setup-module__step"},React.createElement("div",{className:"googlesitekit-setup-module__logo"},React.createElement(R.a,{id:"adsense",width:"33",height:"33"})),React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(E._x)("AdSense","Service name","google-site-kit"))),React.createElement("div",{className:"googlesitekit-setup-module__step"},!googlesitekit.canAdsRun&&!googlesitekit.modules.adsense.setupComplete&&React.createElement("div",{className:"googlesitekit-settings-module-warning"},React.createElement(R.a,{id:"error",height:"20",width:"23"}),Object(E.__)("Ad blocker detected, you need to disable it in order to setup AdSense.","google-site-kit")),o&&React.createElement(j.default,{ctaLink:n.ctaLink,ctaLinkText:n.ctaLinkText,header:n.statusHeadline,subHeader:n.statusMessage,incomplete:n.incomplete,required:n.required,loadingMessage:!t&&a}),googlesitekit.canAdsRun&&googlesitekit.modules.adsense.setupComplete&&t&&React.createElement(S.default,i()({},n,{accountStatus:t,continueSetup:this.continueSetup,goBack:this.goBack}))))}}]),t}(k.Component);N.propTypes={status:O.a.string,module:O.a.string},t.default=N},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(20),h=a(14),_=a(29),b=a(74),f=a(9),k=a(62),y=a(18),v=a(2),O=a(0),R=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={isSaving:!1},a}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this,t=this.props,a=t.error,n=t.message,i=t.issue,o=t.notice,c=t.statusHeadline,s=t.statusMessage,r=t.profile,l=t.ctaLinkText,d=t.ctaLink,u=t.footerText,g=t.footerAppendedText,p=t.footerCTA,R=t.footerCTALink,E=t.continueAction,S=t.continueSetup,j=t.accountStatus,w=t.accountTagMatch,D=t.clientId,C=t.existingTag,x=t.switchLabel,N=t.tracking,A=t.switchOffMessage,P=t.switchOnMessage,L=t.goBack,M=t.existingState,I=this.state.isSaving,T=googlesitekit.admin.userData,F=T.email,U=void 0===F?"":F,z=T.picture,q=void 0===z?"":z;return React.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--adsense"},React.createElement("div",{className:"googlesitekit-setup-module__step"},i&&React.createElement("p",{className:"googlesitekit-setup__notice"},React.createElement(m.a,{id:"error",height:"20",width:"23"}),React.createElement("span",{className:"googlesitekit-setup__notice-text"},i)),React.createElement("h2",{className:" googlesitekit-heading-4 googlesitekit-setup-module__title "},c),React.createElement("p",null,s),r&&React.createElement("p",{className:"googlesitekit-setup-module__user"},q&&React.createElement("img",{className:"googlesitekit-setup-module__user-image",src:q,alt:Object(O.__)("User Avatar","google-site-kit")}),React.createElement("span",{className:"googlesitekit-setup-module__user-email"},U)),"account-connected"===j&&React.createElement(b.default,{isEditing:!0,accountTagMatch:w,existingTag:C,saveOnChange:!0,switchLabel:x,switchOffMessage:A,switchOnMessage:P}),o&&React.createElement("div",{className:"googlesitekit-settings-notice"},React.createElement("div",{className:"googlesitekit-settings-notice__text"},o)),a&&0<n.length&&React.createElement("div",{className:"googlesitekit-error-text"},React.createElement("p",null,Object(O.__)("Error:","google-site-kit")," ",n)),React.createElement("div",{className:"googlesitekit-setup-module__action"},"account-connected"===j&&D&&React.createElement(y.Fragment,null,React.createElement(_.a,{disabled:I,onClick:function(){N&&Object(v.v)(N.eventCategory,N.eventName),e.setState({isSaving:!0});var t=document.getElementById("enableAutoAds"),a=t&&t.checked;f.c.set(f.b,"adsense","setup-complete",{clientId:D,useSnippet:a}).then((function(){document.location=d})).catch((function(){e.setState({isSaving:!1})}))}},l),React.createElement(k.a,{isSaving:I})),(!1===j||!D)&&React.createElement(h.a,{className:"googlesitekit-setup-module__cta-link",external:!0,inherit:!0,href:d},l),E&&React.createElement("div",{className:"googlesitekit-setup-module__sub-action"},React.createElement(h.a,{inherit:!0,onClick:function(){S(E)}},E.continueText)),M&&React.createElement("div",{className:"googlesitekit-setup-module__sub-action"},React.createElement(h.a,{inherit:!0,onClick:function(){L()}},Object(O.__)("Back","google-site-kit")))),u&&React.createElement("p",{className:"googlesitekit-setup-module__footer-text"},u," ",p&&React.createElement(h.a,{href:R,inherit:!0,external:!0},p)," ",g)))}}]),t}(p.Component);t.default=R},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.AnalyticsAdSenseTopPagesTableSmall")(h)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.AnalyticsAdSenseTopPagesTable")(h)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(41),h=a(100),_=a(103),b=a(53),f=a(0),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(m.a,{title:Object(f.__)("Earnings","google-site-kit"),description:Object(f.__)("How much you’re earning from your content through AdSense.","google-site-kit"),timePeriod:Object(f.__)("Last 28 days","google-site-kit")}),React.createElement(b.a,{slug:"adsense",context:"module-sitekit-dashboard"})),React.createElement(_.default,null),React.createElement(h.default,null))}}]),t}(p.Component);t.default=k},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(23),b=a(2),f=a(25),k=a(51),y=a(0),v=a(44),O=a(17),R=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={today:!1,period:!1,daily:!1},a}return g()(t,e),c()(t,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,t=e.today,a=e.period,n=e.daily;if(!(t&&a&&n&&a.totals))return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(O.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},React.createElement(_.a,{width:"100%",height:"276px",padding:!0})));var i=Object(v.reduceAdSenseData)(n.rows),o=Object(b.n)("googlesitekit-module-adsense",{}),c=a.headers.find((function(e){return null!==e.currency&&0<e.currency.length})),s=!!c&&c.currency;return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(O.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,{className:"overview-adsense-rpm",title:Object(y.__)("RPM","google-site-kit"),datapoint:Object(b.t)(a.totals[1],s),source:{name:Object(y._x)("AdSense","Service name","google-site-kit"),link:o},sparkline:n&&React.createElement(k.a,{data:Object(b.f)(i.dataMap,2),change:1,id:"adsense-rpm-sparkline",loadSmall:!1}),context:"compact"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,{className:"overview-adsense-earnings",title:Object(y.__)("Total Earnings","google-site-kit"),datapoint:Object(b.t)(a.totals[0],s),source:{name:Object(y._x)("AdSense","Service name","google-site-kit"),link:o},change:t.totals[0],changeDataUnit:"$",sparkline:n&&React.createElement(k.a,{data:Object(b.f)(i.dataMap,1),change:1,id:"adsense-earnings-sparkline",loadSmall:!1}),context:"compact"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,{className:"overview-adsense-impressions",title:Object(y.__)("Ad Impressions","google-site-kit"),datapoint:Object(b.t)(a.totals[2]),source:{name:Object(y._x)("AdSense","Service name","google-site-kit"),link:o},sparkline:n&&React.createElement(k.a,{data:Object(b.f)(i.dataMap,3),change:1,id:"adsense-impressions-sparkline",loadSmall:!1}),context:"compact"})))))))}}]),t}(p.Component);t.default=Object(m.a)(R,[{type:h.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"today"},priority:1,maxAge:Object(b.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.today)return{today:a}}},{type:h.b,identifier:"adsense",datapoint:"earnings",data:{},priority:1,maxAge:Object(b.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.period)return{period:a}}},{type:h.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month",dimensions:["DATE"]},priority:1,maxAge:Object(b.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.daily)return{daily:a}}}],React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(O.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},React.createElement(_.a,{width:"100%",height:"276px",padding:!0}))),{inGrid:!0,createGrid:!0},v.isDataZeroAdSense)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(23),_=a(2),b=a(19),f=a(9),k=a(44),y=a(0),v=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={refetch:!1,today:!1,yesterday:!1,sevenDays:!1,month:!1,twentyEightDays:!1,sameDayLastWeek:!1,prev7Days:!1,monthLastYear:!1,prev28Days:!1,error:!1,message:""},a}return g()(t,e),c()(t,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,a=e.today,n=e.yesterday,i=e.sevenDays,o=e.month,c=e.twentyEightDays,s=e.sameDayLastWeek,r=e.prev7Days,l=e.monthLastYear,d=e.prev28Days;if(!(a&&n&&i&&o&&c&&s&&r&&l&&d))return null;var u=a.headers.find((function(e){return null!==e.currency&&0<e.currency.length})),g=!!u&&u.currency,p=a.totals?[{className:"googlesitekit-data-block--today",title:Object(y.__)("Today so far","google-site-kit"),datapoint:Object(_.t)(a.totals[0],g)},{className:"googlesitekit-data-block--yesterday",title:Object(y.__)("Yesterday","google-site-kit"),datapoint:Object(_.t)(n.totals[0],g),change:s.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--7days",title:Object(y.__)("Last 7 days","google-site-kit"),datapoint:Object(_.t)(i.totals[0],g),change:r.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--month",title:Object(y.__)("This month","google-site-kit"),datapoint:Object(_.t)(o.totals[0],g),change:l.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--28days",title:Object(y.__)("Last 28 days","google-site-kit"),datapoint:Object(_.t)(c.totals[0],g),change:d.totals[0],changeDataUnit:"%"}]:[];return t.renderLayout(p)}}],[{key:"renderLayout",value:function(e){return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},e.map((function(e,t){return React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement(m.a,{stat:t,className:e.className,title:e.title,datapoint:e.datapoint,change:e.change,changeDataUnit:e.changeDataUnit,context:e.context,selected:e.selected,handleStatSelection:e.handleStatSelection}))}))))}},{key:"renderPreviews",value:function(){for(var e=[],t=0;5>t;t++)e.push(React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement(h.a,{width:"100%",height:"104px"})));return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},e))}}]),t}(p.Component);t.default=Object(b.a)(v,[{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"today"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.today)return{today:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"yesterday"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.yesterday)return{yesterday:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"same-day-last-week"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.sameDayLastWeek)return{sameDayLastWeek:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-7-days"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.sevenDays)return{sevenDays:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-7-days"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev7Days)return{prev7Days:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.month)return{month:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month-last-year"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.monthLastYear)return{monthLastYear:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-28-days"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.twentyEightDays)return{twentyEightDays:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-28-days"},priority:1,maxAge:Object(_.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev28Days)return{prev28Days:a}}}],v.renderPreviews(),{createGrid:!0},k.isDataZeroAdSense)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(9),h=a(25),_=a(23),b=a(2),f=a(44),k=a(19),y=a(0),v=a(11),O=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={twentyEightDays:!1,prev28Days:!1},a}return g()(t,e),c()(t,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,t=e.twentyEightDays,a=e.prev28Days,n=t.totals?[{className:"googlesitekit-data-block--page-rpm",title:Object(y.__)("Page RPM","google-site-kit"),datapoint:Object(b.t)(t.totals[1]),change:Object(v.isUndefined)(a.totals)?0:a.totals[1],changeDataUnit:"%"},{className:"googlesitekit-data-block--impression",title:Object(y.__)("Impressions","google-site-kit"),datapoint:Object(b.t)(t.totals[2]),change:Object(v.isUndefined)(a.totals)?0:a.totals[2],changeDataUnit:"%"}]:[];return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},n.map((function(e,t){return React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement(h.a,{stat:t,className:e.className,title:e.title,datapoint:e.datapoint,change:e.change,changeDataUnit:e.changeDataUnit,context:e.context,selected:e.selected,handleStatSelection:e.handleStatSelection}))}))))}}]),t}(p.Component);t.default=Object(k.a)(O,[{type:m.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-28-days"},priority:1,maxAge:Object(b.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.twentyEightDays)return{twentyEightDays:a}}},{type:m.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-28-days"},priority:1,maxAge:Object(b.p)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev28Days)return{prev28Days:a}}}],React.createElement(_.a,{width:"100%",height:"250px"}),{},f.isDataZeroAdSense)},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(13),m=a.n(p),h=a(7),_=a.n(h),b=a(1),f=a(43),k=a(47),y=a(17),v=a(0),O=a(104),R=a(105),E=a(72),S=a(101),j=a(55),w=a(45),D=a(31),C=a(75),x=a(44),N=a(53),A=a(73),P=a(42),L=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={receivingData:!0,error:!1,loading:!0,isAdSenseConnected:!0,zeroData:!1},a.handleDataError=a.handleDataError.bind(m()(a)),a.handleDataSuccess=a.handleDataSuccess.bind(m()(a)),a.handleZeroData=a.handleZeroData.bind(m()(a)),a}return _()(t,e),r()(t,[{key:"componentDidMount",value:function(){this.isAdSenseConnected()}},{key:"isAdSenseConnected",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(x.isAdsenseConnectedAnalytics)());case 2:e.sent?this.setState({isAdSenseConnected:!0}):this.setState({isAdSenseConnected:!1});case 4:case"end":return e.stop()}}),null,this)}},{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e,loading:!1})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"handleZeroData",value:function(){this.setState({zeroData:!0,loading:!1})}},{key:"render",value:function(){var e=this,t=this.state,a=t.receivingData,n=t.error,i=t.loading,o=t.isAdSenseConnected,c=t.zeroData,s=googlesitekit.modules.adsense.homepage,r=i||!a||c?"googlesitekit-nodata":"";return React.createElement(b.Fragment,null,React.createElement(f.a,null),React.createElement("div",{className:"".concat(r)},React.createElement(E.a,{module:"adsense"})),React.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--adsense"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},!n&&googlesitekit.modules.adsense.setupComplete?React.createElement(k.a,{title:Object(v._x)("AdSense","Service name","google-site-kit"),icon:!0,iconWidth:"30",iconHeight:"26",iconID:"adsense",status:"connected",statusText:Object(v.__)("AdSense is connected","google-site-kit")}):React.createElement(k.a,{title:Object(v._x)("AdSense","Service name","google-site-kit"),icon:!0,iconWidth:"30",iconHeight:"26",iconID:"adsense",status:"not-connected",statusText:Object(v.__)("AdSense is not connected","google-site-kit")}),i&&React.createElement(D.a,null)),c&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(y.a,{fill:!0},React.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(A.default,{status:"incomplete"})))))),!a&&(n?Object(w.a)(Object(v._x)("AdSense","Service name","google-site-kit"),n,!0,!0,!0):Object(j.a)(Object(v._x)("AdSense","Service name","google-site-kit"),!0,!0,!0)),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t\t")},React.createElement(N.a,{slug:"adsense",context:"module-dashboard"}),React.createElement(y.a,{header:!0,title:Object(v.__)("Estimated earnings","google-site-kit"),headerCtaLabel:Object(v.__)("Advanced Settings","google-site-kit"),headerCtaLink:s},React.createElement(O.default,{handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t\t")},React.createElement(y.a,{header:!0,title:Object(v.__)("Performance over previous 28 days","google-site-kit"),headerCtaLabel:Object(v.__)("Advanced Settings","google-site-kit"),headerCtaLink:s},React.createElement(R.default,{handleDataError:function(t){t||e.handleZeroData()}}))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t\t")},React.createElement(S.default,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(P.a,null))))),!o&&React.createElement(C.default,null))}}]),t}(b.Component);t.default=L},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(2),h=a(14),_=a(0),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.slug,a=e.screenID,n=e.OriginalComponent,i=googlesitekit.modules.adsense.settings.accountStatus;return i&&"adsense"===t&&("account-pending-review"===i||"ads-display-pending"===i)?React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},Object(_.__)("Site Kit has placed the code on your site, ","google-site-kit"),React.createElement(h.a,{className:"googlesitekit-settings-module__edit-button",onClick:function(){var e=a||"googlesitekit-dashboard";window.location=Object(m.n)(e,{reAuth:!0,slug:t})},inherit:!0},Object(_.__)("check module page","google-site-kit"))):React.createElement(n,this.props)}}]),t}(p.Component);t.default=b},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(20),h=a(0),_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.slug,a=e.context,n=e.OriginalComponent;if("adsense"!==t)return React.createElement(n,this.props);var i=googlesitekit.modules.adsense,o=i.active,c=i.setupComplete,s=Object(h.__)("Ad blocker detected, you need to disable it in order to setup AdSense.","google-site-kit");return o&&c&&(s=Object(h.__)("Ad blocker detected, You need to disable it to get the AdSense latest data.","google-site-kit")),googlesitekit.canAdsRun?React.createElement(n,this.props):React.createElement("div",{className:"googlesitekit-settings-module-warning googlesitekit-settings-module-warning--".concat(a)},React.createElement(m.a,{id:"error",height:"20",width:"23"})," ",s)}}]),t}(p.Component);t.default=_},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(29),b=a(0),f=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).renderAccountSetup=a.renderAccountSetup.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"renderAccountSetup",value:function(){if("no-account"===this.props.accountStatus)return React.createElement(_.a,{onClick:t.createNewAccount},Object(b.__)("Sign up for AdSense","google-site-kit"))}},{key:"render",value:function(){return React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},this.renderAccountSetup()))}}],[{key:"createNewAccount",value:function(e){e.preventDefault();var t=googlesitekit.modules.adsense.signupURL;window.open(t,"_blank")}}]),t}(h.Component);t.default=f},function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(25),b=a(19),f=a(9),k=a(2),y=a(15),v=a(23),O=a(0);function R(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var E=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||e.error||!e.length)return null;var t=Object(y.calculateOverviewData)(e);if(!t)return null;var a=t.totalUsers,n=t.totalSessions,i=t.totalUsersChange,o=t.totalSessionsChange;return React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(_.a,{className:"overview-total-users",title:Object(O.__)("Total Users","google-site-kit"),datapoint:Object(k.t)(a),change:i,changeDataUnit:"%"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(_.a,{className:"overview-total-sessions",title:Object(O.__)("Total Sessions","google-site-kit"),datapoint:Object(k.t)(n),change:o,changeDataUnit:"%"})))}}]),t}(h.Component);t.default=Object(b.a)(E,[{type:f.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?R(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):R(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},y.overviewReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(k.p)("day"),context:"Adminbar"}],React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(v.a,{width:"auto",height:"59px"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(v.a,{width:"auto",height:"59px"}))),{inGrid:!0},y.isDataZeroForReporting,y.getAnalyticsErrorMessageFromData)},function(e,t,a){"use strict";a.r(t);var n=a(49),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(110),b=a(63),f=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){return"undefined"!==i()(googlesitekit.permaLink)&&""===googlesitekit.permaLink?null:googlesitekit.modules.analytics.active?React.createElement(_.default,null):React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(b.a,null)))}}]),t}(h.Component);t.default=f},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(41),h=a(17),_=a(0),b=a(76),f=a(66),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(m.a,{title:Object(_.__)("All Traffic","google-site-kit"),description:Object(_.__)("How people found your page.","google-site-kit")})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{className:"googlesitekit-analytics-acquisition-sources",footer:!0,headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(_.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(_._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(f.default,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(b.default,null)))))))}}]),t}(p.Component);t.default=k},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(2),b=a(28),f=a(95),k=a(38),y=a(11),v=a(0),O=a(15),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=[{title:Object(v.__)("Source","google-site-kit"),primary:!0},{title:Object(v.__)("Percent","google-site-kit")}],a=e[0].data.totals[0].values[0],n=Object(y.map)(e[0].data.rows,(function(e,t){var n=e.metrics[0].values[0]/a*100;return!(1>n)&&[e.dimensions[0],React.createElement(p.Fragment,{key:"minichart-"+t},React.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(n.toFixed(2),"%")," ",React.createElement(f.a,{percent:n.toFixed(1),index:t})))]})),i=Object(b.b)(n,t,{hideHeader:!0,chartsEnabled:!0});return React.createElement("div",{className:"googlesitekit-alltraffic-widget"},React.createElement(b.a,null,i))}}]),t}(p.Component);t.default=Object(m.a)(R,[{type:h.b,identifier:"analytics",datapoint:"report",data:O.trafficSourcesReportDataDefaults,priority:1,maxAge:Object(_.p)("day"),context:"Dashboard"}],React.createElement(k.a,{rows:3,rowHeight:50}))},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(66),b=a(113),f=a(0),k=a(17),y=a(41),v=a(55),O=a(45),R=a(90),E=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={receivingData:!0,error:!1},a.handleDataError=a.handleDataError.bind(g()(a)),a.handleDataSuccess=a.handleDataSuccess.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0})}},{key:"getErrorDataComponent",value:function(){var e=googlesitekit.modules.analytics,t=e.active,a=e.setupComplete,n=this.state,i=n.error,o=n.receivingData;return t&&!a?Object(R.a)("analytics",!0,!0,!0):o?null:i?Object(O.a)(Object(f._x)("Analytics","Service name","google-site-kit"),i,!0,!0,!0):Object(v.a)(Object(f._x)("Analytics","Service name","google-site-kit"),!0,!0,!0)}},{key:"render",value:function(){var e=this.state,t=e.error,a=e.receivingData,n=t||!a?"googlesitekit-nodata":"";return React.createElement(h.Fragment,null,React.createElement("div",{className:"\n\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t"},React.createElement(y.a,{timePeriod:Object(f.__)("Last 28 days","google-site-kit"),description:Object(f.__)("How people found your site.","google-site-kit"),title:Object(f.__)("All Traffic","google-site-kit")})),this.getErrorDataComponent(),React.createElement("div",{className:"\n\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t".concat(n,"\n\t\t\t\t")},React.createElement(k.a,{className:"googlesitekit-dashboard-all-traffic"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(_.default,{source:!0,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(b.default,null)))))))}}]),t}(h.Component);t.default=E},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(2),b=a(28),f=a(17),k=a(38),y=a(11),v=a(0),O=a(15),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var a=[{title:Object(v.__)("Page Title","google-site-kit"),tooltip:Object(v.__)("Page Title","google-site-kit"),primary:!0},{title:Object(v.__)("Earnings","google-site-kit"),tooltip:Object(v.__)("Earnings","google-site-kit")},{title:Object(v.__)("Page RPM","google-site-kit"),tooltip:Object(v.__)("Page RPM","google-site-kit")},{title:Object(v.__)("Impressions","google-site-kit"),tooltip:Object(v.__)("Impressions","google-site-kit")}],n=Object(y.map)(e[0].data.rows,(function(e){return[e.dimensions[0],Number(e.metrics[0].values[0]).toFixed(2),Number(e.metrics[0].values[1]).toFixed(2),Object(_.r)(e.metrics[0].values[2])]})),i=googlesitekit.modules.analytics.settings,o=i.accountID,c=i.internalWebPropertyID,s=i.profileID,r="https://analytics.google.com/analytics/web/?pli=1#/report/content-pages/a".concat(o,"w").concat(c,"p").concat(s,"/explorer-table.plotKeys=%5B%5D&_r.drilldown=analytics.pagePath:~2F"),l={hideHeader:!1,chartsEnabled:!1,links:Object(y.map)(e[0].data.rows,(function(e){var t=e.dimensions[1].replace(/\//g,"~2F");return r+t}))},d=Object(b.b)(n,a,l);return t.renderLayout(React.createElement(b.a,null,d))}}],[{key:"renderLayout",value:function(e){var t=googlesitekit.modules.adsense.accountURL;return React.createElement(f.a,{header:!0,title:Object(v.__)("Performance over previous 28 days","google-site-kit"),headerCtaLabel:Object(v.__)("Advanced Settings","google-site-kit"),headerCtaLink:t},e)}}]),t}(p.Component);t.default=Object(m.a)(R,[{type:h.b,identifier:"analytics",datapoint:"report",data:O.analyticsAdsenseReportDataDefaults,priority:1,maxAge:Object(_.p)("day"),context:"Single"}],R.renderLayout(React.createElement(k.a,{padding:!0})),{inGrid:!0,fullWidth:!0,createGrid:!0},(function(){return!1}),(function(e){return!(!e||!e.error)&&(400===e.error.code&&"INVALID_ARGUMENT"===e.error.status&&googlesitekit.modules.analytics.active?null:e.error.message?e.error.message:e.error.errors&&e.error.errors[0]&&e.error.errors[0].message?e.error.errors[0].message:Object(v.__)("Unidentified error","google-site-kit"))}))},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(19),_=a(9),b=a(2),f=a(15),k=a(23),y=a(8),v=a.n(y),O=a(0),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats,n=e.handleStatSelection;if(!t||!t.length)return null;var i=Object(f.calculateOverviewData)(t);if(!i)return null;var o=i.totalUsers,c=i.totalSessions,s=i.averageBounceRate,r=i.averageSessionDuration,l=i.totalUsersChange,d=i.totalSessionsChange,u=i.averageBounceRateChange,g=i.averageSessionDurationChange,p=[{className:"googlesitekit-data-block--users googlesitekit-data-block--button-1",title:Object(O.__)("Users","google-site-kit"),datapoint:Object(b.t)(o),change:l,changeDataUnit:"%",context:"button",selected:a.includes(0),handleStatSelection:n},{className:"googlesitekit-data-block--sessions googlesitekit-data-block--button-2",title:Object(O.__)("Sessions","google-site-kit"),datapoint:Object(b.t)(c),change:d,changeDataUnit:"%",context:"button",selected:a.includes(1),handleStatSelection:n},{className:"googlesitekit-data-block--bounce googlesitekit-data-block--button-3",title:Object(O.__)("Bounce Rate","google-site-kit"),datapoint:Number(s).toFixed(2),change:u,changeDataUnit:"%",context:"button",selected:a.includes(2),handleStatSelection:n,datapointUnit:"%",reverseArrowDirection:!0},{className:"googlesitekit-data-block--duration googlesitekit-data-block--button-4",title:Object(O.__)("Session Duration","google-site-kit"),datapoint:Object(b.s)(r),change:g,changeDataUnit:"%",context:"button",selected:a.includes(3),handleStatSelection:n}];return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner",role:"toolbar","aria-label":"Line Chart Options"},p.map((function(e,t){return React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{stat:t,className:e.className,title:e.title,datapoint:e.datapoint,change:e.change,changeDataUnit:e.changeDataUnit,context:e.context,selected:e.selected,handleStatSelection:e.handleStatSelection,datapointUnit:e.datapointUnit,reverseArrowDirection:e.reverseArrowDirection}))}))))}}]),t}(p.Component);R.propTypes={handleDataError:v.a.func.isRequired},t.default=Object(h.a)(R,[{type:_.b,identifier:"analytics",datapoint:"report",data:f.overviewReportDataDefaults,priority:1,maxAge:Object(b.p)("day"),context:["Single","Dashboard"]}],React.createElement(k.a,{width:"100%",height:"190px",padding:!0}),{createGrid:!0},f.isDataZeroForReporting,f.getAnalyticsErrorMessageFromData)},function(e,t,a){"use strict";a.r(t);var n=a(61),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(2),k=a(28),y=a(38),v=a(17),O=a(11),R=a(0),E=a(15),S=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.data,a=googlesitekit.admin.siteURL;if(!e||!e.length)return null;var n=[{title:Object(R.__)("Most popular content","google-site-kit"),primary:!0},{title:Object(R.__)("Views","google-site-kit")}],o=[],c=Object(O.map)(e[0].data.rows,(function(e,t){var n=i()(e.dimensions,2),c=n[0],s=n[1];return o[t]=a+s,[c,Object(f.r)(e.metrics[0].values[0])]})),s={hideHeader:!1,chartsEnabled:!1,links:o,showURLs:!0},r=Object(k.b)(c,n,s);return t.renderLayout(React.createElement(k.a,null,r))}}],[{key:"renderLayout",value:function(e){return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(v.a,{className:"googlesitekit-popular-content",footer:!0,footerCtaLabel:Object(R._x)("Analytics","Service name","google-site-kit"),footerCtaLink:googlesitekit.modules.analytics.homepage,fill:!0},e))}}]),t}(h.Component);t.default=Object(_.a)(S,[{type:b.b,identifier:"analytics",datapoint:"report",data:Object(E.getTopPagesReportDataDefaults)(),priority:1,maxAge:Object(f.p)("day"),context:["Single","Dashboard"]}],S.renderLayout(React.createElement(y.a,{padding:!0})),{inGrid:!0,createGrid:!0},E.isDataZeroForReporting)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(56),b=a(2),f=a(19),k=a(9),y=a(15),v=a(23),O=a(0),R=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).setOptions=a.setOptions.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"setOptions",value:function(){var e=this.props,t=e.series,a=e.vAxes,n={chart:{title:""===googlesitekit.pageTitle?"":Object(O.__)("Users Traffic Summary","google-site-kit")},curveType:"line",height:270,width:"100%",chartArea:{height:"80%",width:"87%"},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"M/d/yy",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1}}};return n.series=t,n.vAxes=a,n}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats,n=e.dateRangeFrom;if(!t||!t.length)return null;var i=n?n.match(/\d+/).map(Number)[0]:28,o=Object(y.extractAnalyticsDashboardData)(t,a,i);if(!o)return null;var c=this.setOptions();return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(_.a,{selectedStats:a,data:o,options:c}))))}}]),t}(h.Component);t.default=Object(f.a)(R,[{type:k.b,identifier:"analytics",datapoint:"report",data:y.siteAnalyticsReportDataDefaults,priority:1,maxAge:Object(b.p)("day"),context:"Single"}],React.createElement(v.a,{width:"100%",height:"270px",padding:!0}),{createGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(11),h=a(19),_=a(9),b=a(2),f=a(28),k=a(38),y=a(17),v=a(32),O=a(0),R=a(15),E=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var a=[{title:Object(O.__)("Top Earning Pages","google-site-kit"),tooltip:Object(O.__)("Top Earning Pages","google-site-kit"),primary:!0},{title:Object(O.__)("Revenue","google-site-kit"),tooltip:Object(O.__)("Revenue","google-site-kit")}],n=[],i=Object(m.map)(e[0].data.rows,(function(e,t){return n[t]=e.dimensions[1],[e.dimensions[0],Number(e.metrics[0].values[0]).toFixed(2)]})),o={hideHeader:!1,chartsEnabled:!1,cap:5,links:n},c=Object(f.b)(i,a,o);return t.renderLayout(React.createElement(f.a,null,c))}}],[{key:"renderLayout",value:function(e){return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(y.a,{className:"googlesitekit-top-earnings-pages",footer:!0,footerCtaLabel:Object(O._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"http://analytics.google.com",fill:!0},e))}}]),t}(p.Component);t.default=Object(h.a)(E,[{type:_.b,identifier:"analytics",datapoint:"report",data:R.analyticsAdsenseReportDataDefaults,priority:1,maxAge:Object(b.p)("day"),context:"Dashboard"}],E.renderLayout(React.createElement(k.a,{rows:5,padding:!0})),{inGrid:!0,createGrid:!0},(function(){return!1}),(function(e){if(e&&e.error_data){var t=Object.values(e.error_data);if(t[0]&&"badRequest"===t[0].reason)return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(y.a,{className:"googlesitekit-top-earnings-pages",fill:!0},React.createElement(v.a,{title:Object(O.__)("Restricted metric(s)","google-site-kit"),description:Object(O.__)("You need to link Analytics and AdSense to get report for your top earning pages. Learn more: https://support.google.com/adsense/answer/6084409 ","google-site-kit")})))}if(e&&e.errors){var a=Object.values(e.errors);if(a[0]&&a[0][0])return a[0][0]}return!1}))},function(e,t,a){"use strict";a.r(t);var n=a(27),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(25),b=a(19),f=a(9),k=a(51),y=a(32),v=a(23),O=a(2),R=a(11),E=a(0),S=a(15);function j(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function w(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?j(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var D=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={accounts:!1,goals:!1},a}return m()(t,e),r()(t,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,t=e.overview,a=e.extractedAnalytics,n=e.goals,i=googlesitekit.permaLink,o=Object(O.n)("googlesitekit-module-analytics",{}),c="",s="",r="",l="",d="",u="";return t&&(c=t.totalUsers,s=t.totalUsersChange,r=t.goalCompletions,l=t.goalCompletionsChange,d=t.averageBounceRate,u=t.averageBounceRateChange),React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(_.a,{className:"overview-total-users",title:Object(E.__)("Unique Visitors from Search","google-site-kit"),datapoint:Object(O.t)(c),change:s,changeDataUnit:"%",source:{name:Object(E._x)("Analytics","Service name","google-site-kit"),link:o},sparkline:a&&React.createElement(k.a,{data:Object(O.f)(a,1),change:s,id:"analytics-users-sparkline"})})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},i&&React.createElement(_.a,{className:"overview-bounce-rate",title:Object(E.__)("Bounce Rate","google-site-kit"),datapoint:Number(d).toFixed(2),datapointUnit:Object(E.__)("%","google-site-kit"),change:u,changeDataUnit:"%",reverseArrowDirection:!0,source:{name:Object(E._x)("Analytics","Service name","google-site-kit"),link:o},sparkline:a&&React.createElement(k.a,{data:Object(O.f)(a,2),change:u,id:"analytics-sessions-sparkline"})}),!i&&n&&Object(R.isEmpty)(n.items)&&React.createElement(y.a,{title:Object(E.__)("Use goals to measure success.","google-site-kit"),description:Object(E.__)("Goals measure how well your site or app fulfills your target objectives.","google-site-kit"),ctaLink:"https://support.google.com/analytics/answer/1032415?hl=en#create_or_edit_goals",ctaLabel:Object(E.__)("Create a new goal","google-site-kit")}),!i&&n&&!Object(R.isEmpty)(n.items)&&React.createElement(_.a,{className:"overview-goals-completed",title:Object(E.__)("Goals Completed","google-site-kit"),datapoint:Object(O.t)(r),change:l,changeDataUnit:"%",source:{name:Object(E._x)("Analytics","Service name","google-site-kit"),link:o},sparkline:a&&React.createElement(k.a,{data:Object(O.f)(a,3),change:l,id:"analytics-sessions-sparkline"})}),!i&&!n&&React.createElement(v.a,{width:"100%",height:"202px"})))}}]),t}(h.Component);t.default=Object(b.a)(D,[{type:f.b,identifier:"analytics",datapoint:"report",data:w({},S.overviewReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(O.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.overview)return{overview:Object(S.calculateOverviewData)(a)}}},{type:f.b,identifier:"analytics",datapoint:"report",data:w({},S.siteAnalyticsReportDataDefaults,{url:googlesitekit.permaLink}),priority:1,maxAge:Object(O.p)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.extractedAnalytics)return{extractedAnalytics:Object(S.extractAnalyticsDashboardSparklineData)(a)}}},{type:f.b,identifier:"analytics",datapoint:"goals",data:{url:googlesitekit.permaLink},priority:1,maxAge:Object(O.p)("hour"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.goals)return{goals:a}}}],React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(v.a,{width:"100%",height:"202px"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(v.a,{width:"100%",height:"202px"}))),{inGrid:!0},(function(e,t){return"report"===t&&Object(S.isDataZeroForReporting)(e)}),S.getAnalyticsErrorMessageFromData)},function(e,t,a){"use strict";a.r(t);var n=a(61),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(2),k=a(28),y=a(38),v=a(11),O=a(8),R=a.n(O),E=a(0),S=a(15),j=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,a=e.data,n=e.colspan;if(!a||!a.length)return null;var o=[{title:Object(E.__)("Title","google-site-kit"),tooltip:Object(E.__)("Page Title","google-site-kit"),primary:!0},{title:Object(E.__)("Pageviews","google-site-kit"),tooltip:Object(E.__)("Pageviews","google-site-kit")},{title:Object(E.__)("Unique Pageviews","google-site-kit"),tooltip:Object(E.__)("Unique Pageviews","google-site-kit")},{title:Object(E.__)("Bounce Rate","google-site-kit"),tooltip:Object(E.__)("Bounce Rate","google-site-kit")}],c=[],s=Object(v.map)(a[0].data.rows,(function(e,a){var n=Number(e.metrics[0].values[2]),o=i()(e.dimensions,2),s=o[0],r=o[1];return c[a]=t.addDeepLink(r),[s,Object(f.r)(e.metrics[0].values[0]),Object(f.r)(e.metrics[0].values[1]),React.createElement(h.Fragment,{key:"minichart-"+a},React.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(n.toFixed(2),"%")))]})),r={hideHeader:!1,chartsEnabled:!1,links:c},l=Object(k.b)(s,o,r);return React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-".concat(n)},React.createElement(k.a,null,l))}}],[{key:"addDeepLink",value:function(e){var t=googlesitekit.modules.analytics.settings,a=t.accountID,n=t.internalWebPropertyID,i=t.profileID;return a?"https://analytics.google.com/analytics/web/#/report/content-drilldown/a".concat(a,"w").concat(n,"p").concat(i,"/explorer-table.plotKeys=%5B%5D&_r.drilldown=analytics.pagePath:").concat(encodeURIComponent(e.replace(/\//g,"~2F"))):"https://analytics.google.com/analytics/web/"}}]),t}(h.Component);j.propTypes={data:R.a.array,colspan:R.a.number},j.defaultProps={data:null,colspan:12},t.default=Object(_.a)(j,[{type:b.b,identifier:"analytics",datapoint:"report",data:Object(S.getTopPagesReportDataDefaults)(),priority:1,maxAge:Object(f.p)("day"),context:["Single","Dashboard"]}],React.createElement(y.a,{padding:!0}),{createGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(13),m=a.n(p),h=a(7),_=a.n(h),b=a(1),f=a(43),k=a(0),y=a(118),v=a(121),O=a(116),R=a(76),E=a(17),S=a(47),j=a(66),w=a(72),D=a(31),C=a(55),x=a(45),N=a(75),A=a(44),P=a(2),L=a(42),M=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={selectedStats:[0],receivingData:!0,error:!1,loading:!0,isAdSenseConnected:!0},a.handleStatSelection=a.handleStatSelection.bind(m()(a)),a.buildSeries=a.buildSeries.bind(m()(a)),a.handleDataError=a.handleDataError.bind(m()(a)),a.handleDataSuccess=a.handleDataSuccess.bind(m()(a)),a}return _()(t,e),r()(t,[{key:"componentDidMount",value:function(){this.isAdSenseConnected()}},{key:"isAdSenseConnected",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(A.isAdsenseConnectedAnalytics)());case 2:e.sent?this.setState({isAdSenseConnected:!0}):this.setState({isAdSenseConnected:!1});case 4:case"end":return e.stop()}}),null,this)}},{key:"handleStatSelection",value:function(e){this.setState({selectedStats:[e]})}},{key:"handleDataError",value:function(e){this.setState({receivingData:!1,loading:!1,error:e})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"buildSeries",value:function(){var e=this.state.selectedStats,t={0:"#4285f4",1:"#27bcd4",2:"#1b9688",3:"#673ab7"};return{0:{color:t[e],targetAxisIndex:0},1:{color:t[e],targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}}},{key:"render",value:function(){var e=this.state,t=e.selectedStats,a=e.error,n=e.receivingData,i=e.loading,o=e.isAdSenseConnected,c=this.buildSeries(),s=!i&&n?"":"googlesitekit-nodata",r=Object(P.i)();return React.createElement(b.Fragment,null,React.createElement(f.a,null),React.createElement(w.a,{module:"analytics"}),React.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--analytics"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(S.a,{title:Object(k._x)("Analytics","Service name","google-site-kit"),icon:!0,iconWidth:"24",iconHeight:"26",iconID:"analytics",status:"connected",statusText:Object(k.__)("Analytics is connected","google-site-kit")}),i&&React.createElement(D.a,null)),!n&&(a?Object(x.a)(Object(k._x)("Analytics","Service name","google-site-kit"),a,!0,!0,!0):Object(C.a)(Object(k._x)("Analytics","Service name","google-site-kit"),!0,!0,!0)),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(E.a,{header:!0,title:Object(k.sprintf)(Object(k.__)("Audience overview for the last %s","google-site-kit"),r),headerCtaLabel:Object(k.__)("See full stats in Analytics","google-site-kit"),headerCtaLink:"http://analytics.google.com"},React.createElement(O.default,{selectedStats:t,handleStatSelection:this.handleStatSelection,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}),React.createElement(y.default,{selectedStats:t,series:c,vAxes:null,dateRangeFrom:r}))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(E.a,{header:!0,footer:!0,title:Object(k.sprintf)(Object(k.__)("Top content over the last %s","google-site-kit"),r),headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(k.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(k._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},React.createElement(v.default,null))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(E.a,{header:!0,footer:!0,title:Object(k.sprintf)(Object(k.__)("Top acquisition sources over the last %s","google-site-kit"),r),headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(k.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(k._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(j.default,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(R.default,null)))))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(L.a,null))))),!i&&!o&&React.createElement(N.default,null))}}]),t}(b.Component);t.default=M},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(91),h=a(25),_=a(32),b=a(19),f=a(9),k=a(2),y=a(15),v=a(0),O=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=Object(y.calculateOverviewData)(e);if(!t)return null;var a=t.totalUsers,n=t.averageSessionDuration,i=t.totalUsersChange,o=t.averageSessionDurationChange;return React.createElement(p.Fragment,null,e.length?React.createElement(p.Fragment,null,React.createElement(h.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-users",title:Object(v.__)("Total Unique Visitors","google-site-kit"),datapoint:Object(k.t)(a),change:i,changeDataUnit:"%"}),React.createElement(h.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-average-session-duration",title:Object(v.__)("Avg. Time on Page","google-site-kit"),datapoint:Object(k.s)(n),change:o,changeDataUnit:"%"})):React.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},React.createElement(_.a,{title:Object(v.__)("Analytics Gathering Data","google-site-kit"),description:Object(v.__)("Analytics data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""})))}}]),t}(p.Component);t.default=Object(b.a)(O,[{type:f.b,identifier:"analytics",datapoint:"report",data:y.overviewReportDataDefaults,priority:1,maxAge:Object(k.p)("day"),context:["WPDashboard"]}],React.createElement(m.a,{width:"23%",height:"94px",count:2}),{},y.isDataZeroForReporting,y.getAnalyticsErrorMessageFromData)},function(e,t,a){"use strict";a.r(t);var n=a(61),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(2),k=a(28),y=a(38),v=a(11),O=a(0),R=a(15),E=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.data,t=googlesitekit.admin.siteURL;if(Object(R.isDataZeroForReporting)(e))return null;var a=[],n=Object(v.map)(e[0].data.rows,(function(e,n){var o=i()(e.dimensions,2),c=o[0],s=o[1];return a[n]=t+s,[c,Object(f.r)(e.metrics[0].values[0])]})),o=[{title:Object(O.__)("Title","google-site-kit"),tooltip:Object(O.__)("Page Title","google-site-kit"),primary:!0},{title:Object(O.__)("Pageviews","google-site-kit"),tooltip:Object(O.__)("Pageviews","google-site-kit")}],c={chartsEnabled:!0,links:a,cap:5,showURLs:!0},s=Object(k.b)(n,o,c);return React.createElement("div",{className:"googlesitekit-search-console-widget"},React.createElement("h2",{className:"googlesitekit-search-console-widget__title"},Object(O.__)("Top content over the last 28 days","google-site-kit")),React.createElement(k.a,null,s))}}]),t}(h.Component);t.default=Object(_.a)(E,[{type:b.b,identifier:"analytics",datapoint:"report",data:Object(R.getTopPagesReportDataDefaults)(),priority:1,maxAge:Object(f.p)("day"),context:"WPDashboard"}],React.createElement(y.a,{rows:6}))},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=(a(1),a(32)),c=a(9),s=a(54),r=a(2),l=a(0);t.default=function(){var e=googlesitekit.modules["pagespeed-insights"],t=e.active,a=e.setupComplete;if(!googlesitekit.permissions.canManageOptions&&!a)return null;return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(o.a,{title:!a&&t?Object(l.__)("Complete PageSpeed Insights activation.","google-site-kit"):Object(l.__)("Activate PageSpeed Insights.","google-site-kit"),description:Object(l.__)("Google PageSpeed Insights gives you metrics about performance, accessibility, SEO and PWA.","google-site-kit"),ctaLink:"#",ctaLabel:!a&&t?Object(l.__)("Complete activation","google-site-kit"):Object(l.__)("Activate PageSpeed Insights","google-site-kit"),onClick:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.a.awrap(Object(r.a)(c.c,"pagespeed-insights",!0));case 3:window.location=Object(r.m)("pagespeed-insights"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),Object(r.w)(s.a,{id:"pagespeed-insights-setup-error",title:Object(l.__)("Internal Server Error","google-site-kit"),description:e.t0.message,format:"small",type:"win-error"});case 9:case"end":return e.stop()}}),null,null,[[0,6]])}}))}},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(60),b=a(31),f=a(45),k=a(0),y=a(93),v=a(64),O=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={loading:!0,error:!1},a.handleDataLoaded=a.handleDataLoaded.bind(g()(a)),a.handleDataError=a.handleDataError.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"handleDataLoaded",value:function(){this.setState({loading:!1})}},{key:"handleDataError",value:function(e){this.setState({error:e})}},{key:"render",value:function(){var e=this.state,t=e.loading,a=e.error,n={name:Object(k._x)("PageSpeed Insights","Service name","google-site-kit"),link:Object(k.sprintf)("https://developers.google.com/speed/pagespeed/insights/?url=%s",googlesitekit.permaLink||googlesitekit.admin.siteURL)};return a?React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},Object(f.a)(Object(k._x)("PageSpeed Insights","Service name","google-site-kit"),a,!0,!0,!1)):React.createElement(h.Fragment,null,t&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-pagespeed-report__loading"},React.createElement(b.a,null),React.createElement("p",null,Object(k.__)("PageSpeed Insights is preparing data…","google-site-kit")))),React.createElement(y.PageSpeedInsightsDashboardWidgetHomepageSpeedMobile,{handleDataLoaded:this.handleDataLoaded,handleDataError:this.handleDataError,title:Object(k.__)("Mobile","google-site-kit")}),React.createElement(y.PageSpeedInsightsDashboardWidgetHomepageSpeedDesktop,{title:Object(k.__)("Desktop","google-site-kit")}),!t&&React.createElement(h.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(_.a,{name:n.name,href:n.link,external:!0})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--align-right-tablet "},React.createElement(v.PageSpeedReportScale,null))))}}]),t}(h.Component);t.default=O},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.DashboardSpeed")(h)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(127),h=a(17),_=a(41),b=a(0),f=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=googlesitekit.permaLink?Object(b.__)("How fast this page is.","google-site-kit"):Object(b.__)("How fast your home page is.","google-site-kit");return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(_.a,{title:Object(b.__)("Speed","google-site-kit"),description:e})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{className:"googlesitekit-pagespeed-report"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement(m.default,null))))))}}]),t}(p.Component);t.default=f},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(19),_=a(9),b=a(2),f=a(33),k=a(23),y=a(0),v=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||e.error)return null;var t=Object(f.extractSearchConsoleDashboardData)(e),a=t.totalClicks,n=t.totalImpressions,i=t.totalClicksChange,o=t.totalImpressionsChange;return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{className:"overview-total-clicks",title:Object(y.__)("Total Clicks","google-site-kit"),datapoint:a,change:i,changeDataUnit:"%"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{className:"overview-total-impressions",title:Object(y.__)("Total Impressions","google-site-kit"),datapoint:n,change:o,changeDataUnit:"%"})))}}]),t}(p.Component);t.default=Object(h.a)(v,[{type:_.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:googlesitekit.permaLink,dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(b.p)("day"),context:"Adminbar"}],React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(k.a,{width:"auto",height:"59px"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(k.a,{width:"auto",height:"59px"}))),{inGrid:!0},f.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(49),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(129),b=function(e){function t(){return c()(this,t),d()(this,g()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){return"undefined"!==i()(googlesitekit.permaLink)&&""===googlesitekit.permaLink?null:React.createElement(_.default,null)}}]),t}(h.Component);t.default=b},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(41),h=a(17),_=a(0),b=a(77),f=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(m.a,{title:Object(_.__)("Top Queries","google-site-kit"),description:Object(_.__)("What people searched for to find your page.","google-site-kit")})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{footer:!0,footerCtaLabel:Object(_._x)("Search Console","Service name","google-site-kit"),footerCtaLink:Object(_.sprintf)("https://search.google.com/u/1/search-console?resource_id=%s",googlesitekit.admin.siteURL)},React.createElement(b.default,null))))}}]),t}(p.Component);t.default=f},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(63),h=a(41),_=a(17),b=a(0),f=a(78),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{description:Object(b.__)("How your site appeared in Search results and how many visitors you got from Search.","google-site-kit"),title:Object(b.__)("Search Funnel","google-site-kit")})),React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(_.a,{className:"googlesitekit-analytics-search-funnel"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement(f.default,null),!googlesitekit.modules.analytics.active&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(m.a,null)))))))}}]),t}(p.Component);t.default=k},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(19),_=a(9),b=a(23),f=a(2),k=a(33),y=a(8),v=a.n(y),O=a(0),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats,n=e.handleStatSelection;if(!t||!t.length)return null;var i=Object(k.extractSearchConsoleDashboardData)(t),o=i.totalClicks,c=i.totalImpressions,s=i.averageCTR,r=i.averagePosition,l=i.totalClicksChange,d=i.totalImpressionsChange,u=i.averageCTRChange,g=i.averagePositionChange,h=[{className:"googlesitekit-data-block--clicks googlesitekit-data-block--button-1",title:Object(O.__)("Total Clicks","google-site-kit"),datapoint:o,change:l,changeDataUnit:"%",context:"button",selected:a.includes(0),handleStatSelection:n},{className:"googlesitekit-data-block--impressions googlesitekit-data-block--button-2",title:Object(O.__)("Total Impressions","google-site-kit"),datapoint:c,change:d,changeDataUnit:"%",context:"button",selected:a.includes(1),handleStatSelection:n},{className:"googlesitekit-data-block--ctr googlesitekit-data-block--button-3",title:Object(O.__)("Average CTR","google-site-kit"),datapoint:s+"%",change:u,changeDataUnit:"%",context:"button",selected:a.includes(2),handleStatSelection:n},{className:"googlesitekit-data-block--position googlesitekit-data-block--button-4",title:Object(O.__)("Average Position","google-site-kit"),datapoint:r,change:g,changeDataUnit:"%",context:"button",selected:a.includes(3),handleStatSelection:n}];return React.createElement(p.Fragment,null,React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner",role:"toolbar","aria-label":"Line Chart Options"},h.map((function(e,t){return React.createElement("div",{key:t,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{stat:t,className:e.className,title:e.title,datapoint:e.datapoint,change:e.change,changeDataUnit:e.changeDataUnit,context:e.context,selected:e.selected,handleStatSelection:e.handleStatSelection}))})))))}}]),t}(p.Component);R.propTypes={handleDataError:v.a.func.isRequired},t.default=Object(h.a)(R,[{type:_.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(f.p)("day"),context:["Single","Dashboard"]}],React.createElement(b.a,{width:"100%",height:"190px",padding:!0}),{createGrid:!0},k.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(19),h=a(9),_=a(2),b=a(28),f=a(38),k=a(17),y=a(11),v=a(0),O=a(33),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var a=[{title:Object(v.__)("Top search queries for your site","google-site-kit"),tooltip:Object(v.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0},{title:Object(v.__)("Clicks","google-site-kit"),tooltip:Object(v.__)("Number of times users clicked on your content in search results","google-site-kit")},{title:Object(v.__)("Impressions","google-site-kit"),tooltip:Object(v.__)("Counted each time your content appears in search results","google-site-kit")}],n=googlesitekit.admin.siteURL,i=[],o=Object(y.map)(e,(function(e,t){var a=e.keys[0];return i[t]=Object(v.sprintf)("https://search.google.com/search-console/performance/search-analytics?resource_id=%s&query=!%s&num_of_days=28",n,a),[a,Object(_.r)(e.clicks),Object(_.r)(e.impressions)]})),c={hideHeader:!1,chartsEnabled:!1,links:i},s=Object(b.b)(o,a,c);return t.renderLayout(React.createElement(b.a,null,s))}}],[{key:"renderLayout",value:function(e){return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},React.createElement(k.a,{className:"googlesitekit-popular-content",footer:!0,footerCtaLabel:Object(v._x)("Search Console","Service name","google-site-kit"),footerCtaLink:Object(v.sprintf)("https://search.google.com/u/1/search-console?resource_id=%s",googlesitekit.admin.siteURL),fill:!0},e))}}]),t}(p.Component);t.default=Object(m.a)(R,[{type:h.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"query",limit:10},priority:1,maxAge:Object(_.p)("day"),context:["Dashboard"]}],R.renderLayout(React.createElement(f.a,{padding:!0})),{inGrid:!0,createGrid:!0},O.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(21),m=a(1),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.default=Object(p.a)("googlesitekit.DashboardPopularity")(h)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(135),h=a(41),_=a(0),b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(h.a,{title:Object(_.__)("Popularity","google-site-kit"),description:Object(_.__)("Your most popular pages and how people found them from Search.","google-site-kit"),timePeriod:Object(_.__)("Last 28 days","google-site-kit")})),React.createElement(m.default,null))}}]),t}(p.Component);t.default=b},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(78),h=a(17),_=a(41),b=a(63),f=a(0),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=googlesitekit.permissions.canManageOptions,t=googlesitekit.modules.analytics.active||e?12:6;return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(_.a,{title:Object(f.__)("Search Funnel","google-site-kit"),description:Object(f.__)("How your site appeared in Search results and how many visitors you got from Search.","google-site-kit"),timePeriod:Object(f.__)("Last 28 days","google-site-kit")})),React.createElement("div",{className:"\n\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\tmdc-layout-grid__cell--span-".concat(t,"\n\t\t\t\t")},React.createElement(h.a,{className:"googlesitekit-analytics-search-funnel"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement(m.default,null),!googlesitekit.modules.analytics.active&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(b.a,null)))))))}}]),t}(p.Component);t.default=k},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(19),b=a(9),f=a(56),k=a(23),y=a(2),v=a(33),O=a(0),R=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).setOptions=a.setOptions.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"setOptions",value:function(){var e=this.props,t=e.selectedStats,a=e.series,n=e.vAxes,i={chart:{title:googlesitekit.pageTitle&&googlesitekit.pageTitle.length?Object(O.sprintf)(Object(O.__)("Search Traffic Summary for %s","google-site-kit"),Object(y.e)(googlesitekit.pageTitle)):Object(O.__)("Search Traffic Summary","google-site-kit")},curveType:"line",height:270,width:"100%",chartArea:{height:"80%",width:"87%"},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"M/d/yy",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1}}};return i.series=a,i.vAxes=n,3<=t.length&&(i.vAxis.textPosition="none",i.vAxis.gridlines.color="#fff",i.vAxis.minorGridlines.color="#fff",i.vAxes={},i.chartArea.width="98%"),i}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats;if(!t||!t.length)return null;var n=this.setOptions(),i=Object(v.extractSearchConsoleDashboardData)(t);return React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(f.a,{selectedStats:a,data:i.dataMap,options:n,singleStat:!1}))))}}]),t}(h.Component);t.default=Object(_.a)(R,[{type:b.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(y.p)("day"),context:"Single"}],React.createElement(k.a,{width:"100%",height:"270px",padding:!0}),{createGrid:!0})},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(25),h=a(19),_=a(9),b=a(0),f=a(33),k=a(51),y=a(23),v=a(2),O=a(32),R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data,t=e.error;if(t)return Object(v.v)("plugin_setup","search_console_error",t.message),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(O.a,{title:Object(b.__)("Something went wrong","google-site-kit"),description:t.message,error:!0}));if(!e)return null;if(!e.length)return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(O.a,{title:Object(b.__)("Search Console Data Empty","google-site-kit"),description:Object(b.__)("Search Console data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""}));var a=Object(f.extractSearchConsoleDashboardData)(e),n=Object(v.n)("googlesitekit-module-search-console",{}),i=a.totalClicks,o=a.totalImpressions,c=a.totalClicksChange,s=a.totalImpressionsChange;return React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{className:"overview-total-impressions",title:Object(b.__)("Impressions","google-site-kit"),datapoint:o,change:c,changeDataUnit:"%",source:{name:Object(b._x)("Search Console","Service name","google-site-kit"),link:n},sparkline:React.createElement(k.a,{data:Object(v.f)(a.dataMap,1),change:c,id:"search-console-impressions-sparkline"})})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(m.a,{className:"overview-total-clicks",title:Object(b.__)("Clicks","google-site-kit"),datapoint:i,change:s,changeDataUnit:"%",source:{name:Object(b._x)("Search Console","Service name","google-site-kit"),link:n},sparkline:React.createElement(k.a,{data:Object(v.f)(a.dataMap,2),change:s,id:"search-console-clicks-sparkline"})})))}}]),t}(p.Component);t.default=Object(h.a)(R,[{type:_.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:googlesitekit.permaLink,dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(v.p)("day"),context:["Single","Dashboard"]}],React.createElement(p.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(y.a,{width:"100%",height:"202px"})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(y.a,{width:"100%",height:"202px"}))),{inGrid:!0},f.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(13),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(43),b=a(0),f=a(138),k=a(77),y=a(133),v=a(47),O=a(17),R=a(72),E=a(31),S=a(55),j=a(45),w=a(2),D=a(42),C=function(e){function t(e){var a;return i()(this,t),(a=r()(this,d()(t).call(this,e))).state={selectedStats:[0,1],receivingData:!0,error:!1,loading:!0},a.handleStatSelection=a.handleStatSelection.bind(g()(a)),a.buildSeries=a.buildSeries.bind(g()(a)),a.buildVAxes=a.buildVAxes.bind(g()(a)),a.handleDataError=a.handleDataError.bind(g()(a)),a.handleDataSuccess=a.handleDataSuccess.bind(g()(a)),a}return m()(t,e),c()(t,[{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e,loading:!1})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"handleStatSelection",value:function(e){var t=this.state.selectedStats,a=t.slice();t.includes(e)?a=t.filter((function(t){return e!==t})):a.push(e),0!==a.length&&this.setState({selectedStats:a})}},{key:"buildSeries",value:function(){var e=this.state.selectedStats,t={0:"#4285f4",1:"#27bcd4",2:"#1b9688",3:"#673ab7"};return e.map((function(e,a){return{color:t[e],targetAxisIndex:a}}))}},{key:"buildVAxes",value:function(){var e=this.state.selectedStats,t={0:"Clicks",1:"Impressions",2:"Average CTR",3:"Average Position"};return e.map((function(e){return{title:t[e]}}))}},{key:"render",value:function(){var e=this.state,t=e.selectedStats,a=e.receivingData,n=e.error,i=e.loading,o=this.buildSeries(),c=this.buildVAxes(),s=!i&&a?"":"googlesitekit-nodata",r=Object(w.i)(),l=Object(b.sprintf)("https://search.google.com/u/1/search-console?resource_id=%s",googlesitekit.admin.siteURL);return React.createElement(h.Fragment,null,React.createElement(_.a,null),React.createElement(R.a,{module:"search-console"}),React.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--search-console"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(v.a,{title:Object(b._x)("Search Console","Service name","google-site-kit"),icon:!0,iconWidth:"23",iconHeight:"21",iconID:"search-console",status:"connected",statusText:Object(b.__)("Search Console is connected","google-site-kit")}),i&&React.createElement(E.a,null)),!a&&(n?Object(j.a)(Object(b._x)("Search Console","Service name","google-site-kit"),n,!0,!0,!0):Object(S.a)(Object(b._x)("Search Console","Service name","google-site-kit"),!0,!0,!0)),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(O.a,{header:!0,title:Object(b.sprintf)(Object(b.__)("Overview for the last %s","google-site-kit"),r),headerCtaLabel:Object(b.__)("See full stats in Search Console","google-site-kit"),headerCtaLink:l},React.createElement(y.default,{selectedStats:t,handleStatSelection:this.handleStatSelection,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}),React.createElement(f.default,{selectedStats:t,series:o,vAxes:c}))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t\t\t\t\t\t".concat(s,"\n\t\t\t\t\t\t\t")},React.createElement(O.a,{title:Object(b.sprintf)(Object(b.__)("Top search queries over the last %s","google-site-kit"),r),header:!0,footer:!0,headerCtaLabel:Object(b.__)("See full stats in Search Console","google-site-kit"),headerCtaLink:l,footerCtaLabel:Object(b._x)("Search Console","Service name","google-site-kit"),footerCtaLink:l},React.createElement(k.default,null))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(D.a,null))))))}}]),t}(h.Component);t.default=C},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(142),h=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement(m.default,null))}}]),t}(p.Component);t.default=h},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(91),h=a(25),_=a(19),b=a(9),f=a(2),k=a(33),y=a(32),v=a(0),O=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.data;if(!e||!e.length)return null;var t=Object(k.extractSearchConsoleDashboardData)(e),a=t.totalClicks,n=t.totalImpressions,i=t.totalClicksChange,o=t.totalImpressionsChange;return React.createElement(p.Fragment,null,e.length?React.createElement(p.Fragment,null,React.createElement(h.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-impressions",title:Object(v.__)("Total Impressions","google-site-kit"),datapoint:n,change:o,changeDataUnit:"%"}),React.createElement(h.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-clicks",title:Object(v.__)("Total Clicks","google-site-kit"),datapoint:a,change:i,changeDataUnit:"%"})):React.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},React.createElement(y.a,{title:Object(v.__)("Search Console Data Empty","google-site-kit"),description:Object(v.__)("Search Console data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""})))}}]),t}(p.Component);t.default=Object(_.a)(O,[{type:b.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(f.p)("day"),context:["WPDashboard"]}],React.createElement(m.a,{width:"23%",height:"94px",count:2}),{},k.isDataZeroSearchConsole)},function(e,t,a){"use strict";a.r(t);var n=a(3),i=a.n(n),o=a(4),c=a.n(o),s=a(5),r=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(1),m=a(0),h=googlesitekit.admin.siteURL,_=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return g()(t,e),c()(t,[{key:"render",value:function(){return React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-settings-module__meta-item-type"},Object(m.__)("Connected URL","google-site-kit")),React.createElement("div",{className:"googlesitekit-settings-module__meta-item-data"},h))}}]),t}(p.Component);t.default=_},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){a(73),a(98),a(100),a(101),a(102),a(75),a(104),a(103),a(105),a(106),a(191),a(107),a(108),a(74),a(99),a(192),a(109),a(44),a(110),a(111),a(112),a(113),a(66),a(114),a(115),a(116),a(117),a(118),a(76),a(119),a(120),a(121),a(122),a(193),a(96),a(15),a(123),a(124),a(197),a(92),a(125),a(93),a(126),a(127),a(128),a(64),a(198),a(129),a(130),a(131),a(132),a(77),a(133),a(134),a(135),a(136),a(78),a(137),a(138),a(139),a(140),a(33),a(207),a(143),a(142),a(141),a(200),e.exports=a(94)},,,,function(e,t,a){"use strict";a.r(t);a(1);var n=a(24),i=a(2),o=a(106),c=a(102),s=a(74),r=a(98),l=a(107),d=a(108),u=a(10),g="adsense";if(Object(u.addFilter)("googlesitekit.ModuleSettingsWarning","googlesitekit.adsenseSettingsWarning",Object(i.g)(d.default,{})),Object(u.addFilter)("googlesitekit.SetupModuleShowLink","googlesitekit.adsenseSetupModuleShowLink",(function(e,t){return!("adsense"===t&&!googlesitekit.canAdsRun)&&e})),googlesitekit.modules.adsense.active){var p=Object(n.a)(React.createElement(o.default,null)),m=Object(n.a)(React.createElement(c.default,null));if(googlesitekit.modules[g].setupComplete)Object(u.addFilter)("googlesitekit.ModuleApp-".concat(g),"googlesitekit.ModuleApp",p),Object(u.addFilter)("googlesitekit.DashboardModule","googlesitekit.DashboardEarningModule",m,50);else{var h=googlesitekit.admin,_=h.reAuth,b=h.currentScreen,f=b?b.id:null;_||"site-kit_page_googlesitekit-module-adsense"!==f||(window.location=Object(i.n)("googlesitekit-module-".concat(g),{reAuth:!0,slug:g})),Object(u.addFilter)("googlesitekit.Connected-".concat(g),"googlesitekit.AdSenseModuleConnected",(function(e){var t=googlesitekit.modules[g].settings;return!(e||void 0===t||"account-pending-review"!==t.accountStatus&&"ads-display-pending"!==t.accountStatus)||e}))}Object(u.addFilter)("googlesitekit.ModuleSettingsDetails-".concat(g),"googlesitekit.AdSenseModuleSettingsDetails",Object(i.g)(s.default,{onSettingsPage:!0})),Object(u.addFilter)("googlesitekit.ModuleSetup-".concat(g),"googlesitekit.TagmanagerModuleSetupWizard",Object(i.g)(r.default,{onSettingsPage:!1})),Object(u.addFilter)("googlesitekit.autoRefreshModules","googlesitekit.AdSenseAutoRefresh",(function(e){return e.push({identifier:"adsense",toRefresh:function(){var e="";return googlesitekit.modules.adsense&&googlesitekit.modules.adsense["account-status"]&&(e=googlesitekit.modules.adsense["account-status"].accountStatus),!(e&&-1<e.indexOf("account-connected"))}}),e})),Object(u.addFilter)("googlesitekit.ModulesNotificationsRequest","googlesitekit.adsenseNotifications",(function(e){return e.push({identifier:"adsense"}),e})),Object(u.addFilter)("googlesitekit.ModuleSetupIncomplete","googlesitekit.adsenseSettingStatus",Object(i.g)(l.default,{}))}},function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),o=a(3),c=a.n(o),s=a(4),r=a.n(s),l=a(5),d=a.n(l),u=a(6),g=a.n(u),p=a(7),m=a.n(p),h=a(1),_=a(9),b=a(109),f=a(62),k=a(0),y=function(e){function t(e){var a;return c()(this,t),(a=d()(this,g()(t).call(this,e))).state={isLoading:!0,error:!1,message:"",accounts:[],accountStatus:""},a}return m()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isOpen;e.onSettingsPage&&!t||this.getAccounts()}},{key:"getAccounts",value:function(){var e,t,a;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i.a.awrap(_.c.get(_.b,"adsense","accounts"));case 3:e=n.sent,t="",e&&e.length||(t="no-account"),a=e,this.setState({isLoading:!1,accountStatus:t,accounts:a,error:!1}),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(0),this.setState({isLoading:!1,error:n.t0.code,message:n.t0.message});case 13:case"end":return n.stop()}}),null,this,[[0,10]])}},{key:"renderErrorMessage",value:function(){var e=this.state,t=e.error,a=e.message;return t&&0<a.length?React.createElement("div",{className:"googlesitekit-error-text"},React.createElement("p",null,Object(k.__)("Error:","google-site-kit")," ",a)):null}},{key:"render",value:function(){var e=this.state,t=e.isLoading,a=e.accounts,n=e.accountStatus;return React.createElement(h.Fragment,null,React.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--adsense"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},t?React.createElement(f.a,{isSaving:t}):React.createElement(b.default,{accountStatus:n,accounts:a}),t?null:this.renderErrorMessage()))))}}]),t}(h.Component);t.default=y},function(e,t,a){"use strict";a.r(t);a(1);var n=a(2),i=a(24),o=a(122),c=a(111),s=a(114),r=a(120),l=a(123),d=a(112),u=a(124),g=a(115),p=a(117),m=a(119),h=a(96),_=a(10),b="analytics",f=Object(i.a)(React.createElement(c.default,null));if(Object(_.addFilter)("googlesitekit.AdminbarModules","googlesitekit.Analytics",f,11),!googlesitekit.modules[b].setupComplete){var k=googlesitekit.admin,y=k.reAuth,v=k.currentScreen,O=v?v.id:null;y||"site-kit_page_googlesitekit-module-analytics"!==O||(window.location=Object(n.n)("googlesitekit-module-".concat(b),{reAuth:!0,slug:b}))}if(googlesitekit.modules.analytics.active){var R=Object(i.a)(React.createElement(o.default,null)),E=Object(i.a)(React.createElement(s.default,null)),S=Object(i.a)(React.createElement(l.default,null)),j=Object(i.a)(React.createElement(u.default,null)),w=Object(i.a)(React.createElement(r.default,null)),D=Object(i.a)(React.createElement(d.default,null)),C=Object(i.a)(React.createElement(g.default,null)),x=Object(i.a)(React.createElement(p.default,null)),N=Object(i.a)(React.createElement(m.default,null));Object(_.addFilter)("googlesitekit.DashboardModule","googlesitekit.Analytics",E,9),Object(_.addFilter)("googlesitekit.DashboardSearchFunnel","googlesitekit.Analytics",w,11),Object(_.addFilter)("googlesitekit.DashboardPopularity","googlesitekit.Analytics",x,20),Object(_.addFilter)("googlesitekit.AnalyticsAdSenseTopPagesTableSmall","googlesitekit.Analytics",N,20),Object(_.addFilter)("googlesitekit.DashboardDetailsModule","googlesitekit.Analytics",D,20),Object(_.addFilter)("googlesitekit.WPDashboardHeader","googlesitekit.Analytics",S),Object(_.addFilter)("googlesitekit.WPDashboardModule","googlesitekit.Analytics",j),Object(_.addFilter)("googlesitekit.ModuleApp-"+b,"googlesitekit.Analytics",R),Object(_.addFilter)("googlesitekit.AnalyticsAdSenseTopPagesTable","googlesitekit.Analytics",C,11),Object(_.addFilter)("googlesitekit.ModuleSettingsDetails-".concat(b),"googlesitekit.AnalyticsModuleSettingsDetails",Object(n.g)(h.default,{onSettingsPage:!0})),Object(_.addFilter)("googlesitekit.showDateRangeSelector-".concat(b),"googlesitekit.analyticsShowDateRangeSelector",(function(){return!0})),Object(_.addFilter)("googlesitekit.ModuleSetup-".concat(b),"googlesitekit.AnalyticsModuleSetupWizard",Object(n.g)(h.default,{onSettingsPage:!1}))}},,,,function(e,t,a){"use strict";a.r(t);var n=a(2),i=a(92),o=a(10),c=a(0),s="optimize";googlesitekit.modules.optimize.active&&(Object(o.addFilter)("googlesitekit.ModuleSettingsDetails-".concat(s),"googlesitekit.OptimizeModuleSettingsDetails",Object(n.g)(i.default,{onSettingsPage:!0})),Object(o.addFilter)("googlesitekit.ModuleSetup-".concat(s),"googlesitekit.OptimizeModuleSetupWizard",Object(n.g)(i.default,{onSettingsPage:!1})),Object(o.addFilter)("googlesitekit.SetupWinNotification-".concat(s),"googlesitekit.OptimizeSetupWinNotification",(function(e){return e.description=Object(c.__)("To set up experiments and see the results, go to ","google-site-kit"),e.learnMore.label="Optimize",e.learnMore.url="https://optimize.withgoogle.com/",e})))},function(e,t,a){"use strict";a.r(t);a(1);var n=a(24),i=a(128),o=a(126),c=a(125),s=a(10),r=googlesitekit.modules["pagespeed-insights"],l=r.active,d=r.setupComplete;if(l&&d){var u=Object(n.a)(React.createElement(i.default,null)),g=Object(n.a)(React.createElement(o.default,null));Object(s.addFilter)("googlesitekit.DashboardModule","googlesitekit.PageSpeedInsights",u,45),Object(s.addFilter)("googlesitekit.DashboardDetailsModule","googlesitekit.PageSpeedInsights",u,45),Object(s.addFilter)("googlesitekit.DashboardSpeed","googlesitekit.PageSpeedInsightsHomepageSpeed",g)}else{var p=Object(n.a)(React.createElement(c.default,null));Object(s.addFilter)("googlesitekit.DashboardModule","googlesitekit.PageSpeedInsights",p,45)}},,function(e,t,a){"use strict";a.r(t);var n=a(2),i=a(94),o=a(10);googlesitekit.modules.tagmanager.active&&(Object(o.addFilter)("googlesitekit.ModuleSettingsDetails-".concat("tagmanager"),"googlesitekit.TagmanagerModuleSettingsDetails",Object(n.g)(i.default,{onSettingsPage:!0})),Object(o.addFilter)("googlesitekit.ModuleSetup-".concat("tagmanager"),"googlesitekit.TagmanagerModuleSetupWizard",Object(n.g)(i.default,{onSettingsPage:!1})))},,,,,,,function(e,t,a){"use strict";a.r(t);var n=a(1),i=a(140),o=a(130),c=a(141),s=a(137),r=a(139),l=a(131),d=a(134),u=a(132),g=a(136),p=a(12),m=a.n(p),h=a(3),_=a.n(h),b=a(4),f=a.n(b),k=a(5),y=a.n(k),v=a(6),O=a.n(v),R=a(13),E=a.n(R),S=a(7),j=a.n(S),w=a(11),D=a(170),C=a.n(D),x=a(9),N=a(29),A=a(17),P=a(2),L=a(0),M=function(e){function t(e){var a;return _()(this,t),(a=y()(this,O()(t).call(this,e))).state={isSearching:!1,results:[],error:!1,message:""},a.postSearch=a.postSearch.bind(E()(a)),a.onClick=a.onClick.bind(E()(a)),a.onConfirm=a.onConfirm.bind(E()(a)),a}return j()(t,e),f()(t,[{key:"postSearch",value:function(e,t){var a;return m.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t([Object(L.__)("Loading...","google-site-kit")]),n.prev=1,n.next=4,m.a.awrap(x.c.get(x.a,"search","post-search",{query:encodeURIComponent(e)}));case 4:0<(a=n.sent).length?t(Object(w.map)(a,(function(e){return e.post_title}))):t([Object(L.__)("No results found","google-site-kit")]),this.setState({isSearching:!0,results:a,error:!1,message:""}),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(1),t([Object(L.__)("No results found","google-site-kit")]),this.setState({isSearching:!1,error:n.t0.code,message:n.t0.message});case 13:case"end":return n.stop()}}),null,this,[[1,9]])}},{key:"getURLPathname",value:function(e){try{var t=new URL(e);return Object(w.trim)(t.pathname,"/")}catch(e){return!1}}},{key:"onConfirm",value:function(e){this.setState({selection:e})}},{key:"onClick",value:function(){var e=this.state,t=e.results,a=e.selection,n=Object(w.find)(t,(function(e){return e.post_title===a}));document.location=Object(P.n)("googlesitekit-dashboard",{id:n.id,permaLink:n.permalink,pageTitle:a})}},{key:"render",value:function(){var e=googlesitekit.modules,t=e.analytics&&e.analytics.active?"mdc-layout-grid__cell mdc-layout-grid__cell--span-12":"mdc-layout-grid__cell mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop";return React.createElement("div",{className:t},React.createElement(A.a,{title:Object(L.__)("Search for individual page or post information","google-site-kit"),header:!0},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement("div",{className:"googlesitekit-post-searcher"},React.createElement("label",{className:"googlesitekit-post-searcher__label",htmlFor:"autocomplete"},Object(L.__)("Title or URL","google-site-kit")),React.createElement(C.a,{id:"autocomplete",source:Object(w.debounce)(this.postSearch,200),minLength:2,onConfirm:this.onConfirm,showNoOptionsFound:!1}),React.createElement("div",{className:"googlesitekit-post-searcher__button-wrapper"},React.createElement(N.a,{onClick:this.onClick,className:"googlesitekit-post-searcher__button"},Object(L.__)("View Data","google-site-kit")))))))))}}]),t}(n.Component),I=a(143),T=a(24),F=a(10),U="search-console",z=Object(T.a)(React.createElement(i.default,null)),q=Object(T.a)(React.createElement(o.default,null)),W=Object(T.a)(React.createElement(c.default,null)),G=Object(T.a)(React.createElement(s.default,null)),H=Object(T.a)(React.createElement(r.default,null)),B=Object(T.a)(React.createElement(u.default,null)),K=Object(T.a)(React.createElement(l.default,null)),Y=Object(T.a)(React.createElement(d.default,null)),V=Object(T.a)(React.createElement(g.default,null)),Z=Object(T.a)(React.createElement(M,null));Object(F.addFilter)("googlesitekit.ModuleSettingsDetails-".concat(U),"googlesitekit.SearchConsoleModuleSettingsDetails",Object(P.g)(I.default,{onSettingsPage:!0})),Object(F.addFilter)("googlesitekit.DashboardModule","googlesitekit.SearchConsole",G,11),Object(F.addFilter)("googlesitekit.DashboardModule","googlesitekit.DashboardPopularityModule",V,40),Object(F.addFilter)("googlesitekit.DashboardSearchFunnel","googlesitekit.SearchConsoleSearchFunnel",H),Object(F.addFilter)("googlesitekit.DashboardDetailsModule","googlesitekit.SearchConsole",B),Object(F.addFilter)("googlesitekit.DashboardDetailsModule","googlesitekit.SearchConsole",K,40),Object(F.addFilter)("googlesitekit.DashboardPopularity","googlesitekit.SearchConsoleDashboardPopularity",Y),Object(F.addFilter)("googlesitekit.DashboardPopularity","googlesitekit.DashboardPPostSearcherModule",Z,30),Object(F.addFilter)("googlesitekit.WPDashboardHeader","googlesitekit.SearchConsole",W,11),Object(F.addFilter)("googlesitekit.ModuleApp-"+U,"googlesitekit.ModuleApp",z),Object(F.addFilter)("googlesitekit.showDateRangeSelector-".concat(U),"googlesitekit.searchConsoleShowDateRangeSelector",(function(){return!0})),Object(F.addFilter)("googlesitekit.AdminbarModules","googlesitekit.SearchConsole",q)}]);
|
dist/assets/js/chunk-googlesitekit-adminbar.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{
|
1 |
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{208:function(e,t,n){"use strict";n.r(t);var i=n(3),a=n.n(i),l=n(4),o=n.n(l),c=n(5),r=n.n(c),s=n(6),d=n.n(s),m=n(13),u=n.n(m),g=n(7),k=n.n(g),_=n(1),p=n(14),b=n(2),h=n(10),f=n(0),v=n(21),y=function(e){function t(){return a()(this,t),r()(this,d()(t).apply(this,arguments))}return k()(t,e),o()(t,[{key:"render",value:function(){return React.createElement(_.Fragment,null)}}]),t}(_.Component),j=Object(v.a)("googlesitekit.AdminbarModules")(y);n.d(t,"GoogleSitekitAdminbar",(function(){return O})),n.d(t,"init",(function(){return E}));var O=function(e){function t(e){var n;return a()(this,t),n=r()(this,d()(t).call(this,e)),Object(f.setLocaleData)(googlesitekit.locale,"google-site-kit"),n.handleMoreDetailsLink=n.handleMoreDetailsLink.bind(u()(n)),n}return k()(t,e),o()(t,[{key:"handleMoreDetailsLink",value:function(){var e=googlesitekit,t=e.permaLink,n=e.postID,i=e.postType,a=e.pageTitle,l=Object(b.n)("googlesitekit-dashboard",{permaLink:t,id:n,postType:i,pageTitle:a});Object(b.v)("admin_bar","post_details_click"),document.location=l}},{key:"render",value:function(){var e=googlesitekit,t=e.pageTitle,n=e.permaLink;return React.createElement(_.Fragment,null,React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-3 mdc-layout-grid__cell--align-middle "},React.createElement("span",{className:"googlesitekit-adminbar__subtitle"},Object(f.__)("Stats for:","google-site-kit")),React.createElement("h2",{className:"googlesitekit-adminbar__title"},t?Object(b.e)(t):n)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--align-middle "},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement(j,null))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2 mdc-layout-grid__cell--align-middle "},React.createElement(p.a,{className:"googlesitekit-adminbar__link",href:"#",onClick:this.handleMoreDetailsLink},Object(f.__)("More details","google-site-kit"))))),React.createElement(p.a,{className:"googlesitekit-adminbar__link googlesitekit-adminbar__link--mobile",href:"#",onClick:this.handleMoreDetailsLink},Object(f.__)("More details","google-site-kit")))}}]),t}(_.Component);function E(){null!==document.getElementById("js-googlesitekit-adminbar-modules")&&(Object(_.render)(React.createElement(O,null),document.getElementById("js-googlesitekit-adminbar-modules")),Object(h.doAction)("googlesitekit.moduleLoaded","Adminbar"))}},21:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n(3),a=n.n(i),l=n(4),o=n.n(l),c=n(5),r=n.n(c),s=n(6),d=n.n(s),m=n(7),u=n.n(m),g=n(1),k=n(11),_=n(10),p=n(59),b=16;function h(e){return Object(p.createHigherOrderComponent)((function(t){var n,i="core/with-filters/"+e;var l=function(l){function c(){var i;return a()(this,c),i=r()(this,d()(c).apply(this,arguments)),void 0===n&&(n=Object(_.applyFilters)(e,t)),i}return u()(c,l),o()(c,[{key:"componentDidMount",value:function(){c.instances.push(this),1===c.instances.length&&(Object(_.addAction)("hookRemoved",i,s),Object(_.addAction)("hookAdded",i,s))}},{key:"componentWillUnmount",value:function(){c.instances=Object(k.without)(c.instances,this),0===c.instances.length&&(Object(_.removeAction)("hookRemoved",i),Object(_.removeAction)("hookAdded",i))}},{key:"render",value:function(){return React.createElement(n,this.props)}}]),c}(g.Component);l.instances=[];var c=Object(k.debounce)((function(){n=Object(_.applyFilters)(e,t),l.instances.forEach((function(e){e.forceUpdate()}))}),b);function s(t){t===e&&c()}return l}),"withFilters")}}}]);
|
dist/assets/js/chunk-googlesitekit-setup-wizard-proxy.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{143:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),c=n.n(o),l=n(5),r=n.n(l),s=n(6),d=n.n(s),u=n(13),m=n.n(u),g=n(7),h=n.n(g),p=n(1),f=n(22),k=n(8),_=n.n(k),v=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).formFieldRef=Object(p.createRef)(),n.checkboxRef=Object(p.createRef)(),n}return h()(t,e),c()(t,[{key:"componentDidMount",value:function(){new f.e(this.formFieldRef.current).input=new f.c(this.checkboxRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onChange,n=e.id,a=e.name,i=e.value,o=e.checked,c=e.disabled,l=e.children;return React.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},React.createElement("div",{className:"\n\t\t\t\t\t\tmdc-checkbox\n\t\t\t\t\t\t".concat(c?"mdc-checkbox--disabled":"","\n\t\t\t\t\t"),ref:this.checkboxRef},React.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:n,name:a,value:i,checked:o,disabled:c,onChange:t}),React.createElement("div",{className:"mdc-checkbox__background"},React.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},React.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),React.createElement("div",{className:"mdc-checkbox__mixedmark"}))),React.createElement("label",{htmlFor:n},l))}}]),t}(p.Component);v.propTypes={onChange:_.a.func.isRequired,id:_.a.string.isRequired,name:_.a.string.isRequired,value:_.a.string.isRequired,checked:_.a.bool,disabled:_.a.bool,children:_.a.node.isRequired},v.defaultProps={checked:!1,disabled:!1};var y=v,R=n(35),b=n.n(R),E=n(0),C=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).state={scriptOnPage:!!googlesitekit.admin.trackingOptin,optIn:!!googlesitekit.admin.trackingOptin,error:!1},n.handleOptIn=n.handleOptIn.bind(m()(n)),n}return h()(t,e),c()(t,[{key:"handleOptIn",value:function(e){var t=this,n=e.target.checked,a={googlesitekit_tracking_optin:n};b()({path:"/wp/v2/settings",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(a),method:"POST"}).then((function(){if(n&&!t.state.scriptOnPage){var e=window.document;if(!e)return;window.googlesitekitTrackingEnabled=!!n,e.body.insertAdjacentHTML("beforeend",'\n\t\t\t\t\t\t<script async src="https://www.googletagmanager.com/gtag/js?id='.concat(googlesitekit.admin.trackingID,'"><\/script>\n\t\t\t\t\t')),e.body.insertAdjacentHTML("beforeend","\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\t\t\t\t\tfunction gtag(){dataLayer.push(arguments);}\n\t\t\t\t\t\t\tgtag('js', new Date());\n\t\t\t\t\t\t\tgtag('config', '".concat(googlesitekit.admin.trackingID,"');\n\t\t\t\t\t\t<\/script>\n\t\t\t\t\t"))}t.setState({optIn:!!n,error:!1,scriptOnPage:!0})})).catch((function(n){t.setState({optIn:!e.target.checked,error:{errorCode:n.code,errorMsg:n.message}})}))}},{key:"render",value:function(){var e=this.state,t=e.optIn,n=e.error,a=this.props,i=a.id,o=a.name;return React.createElement("div",{className:"googlesitekit-opt-in"},React.createElement(y,{id:i,name:o,value:"1",checked:t,onChange:this.handleOptIn},Object(E.__)("Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with ","google-site-kit"),React.createElement("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer"},Object(E.__)("Google Privacy Policy","google-site-kit")),"."),n&&React.createElement("div",{className:"googlesitekit-error-text"},n.errorMsg))}}]),t}(p.Component);C.propTypes={id:_.a.string,name:_.a.string},C.defaultProps={id:"googlesitekit-opt-in",name:"optIn"};t.a=C},145:function(e,t,n){"use strict";var a=n(12),i=n.n(a),o=n(3),c=n.n(o),l=n(4),r=n.n(l),s=n(5),d=n.n(s),u=n(6),m=n.n(u),g=n(13),h=n.n(g),p=n(7),f=n.n(p),k=n(1),_=n(9),v=n(2),y=n(67),R=n(0),b=n(14),E=function(e){function t(e){var n;return c()(this,t),(n=d()(this,m()(t).call(this,e))).el=document.createElement("div"),n.root=document.querySelector(".googlesitekit-plugin")||document.body,n}return f()(t,e),r()(t,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(k.createPortal)(this.props.children,this.el)}}]),t}(k.Component);n.d(t,"a",(function(){return C}));var C=function(e){function t(e){var n;return c()(this,t),(n=d()(this,m()(t).call(this,e))).state={dialogActive:!1},n.handleDialog=n.handleDialog.bind(h()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(h()(n)),n.handleCloseModal=n.handleCloseModal.bind(h()(n)),n}return f()(t,e),r()(t,[{key:"componentDidMount",value:function(){window.addEventListener("keyup",this.handleCloseModal,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keyup",this.handleCloseModal)}},{key:"handleUnlinkConfirm",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(_.c.set(_.a,"site","reset"));case 2:Object(v.d)(),this.handleDialog(),document.location=Object(v.n)("googlesitekit-splash",{notification:"reset_success"});case 5:case"end":return e.stop()}}),null,this)}},{key:"handleCloseModal",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1})}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive}}))}},{key:"render",value:function(){var e=this,t=this.props.children,n=this.state.dialogActive;return React.createElement(k.Fragment,null,React.createElement(b.a,{className:"googlesitekit-reset-button",onClick:function(){return e.setState({dialogActive:!0})},inherit:!0},t||Object(R.__)("Reset Site Kit","google-site-kit")),React.createElement(E,null,React.createElement(y.a,{dialogActive:n,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(R.__)("Reset Site Kit","google-site-kit"),subtitle:Object(R.__)("Resetting this site will remove access to all services. After disconnecting, you will need to re-authorize your access to restore service.","google-site-kit"),confirmButton:Object(R.__)("Reset","google-site-kit"),provides:[]})))}}]),t}(k.Component)},17:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),c=n.n(o),l=n(5),r=n.n(l),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=n(8),p=n.n(h),f=n(14),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.ctaLabel,a=e.ctaLink;return React.createElement("header",{className:"googlesitekit-layout__header"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:"\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\t\t".concat(a?"mdc-layout-grid__cell--span-6-desktop":"mdc-layout-grid__cell--span-12-desktop","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--align-middle\n\t\t\t\t\t\t\t\t\t").concat(a?"":"mdc-layout-grid__cell--span-8-tablet","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\t\t\t\t\t\t")},React.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},t)),a&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},React.createElement(f.a,{href:a,external:!0,inherit:!0},n)))))}}]),t}(g.Component);k.propTypes={title:p.a.string,ctaLabel:p.a.string,ctaLink:p.a.string},k.defaultProps={title:"",ctaLabel:"",ctaLink:""};var _=k,v=n(60),y=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.ctaLabel,n=e.ctaLink,a=e.footerContent;return React.createElement("footer",{className:"googlesitekit-layout__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n&&t&&React.createElement(v.a,{className:"googlesitekit-data-block__source",name:t,href:n,external:!0}),a))))}}]),t}(g.Component);y.propTypes={ctaLabel:p.a.string,ctaLink:p.a.string};var R=y,b=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.footer,a=e.children,i=e.title,o=e.headerCtaLabel,c=e.headerCtaLink,l=e.footerCtaLabel,r=e.footerCtaLink,s=e.footerContent,d=e.className,u=e.fill,m=e.relative;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-layout\n\t\t\t\t".concat(d&&d,"\n\t\t\t\t").concat(u?"googlesitekit-layout--fill":"","\n\t\t\t\t").concat(m?"googlesitekit-layout--relative":"","\n\t\t\t")},t&&React.createElement(_,{title:i,ctaLabel:o,ctaLink:c}),a,n&&React.createElement(R,{ctaLabel:l,ctaLink:r,footerContent:s}))}}]),t}(g.Component);b.propTypes={header:p.a.bool,footer:p.a.bool,children:p.a.node.isRequired,title:p.a.string,headerCtaLabel:p.a.string,headerCtaLink:p.a.string,footerCtaLabel:p.a.string,footerCtaLink:p.a.string,footerContent:p.a.node,className:p.a.string,fill:p.a.bool,relative:p.a.bool},b.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1};t.a=b},208:function(e,t,n){"use strict";n.r(t);var a=n(3),i=n.n(a),o=n(4),c=n.n(o),l=n(5),r=n.n(l),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=n(43),p=n(29),f=n(145),k=n(17),_=n(26),v=n(143),y=n(2),R=n(11),b=n(0),E=n(36),C=function(e){function t(e){var n;i()(this,t),n=r()(this,d()(t).call(this,e));var a=googlesitekit.admin,o=a.proxySetupURL,c=a.siteURL,l=googlesitekit.setup,s=l.isSiteKitConnected,u=l.isResettable,m=googlesitekit.permissions.canSetup;return n.state={canSetup:m,isSiteKitConnected:s,isResettable:u,completeSetup:!1,proxySetupURL:o,resetSuccess:"reset_success"===Object(E.getQueryArg)(location.href,"notification"),context:Object(E.getQueryArg)(location.href,"googlesitekit_context"),siteHostname:new URL(c).hostname},n}return m()(t,e),c()(t,[{key:"isSetupFinished",value:function(){var e=this.state,t=e.isSiteKitConnected,n=e.completeSetup;return t&&n}},{key:"render",value:function(){if(this.isSetupFinished()){var e=Object(y.n)("googlesitekit-dashboard",{notification:"authentication_success"});Object(R.delay)((function(){window.location.replace(e)}),500,"later")}var t=this.state,n=t.context,a=t.isResettable,i=t.proxySetupURL,o=t.resetSuccess,c=t.siteHostname,l="revoked"===n;return React.createElement(g.Fragment,null,React.createElement(h.a,null),o&&React.createElement(_.a,{id:"reset_success",title:Object(b.__)("Site Kit by Google was successfully reset.","google-site-kit"),isDismissable:!1}),React.createElement("div",{className:"googlesitekit-wizard"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,null,React.createElement("section",{className:"googlesitekit-wizard-progress"},React.createElement("div",{className:"googlesitekit-setup__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},l?React.createElement(g.Fragment,null,React.createElement("h1",{className:"googlesitekit-setup__title"},Object(b.sprintf)(
|
2 |
/* translators: %s is the site's hostname. (e.g. example.com) */
|
3 |
-
Object(b.__)("You revoked access to Site Kit for %s","google-site-kit"),c)),React.createElement("p",{className:"googlesitekit-setup__description"},Object(b.__)('Site Kit will no longer have access to your account. If you’d like to reconnect Site Kit, click "Start Setup" below to generate new credentials.',"google-site-kit"))):React.createElement(g.Fragment,null,React.createElement("h1",{className:"googlesitekit-setup__title"},Object(b.__)("The Site Kit plugin is active but requires setup","google-site-kit")),React.createElement("p",{className:"googlesitekit-setup__description"},Object(b.__)("Site Kit Service will guide you through 3 simple setup steps.","google-site-kit"))),React.createElement(v.a,null),React.createElement(p.a,{className:"googlesitekit-start-setup",href:i,onClick:function(){Object(y.v)("plugin_setup","proxy_start_setup_landing_page")}},Object(b.__)("Start setup","google-site-kit")),a&&React.createElement(f.a,null))))))))))))}}]),t}(g.Component);t.default=C},43:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),c=n.n(o),l=n(5),r=n.n(l),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=n(21),p=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(g.Component),f=Object(h.a)("googlesitekit.ErrorNotification")(p),k=n(80),_=n(12),v=n.n(_),y=n(13),R=n.n(y),b=n(67),E=n(29),C=n(22),w=n(8),N=n.n(w),O=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).menuRef=Object(g.createRef)(),n}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new C.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var e=this.props,t=e.menuOpen,n=e.menuItems,a=e.onSelected,i=e.id;return React.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},React.createElement("ul",{id:i,className:"mdc-list",role:"menu","aria-hidden":!t,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(e,t){return React.createElement("li",{key:t,className:"mdc-list-item",role:"menuitem",onClick:a.bind(null,t),onKeyDown:a.bind(null,t)},React.createElement("span",{className:"mdc-list-item__text"},e))}))))}}]),t}(g.Component);O.propTypes={menuOpen:N.a.bool.isRequired,menuItems:N.a.array.isRequired,id:N.a.string.isRequired};var S=O,j=n(2),L=n(0),D=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).state={dialogActive:!1,menuOpen:!1},n.handleMenu=n.handleMenu.bind(R()(n)),n.handleMenuClose=n.handleMenuClose.bind(R()(n)),n.handleMenuItemSelect=n.handleMenuItemSelect.bind(R()(n)),n.handleDialog=n.handleDialog.bind(R()(n)),n.handleDialogClose=n.handleDialogClose.bind(R()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(R()(n)),n.menuButtonRef=Object(g.createRef)(),n.menuRef=Object(g.createRef)(),n}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){window.addEventListener("mouseup",this.handleMenuClose),window.addEventListener("keyup",this.handleMenuClose),window.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.handleMenuClose),window.removeEventListener("keyup",this.handleMenuClose),window.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(e,t){var n=googlesitekit.admin.proxyPermissionsURL;if("keydown"===t.type&&(13===t.keyCode||32===t.keyCode)||"click"===t.type)switch(e){case 0:this.handleDialog();break;case 1:window.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return v.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(j.d)(),document.location=Object(j.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var e=googlesitekit.admin,t=e.userData,n=t.email,a=void 0===n?"":n,i=t.picture,o=void 0===i?"":i,c=e.proxyPermissionsURL,l=this.state,r=l.dialogActive,s=l.menuOpen;return React.createElement(g.Fragment,null,React.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},React.createElement(E.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:o?React.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},React.createElement("img",{className:"mdc-button__icon--image",src:o,alt:Object(L.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:s,ariaControls:"user-menu"},a),React.createElement(S,{ref:this.menuRef,menuOpen:s,menuItems:[Object(L.__)("Disconnect","google-site-kit")].concat(c?[Object(L.__)("Manage sites...","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),React.createElement(b.a,{dialogActive:r,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(L.__)("Disconnect","google-site-kit"),subtitle:Object(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:Object(L.__)("Disconnect","google-site-kit"),provides:[]}))}}]),t}(g.Component),x=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),c()(t,[{key:"render",value:function(){var e=googlesitekit.setup.isAuthenticated;return React.createElement(g.Fragment,null,React.createElement("header",{className:"googlesitekit-header"},React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(k.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e&&React.createElement(D,null))))),React.createElement(f,null))}}]),t}(g.Component);t.a=x},67:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),c=n.n(o),l=n(5),r=n.n(l),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=n(8),p=n.n(h),f=n(29),k=n(14),_=n(22),v=n(144),y=n.n(v),R=n(0),b=function(e){function t(){var e;return i()(this,t),(e=r()(this,d()(t).call(this))).state={attributes:[Object(R.__)("Audience overview","google-site-kit"),Object(R.__)("Top pages","google-site-kit"),Object(R.__)("Top acquisition sources","google-site-kit"),Object(R.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(g.createRef)(),e}return m()(t,e),c()(t,[{key:"componentDidMount",value:function(){new _.d(this.dialogRef.current)}},{key:"render",value:function(){var e=this.props,t=e.dialogActive,n=e.handleDialog,a=e.title,i=e.provides,o=e.handleConfirm,c=e.subtitle,l=e.confirmButton,r=e.dependentModules;return React.createElement("div",{ref:this.dialogRef,className:"mdc-dialog ".concat(t?"mdc-dialog--open":""),role:"alertdialog","aria-modal":"true","aria-labelledby":"remove-module-dialog","aria-describedby":"remove-module-dialog-description","aria-hidden":t?"false":"true",tabIndex:"-1"},React.createElement("div",{className:"mdc-dialog__scrim"}," "),React.createElement(y.a,{active:t},React.createElement("div",null,React.createElement("div",{className:"mdc-dialog__container"},React.createElement("div",{className:"mdc-dialog__surface"},a&&React.createElement("h2",{id:"remove-module-dialog",className:"mdc-dialog__title"},a),c&&React.createElement("p",{className:"mdc-dialog__lead"},c),React.createElement("section",{id:"remove-module-dialog-description",className:"mdc-dialog__content"},React.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},i&&i.map((function(e){return React.createElement("li",{className:"mdc-list-item",key:e},React.createElement("span",{className:"mdc-list-item__text"},e))})))),r&&React.createElement("p",{className:"mdc-dialog__dependecies"},React.createElement("strong",null,Object(R.__)("Note: ","google-site-kit")),r),React.createElement("footer",{className:"mdc-dialog__actions"},React.createElement(f.a,{onClick:o,danger:!0},l||Object(R.__)("Disconnect","google-site-kit")),React.createElement(k.a,{className:"mdc-dialog__cancel-button",onClick:function(){return n()},inherit:!0},Object(R.__)("Cancel","google-site-kit"))))))))}}]),t}(g.Component);b.propTypes={dialogActive:p.a.bool,handleDialog:p.a.func,handleConfirm:p.a.func.isRequired,title:p.a.string,description:p.a.string,confirmButton:p.a.string},b.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null},t.a=b}}]);
|
1 |
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{144:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),l=n.n(o),c=n(5),r=n.n(c),s=n(6),d=n.n(s),u=n(13),m=n.n(u),g=n(7),h=n.n(g),p=n(1),f=n(22),k=n(8),_=n.n(k),v=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).formFieldRef=Object(p.createRef)(),n.checkboxRef=Object(p.createRef)(),n}return h()(t,e),l()(t,[{key:"componentDidMount",value:function(){new f.e(this.formFieldRef.current).input=new f.c(this.checkboxRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onChange,n=e.id,a=e.name,i=e.value,o=e.checked,l=e.disabled,c=e.children;return React.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},React.createElement("div",{className:"\n\t\t\t\t\t\tmdc-checkbox\n\t\t\t\t\t\t".concat(l?"mdc-checkbox--disabled":"","\n\t\t\t\t\t"),ref:this.checkboxRef},React.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:n,name:a,value:i,checked:o,disabled:l,onChange:t}),React.createElement("div",{className:"mdc-checkbox__background"},React.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},React.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),React.createElement("div",{className:"mdc-checkbox__mixedmark"}))),React.createElement("label",{htmlFor:n},c))}}]),t}(p.Component);v.propTypes={onChange:_.a.func.isRequired,id:_.a.string.isRequired,name:_.a.string.isRequired,value:_.a.string.isRequired,checked:_.a.bool,disabled:_.a.bool,children:_.a.node.isRequired},v.defaultProps={checked:!1,disabled:!1};var y=v,b=n(35),R=n.n(b),E=n(0),C=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).state={scriptOnPage:!!window.googlesitekitTrackingEnabled,optIn:!!window.googlesitekitTrackingEnabled,error:!1},n.handleOptIn=n.handleOptIn.bind(m()(n)),n}return h()(t,e),l()(t,[{key:"handleOptIn",value:function(e){var t=this,n=e.target.checked,a={googlesitekit_tracking_optin:n};R()({path:"/wp/v2/settings",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(a),method:"POST"}).then((function(){if(window.googlesitekitTrackingEnabled=!!n,n&&!t.state.scriptOnPage){var e=window.document;if(!e)return;e.body.insertAdjacentHTML("beforeend",'\n\t\t\t\t\t\t<script async src="https://www.googletagmanager.com/gtag/js?id='.concat(googlesitekit.admin.trackingID,'"><\/script>\n\t\t\t\t\t')),e.body.insertAdjacentHTML("beforeend","\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\t\t\t\t\tfunction gtag(){dataLayer.push(arguments);}\n\t\t\t\t\t\t\tgtag('js', new Date());\n\t\t\t\t\t\t\tgtag('config', '".concat(googlesitekit.admin.trackingID,"');\n\t\t\t\t\t\t<\/script>\n\t\t\t\t\t"))}t.setState({optIn:!!n,error:!1,scriptOnPage:!0})})).catch((function(n){t.setState({optIn:!e.target.checked,error:{errorCode:n.code,errorMsg:n.message}})}))}},{key:"render",value:function(){var e=this.state,t=e.optIn,n=e.error,a=this.props,i=a.id,o=a.name;return React.createElement("div",{className:"googlesitekit-opt-in"},React.createElement(y,{id:i,name:o,value:"1",checked:t,onChange:this.handleOptIn},Object(E.__)("Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with ","google-site-kit"),React.createElement("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer"},Object(E.__)("Google Privacy Policy","google-site-kit")),"."),n&&React.createElement("div",{className:"googlesitekit-error-text"},n.errorMsg))}}]),t}(p.Component);C.propTypes={id:_.a.string,name:_.a.string},C.defaultProps={id:"googlesitekit-opt-in",name:"optIn"};t.a=C},146:function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var a=n(12),i=n.n(a),o=n(3),l=n.n(o),c=n(4),r=n.n(c),s=n(5),d=n.n(s),u=n(6),m=n.n(u),g=n(13),h=n.n(g),p=n(7),f=n.n(p),k=n(1),_=n(9),v=n(2),y=n(67),b=n(0),R=n(14),E=n(80),C=function(e){function t(e){var n;return l()(this,t),(n=d()(this,m()(t).call(this,e))).state={dialogActive:!1},n.handleDialog=n.handleDialog.bind(h()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(h()(n)),n.handleCloseModal=n.handleCloseModal.bind(h()(n)),n}return f()(t,e),r()(t,[{key:"componentDidMount",value:function(){window.addEventListener("keyup",this.handleCloseModal,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keyup",this.handleCloseModal)}},{key:"handleUnlinkConfirm",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(_.c.set(_.a,"site","reset"));case 2:Object(v.d)(),this.handleDialog(),document.location=Object(v.n)("googlesitekit-splash",{notification:"reset_success"});case 5:case"end":return e.stop()}}),null,this)}},{key:"handleCloseModal",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1})}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive}}))}},{key:"render",value:function(){var e=this,t=this.props.children,n=this.state.dialogActive;return React.createElement(k.Fragment,null,React.createElement(R.a,{className:"googlesitekit-reset-button",onClick:function(){return e.setState({dialogActive:!0})},inherit:!0},t||Object(b.__)("Reset Site Kit","google-site-kit")),React.createElement(E.a,null,React.createElement(y.a,{dialogActive:n,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(b.__)("Reset Site Kit","google-site-kit"),subtitle:Object(b.__)("Resetting this site will remove access to all services. After disconnecting, you will need to re-authorize your access to restore service.","google-site-kit"),confirmButton:Object(b.__)("Reset","google-site-kit"),provides:[]})))}}]),t}(k.Component)},17:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),l=n.n(o),c=n(5),r=n.n(c),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=n(8),p=n.n(h),f=n(14),k=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.ctaLabel,a=e.ctaLink;return React.createElement("header",{className:"googlesitekit-layout__header"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:"\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\t\t".concat(a?"mdc-layout-grid__cell--span-6-desktop":"mdc-layout-grid__cell--span-12-desktop","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--align-middle\n\t\t\t\t\t\t\t\t\t").concat(a?"":"mdc-layout-grid__cell--span-8-tablet","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\t\t\t\t\t\t")},React.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},t)),a&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},React.createElement(f.a,{href:a,external:!0,inherit:!0},n)))))}}]),t}(g.Component);k.propTypes={title:p.a.string,ctaLabel:p.a.string,ctaLink:p.a.string},k.defaultProps={title:"",ctaLabel:"",ctaLink:""};var _=k,v=n(60),y=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){var e=this.props,t=e.ctaLabel,n=e.ctaLink,a=e.footerContent;return React.createElement("footer",{className:"googlesitekit-layout__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n&&t&&React.createElement(v.a,{className:"googlesitekit-data-block__source",name:t,href:n,external:!0}),a))))}}]),t}(g.Component);y.propTypes={ctaLabel:p.a.string,ctaLink:p.a.string};var b=y,R=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.footer,a=e.children,i=e.title,o=e.headerCtaLabel,l=e.headerCtaLink,c=e.footerCtaLabel,r=e.footerCtaLink,s=e.footerContent,d=e.className,u=e.fill,m=e.relative;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-layout\n\t\t\t\t".concat(d&&d,"\n\t\t\t\t").concat(u?"googlesitekit-layout--fill":"","\n\t\t\t\t").concat(m?"googlesitekit-layout--relative":"","\n\t\t\t")},t&&React.createElement(_,{title:i,ctaLabel:o,ctaLink:l}),a,n&&React.createElement(b,{ctaLabel:c,ctaLink:r,footerContent:s}))}}]),t}(g.Component);R.propTypes={header:p.a.bool,footer:p.a.bool,children:p.a.node.isRequired,title:p.a.string,headerCtaLabel:p.a.string,headerCtaLink:p.a.string,footerCtaLabel:p.a.string,footerCtaLink:p.a.string,footerContent:p.a.node,className:p.a.string,fill:p.a.bool,relative:p.a.bool},R.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1};t.a=R},209:function(e,t,n){"use strict";n.r(t);var a=n(3),i=n.n(a),o=n(4),l=n.n(o),c=n(5),r=n.n(c),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=n(43),p=n(29),f=n(146),k=n(17),_=n(26),v=n(144),y=n(2),b=n(11),R=n(0),E=n(36),C=function(e){function t(e){var n;i()(this,t),n=r()(this,d()(t).call(this,e));var a=googlesitekit.admin,o=a.proxySetupURL,l=a.siteURL,c=googlesitekit.setup,s=c.isSiteKitConnected,u=c.isResettable,m=c.errorMessage,g=googlesitekit.permissions.canSetup;return n.state={canSetup:g,errorMessage:m,isSiteKitConnected:s,isResettable:u,completeSetup:!1,proxySetupURL:o,resetSuccess:"reset_success"===Object(E.getQueryArg)(location.href,"notification"),context:Object(E.getQueryArg)(location.href,"googlesitekit_context"),siteHostname:new URL(l).hostname},n}return m()(t,e),l()(t,[{key:"isSetupFinished",value:function(){var e=this.state,t=e.isSiteKitConnected,n=e.completeSetup;return t&&n}},{key:"render",value:function(){if(this.isSetupFinished()){var e=Object(y.n)("googlesitekit-dashboard",{notification:"authentication_success"});Object(b.delay)((function(){window.location.replace(e)}),500,"later")}var t=this.state,n=t.context,a=t.errorMessage,i=t.isResettable,o=t.proxySetupURL,l=t.resetSuccess,c=t.siteHostname,r="revoked"===n;return React.createElement(g.Fragment,null,React.createElement(h.a,null),a&&React.createElement(_.a,{id:"setup_error",type:"win-error",title:Object(R.__)("Oops! There was a problem during set up. Please try again.","google-site-kit"),description:a,isDismissable:!1}),l&&React.createElement(_.a,{id:"reset_success",title:Object(R.__)("Site Kit by Google was successfully reset.","google-site-kit"),isDismissable:!1}),React.createElement("div",{className:"googlesitekit-wizard"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,null,React.createElement("section",{className:"googlesitekit-wizard-progress"},React.createElement("div",{className:"googlesitekit-setup__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},r?React.createElement(g.Fragment,null,React.createElement("h1",{className:"googlesitekit-setup__title"},Object(R.sprintf)(
|
2 |
/* translators: %s is the site's hostname. (e.g. example.com) */
|
3 |
+
Object(R.__)("You revoked access to Site Kit for %s","google-site-kit"),c)),React.createElement("p",{className:"googlesitekit-setup__description"},Object(R.__)('Site Kit will no longer have access to your account. If you’d like to reconnect Site Kit, click "Start Setup" below to generate new credentials.',"google-site-kit"))):React.createElement(g.Fragment,null,React.createElement("h1",{className:"googlesitekit-setup__title"},Object(R.__)("The Site Kit plugin is active but requires setup","google-site-kit")),React.createElement("p",{className:"googlesitekit-setup__description"},Object(R.__)("Site Kit Service will guide you through 3 simple setup steps.","google-site-kit"))),React.createElement(v.a,null),React.createElement(p.a,{className:"googlesitekit-start-setup",href:o,onClick:function(){Object(y.v)("plugin_setup","proxy_start_setup_landing_page")}},Object(R.__)("Start setup","google-site-kit")),i&&React.createElement(f.a,null))))))))))))}}]),t}(g.Component);t.default=C},43:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),l=n.n(o),c=n(5),r=n.n(c),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=n(21),p=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){return null}}]),t}(g.Component),f=Object(h.a)("googlesitekit.ErrorNotification")(p),k=n(81),_=n(12),v=n.n(_),y=n(13),b=n.n(y),R=n(67),E=n(29),C=n(22),w=n(8),N=n.n(w),O=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).menuRef=Object(g.createRef)(),n}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new C.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var e=this.props,t=e.menuOpen,n=e.menuItems,a=e.onSelected,i=e.id;return React.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},React.createElement("ul",{id:i,className:"mdc-list",role:"menu","aria-hidden":!t,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(e,t){return React.createElement("li",{key:t,className:"mdc-list-item",role:"menuitem",onClick:a.bind(null,t),onKeyDown:a.bind(null,t)},React.createElement("span",{className:"mdc-list-item__text"},e))}))))}}]),t}(g.Component);O.propTypes={menuOpen:N.a.bool.isRequired,menuItems:N.a.array.isRequired,id:N.a.string.isRequired};var j=O,S=n(80),L=n(2),D=n(0),M=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).state={dialogActive:!1,menuOpen:!1},n.handleMenu=n.handleMenu.bind(b()(n)),n.handleMenuClose=n.handleMenuClose.bind(b()(n)),n.handleMenuItemSelect=n.handleMenuItemSelect.bind(b()(n)),n.handleDialog=n.handleDialog.bind(b()(n)),n.handleDialogClose=n.handleDialogClose.bind(b()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(b()(n)),n.menuButtonRef=Object(g.createRef)(),n.menuRef=Object(g.createRef)(),n}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){window.addEventListener("mouseup",this.handleMenuClose),window.addEventListener("keyup",this.handleMenuClose),window.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.handleMenuClose),window.removeEventListener("keyup",this.handleMenuClose),window.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(e,t){var n=googlesitekit.admin.proxyPermissionsURL;if("keydown"===t.type&&(13===t.keyCode||32===t.keyCode)||"click"===t.type)switch(e){case 0:this.handleDialog();break;case 1:window.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return v.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(L.d)(),document.location=Object(L.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var e=googlesitekit.admin,t=e.userData,n=t.email,a=void 0===n?"":n,i=t.picture,o=void 0===i?"":i,l=e.proxyPermissionsURL,c=this.state,r=c.dialogActive,s=c.menuOpen;return React.createElement(g.Fragment,null,React.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},React.createElement(E.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:o?React.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},React.createElement("img",{className:"mdc-button__icon--image",src:o,alt:Object(D.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:s,ariaControls:"user-menu"},a),React.createElement(j,{ref:this.menuRef,menuOpen:s,menuItems:[Object(D.__)("Disconnect","google-site-kit")].concat(l?[Object(D.__)("Manage sites...","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),React.createElement(S.a,null,React.createElement(R.a,{dialogActive:r,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(D.__)("Disconnect","google-site-kit"),subtitle:Object(D.__)("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(D.__)("Disconnect","google-site-kit"),provides:[]})))}}]),t}(g.Component),x=function(e){function t(){return i()(this,t),r()(this,d()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){var e=googlesitekit.setup.isAuthenticated;return React.createElement(g.Fragment,null,React.createElement("header",{className:"googlesitekit-header"},React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(k.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e&&React.createElement(M,null))))),React.createElement(f,null))}}]),t}(g.Component);t.a=x},67:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),l=n.n(o),c=n(5),r=n.n(c),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=n(8),p=n.n(h),f=n(29),k=n(14),_=n(22),v=n(145),y=n.n(v),b=n(0),R=function(e){function t(){var e;return i()(this,t),(e=r()(this,d()(t).call(this))).state={attributes:[Object(b.__)("Audience overview","google-site-kit"),Object(b.__)("Top pages","google-site-kit"),Object(b.__)("Top acquisition sources","google-site-kit"),Object(b.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(g.createRef)(),e}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){new _.d(this.dialogRef.current)}},{key:"render",value:function(){var e=this.props,t=e.dialogActive,n=e.handleDialog,a=e.title,i=e.provides,o=e.handleConfirm,l=e.subtitle,c=e.confirmButton,r=e.dependentModules;return React.createElement("div",{ref:this.dialogRef,className:"mdc-dialog ".concat(t?"mdc-dialog--open":""),role:"alertdialog","aria-modal":"true","aria-labelledby":"remove-module-dialog","aria-describedby":"remove-module-dialog-description","aria-hidden":t?"false":"true",tabIndex:"-1"},React.createElement("div",{className:"mdc-dialog__scrim"}," "),React.createElement(y.a,{active:t},React.createElement("div",null,React.createElement("div",{className:"mdc-dialog__container"},React.createElement("div",{className:"mdc-dialog__surface"},a&&React.createElement("h2",{id:"remove-module-dialog",className:"mdc-dialog__title"},a),l&&React.createElement("p",{className:"mdc-dialog__lead"},l),React.createElement("section",{id:"remove-module-dialog-description",className:"mdc-dialog__content"},React.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},i&&i.map((function(e){return React.createElement("li",{className:"mdc-list-item",key:e},React.createElement("span",{className:"mdc-list-item__text"},e))})))),r&&React.createElement("p",{className:"mdc-dialog__dependecies"},React.createElement("strong",null,Object(b.__)("Note: ","google-site-kit")),r),React.createElement("footer",{className:"mdc-dialog__actions"},React.createElement(f.a,{onClick:o,danger:!0},c||Object(b.__)("Disconnect","google-site-kit")),React.createElement(k.a,{className:"mdc-dialog__cancel-button",onClick:function(){return n()},inherit:!0},Object(b.__)("Cancel","google-site-kit"))))))))}}]),t}(g.Component);R.propTypes={dialogActive:p.a.bool,handleDialog:p.a.func,handleConfirm:p.a.func.isRequired,title:p.a.string,description:p.a.string,confirmButton:p.a.string},R.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null},t.a=R},80:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var a=n(3),i=n.n(a),o=n(4),l=n.n(o),c=n(5),r=n.n(c),s=n(6),d=n.n(s),u=n(7),m=n.n(u),g=n(1),h=function(e){function t(e){var n;return i()(this,t),(n=r()(this,d()(t).call(this,e))).el=document.createElement("div"),n.root=document.querySelector(".googlesitekit-plugin")||document.body,n}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(g.createPortal)(this.props.children,this.el)}}]),t}(g.Component)}}]);
|
dist/assets/js/chunk-googlesitekit-setup-wizard.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{143:function(e,t,a){"use strict";var n=a(3),i=a.n(n),s=a(4),r=a.n(s),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(13),m=a.n(d),g=a(7),p=a.n(g),h=a(1),_=a(22),f=a(8),k=a.n(f),v=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).formFieldRef=Object(h.createRef)(),a.checkboxRef=Object(h.createRef)(),a}return p()(t,e),r()(t,[{key:"componentDidMount",value:function(){new _.e(this.formFieldRef.current).input=new _.c(this.checkboxRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.id,n=e.name,i=e.value,s=e.checked,r=e.disabled,o=e.children;return React.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},React.createElement("div",{className:"\n\t\t\t\t\t\tmdc-checkbox\n\t\t\t\t\t\t".concat(r?"mdc-checkbox--disabled":"","\n\t\t\t\t\t"),ref:this.checkboxRef},React.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:a,name:n,value:i,checked:s,disabled:r,onChange:t}),React.createElement("div",{className:"mdc-checkbox__background"},React.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},React.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),React.createElement("div",{className:"mdc-checkbox__mixedmark"}))),React.createElement("label",{htmlFor:a},o))}}]),t}(h.Component);v.propTypes={onChange:k.a.func.isRequired,id:k.a.string.isRequired,name:k.a.string.isRequired,value:k.a.string.isRequired,checked:k.a.bool,disabled:k.a.bool,children:k.a.node.isRequired},v.defaultProps={checked:!1,disabled:!1};var R=v,y=a(35),b=a.n(y),E=a(0),C=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).state={scriptOnPage:!!googlesitekit.admin.trackingOptin,optIn:!!googlesitekit.admin.trackingOptin,error:!1},a.handleOptIn=a.handleOptIn.bind(m()(a)),a}return p()(t,e),r()(t,[{key:"handleOptIn",value:function(e){var t=this,a=e.target.checked,n={googlesitekit_tracking_optin:a};b()({path:"/wp/v2/settings",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(n),method:"POST"}).then((function(){if(a&&!t.state.scriptOnPage){var e=window.document;if(!e)return;window.googlesitekitTrackingEnabled=!!a,e.body.insertAdjacentHTML("beforeend",'\n\t\t\t\t\t\t<script async src="https://www.googletagmanager.com/gtag/js?id='.concat(googlesitekit.admin.trackingID,'"><\/script>\n\t\t\t\t\t')),e.body.insertAdjacentHTML("beforeend","\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\t\t\t\t\tfunction gtag(){dataLayer.push(arguments);}\n\t\t\t\t\t\t\tgtag('js', new Date());\n\t\t\t\t\t\t\tgtag('config', '".concat(googlesitekit.admin.trackingID,"');\n\t\t\t\t\t\t<\/script>\n\t\t\t\t\t"))}t.setState({optIn:!!a,error:!1,scriptOnPage:!0})})).catch((function(a){t.setState({optIn:!e.target.checked,error:{errorCode:a.code,errorMsg:a.message}})}))}},{key:"render",value:function(){var e=this.state,t=e.optIn,a=e.error,n=this.props,i=n.id,s=n.name;return React.createElement("div",{className:"googlesitekit-opt-in"},React.createElement(R,{id:i,name:s,value:"1",checked:t,onChange:this.handleOptIn},Object(E.__)("Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with ","google-site-kit"),React.createElement("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer"},Object(E.__)("Google Privacy Policy","google-site-kit")),"."),a&&React.createElement("div",{className:"googlesitekit-error-text"},a.errorMsg))}}]),t}(h.Component);C.propTypes={id:k.a.string,name:k.a.string},C.defaultProps={id:"googlesitekit-opt-in",name:"optIn"};t.a=C},17:function(e,t,a){"use strict";var n=a(3),i=a.n(n),s=a(4),r=a.n(s),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(7),m=a.n(d),g=a(1),p=a(8),h=a.n(p),_=a(14),f=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,a=e.ctaLabel,n=e.ctaLink;return React.createElement("header",{className:"googlesitekit-layout__header"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:"\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\t\t".concat(n?"mdc-layout-grid__cell--span-6-desktop":"mdc-layout-grid__cell--span-12-desktop","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--align-middle\n\t\t\t\t\t\t\t\t\t").concat(n?"":"mdc-layout-grid__cell--span-8-tablet","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\t\t\t\t\t\t")},React.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},t)),n&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},React.createElement(_.a,{href:n,external:!0,inherit:!0},a)))))}}]),t}(g.Component);f.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},f.defaultProps={title:"",ctaLabel:"",ctaLink:""};var k=f,v=a(60),R=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.ctaLabel,a=e.ctaLink,n=e.footerContent;return React.createElement("footer",{className:"googlesitekit-layout__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},a&&t&&React.createElement(v.a,{className:"googlesitekit-data-block__source",name:t,href:a,external:!0}),n))))}}]),t}(g.Component);R.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string};var y=R,b=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.header,a=e.footer,n=e.children,i=e.title,s=e.headerCtaLabel,r=e.headerCtaLink,o=e.footerCtaLabel,c=e.footerCtaLink,l=e.footerContent,u=e.className,d=e.fill,m=e.relative;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-layout\n\t\t\t\t".concat(u&&u,"\n\t\t\t\t").concat(d?"googlesitekit-layout--fill":"","\n\t\t\t\t").concat(m?"googlesitekit-layout--relative":"","\n\t\t\t")},t&&React.createElement(k,{title:i,ctaLabel:s,ctaLink:r}),n,a&&React.createElement(y,{ctaLabel:o,ctaLink:c,footerContent:l}))}}]),t}(g.Component);b.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},b.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1};t.a=b},209:function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),s=a(3),r=a.n(s),o=a(4),c=a.n(o),l=a(5),u=a.n(l),d=a(6),m=a.n(d),g=a(13),p=a.n(g),h=a(7),_=a.n(h),f=a(1),k=a(11),v=a(0),R=a(43),y=a(29),b=a(17),E=a(9),C=a(2),S=a(8),w=a.n(S),N=a(14),O=a(143),L=a(42),j=function(e){function t(){return r()(this,t),u()(this,m()(t).apply(this,arguments))}return _()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.connectURL,a=e.needReauthenticate,n=e.resetAndRestart;return React.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--two"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(v.__)("Authenticate with Google","google-site-kit")),React.createElement("p",null,Object(v.__)("Please sign into your Google account to begin.","google-site-kit")),a&&React.createElement("p",{className:"googlesitekit-error-text"},Object(v.__)("You did not grant access to one or more of the requested scopes. Please grant all scopes that you are prompted for.","google-site-kit")),React.createElement("p",null,React.createElement(y.a,{onClick:function(){Object(C.v)("plugin_setup","signin_with_google"),document.location=t}},Object(v.__)("Sign in with Google","google-site-kit")),n&&React.createElement(N.a,{className:"googlesitekit-wizard-step__back",onClick:n},Object(v.__)("Back","google-site-kit"))),React.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},React.createElement(O.a,null),React.createElement(L.a,null))))))}}]),t}(f.Component);j.propTypes={connectURL:w.a.string.isRequired,resetAndRestart:w.a.func};var x=j,M=a(68),A=a.n(M),U=a(31),P=a(22),z=function(e){function t(e){var a;r()(this,t);var n=(a=u()(this,m()(t).call(this,e))).props,i=n.isAuthenticated,s=n.shouldSetup;return a.state={loading:i&&s,loadingMsg:Object(v.__)("Getting your verified sites...","google-site-kit"),siteURL:" ",selectedURL:"",errorCode:!1,errorMsg:""},a.onProceed=a.onProceed.bind(p()(a)),a}return _()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isAuthenticated,a=e.shouldSetup;t&&a&&this.requestSitePropertyList()}},{key:"requestSitePropertyList",value:function(){var e,t,a,n,s,r=this,o=this.props.setErrorMessage;i.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,i.a.awrap(E.c.get(E.b,"site-verification","verification"));case 3:if(e=c.sent,t=e.verified,a=e.identifier,!t){c.next=16;break}return Object(C.v)("verification_setup","verification_check_true"),c.next=10,i.a.awrap(r.insertSiteVerification(a));case 10:if(!0!==c.sent.verified){c.next=14;break}return r.props.siteVerificationSetup(!0),c.abrupt("return",!0);case 14:c.next=17;break;case 16:Object(C.v)("verification_setup","verification_check_false");case 17:r.setState({loading:!1,siteURL:a}),c.next=26;break;case 20:c.prev=20,c.t0=c.catch(0),n=c.t0.message,Object(C.z)(c.t0.message)&&(s=JSON.parse(c.t0.message),n=s.error.message||c.t0.message),o(n),r.setState({loading:!1,errorCode:c.t0.code,errorMsg:n,siteURL:googlesitekit.admin.siteURL});case 26:case"end":return c.stop()}}),null,null,[[0,20]])}},{key:"insertSiteVerification",value:function(e){return i.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.awrap(E.c.set(E.b,"site-verification","verification",{siteURL:e}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}))}},{key:"onProceed",value:function(){var e,t,a,n;return i.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return e=this.props.setErrorMessage,t=this.state.siteURL?this.state.siteURL:googlesitekit.admin.siteURL,e(""),this.setState({loading:!0,loadingMsg:Object(v.__)("Verifying...","google-site-kit"),errorCode:!1,errorMsg:""}),s.prev=4,s.next=7,i.a.awrap(this.insertSiteVerification(t));case 7:!0===s.sent.verified&&(Object(C.v)("verification_setup","verification_insert_tag"),this.props.siteVerificationSetup(!0)),s.next=17;break;case 11:s.prev=11,s.t0=s.catch(4),a=s.t0.message,Object(C.z)(s.t0.message)&&(n=JSON.parse(s.t0.message),a=n.error.message||s.t0.message),e(a),this.setState({loading:!1,errorCode:s.t0.code,errorMsg:a});case 17:case"end":return s.stop()}}),null,this,[[4,11]])}},{key:"renderForm",value:function(){var e=this.state,t=e.loading,a=e.loadingMsg,n=e.siteURL,i=React.createElement(f.Fragment,null,a&&React.createElement("p",null,a),React.createElement(U.a,null));return t?i:React.createElement(f.Fragment,null,React.createElement("div",{className:"googlesitekit-wizard-step__inputs"},React.createElement(P.l,{label:Object(v.__)("Website Address","google-site-kit"),name:"siteProperty",floatingLabelClassName:"mdc-floating-label--float-above",outlined:!0,disabled:!0},React.createElement(P.b,{value:n}))),React.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},React.createElement(y.a,{onClick:this.onProceed},Object(v.__)("Continue","google-site-kit")),React.createElement(L.a,null)))}},{key:"render",value:function(){var e=this.props,a=e.isAuthenticated,n=e.shouldSetup,i=this.state.errorMsg;return n?React.createElement(f.Fragment,null,React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(v.__)("Verify URL","google-site-kit")),React.createElement("p",{className:"googlesitekit-wizard-step__text"},Object(v.__)("We will need to verify your URL for Site Kit.","google-site-kit")),i&&0<i.length&&React.createElement("p",{className:"googlesitekit-error-text"},i),a&&this.renderForm()):t.renderSetupDone()}}],[{key:"renderSetupDone",value:function(){return React.createElement(f.Fragment,null,React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(v.__)("Verify URL","google-site-kit")),React.createElement("p",{className:"googlesitekit-wizard-step__text"},Object(v.__)("Congratulations, your site has been verified!","google-site-kit")))}}]),t}(f.Component);z.propTypes={isAuthenticated:w.a.bool.isRequired,shouldSetup:w.a.bool.isRequired,siteVerificationSetup:w.a.func.isRequired,completeSetup:w.a.func,setErrorMessage:w.a.func.isRequired};var D=z,q=function(e){function t(){return r()(this,t),u()(this,m()(t).apply(this,arguments))}return _()(t,e),c()(t,[{key:"render",value:function(){var e=!this.props.isVerified;return React.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--three"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(D,A()({shouldSetup:e},this.props))))))}}]),t}(f.Component);q.propTypes={siteVerificationSetup:w.a.func.isRequired};var F=q,T=function(e){function t(e){var a;r()(this,t),a=u()(this,m()(t).call(this,e));var n=googlesitekit.admin.siteURL;return a.state={loading:!0,sites:!1,selectedURL:n,siteURL:n,connected:!1,errorCode:!1,errorMsg:""},a.handleURLSelect=a.handleURLSelect.bind(p()(a)),a.insertPropertyToSearchConsole=a.insertPropertyToSearchConsole.bind(p()(a)),a.submitPropertyEventHandler=a.submitPropertyEventHandler.bind(p()(a)),a}return _()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e,t,a,n,s,r;return i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(e=this.props,t=e.isAuthenticated,a=e.shouldSetup,t&&a){o.next=3;break}return o.abrupt("return");case 3:return o.prev=3,n=["siteRestrictedUser","siteOwner","siteFullUser"],o.next=7,i.a.awrap(E.c.get(E.b,"search-console","matched-sites"));case 7:if(s=o.sent,!(r=s.exactMatch)||!n.includes(r.permissionLevel)){o.next=13;break}return o.next=12,i.a.awrap(E.c.set(E.b,"search-console","site",{siteURL:r.siteURL}));case 12:return o.abrupt("return",this.props.searchConsoleSetup(r.siteURL));case 13:o.next=17;break;case 15:o.prev=15,o.t0=o.catch(3);case 17:this.requestSearchConsoleSiteList();case 18:case"end":return o.stop()}}),null,this,[[3,15]])}},{key:"requestSearchConsoleSiteList",value:function(){var e=this;if(!this.state.errorCode){var t,a,n,s,r=this.props.setErrorMessage;i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,i.a.awrap(E.c.get(E.b,"search-console","matched-sites"));case 3:if(t=o.sent,a=t.exactMatch,n=t.propertyMatches,!a){o.next=11;break}return o.next=9,i.a.awrap(e.insertPropertyToSearchConsole(a.siteURL));case 9:return e.props.searchConsoleSetup(a.siteURL),o.abrupt("return");case 11:s="",s=1<n.length?Object(v.sprintf)(
|
2 |
/* translators: %d: the number of matching properties. %s: URL of recommended site. */
|
3 |
-
Object(v.__)("We found %d existing accounts. We recommend using the account “%s”. Please confirm or change below to use.","google-site-kit"),n.length,n[0].siteURL):Object(v.__)("Your site has not been added to Search Console yet. Would you like to add it now?","google-site-kit"),r(s),e.setState({loading:!1,sites:n,errorCode:"no_property_matched",errorMsg:s}),o.next=21;break;case 17:o.prev=17,o.t0=o.catch(0),r(o.t0.message),e.setState({loading:!1,errorCode:o.t0.code,errorMsg:o.t0.message});case 21:case"end":return o.stop()}}),null,null,[[0,17]])}}},{key:"insertPropertyToSearchConsole",value:function(e){return i.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.awrap(E.c.set(E.b,"search-console","site",{siteURL:e}));case 2:Object(C.v)("search_console_setup","add_new_sc_property"),this.setState({loading:!1,connected:!0});case 4:case"end":return t.stop()}}),null,this)}},{key:"submitPropertyEventHandler",value:function(){var e=this,t=this.state.selectedURL,a=this.props.setErrorMessage;i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i.a.awrap(e.insertPropertyToSearchConsole(t));case 3:a(""),e.props.searchConsoleSetup(t),n.next=11;break;case 7:n.prev=7,n.t0=n.catch(0),a(n.t0.message[0].message),e.setState({loading:!1,errorCode:n.t0.code,errorMsg:n.t0.message[0].message});case 11:case"end":return n.stop()}}),null,null,[[0,7]])}},{key:"handleURLSelect",value:function(e,t){this.setState({selectedURL:t.getAttribute("data-value")})}},{key:"matchedForm",value:function(){var e=this.state,t=e.sites,a=e.selectedURL,n=[{label:"",value:"",disabled:!0}];return t?(t.forEach((function(e){n.push({label:e,value:e})})),React.createElement(f.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__inputs"},React.createElement(P.k,{enhanced:!0,name:"siteProperty",label:Object(v.__)("Choose URL","google-site-kit"),outlined:!0,onEnhancedChange:this.handleURLSelect,options:n,value:a})),React.createElement("div",{className:"googlesitekit-setup-module__action googlesitekit-setup-module__action--justify"},React.createElement(y.a,{onClick:this.submitPropertyEventHandler},Object(v.__)("Continue","google-site-kit")),React.createElement(L.a,null)))):null}},{key:"noSiteForm",value:function(){var e=this.state.siteURL;return React.createElement(f.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__inputs"},React.createElement(P.l,{label:Object(v.__)("Website Address","google-site-kit"),name:"siteProperty",floatingLabelClassName:"mdc-floating-label--float-above",outlined:!0,disabled:!0},React.createElement(P.b,{value:e}))),React.createElement("div",{className:"googlesitekit-setup-module__action googlesitekit-setup-module__action--justify"},React.createElement(y.a,{onClick:this.submitPropertyEventHandler},Object(v.__)("Continue","google-site-kit")),React.createElement(L.a,null)))}},{key:"renderForm",value:function(){var e=this.state,t=e.loading,a=e.sites;return t?React.createElement(f.Fragment,null,React.createElement("p",null,Object(v.__)("We’re locating your Search Console account.","google-site-kit")),React.createElement(U.a,null)):0===a.length?this.noSiteForm():this.matchedForm()}},{key:"render",value:function(){var e=this.props,a=e.isAuthenticated,n=e.shouldSetup,i=this.state,s=i.errorMsg,r=i.connected;return!n||r?t.connected():React.createElement("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console"},React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(v._x)("Search Console","Service name","google-site-kit")),s&&0<s.length&&React.createElement("p",{className:"googlesitekit-error-text"},s),a&&n&&this.renderForm())}}],[{key:"connected",value:function(){return React.createElement("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console"},React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(v._x)("Search Console","Service name","google-site-kit")),React.createElement("p",{className:"googlesitekit-setup-module__text--no-margin"},Object(v.__)("Your Search Console is set up with Site Kit.","google-site-kit")))}}]),t}(f.Component);T.propTypes={isAuthenticated:w.a.bool.isRequired,shouldSetup:w.a.bool.isRequired,searchConsoleSetup:w.a.func.isRequired,setErrorMessage:w.a.func.isRequired};var V=T,I=function(e){function t(){return r()(this,t),u()(this,m()(t).apply(this,arguments))}return _()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.isVerified,a=e.hasSearchConsoleProperty,n=t&&!a;return React.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--four"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n?React.createElement(V,A()({shouldSetup:n},this.props)):V.connected()))))}}]),t}(f.Component);I.propTypes={searchConsoleSetup:w.a.func.isRequired};var K=I,B=function(e){function t(e){var a;return r()(this,t),a=u()(this,m()(t).call(this,e)),googlesitekit.setup.hasSearchConsoleProperty?Object(C.v)("plugin_setup","user_verified"):Object(C.v)("plugin_setup","site_verified"),a}return _()(t,e),c()(t,[{key:"render",value:function(){return React.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--five"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-9-desktop "},React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(v.__)("Congratulations!","google-site-kit")),React.createElement("p",null,Object(v.__)("You successfully completed the Site Kit setup and connected Search Console. Check the dashboard for more services to connect.","google-site-kit")),React.createElement("div",{className:"googlesitekit-wizard-step__action"},React.createElement(y.a,{id:"wizard-step-five-proceed",onClick:this.props.completeSetup},Object(v.__)("Go to Dashboard","google-site-kit")))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-3-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement("div",{className:"googlesitekit-rocket"},React.createElement("img",{className:"googlesitekit-rocket__body",alt:"",src:googlesitekit.admin.assetsRoot+"images/rocket-body.png"}),React.createElement("img",{className:"googlesitekit-rocket__clouds",alt:"",src:googlesitekit.admin.assetsRoot+"images/rocket-clouds.png"}),React.createElement("img",{className:"googlesitekit-rocket__dust",alt:"",src:googlesitekit.admin.assetsRoot+"images/rocket-dust.png"}))))))}}]),t}(f.Component);B.propTypes={completeSetup:w.a.func.isRequired};var G=B,H={authentication:{title:Object(v.__)("Authenticate","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&!e.needReauthenticate},Component:x},verification:{title:Object(v.__)("Verify URL","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified},Component:F},seachConsoleProperty:{title:Object(v.__)("Connect Search Console","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified&&e.hasSearchConsoleProperty},Component:K},completeSetup:{title:Object(v.__)("Finish","google-site-kit"),required:!1,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified&&e.hasSearchConsoleProperty},Component:G}},W=a(20),J=a(18),Y=a.n(J),Q=function(e){function t(){return r()(this,t),u()(this,m()(t).apply(this,arguments))}return _()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.currentStep,a=e.step,n=e.title,i=e.status,s=e.warning,r=e.error,o=e.stepKey,c=i;s?c="warning":r&&(c="error");var l=!1;switch(c){case"warning":case"error":l=Y.a.createElement(W.a,{id:"exclamation",height:"12",width:"2"});break;case"completed":l=Y.a.createElement(W.a,{id:"check",height:"12",width:"16"})}return Y.a.createElement("div",{className:"\n\t\t\t\tgooglesitekit-wizard-progress-step\n\t\t\t\tgooglesitekit-wizard-progress-step--".concat(a,"\n\t\t\t\t").concat(t?"googlesitekit-wizard-progress-step--current":"","\n\t\t\t\tgooglesitekit-wizard-progress-step--").concat(o,"\n\t\t\t")},Y.a.createElement("div",{className:"googlesitekit-wizard-progress-step__number-wrapper"},Y.a.createElement("div",{className:"\n\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number\n\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number--".concat(c,"\n\t\t\t\t\t")},Y.a.createElement("span",{className:"\n\t\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number-text\n\t\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number-text--".concat(c,"\n\t\t\t\t\t\t")},a),l&&Y.a.createElement("span",{className:"\n\t\t\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number-icon\n\t\t\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number-icon--".concat(c,"\n\t\t\t\t\t\t\t")},l))),Y.a.createElement("p",{className:"googlesitekit-wizard-progress-step__text"},n))}}]),t}(f.Component);Q.propTypes={currentStep:w.a.bool.isRequired,step:w.a.number.isRequired,title:w.a.string,status:w.a.string,warning:w.a.bool,error:w.a.bool},Q.defaultProps={title:"",status:"",warning:!1,error:!1,removeFirstStep:!1};var X=Q,Z=function(e){function t(e){var a;r()(this,t),a=u()(this,m()(t).call(this,e));var n=googlesitekit.admin.connectURL,i=googlesitekit.setup,s=i.isAuthenticated,o=i.hasSearchConsoleProperty,c=i.isSiteKitConnected,l=i.isVerified,d=i.needReauthenticate,g=googlesitekit.permissions.canSetup;return a.state={canSetup:g,isAuthenticated:s,isVerified:l,needReauthenticate:d,hasSearchConsoleProperty:o,hasSearchConsolePropertyFromTheStart:o,connectURL:n,errorMsg:"",isSiteKitConnected:c,completeSetup:!1},a.siteConnectedSetup=a.siteConnectedSetup.bind(p()(a)),a.siteVerificationSetup=a.siteVerificationSetup.bind(p()(a)),a.searchConsoleSetup=a.searchConsoleSetup.bind(p()(a)),a.resetAndRestart=a.resetAndRestart.bind(p()(a)),a.completeSetup=a.completeSetup.bind(p()(a)),a.setErrorMessage=a.setErrorMessage.bind(p()(a)),a}return _()(t,e),c()(t,[{key:"resetAndRestart",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(E.c.set(E.a,"site","reset"));case 2:Object(C.d)(),this.setState({isSiteKitConnected:!1,isAuthenticated:!1,isVerified:!1,hasSearchConsoleProperty:!1,completeSetup:!1,errorMsg:""});case 4:case"end":return e.stop()}}),null,this)}},{key:"completeSetup",value:function(){this.setState({completeSetup:!0})}},{key:"siteConnectedSetup",value:function(e){this.setState({isSiteKitConnected:e})}},{key:"siteVerificationSetup",value:function(e){this.setState({isVerified:e})}},{key:"searchConsoleSetup",value:function(e){this.setState({hasSearchConsoleProperty:e})}},{key:"isSetupFinished",value:function(){var e=this.state,t=e.isSiteKitConnected,a=e.isAuthenticated,n=e.isVerified,i=e.hasSearchConsoleProperty,s=e.completeSetup;return t&&a&&n&&i&&s}},{key:"setErrorMessage",value:function(e){this.setState({errorMsg:e})}},{key:"getApplicableSteps",value:function(){var e,t=H,a=Object.keys(t);for(e=0;e<a.length;e++)t[a[e]].isApplicable(this.state)||delete t[a[e]];return t}},{key:"currentStep",value:function(e){var t,a=Object.keys(e);for(t=0;t<a.length-1;t++)if(!e[a[t]].isCompleted(this.state))return a[t];return a[t]}},{key:"stepStatus",value:function(e,t){return e[t].isCompleted(this.state)?"completed":t===this.currentStep(e)?"inprogress":""}},{key:"render",value:function(){var e=this,t=this.state,a=t.canSetup,n=t.isAuthenticated,i=t.isVerified,s=t.needReauthenticate,r=t.hasSearchConsoleProperty,o=t.connectURL,c=t.isSiteKitConnected;if(this.isSetupFinished()){var l=Object(C.n)("googlesitekit-dashboard",{notification:"authentication_success"});Object(k.delay)((function(){window.location.replace(l)}),500,"later")}var u=this.getApplicableSteps(),d=this.currentStep(u),m=u[d].Component,g=React.createElement(m,{siteConnectedSetup:this.siteConnectedSetup,connectURL:o,siteVerificationSetup:this.siteVerificationSetup,searchConsoleSetup:this.searchConsoleSetup,completeSetup:this.completeSetup,isSiteKitConnected:c,isAuthenticated:n,isVerified:i,needReauthenticate:s,hasSearchConsoleProperty:r,setErrorMessage:this.setErrorMessage,resetAndRestart:u.clientCredentials?this.resetAndRestart:void 0}),p=a,h=!p&&!n;return React.createElement(f.Fragment,null,React.createElement(R.a,null),React.createElement("div",{className:"googlesitekit-wizard"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(b.a,null,React.createElement("section",{className:"googlesitekit-wizard-progress"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},p&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-wizard-progress__steps"},Object.keys(u).map((function(t,a){return React.createElement(X,{key:u[t].title,currentStep:d===t,title:u[t].title,step:a+1,status:e.stepStatus(u,t),warning:u[t].warning,error:u[t].error,stepKey:t})})))))),h&&React.createElement("div",{className:"googlesitekit-setup__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("h1",{className:"googlesitekit-setup__title"},Object(v.__)("Authenticate Site Kit","google-site-kit")),React.createElement("p",{className:"googlesitekit-setup__description"},Object(v.__)("Please sign into your Google account to begin.","google-site-kit")),React.createElement(y.a,{href:"#",onClick:function(){Object(C.v)("plugin_setup","signin_with_google"),document.location=o}},Object(v.__)("Sign in with Google","google-site-kit"))))))),p&&g))))))}}]),t}(f.Component);t.default=Z},42:function(e,t,a){"use strict";a(1);var n=a(0),i=a(14);t.a=function(){var e=Object(n.__)("Need help?","google-site-kit");return React.createElement(i.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},e)}},43:function(e,t,a){"use strict";var n=a(3),i=a.n(n),s=a(4),r=a.n(s),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(7),m=a.n(d),g=a(1),p=a(21),h=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){return null}}]),t}(g.Component),_=Object(p.a)("googlesitekit.ErrorNotification")(h),f=a(80),k=a(12),v=a.n(k),R=a(13),y=a.n(R),b=a(67),E=a(29),C=a(22),S=a(8),w=a.n(S),N=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).menuRef=Object(g.createRef)(),a}return m()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new C.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var e=this.props,t=e.menuOpen,a=e.menuItems,n=e.onSelected,i=e.id;return React.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},React.createElement("ul",{id:i,className:"mdc-list",role:"menu","aria-hidden":!t,"aria-orientation":"vertical",tabIndex:"-1"},a.map((function(e,t){return React.createElement("li",{key:t,className:"mdc-list-item",role:"menuitem",onClick:n.bind(null,t),onKeyDown:n.bind(null,t)},React.createElement("span",{className:"mdc-list-item__text"},e))}))))}}]),t}(g.Component);N.propTypes={menuOpen:w.a.bool.isRequired,menuItems:w.a.array.isRequired,id:w.a.string.isRequired};var O=N,L=a(2),j=a(0),x=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).state={dialogActive:!1,menuOpen:!1},a.handleMenu=a.handleMenu.bind(y()(a)),a.handleMenuClose=a.handleMenuClose.bind(y()(a)),a.handleMenuItemSelect=a.handleMenuItemSelect.bind(y()(a)),a.handleDialog=a.handleDialog.bind(y()(a)),a.handleDialogClose=a.handleDialogClose.bind(y()(a)),a.handleUnlinkConfirm=a.handleUnlinkConfirm.bind(y()(a)),a.menuButtonRef=Object(g.createRef)(),a.menuRef=Object(g.createRef)(),a}return m()(t,e),r()(t,[{key:"componentDidMount",value:function(){window.addEventListener("mouseup",this.handleMenuClose),window.addEventListener("keyup",this.handleMenuClose),window.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.handleMenuClose),window.removeEventListener("keyup",this.handleMenuClose),window.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(e,t){var a=googlesitekit.admin.proxyPermissionsURL;if("keydown"===t.type&&(13===t.keyCode||32===t.keyCode)||"click"===t.type)switch(e){case 0:this.handleDialog();break;case 1:window.location.assign(a);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return v.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(L.d)(),document.location=Object(L.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var e=googlesitekit.admin,t=e.userData,a=t.email,n=void 0===a?"":a,i=t.picture,s=void 0===i?"":i,r=e.proxyPermissionsURL,o=this.state,c=o.dialogActive,l=o.menuOpen;return React.createElement(g.Fragment,null,React.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},React.createElement(E.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:s?React.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},React.createElement("img",{className:"mdc-button__icon--image",src:s,alt:Object(j.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:l,ariaControls:"user-menu"},n),React.createElement(O,{ref:this.menuRef,menuOpen:l,menuItems:[Object(j.__)("Disconnect","google-site-kit")].concat(r?[Object(j.__)("Manage sites...","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),React.createElement(b.a,{dialogActive:c,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(j.__)("Disconnect","google-site-kit"),subtitle:Object(j.__)("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(j.__)("Disconnect","google-site-kit"),provides:[]}))}}]),t}(g.Component),M=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),r()(t,[{key:"render",value:function(){var e=googlesitekit.setup.isAuthenticated;return React.createElement(g.Fragment,null,React.createElement("header",{className:"googlesitekit-header"},React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(f.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e&&React.createElement(x,null))))),React.createElement(_,null))}}]),t}(g.Component);t.a=M},67:function(e,t,a){"use strict";var n=a(3),i=a.n(n),s=a(4),r=a.n(s),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(7),m=a.n(d),g=a(1),p=a(8),h=a.n(p),_=a(29),f=a(14),k=a(22),v=a(144),R=a.n(v),y=a(0),b=function(e){function t(){var e;return i()(this,t),(e=c()(this,u()(t).call(this))).state={attributes:[Object(y.__)("Audience overview","google-site-kit"),Object(y.__)("Top pages","google-site-kit"),Object(y.__)("Top acquisition sources","google-site-kit"),Object(y.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(g.createRef)(),e}return m()(t,e),r()(t,[{key:"componentDidMount",value:function(){new k.d(this.dialogRef.current)}},{key:"render",value:function(){var e=this.props,t=e.dialogActive,a=e.handleDialog,n=e.title,i=e.provides,s=e.handleConfirm,r=e.subtitle,o=e.confirmButton,c=e.dependentModules;return React.createElement("div",{ref:this.dialogRef,className:"mdc-dialog ".concat(t?"mdc-dialog--open":""),role:"alertdialog","aria-modal":"true","aria-labelledby":"remove-module-dialog","aria-describedby":"remove-module-dialog-description","aria-hidden":t?"false":"true",tabIndex:"-1"},React.createElement("div",{className:"mdc-dialog__scrim"}," "),React.createElement(R.a,{active:t},React.createElement("div",null,React.createElement("div",{className:"mdc-dialog__container"},React.createElement("div",{className:"mdc-dialog__surface"},n&&React.createElement("h2",{id:"remove-module-dialog",className:"mdc-dialog__title"},n),r&&React.createElement("p",{className:"mdc-dialog__lead"},r),React.createElement("section",{id:"remove-module-dialog-description",className:"mdc-dialog__content"},React.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},i&&i.map((function(e){return React.createElement("li",{className:"mdc-list-item",key:e},React.createElement("span",{className:"mdc-list-item__text"},e))})))),c&&React.createElement("p",{className:"mdc-dialog__dependecies"},React.createElement("strong",null,Object(y.__)("Note: ","google-site-kit")),c),React.createElement("footer",{className:"mdc-dialog__actions"},React.createElement(_.a,{onClick:s,danger:!0},o||Object(y.__)("Disconnect","google-site-kit")),React.createElement(f.a,{className:"mdc-dialog__cancel-button",onClick:function(){return a()},inherit:!0},Object(y.__)("Cancel","google-site-kit"))))))))}}]),t}(g.Component);b.propTypes={dialogActive:h.a.bool,handleDialog:h.a.func,handleConfirm:h.a.func.isRequired,title:h.a.string,description:h.a.string,confirmButton:h.a.string},b.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null},t.a=b}}]);
|
1 |
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{144:function(e,t,a){"use strict";var n=a(3),i=a.n(n),r=a(4),s=a.n(r),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(13),m=a.n(d),g=a(7),p=a.n(g),h=a(1),_=a(22),f=a(8),k=a.n(f),v=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).formFieldRef=Object(h.createRef)(),a.checkboxRef=Object(h.createRef)(),a}return p()(t,e),s()(t,[{key:"componentDidMount",value:function(){new _.e(this.formFieldRef.current).input=new _.c(this.checkboxRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.id,n=e.name,i=e.value,r=e.checked,s=e.disabled,o=e.children;return React.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},React.createElement("div",{className:"\n\t\t\t\t\t\tmdc-checkbox\n\t\t\t\t\t\t".concat(s?"mdc-checkbox--disabled":"","\n\t\t\t\t\t"),ref:this.checkboxRef},React.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:a,name:n,value:i,checked:r,disabled:s,onChange:t}),React.createElement("div",{className:"mdc-checkbox__background"},React.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},React.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),React.createElement("div",{className:"mdc-checkbox__mixedmark"}))),React.createElement("label",{htmlFor:a},o))}}]),t}(h.Component);v.propTypes={onChange:k.a.func.isRequired,id:k.a.string.isRequired,name:k.a.string.isRequired,value:k.a.string.isRequired,checked:k.a.bool,disabled:k.a.bool,children:k.a.node.isRequired},v.defaultProps={checked:!1,disabled:!1};var R=v,y=a(35),b=a.n(y),E=a(0),C=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).state={scriptOnPage:!!window.googlesitekitTrackingEnabled,optIn:!!window.googlesitekitTrackingEnabled,error:!1},a.handleOptIn=a.handleOptIn.bind(m()(a)),a}return p()(t,e),s()(t,[{key:"handleOptIn",value:function(e){var t=this,a=e.target.checked,n={googlesitekit_tracking_optin:a};b()({path:"/wp/v2/settings",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(n),method:"POST"}).then((function(){if(window.googlesitekitTrackingEnabled=!!a,a&&!t.state.scriptOnPage){var e=window.document;if(!e)return;e.body.insertAdjacentHTML("beforeend",'\n\t\t\t\t\t\t<script async src="https://www.googletagmanager.com/gtag/js?id='.concat(googlesitekit.admin.trackingID,'"><\/script>\n\t\t\t\t\t')),e.body.insertAdjacentHTML("beforeend","\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\t\t\t\t\tfunction gtag(){dataLayer.push(arguments);}\n\t\t\t\t\t\t\tgtag('js', new Date());\n\t\t\t\t\t\t\tgtag('config', '".concat(googlesitekit.admin.trackingID,"');\n\t\t\t\t\t\t<\/script>\n\t\t\t\t\t"))}t.setState({optIn:!!a,error:!1,scriptOnPage:!0})})).catch((function(a){t.setState({optIn:!e.target.checked,error:{errorCode:a.code,errorMsg:a.message}})}))}},{key:"render",value:function(){var e=this.state,t=e.optIn,a=e.error,n=this.props,i=n.id,r=n.name;return React.createElement("div",{className:"googlesitekit-opt-in"},React.createElement(R,{id:i,name:r,value:"1",checked:t,onChange:this.handleOptIn},Object(E.__)("Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with ","google-site-kit"),React.createElement("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer"},Object(E.__)("Google Privacy Policy","google-site-kit")),"."),a&&React.createElement("div",{className:"googlesitekit-error-text"},a.errorMsg))}}]),t}(h.Component);C.propTypes={id:k.a.string,name:k.a.string},C.defaultProps={id:"googlesitekit-opt-in",name:"optIn"};t.a=C},17:function(e,t,a){"use strict";var n=a(3),i=a.n(n),r=a(4),s=a.n(r),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(7),m=a.n(d),g=a(1),p=a(8),h=a.n(p),_=a(14),f=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,t=e.title,a=e.ctaLabel,n=e.ctaLink;return React.createElement("header",{className:"googlesitekit-layout__header"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:"\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\t\t".concat(n?"mdc-layout-grid__cell--span-6-desktop":"mdc-layout-grid__cell--span-12-desktop","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--align-middle\n\t\t\t\t\t\t\t\t\t").concat(n?"":"mdc-layout-grid__cell--span-8-tablet","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\t\t\t\t\t\t")},React.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},t)),n&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},React.createElement(_.a,{href:n,external:!0,inherit:!0},a)))))}}]),t}(g.Component);f.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},f.defaultProps={title:"",ctaLabel:"",ctaLink:""};var k=f,v=a(60),R=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,t=e.ctaLabel,a=e.ctaLink,n=e.footerContent;return React.createElement("footer",{className:"googlesitekit-layout__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},a&&t&&React.createElement(v.a,{className:"googlesitekit-data-block__source",name:t,href:a,external:!0}),n))))}}]),t}(g.Component);R.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string};var y=R,b=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),s()(t,[{key:"render",value:function(){var e=this.props,t=e.header,a=e.footer,n=e.children,i=e.title,r=e.headerCtaLabel,s=e.headerCtaLink,o=e.footerCtaLabel,c=e.footerCtaLink,l=e.footerContent,u=e.className,d=e.fill,m=e.relative;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-layout\n\t\t\t\t".concat(u&&u,"\n\t\t\t\t").concat(d?"googlesitekit-layout--fill":"","\n\t\t\t\t").concat(m?"googlesitekit-layout--relative":"","\n\t\t\t")},t&&React.createElement(k,{title:i,ctaLabel:r,ctaLink:s}),n,a&&React.createElement(y,{ctaLabel:o,ctaLink:c,footerContent:l}))}}]),t}(g.Component);b.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},b.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1};t.a=b},210:function(e,t,a){"use strict";a.r(t);var n=a(12),i=a.n(n),r=a(3),s=a.n(r),o=a(4),c=a.n(o),l=a(5),u=a.n(l),d=a(6),m=a.n(d),g=a(13),p=a.n(g),h=a(7),_=a.n(h),f=a(1),k=a(11),v=a(0),R=a(43),y=a(29),b=a(17),E=a(9),C=a(2),S=a(8),w=a.n(S),N=a(14),O=a(144),j=a(42),L=function(e){function t(){return s()(this,t),u()(this,m()(t).apply(this,arguments))}return _()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.connectURL,a=e.needReauthenticate,n=e.resetAndRestart;return React.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--two"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(v.__)("Authenticate with Google","google-site-kit")),React.createElement("p",null,Object(v.__)("Please sign into your Google account to begin.","google-site-kit")),a&&React.createElement("p",{className:"googlesitekit-error-text"},Object(v.__)("You did not grant access to one or more of the requested scopes. Please grant all scopes that you are prompted for.","google-site-kit")),React.createElement("p",null,React.createElement(y.a,{onClick:function(){Object(C.v)("plugin_setup","signin_with_google"),document.location=t}},Object(v.__)("Sign in with Google","google-site-kit")),n&&React.createElement(N.a,{className:"googlesitekit-wizard-step__back",onClick:n},Object(v.__)("Back","google-site-kit"))),React.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},React.createElement(O.a,null),React.createElement(j.a,null))))))}}]),t}(f.Component);L.propTypes={connectURL:w.a.string.isRequired,resetAndRestart:w.a.func};var x=L,M=a(68),A=a.n(M),U=a(31),P=a(22),z=function(e){function t(e){var a;s()(this,t);var n=(a=u()(this,m()(t).call(this,e))).props,i=n.isAuthenticated,r=n.shouldSetup;return a.state={loading:i&&r,loadingMsg:Object(v.__)("Getting your verified sites...","google-site-kit"),siteURL:" ",selectedURL:"",errorCode:!1,errorMsg:""},a.onProceed=a.onProceed.bind(p()(a)),a}return _()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isAuthenticated,a=e.shouldSetup;t&&a&&this.requestSitePropertyList()}},{key:"requestSitePropertyList",value:function(){var e,t,a,n,r,s=this,o=this.props.setErrorMessage;i.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,i.a.awrap(E.c.get(E.b,"site-verification","verification"));case 3:if(e=c.sent,t=e.verified,a=e.identifier,!t){c.next=16;break}return Object(C.v)("verification_setup","verification_check_true"),c.next=10,i.a.awrap(s.insertSiteVerification(a));case 10:if(!0!==c.sent.verified){c.next=14;break}return s.props.siteVerificationSetup(!0),c.abrupt("return",!0);case 14:c.next=17;break;case 16:Object(C.v)("verification_setup","verification_check_false");case 17:s.setState({loading:!1,siteURL:a}),c.next=26;break;case 20:c.prev=20,c.t0=c.catch(0),n=c.t0.message,Object(C.z)(c.t0.message)&&(r=JSON.parse(c.t0.message),n=r.error.message||c.t0.message),o(n),s.setState({loading:!1,errorCode:c.t0.code,errorMsg:n,siteURL:googlesitekit.admin.siteURL});case 26:case"end":return c.stop()}}),null,null,[[0,20]])}},{key:"insertSiteVerification",value:function(e){return i.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.awrap(E.c.set(E.b,"site-verification","verification",{siteURL:e}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}))}},{key:"onProceed",value:function(){var e,t,a,n;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return e=this.props.setErrorMessage,t=this.state.siteURL?this.state.siteURL:googlesitekit.admin.siteURL,e(""),this.setState({loading:!0,loadingMsg:Object(v.__)("Verifying...","google-site-kit"),errorCode:!1,errorMsg:""}),r.prev=4,r.next=7,i.a.awrap(this.insertSiteVerification(t));case 7:!0===r.sent.verified&&(Object(C.v)("verification_setup","verification_insert_tag"),this.props.siteVerificationSetup(!0)),r.next=17;break;case 11:r.prev=11,r.t0=r.catch(4),a=r.t0.message,Object(C.z)(r.t0.message)&&(n=JSON.parse(r.t0.message),a=n.error.message||r.t0.message),e(a),this.setState({loading:!1,errorCode:r.t0.code,errorMsg:a});case 17:case"end":return r.stop()}}),null,this,[[4,11]])}},{key:"renderForm",value:function(){var e=this.state,t=e.loading,a=e.loadingMsg,n=e.siteURL,i=React.createElement(f.Fragment,null,a&&React.createElement("p",null,a),React.createElement(U.a,null));return t?i:React.createElement(f.Fragment,null,React.createElement("div",{className:"googlesitekit-wizard-step__inputs"},React.createElement(P.l,{label:Object(v.__)("Website Address","google-site-kit"),name:"siteProperty",floatingLabelClassName:"mdc-floating-label--float-above",outlined:!0,disabled:!0},React.createElement(P.b,{value:n}))),React.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},React.createElement(y.a,{onClick:this.onProceed},Object(v.__)("Continue","google-site-kit")),React.createElement(j.a,null)))}},{key:"render",value:function(){var e=this.props,a=e.isAuthenticated,n=e.shouldSetup,i=this.state.errorMsg;return n?React.createElement(f.Fragment,null,React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(v.__)("Verify URL","google-site-kit")),React.createElement("p",{className:"googlesitekit-wizard-step__text"},Object(v.__)("We will need to verify your URL for Site Kit.","google-site-kit")),i&&0<i.length&&React.createElement("p",{className:"googlesitekit-error-text"},i),a&&this.renderForm()):t.renderSetupDone()}}],[{key:"renderSetupDone",value:function(){return React.createElement(f.Fragment,null,React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(v.__)("Verify URL","google-site-kit")),React.createElement("p",{className:"googlesitekit-wizard-step__text"},Object(v.__)("Congratulations, your site has been verified!","google-site-kit")))}}]),t}(f.Component);z.propTypes={isAuthenticated:w.a.bool.isRequired,shouldSetup:w.a.bool.isRequired,siteVerificationSetup:w.a.func.isRequired,completeSetup:w.a.func,setErrorMessage:w.a.func.isRequired};var D=z,q=function(e){function t(){return s()(this,t),u()(this,m()(t).apply(this,arguments))}return _()(t,e),c()(t,[{key:"render",value:function(){var e=!this.props.isVerified;return React.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--three"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(D,A()({shouldSetup:e},this.props))))))}}]),t}(f.Component);q.propTypes={siteVerificationSetup:w.a.func.isRequired};var F=q,T=function(e){function t(e){var a;s()(this,t),a=u()(this,m()(t).call(this,e));var n=googlesitekit.admin.siteURL;return a.state={loading:!0,sites:!1,selectedURL:n,siteURL:n,connected:!1,errorCode:!1,errorMsg:""},a.handleURLSelect=a.handleURLSelect.bind(p()(a)),a.insertPropertyToSearchConsole=a.insertPropertyToSearchConsole.bind(p()(a)),a.submitPropertyEventHandler=a.submitPropertyEventHandler.bind(p()(a)),a}return _()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e,t,a,n,r,s;return i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(e=this.props,t=e.isAuthenticated,a=e.shouldSetup,t&&a){o.next=3;break}return o.abrupt("return");case 3:return o.prev=3,n=["siteRestrictedUser","siteOwner","siteFullUser"],o.next=7,i.a.awrap(E.c.get(E.b,"search-console","matched-sites"));case 7:if(r=o.sent,!(s=r.exactMatch)||!n.includes(s.permissionLevel)){o.next=13;break}return o.next=12,i.a.awrap(E.c.set(E.b,"search-console","site",{siteURL:s.siteURL}));case 12:return o.abrupt("return",this.props.searchConsoleSetup(s.siteURL));case 13:o.next=17;break;case 15:o.prev=15,o.t0=o.catch(3);case 17:this.requestSearchConsoleSiteList();case 18:case"end":return o.stop()}}),null,this,[[3,15]])}},{key:"requestSearchConsoleSiteList",value:function(){var e=this;if(!this.state.errorCode){var t,a,n,r,s=this.props.setErrorMessage;i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,i.a.awrap(E.c.get(E.b,"search-console","matched-sites"));case 3:if(t=o.sent,a=t.exactMatch,n=t.propertyMatches,!a){o.next=11;break}return o.next=9,i.a.awrap(e.insertPropertyToSearchConsole(a.siteURL));case 9:return e.props.searchConsoleSetup(a.siteURL),o.abrupt("return");case 11:r="",r=1<n.length?Object(v.sprintf)(
|
2 |
/* translators: %d: the number of matching properties. %s: URL of recommended site. */
|
3 |
+
Object(v.__)("We found %d existing accounts. We recommend using the account “%s”. Please confirm or change below to use.","google-site-kit"),n.length,n[0].siteURL):Object(v.__)("Your site has not been added to Search Console yet. Would you like to add it now?","google-site-kit"),s(r),e.setState({loading:!1,sites:n,errorCode:"no_property_matched",errorMsg:r}),o.next=21;break;case 17:o.prev=17,o.t0=o.catch(0),s(o.t0.message),e.setState({loading:!1,errorCode:o.t0.code,errorMsg:o.t0.message});case 21:case"end":return o.stop()}}),null,null,[[0,17]])}}},{key:"insertPropertyToSearchConsole",value:function(e){return i.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.awrap(E.c.set(E.b,"search-console","site",{siteURL:e}));case 2:Object(C.v)("search_console_setup","add_new_sc_property"),this.setState({loading:!1,connected:!0});case 4:case"end":return t.stop()}}),null,this)}},{key:"submitPropertyEventHandler",value:function(){var e=this,t=this.state.selectedURL,a=this.props.setErrorMessage;i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i.a.awrap(e.insertPropertyToSearchConsole(t));case 3:a(""),e.props.searchConsoleSetup(t),n.next=11;break;case 7:n.prev=7,n.t0=n.catch(0),a(n.t0.message[0].message),e.setState({loading:!1,errorCode:n.t0.code,errorMsg:n.t0.message[0].message});case 11:case"end":return n.stop()}}),null,null,[[0,7]])}},{key:"handleURLSelect",value:function(e,t){this.setState({selectedURL:t.getAttribute("data-value")})}},{key:"matchedForm",value:function(){var e=this.state,t=e.sites,a=e.selectedURL,n=[{label:"",value:"",disabled:!0}];return t?(t.forEach((function(e){n.push({label:e,value:e})})),React.createElement(f.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__inputs"},React.createElement(P.k,{enhanced:!0,name:"siteProperty",label:Object(v.__)("Choose URL","google-site-kit"),outlined:!0,onEnhancedChange:this.handleURLSelect,options:n,value:a})),React.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},React.createElement(y.a,{onClick:this.submitPropertyEventHandler},Object(v.__)("Continue","google-site-kit")),React.createElement(j.a,null)))):null}},{key:"noSiteForm",value:function(){var e=this.state.siteURL;return React.createElement(f.Fragment,null,React.createElement("div",{className:"googlesitekit-setup-module__inputs"},React.createElement(P.l,{label:Object(v.__)("Website Address","google-site-kit"),name:"siteProperty",floatingLabelClassName:"mdc-floating-label--float-above",outlined:!0,disabled:!0},React.createElement(P.b,{value:e}))),React.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},React.createElement(y.a,{onClick:this.submitPropertyEventHandler},Object(v.__)("Continue","google-site-kit")),React.createElement(j.a,null)))}},{key:"renderForm",value:function(){var e=this.state,t=e.loading,a=e.sites;return t?React.createElement(f.Fragment,null,React.createElement("p",null,Object(v.__)("We’re locating your Search Console account.","google-site-kit")),React.createElement(U.a,null)):0===a.length?this.noSiteForm():this.matchedForm()}},{key:"render",value:function(){var e=this.props,a=e.isAuthenticated,n=e.shouldSetup,i=this.state,r=i.errorMsg,s=i.connected;return!n||s?t.connected():React.createElement("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console"},React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(v._x)("Search Console","Service name","google-site-kit")),r&&0<r.length&&React.createElement("p",{className:"googlesitekit-error-text"},r),a&&n&&this.renderForm())}}],[{key:"connected",value:function(){return React.createElement("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console"},React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(v._x)("Search Console","Service name","google-site-kit")),React.createElement("p",{className:"googlesitekit-setup-module__text--no-margin"},Object(v.__)("Your Search Console is set up with Site Kit.","google-site-kit")))}}]),t}(f.Component);T.propTypes={isAuthenticated:w.a.bool.isRequired,shouldSetup:w.a.bool.isRequired,searchConsoleSetup:w.a.func.isRequired,setErrorMessage:w.a.func.isRequired};var V=T,I=function(e){function t(){return s()(this,t),u()(this,m()(t).apply(this,arguments))}return _()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.isVerified,a=e.hasSearchConsoleProperty,n=t&&!a;return React.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--four"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n?React.createElement(V,A()({shouldSetup:n},this.props)):V.connected()))))}}]),t}(f.Component);I.propTypes={searchConsoleSetup:w.a.func.isRequired};var K=I,B=function(e){function t(e){var a;return s()(this,t),a=u()(this,m()(t).call(this,e)),googlesitekit.setup.hasSearchConsoleProperty?Object(C.v)("plugin_setup","user_verified"):Object(C.v)("plugin_setup","site_verified"),a}return _()(t,e),c()(t,[{key:"render",value:function(){return React.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--five"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-9-desktop "},React.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(v.__)("Congratulations!","google-site-kit")),React.createElement("p",null,Object(v.__)("You successfully completed the Site Kit setup and connected Search Console. Check the dashboard for more services to connect.","google-site-kit")),React.createElement("div",{className:"googlesitekit-wizard-step__action"},React.createElement(y.a,{id:"wizard-step-five-proceed",onClick:this.props.completeSetup},Object(v.__)("Go to Dashboard","google-site-kit")))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-3-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement("div",{className:"googlesitekit-rocket"},React.createElement("img",{className:"googlesitekit-rocket__body",alt:"",src:googlesitekit.admin.assetsRoot+"images/rocket-body.png"}),React.createElement("img",{className:"googlesitekit-rocket__clouds",alt:"",src:googlesitekit.admin.assetsRoot+"images/rocket-clouds.png"}),React.createElement("img",{className:"googlesitekit-rocket__dust",alt:"",src:googlesitekit.admin.assetsRoot+"images/rocket-dust.png"}))))))}}]),t}(f.Component);B.propTypes={completeSetup:w.a.func.isRequired};var G=B,H={authentication:{title:Object(v.__)("Authenticate","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&!e.needReauthenticate},Component:x},verification:{title:Object(v.__)("Verify URL","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified},Component:F},seachConsoleProperty:{title:Object(v.__)("Connect Search Console","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified&&e.hasSearchConsoleProperty},Component:K},completeSetup:{title:Object(v.__)("Finish","google-site-kit"),required:!1,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified&&e.hasSearchConsoleProperty},Component:G}},W=a(20),J=a(18),Y=a.n(J),Q=function(e){function t(){return s()(this,t),u()(this,m()(t).apply(this,arguments))}return _()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.currentStep,a=e.step,n=e.title,i=e.status,r=e.warning,s=e.error,o=e.stepKey,c=i;r?c="warning":s&&(c="error");var l=!1;switch(c){case"warning":case"error":l=Y.a.createElement(W.a,{id:"exclamation",height:"12",width:"2"});break;case"completed":l=Y.a.createElement(W.a,{id:"check",height:"12",width:"16"})}return Y.a.createElement("div",{className:"\n\t\t\t\tgooglesitekit-wizard-progress-step\n\t\t\t\tgooglesitekit-wizard-progress-step--".concat(a,"\n\t\t\t\t").concat(t?"googlesitekit-wizard-progress-step--current":"","\n\t\t\t\tgooglesitekit-wizard-progress-step--").concat(o,"\n\t\t\t")},Y.a.createElement("div",{className:"googlesitekit-wizard-progress-step__number-wrapper"},Y.a.createElement("div",{className:"\n\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number\n\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number--".concat(c,"\n\t\t\t\t\t")},Y.a.createElement("span",{className:"\n\t\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number-text\n\t\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number-text--".concat(c,"\n\t\t\t\t\t\t")},a),l&&Y.a.createElement("span",{className:"\n\t\t\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number-icon\n\t\t\t\t\t\t\t\tgooglesitekit-wizard-progress-step__number-icon--".concat(c,"\n\t\t\t\t\t\t\t")},l))),Y.a.createElement("p",{className:"googlesitekit-wizard-progress-step__text"},n))}}]),t}(f.Component);Q.propTypes={currentStep:w.a.bool.isRequired,step:w.a.number.isRequired,title:w.a.string,status:w.a.string,warning:w.a.bool,error:w.a.bool},Q.defaultProps={title:"",status:"",warning:!1,error:!1,removeFirstStep:!1};var X=Q,Z=function(e){function t(e){var a;s()(this,t),a=u()(this,m()(t).call(this,e));var n=googlesitekit.admin.connectURL,i=googlesitekit.setup,r=i.isAuthenticated,o=i.hasSearchConsoleProperty,c=i.isSiteKitConnected,l=i.isVerified,d=i.needReauthenticate,g=googlesitekit.permissions.canSetup;return a.state={canSetup:g,isAuthenticated:r,isVerified:l,needReauthenticate:d,hasSearchConsoleProperty:o,hasSearchConsolePropertyFromTheStart:o,connectURL:n,errorMsg:"",isSiteKitConnected:c,completeSetup:!1},a.siteConnectedSetup=a.siteConnectedSetup.bind(p()(a)),a.siteVerificationSetup=a.siteVerificationSetup.bind(p()(a)),a.searchConsoleSetup=a.searchConsoleSetup.bind(p()(a)),a.resetAndRestart=a.resetAndRestart.bind(p()(a)),a.completeSetup=a.completeSetup.bind(p()(a)),a.setErrorMessage=a.setErrorMessage.bind(p()(a)),a}return _()(t,e),c()(t,[{key:"resetAndRestart",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(E.c.set(E.a,"site","reset"));case 2:Object(C.d)(),this.setState({isSiteKitConnected:!1,isAuthenticated:!1,isVerified:!1,hasSearchConsoleProperty:!1,completeSetup:!1,errorMsg:""});case 4:case"end":return e.stop()}}),null,this)}},{key:"completeSetup",value:function(){this.setState({completeSetup:!0})}},{key:"siteConnectedSetup",value:function(e){this.setState({isSiteKitConnected:e})}},{key:"siteVerificationSetup",value:function(e){this.setState({isVerified:e})}},{key:"searchConsoleSetup",value:function(e){this.setState({hasSearchConsoleProperty:e})}},{key:"isSetupFinished",value:function(){var e=this.state,t=e.isSiteKitConnected,a=e.isAuthenticated,n=e.isVerified,i=e.hasSearchConsoleProperty,r=e.completeSetup;return t&&a&&n&&i&&r}},{key:"setErrorMessage",value:function(e){this.setState({errorMsg:e})}},{key:"getApplicableSteps",value:function(){var e,t=H,a=Object.keys(t);for(e=0;e<a.length;e++)t[a[e]].isApplicable(this.state)||delete t[a[e]];return t}},{key:"currentStep",value:function(e){var t,a=Object.keys(e);for(t=0;t<a.length-1;t++)if(!e[a[t]].isCompleted(this.state))return a[t];return a[t]}},{key:"stepStatus",value:function(e,t){return e[t].isCompleted(this.state)?"completed":t===this.currentStep(e)?"inprogress":""}},{key:"render",value:function(){var e=this,t=this.state,a=t.canSetup,n=t.isAuthenticated,i=t.isVerified,r=t.needReauthenticate,s=t.hasSearchConsoleProperty,o=t.connectURL,c=t.isSiteKitConnected;if(this.isSetupFinished()){var l=Object(C.n)("googlesitekit-dashboard",{notification:"authentication_success"});Object(k.delay)((function(){window.location.replace(l)}),500,"later")}var u=this.getApplicableSteps(),d=this.currentStep(u),m=u[d].Component,g=React.createElement(m,{siteConnectedSetup:this.siteConnectedSetup,connectURL:o,siteVerificationSetup:this.siteVerificationSetup,searchConsoleSetup:this.searchConsoleSetup,completeSetup:this.completeSetup,isSiteKitConnected:c,isAuthenticated:n,isVerified:i,needReauthenticate:r,hasSearchConsoleProperty:s,setErrorMessage:this.setErrorMessage,resetAndRestart:u.clientCredentials?this.resetAndRestart:void 0}),p=a,h=!p&&!n;return React.createElement(f.Fragment,null,React.createElement(R.a,null),React.createElement("div",{className:"googlesitekit-wizard"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(b.a,null,React.createElement("section",{className:"googlesitekit-wizard-progress"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},p&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-wizard-progress__steps"},Object.keys(u).map((function(t,a){return React.createElement(X,{key:u[t].title,currentStep:d===t,title:u[t].title,step:a+1,status:e.stepStatus(u,t),warning:u[t].warning,error:u[t].error,stepKey:t})})))))),h&&React.createElement("div",{className:"googlesitekit-setup__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("h1",{className:"googlesitekit-setup__title"},Object(v.__)("Authenticate Site Kit","google-site-kit")),React.createElement("p",{className:"googlesitekit-setup__description"},Object(v.__)("Please sign into your Google account to begin.","google-site-kit")),React.createElement(y.a,{href:"#",onClick:function(){Object(C.v)("plugin_setup","signin_with_google"),document.location=o}},Object(v.__)("Sign in with Google","google-site-kit"))))))),p&&g))))))}}]),t}(f.Component);t.default=Z},42:function(e,t,a){"use strict";a(1);var n=a(0),i=a(14);t.a=function(){var e=Object(n.__)("Need help?","google-site-kit");return React.createElement(i.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},e)}},43:function(e,t,a){"use strict";var n=a(3),i=a.n(n),r=a(4),s=a.n(r),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(7),m=a.n(d),g=a(1),p=a(21),h=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),s()(t,[{key:"render",value:function(){return null}}]),t}(g.Component),_=Object(p.a)("googlesitekit.ErrorNotification")(h),f=a(81),k=a(12),v=a.n(k),R=a(13),y=a.n(R),b=a(67),E=a(29),C=a(22),S=a(8),w=a.n(S),N=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).menuRef=Object(g.createRef)(),a}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new C.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var e=this.props,t=e.menuOpen,a=e.menuItems,n=e.onSelected,i=e.id;return React.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},React.createElement("ul",{id:i,className:"mdc-list",role:"menu","aria-hidden":!t,"aria-orientation":"vertical",tabIndex:"-1"},a.map((function(e,t){return React.createElement("li",{key:t,className:"mdc-list-item",role:"menuitem",onClick:n.bind(null,t),onKeyDown:n.bind(null,t)},React.createElement("span",{className:"mdc-list-item__text"},e))}))))}}]),t}(g.Component);N.propTypes={menuOpen:w.a.bool.isRequired,menuItems:w.a.array.isRequired,id:w.a.string.isRequired};var O=N,j=a(80),L=a(2),x=a(0),M=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).state={dialogActive:!1,menuOpen:!1},a.handleMenu=a.handleMenu.bind(y()(a)),a.handleMenuClose=a.handleMenuClose.bind(y()(a)),a.handleMenuItemSelect=a.handleMenuItemSelect.bind(y()(a)),a.handleDialog=a.handleDialog.bind(y()(a)),a.handleDialogClose=a.handleDialogClose.bind(y()(a)),a.handleUnlinkConfirm=a.handleUnlinkConfirm.bind(y()(a)),a.menuButtonRef=Object(g.createRef)(),a.menuRef=Object(g.createRef)(),a}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){window.addEventListener("mouseup",this.handleMenuClose),window.addEventListener("keyup",this.handleMenuClose),window.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.handleMenuClose),window.removeEventListener("keyup",this.handleMenuClose),window.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(e,t){var a=googlesitekit.admin.proxyPermissionsURL;if("keydown"===t.type&&(13===t.keyCode||32===t.keyCode)||"click"===t.type)switch(e){case 0:this.handleDialog();break;case 1:window.location.assign(a);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return v.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(L.d)(),document.location=Object(L.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var e=googlesitekit.admin,t=e.userData,a=t.email,n=void 0===a?"":a,i=t.picture,r=void 0===i?"":i,s=e.proxyPermissionsURL,o=this.state,c=o.dialogActive,l=o.menuOpen;return React.createElement(g.Fragment,null,React.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},React.createElement(E.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:r?React.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},React.createElement("img",{className:"mdc-button__icon--image",src:r,alt:Object(x.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:l,ariaControls:"user-menu"},n),React.createElement(O,{ref:this.menuRef,menuOpen:l,menuItems:[Object(x.__)("Disconnect","google-site-kit")].concat(s?[Object(x.__)("Manage sites...","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),React.createElement(j.a,null,React.createElement(b.a,{dialogActive:c,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(x.__)("Disconnect","google-site-kit"),subtitle:Object(x.__)("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(x.__)("Disconnect","google-site-kit"),provides:[]})))}}]),t}(g.Component),A=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return m()(t,e),s()(t,[{key:"render",value:function(){var e=googlesitekit.setup.isAuthenticated;return React.createElement(g.Fragment,null,React.createElement("header",{className:"googlesitekit-header"},React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(f.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e&&React.createElement(M,null))))),React.createElement(_,null))}}]),t}(g.Component);t.a=A},67:function(e,t,a){"use strict";var n=a(3),i=a.n(n),r=a(4),s=a.n(r),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(7),m=a.n(d),g=a(1),p=a(8),h=a.n(p),_=a(29),f=a(14),k=a(22),v=a(145),R=a.n(v),y=a(0),b=function(e){function t(){var e;return i()(this,t),(e=c()(this,u()(t).call(this))).state={attributes:[Object(y.__)("Audience overview","google-site-kit"),Object(y.__)("Top pages","google-site-kit"),Object(y.__)("Top acquisition sources","google-site-kit"),Object(y.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(g.createRef)(),e}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){new k.d(this.dialogRef.current)}},{key:"render",value:function(){var e=this.props,t=e.dialogActive,a=e.handleDialog,n=e.title,i=e.provides,r=e.handleConfirm,s=e.subtitle,o=e.confirmButton,c=e.dependentModules;return React.createElement("div",{ref:this.dialogRef,className:"mdc-dialog ".concat(t?"mdc-dialog--open":""),role:"alertdialog","aria-modal":"true","aria-labelledby":"remove-module-dialog","aria-describedby":"remove-module-dialog-description","aria-hidden":t?"false":"true",tabIndex:"-1"},React.createElement("div",{className:"mdc-dialog__scrim"}," "),React.createElement(R.a,{active:t},React.createElement("div",null,React.createElement("div",{className:"mdc-dialog__container"},React.createElement("div",{className:"mdc-dialog__surface"},n&&React.createElement("h2",{id:"remove-module-dialog",className:"mdc-dialog__title"},n),s&&React.createElement("p",{className:"mdc-dialog__lead"},s),React.createElement("section",{id:"remove-module-dialog-description",className:"mdc-dialog__content"},React.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},i&&i.map((function(e){return React.createElement("li",{className:"mdc-list-item",key:e},React.createElement("span",{className:"mdc-list-item__text"},e))})))),c&&React.createElement("p",{className:"mdc-dialog__dependecies"},React.createElement("strong",null,Object(y.__)("Note: ","google-site-kit")),c),React.createElement("footer",{className:"mdc-dialog__actions"},React.createElement(_.a,{onClick:r,danger:!0},o||Object(y.__)("Disconnect","google-site-kit")),React.createElement(f.a,{className:"mdc-dialog__cancel-button",onClick:function(){return a()},inherit:!0},Object(y.__)("Cancel","google-site-kit"))))))))}}]),t}(g.Component);b.propTypes={dialogActive:h.a.bool,handleDialog:h.a.func,handleConfirm:h.a.func.isRequired,title:h.a.string,description:h.a.string,confirmButton:h.a.string},b.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null},t.a=b},80:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(3),i=a.n(n),r=a(4),s=a.n(r),o=a(5),c=a.n(o),l=a(6),u=a.n(l),d=a(7),m=a.n(d),g=a(1),p=function(e){function t(e){var a;return i()(this,t),(a=c()(this,u()(t).call(this,e))).el=document.createElement("div"),a.root=document.querySelector(".googlesitekit-plugin")||document.body,a}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(g.createPortal)(this.props.children,this.el)}}]),t}(g.Component)}}]);
|
dist/assets/js/chunk-googlesitekit-setup-wrapper.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{155:function(e,t,n){"use strict";n.r(t);var i=n(13),a=n.n(i),l=n(3),o=n.n(l),c=n(4),s=n.n(c),r=n(5),u=n.n(r),d=n(6),m=n.n(d),g=n(7),h=n.n(g),p=n(1),f=n(11),_=n(43),v=n(14),k=n(42),R=n(2),y=n(21),E=n(0),b=n(10),w=function(e){function t(){return o()(this,t),u()(this,m()(t).apply(this,arguments))}return h()(t,e),s()(t,[{key:"render",value:function(){var e=this.props.children;return React.createElement(p.Fragment,null,e)}}]),t}(p.Component),N=function(e){function t(e){var n;o()(this,t),n=u()(this,m()(t).call(this,e));var i=googlesitekit.setup.moduleToSetup;return n.state={currentModule:i,refresh:!1},n.timeoutID=null,n.unfocusedTime=0,n.autoRefreshModules=Object(b.applyFilters)("googlesitekit.autoRefreshModules",[]),n.moduleRefresh=n.autoRefreshModules.find((function(e){return n.state.currentModule===e.identifier})),n.refreshStatus=n.refreshStatus.bind(a()(n)),n.startUnfocusedTimer=n.startUnfocusedTimer.bind(a()(n)),n}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){window.addEventListener("focus",this.refreshStatus),window.addEventListener("blur",this.startUnfocusedTimer)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("focus",this.refreshStatus),window.removeEventListener("blur",this.startUnfocusedTimer)}},{key:"startUnfocusedTimer",value:function(){var e=this;if(this.moduleRefresh){var t=!0;this.moduleRefresh.toRefresh&&(t=this.moduleRefresh.toRefresh()),t&&(this.timeoutID=window.setInterval((function(){e.unfocusedTime++}),1e3))}}},{key:"refreshStatus",value:function(){if(this.moduleRefresh){var e=this.moduleRefresh.idleTime||15,t=!0;this.moduleRefresh.toRefresh&&(t=this.moduleRefresh.toRefresh()),t&&(e<this.unfocusedTime&&this.setState({refresh:this.timeoutID}),window.clearTimeout(this.timeoutID),this.unfocusedTime=0,this.timeoutID=null)}}},{key:"render",value:function(){var e=this.state.currentModule,n=t.loadSetupModule(e),i=Object(R.n)("googlesitekit-settings",{});return React.createElement(p.Fragment,null,React.createElement(_.a,null),React.createElement("div",{className:"googlesitekit-setup"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("section",{className:"googlesitekit-setup__wrapper"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("p",{className:" googlesitekit-setup__intro-title googlesitekit-overline "},Object(E.__)("Connect Service","google-site-kit")),n))),React.createElement("div",{className:"googlesitekit-setup__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(v.a,{id:"setup-".concat(e,"-cancel"),href:i},Object(E.__)("Cancel","google-site-kit"))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--align-right "},React.createElement(k.a,null)))))))))))}}],[{key:"loadSetupModule",value:function(e){var n=Object(y.a)("googlesitekit.ModuleSetup-".concat(e))(w);return React.createElement(n,{finishSetup:t.finishSetup,onSettingsPage:!1,isEditing:!0})}},{key:"finishSetup",value:function(){var e={notification:"authentication_success"};googlesitekit.setup&&googlesitekit.setup.moduleToSetup&&(e.slug=googlesitekit.setup.moduleToSetup);var t=Object(R.n)("googlesitekit-dashboard",e);Object(f.delay)((function(){window.location.replace(t)}),500,"later")}}]),t}(p.Component);t.default=N},42:function(e,t,n){"use strict";n(1);var i=n(0),a=n(14);t.a=function(){var e=Object(i.__)("Need help?","google-site-kit");return React.createElement(a.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},e)}},43:function(e,t,n){"use strict";var i=n(3),a=n.n(i),l=n(4),o=n.n(l),c=n(5),s=n.n(c),r=n(6),u=n.n(r),d=n(7),m=n.n(d),g=n(1),h=n(21),p=function(e){function t(){return a()(this,t),s()(this,u()(t).apply(this,arguments))}return m()(t,e),o()(t,[{key:"render",value:function(){return null}}]),t}(g.Component),f=Object(h.a)("googlesitekit.ErrorNotification")(p),_=n(80),v=n(12),k=n.n(v),R=n(13),y=n.n(R),E=n(67),b=n(29),w=n(22),N=n(8),O=n.n(N),C=function(e){function t(e){var n;return a()(this,t),(n=s()(this,u()(t).call(this,e))).menuRef=Object(g.createRef)(),n}return m()(t,e),o()(t,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new w.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var e=this.props,t=e.menuOpen,n=e.menuItems,i=e.onSelected,a=e.id;return React.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},React.createElement("ul",{id:a,className:"mdc-list",role:"menu","aria-hidden":!t,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(e,t){return React.createElement("li",{key:t,className:"mdc-list-item",role:"menuitem",onClick:i.bind(null,t),onKeyDown:i.bind(null,t)},React.createElement("span",{className:"mdc-list-item__text"},e))}))))}}]),t}(g.Component);C.propTypes={menuOpen:O.a.bool.isRequired,menuItems:O.a.array.isRequired,id:O.a.string.isRequired};var D=C,S=n(2),M=n(0),j=function(e){function t(e){var n;return a()(this,t),(n=s()(this,u()(t).call(this,e))).state={dialogActive:!1,menuOpen:!1},n.handleMenu=n.handleMenu.bind(y()(n)),n.handleMenuClose=n.handleMenuClose.bind(y()(n)),n.handleMenuItemSelect=n.handleMenuItemSelect.bind(y()(n)),n.handleDialog=n.handleDialog.bind(y()(n)),n.handleDialogClose=n.handleDialogClose.bind(y()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(y()(n)),n.menuButtonRef=Object(g.createRef)(),n.menuRef=Object(g.createRef)(),n}return m()(t,e),o()(t,[{key:"componentDidMount",value:function(){window.addEventListener("mouseup",this.handleMenuClose),window.addEventListener("keyup",this.handleMenuClose),window.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.handleMenuClose),window.removeEventListener("keyup",this.handleMenuClose),window.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(e,t){var n=googlesitekit.admin.proxyPermissionsURL;if("keydown"===t.type&&(13===t.keyCode||32===t.keyCode)||"click"===t.type)switch(e){case 0:this.handleDialog();break;case 1:window.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return k.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(S.d)(),document.location=Object(S.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var e=googlesitekit.admin,t=e.userData,n=t.email,i=void 0===n?"":n,a=t.picture,l=void 0===a?"":a,o=e.proxyPermissionsURL,c=this.state,s=c.dialogActive,r=c.menuOpen;return React.createElement(g.Fragment,null,React.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},React.createElement(b.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:l?React.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},React.createElement("img",{className:"mdc-button__icon--image",src:l,alt:Object(M.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:r,ariaControls:"user-menu"},i),React.createElement(D,{ref:this.menuRef,menuOpen:r,menuItems:[Object(M.__)("Disconnect","google-site-kit")].concat(o?[Object(M.__)("Manage sites...","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),React.createElement(E.a,{dialogActive:s,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(M.__)("Disconnect","google-site-kit"),subtitle:Object(M.__)("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(M.__)("Disconnect","google-site-kit"),provides:[]}))}}]),t}(g.Component),T=function(e){function t(){return a()(this,t),s()(this,u()(t).apply(this,arguments))}return m()(t,e),o()(t,[{key:"render",value:function(){var e=googlesitekit.setup.isAuthenticated;return React.createElement(g.Fragment,null,React.createElement("header",{className:"googlesitekit-header"},React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(_.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e&&React.createElement(j,null))))),React.createElement(f,null))}}]),t}(g.Component);t.a=T},67:function(e,t,n){"use strict";var i=n(3),a=n.n(i),l=n(4),o=n.n(l),c=n(5),s=n.n(c),r=n(6),u=n.n(r),d=n(7),m=n.n(d),g=n(1),h=n(8),p=n.n(h),f=n(29),_=n(14),v=n(22),k=n(144),R=n.n(k),y=n(0),E=function(e){function t(){var e;return a()(this,t),(e=s()(this,u()(t).call(this))).state={attributes:[Object(y.__)("Audience overview","google-site-kit"),Object(y.__)("Top pages","google-site-kit"),Object(y.__)("Top acquisition sources","google-site-kit"),Object(y.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(g.createRef)(),e}return m()(t,e),o()(t,[{key:"componentDidMount",value:function(){new v.d(this.dialogRef.current)}},{key:"render",value:function(){var e=this.props,t=e.dialogActive,n=e.handleDialog,i=e.title,a=e.provides,l=e.handleConfirm,o=e.subtitle,c=e.confirmButton,s=e.dependentModules;return React.createElement("div",{ref:this.dialogRef,className:"mdc-dialog ".concat(t?"mdc-dialog--open":""),role:"alertdialog","aria-modal":"true","aria-labelledby":"remove-module-dialog","aria-describedby":"remove-module-dialog-description","aria-hidden":t?"false":"true",tabIndex:"-1"},React.createElement("div",{className:"mdc-dialog__scrim"}," "),React.createElement(R.a,{active:t},React.createElement("div",null,React.createElement("div",{className:"mdc-dialog__container"},React.createElement("div",{className:"mdc-dialog__surface"},i&&React.createElement("h2",{id:"remove-module-dialog",className:"mdc-dialog__title"},i),o&&React.createElement("p",{className:"mdc-dialog__lead"},o),React.createElement("section",{id:"remove-module-dialog-description",className:"mdc-dialog__content"},React.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},a&&a.map((function(e){return React.createElement("li",{className:"mdc-list-item",key:e},React.createElement("span",{className:"mdc-list-item__text"},e))})))),s&&React.createElement("p",{className:"mdc-dialog__dependecies"},React.createElement("strong",null,Object(y.__)("Note: ","google-site-kit")),s),React.createElement("footer",{className:"mdc-dialog__actions"},React.createElement(f.a,{onClick:l,danger:!0},c||Object(y.__)("Disconnect","google-site-kit")),React.createElement(_.a,{className:"mdc-dialog__cancel-button",onClick:function(){return n()},inherit:!0},Object(y.__)("Cancel","google-site-kit"))))))))}}]),t}(g.Component);E.propTypes={dialogActive:p.a.bool,handleDialog:p.a.func,handleConfirm:p.a.func.isRequired,title:p.a.string,description:p.a.string,confirmButton:p.a.string},E.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null},t.a=E},80:function(e,t,n){"use strict";n(1);var i=n(20),a=n(0);t.a=function(){return React.createElement("div",{className:"googlesitekit-logo","aria-hidden":"true"},React.createElement(i.a,{id:"logo-g",className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),React.createElement(i.a,{id:"logo-sitekit",className:"\n\t\t\t\t googlesitekit-logo__logo-sitekit\n\t\t\t\t",height:"26",width:"99"}),React.createElement("span",{className:"screen-reader-text"},Object(a.__)("Site Kit by Google Logo","google-site-kit")))}}}]);
|
1 |
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{156:function(e,t,n){"use strict";n.r(t);var i=n(13),a=n.n(i),l=n(3),o=n.n(l),c=n(4),s=n.n(c),r=n(5),u=n.n(r),d=n(6),m=n.n(d),g=n(7),h=n.n(g),p=n(1),f=n(11),v=n(43),_=n(14),k=n(42),R=n(2),y=n(21),E=n(0),b=n(10),w=function(e){function t(){return o()(this,t),u()(this,m()(t).apply(this,arguments))}return h()(t,e),s()(t,[{key:"render",value:function(){var e=this.props.children;return React.createElement(p.Fragment,null,e)}}]),t}(p.Component),N=function(e){function t(e){var n;o()(this,t),n=u()(this,m()(t).call(this,e));var i=googlesitekit.setup.moduleToSetup;return n.state={currentModule:i,refresh:!1},n.timeoutID=null,n.unfocusedTime=0,n.autoRefreshModules=Object(b.applyFilters)("googlesitekit.autoRefreshModules",[]),n.moduleRefresh=n.autoRefreshModules.find((function(e){return n.state.currentModule===e.identifier})),n.refreshStatus=n.refreshStatus.bind(a()(n)),n.startUnfocusedTimer=n.startUnfocusedTimer.bind(a()(n)),n}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){window.addEventListener("focus",this.refreshStatus),window.addEventListener("blur",this.startUnfocusedTimer)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("focus",this.refreshStatus),window.removeEventListener("blur",this.startUnfocusedTimer)}},{key:"startUnfocusedTimer",value:function(){var e=this;if(this.moduleRefresh){var t=!0;this.moduleRefresh.toRefresh&&(t=this.moduleRefresh.toRefresh()),t&&(this.timeoutID=window.setInterval((function(){e.unfocusedTime++}),1e3))}}},{key:"refreshStatus",value:function(){if(this.moduleRefresh){var e=this.moduleRefresh.idleTime||15,t=!0;this.moduleRefresh.toRefresh&&(t=this.moduleRefresh.toRefresh()),t&&(e<this.unfocusedTime&&this.setState({refresh:this.timeoutID}),window.clearTimeout(this.timeoutID),this.unfocusedTime=0,this.timeoutID=null)}}},{key:"render",value:function(){var e=this.state.currentModule,n=t.loadSetupModule(e),i=Object(R.n)("googlesitekit-settings",{});return React.createElement(p.Fragment,null,React.createElement(v.a,null),React.createElement("div",{className:"googlesitekit-setup"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("section",{className:"googlesitekit-setup__wrapper"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("p",{className:" googlesitekit-setup__intro-title googlesitekit-overline "},Object(E.__)("Connect Service","google-site-kit")),n))),React.createElement("div",{className:"googlesitekit-setup__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(_.a,{id:"setup-".concat(e,"-cancel"),href:i},Object(E.__)("Cancel","google-site-kit"))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--align-right "},React.createElement(k.a,null)))))))))))}}],[{key:"loadSetupModule",value:function(e){var n=Object(y.a)("googlesitekit.ModuleSetup-".concat(e))(w);return React.createElement(n,{finishSetup:t.finishSetup,onSettingsPage:!1,isEditing:!0})}},{key:"finishSetup",value:function(){var e={notification:"authentication_success"};googlesitekit.setup&&googlesitekit.setup.moduleToSetup&&(e.slug=googlesitekit.setup.moduleToSetup);var t=Object(R.n)("googlesitekit-dashboard",e);Object(f.delay)((function(){window.location.replace(t)}),500,"later")}}]),t}(p.Component);t.default=N},42:function(e,t,n){"use strict";n(1);var i=n(0),a=n(14);t.a=function(){var e=Object(i.__)("Need help?","google-site-kit");return React.createElement(a.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},e)}},43:function(e,t,n){"use strict";var i=n(3),a=n.n(i),l=n(4),o=n.n(l),c=n(5),s=n.n(c),r=n(6),u=n.n(r),d=n(7),m=n.n(d),g=n(1),h=n(21),p=function(e){function t(){return a()(this,t),s()(this,u()(t).apply(this,arguments))}return m()(t,e),o()(t,[{key:"render",value:function(){return null}}]),t}(g.Component),f=Object(h.a)("googlesitekit.ErrorNotification")(p),v=n(81),_=n(12),k=n.n(_),R=n(13),y=n.n(R),E=n(67),b=n(29),w=n(22),N=n(8),O=n.n(N),C=function(e){function t(e){var n;return a()(this,t),(n=s()(this,u()(t).call(this,e))).menuRef=Object(g.createRef)(),n}return m()(t,e),o()(t,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new w.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var e=this.props,t=e.menuOpen,n=e.menuItems,i=e.onSelected,a=e.id;return React.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},React.createElement("ul",{id:a,className:"mdc-list",role:"menu","aria-hidden":!t,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(e,t){return React.createElement("li",{key:t,className:"mdc-list-item",role:"menuitem",onClick:i.bind(null,t),onKeyDown:i.bind(null,t)},React.createElement("span",{className:"mdc-list-item__text"},e))}))))}}]),t}(g.Component);C.propTypes={menuOpen:O.a.bool.isRequired,menuItems:O.a.array.isRequired,id:O.a.string.isRequired};var D=C,S=n(80),M=n(2),j=n(0),T=function(e){function t(e){var n;return a()(this,t),(n=s()(this,u()(t).call(this,e))).state={dialogActive:!1,menuOpen:!1},n.handleMenu=n.handleMenu.bind(y()(n)),n.handleMenuClose=n.handleMenuClose.bind(y()(n)),n.handleMenuItemSelect=n.handleMenuItemSelect.bind(y()(n)),n.handleDialog=n.handleDialog.bind(y()(n)),n.handleDialogClose=n.handleDialogClose.bind(y()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(y()(n)),n.menuButtonRef=Object(g.createRef)(),n.menuRef=Object(g.createRef)(),n}return m()(t,e),o()(t,[{key:"componentDidMount",value:function(){window.addEventListener("mouseup",this.handleMenuClose),window.addEventListener("keyup",this.handleMenuClose),window.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.handleMenuClose),window.removeEventListener("keyup",this.handleMenuClose),window.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(e,t){var n=googlesitekit.admin.proxyPermissionsURL;if("keydown"===t.type&&(13===t.keyCode||32===t.keyCode)||"click"===t.type)switch(e){case 0:this.handleDialog();break;case 1:window.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return k.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(M.d)(),document.location=Object(M.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var e=googlesitekit.admin,t=e.userData,n=t.email,i=void 0===n?"":n,a=t.picture,l=void 0===a?"":a,o=e.proxyPermissionsURL,c=this.state,s=c.dialogActive,r=c.menuOpen;return React.createElement(g.Fragment,null,React.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},React.createElement(b.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:l?React.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},React.createElement("img",{className:"mdc-button__icon--image",src:l,alt:Object(j.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:r,ariaControls:"user-menu"},i),React.createElement(D,{ref:this.menuRef,menuOpen:r,menuItems:[Object(j.__)("Disconnect","google-site-kit")].concat(o?[Object(j.__)("Manage sites...","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),React.createElement(S.a,null,React.createElement(E.a,{dialogActive:s,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(j.__)("Disconnect","google-site-kit"),subtitle:Object(j.__)("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(j.__)("Disconnect","google-site-kit"),provides:[]})))}}]),t}(g.Component),A=function(e){function t(){return a()(this,t),s()(this,u()(t).apply(this,arguments))}return m()(t,e),o()(t,[{key:"render",value:function(){var e=googlesitekit.setup.isAuthenticated;return React.createElement(g.Fragment,null,React.createElement("header",{className:"googlesitekit-header"},React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(v.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e&&React.createElement(T,null))))),React.createElement(f,null))}}]),t}(g.Component);t.a=A},67:function(e,t,n){"use strict";var i=n(3),a=n.n(i),l=n(4),o=n.n(l),c=n(5),s=n.n(c),r=n(6),u=n.n(r),d=n(7),m=n.n(d),g=n(1),h=n(8),p=n.n(h),f=n(29),v=n(14),_=n(22),k=n(145),R=n.n(k),y=n(0),E=function(e){function t(){var e;return a()(this,t),(e=s()(this,u()(t).call(this))).state={attributes:[Object(y.__)("Audience overview","google-site-kit"),Object(y.__)("Top pages","google-site-kit"),Object(y.__)("Top acquisition sources","google-site-kit"),Object(y.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(g.createRef)(),e}return m()(t,e),o()(t,[{key:"componentDidMount",value:function(){new _.d(this.dialogRef.current)}},{key:"render",value:function(){var e=this.props,t=e.dialogActive,n=e.handleDialog,i=e.title,a=e.provides,l=e.handleConfirm,o=e.subtitle,c=e.confirmButton,s=e.dependentModules;return React.createElement("div",{ref:this.dialogRef,className:"mdc-dialog ".concat(t?"mdc-dialog--open":""),role:"alertdialog","aria-modal":"true","aria-labelledby":"remove-module-dialog","aria-describedby":"remove-module-dialog-description","aria-hidden":t?"false":"true",tabIndex:"-1"},React.createElement("div",{className:"mdc-dialog__scrim"}," "),React.createElement(R.a,{active:t},React.createElement("div",null,React.createElement("div",{className:"mdc-dialog__container"},React.createElement("div",{className:"mdc-dialog__surface"},i&&React.createElement("h2",{id:"remove-module-dialog",className:"mdc-dialog__title"},i),o&&React.createElement("p",{className:"mdc-dialog__lead"},o),React.createElement("section",{id:"remove-module-dialog-description",className:"mdc-dialog__content"},React.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},a&&a.map((function(e){return React.createElement("li",{className:"mdc-list-item",key:e},React.createElement("span",{className:"mdc-list-item__text"},e))})))),s&&React.createElement("p",{className:"mdc-dialog__dependecies"},React.createElement("strong",null,Object(y.__)("Note: ","google-site-kit")),s),React.createElement("footer",{className:"mdc-dialog__actions"},React.createElement(f.a,{onClick:l,danger:!0},c||Object(y.__)("Disconnect","google-site-kit")),React.createElement(v.a,{className:"mdc-dialog__cancel-button",onClick:function(){return n()},inherit:!0},Object(y.__)("Cancel","google-site-kit"))))))))}}]),t}(g.Component);E.propTypes={dialogActive:p.a.bool,handleDialog:p.a.func,handleConfirm:p.a.func.isRequired,title:p.a.string,description:p.a.string,confirmButton:p.a.string},E.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null},t.a=E},80:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n(3),a=n.n(i),l=n(4),o=n.n(l),c=n(5),s=n.n(c),r=n(6),u=n.n(r),d=n(7),m=n.n(d),g=n(1),h=function(e){function t(e){var n;return a()(this,t),(n=s()(this,u()(t).call(this,e))).el=document.createElement("div"),n.root=document.querySelector(".googlesitekit-plugin")||document.body,n}return m()(t,e),o()(t,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(g.createPortal)(this.props.children,this.el)}}]),t}(g.Component)},81:function(e,t,n){"use strict";n(1);var i=n(20),a=n(0);t.a=function(){return React.createElement("div",{className:"googlesitekit-logo","aria-hidden":"true"},React.createElement(i.a,{id:"logo-g",className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),React.createElement(i.a,{id:"logo-sitekit",className:"\n\t\t\t\t googlesitekit-logo__logo-sitekit\n\t\t\t\t",height:"26",width:"99"}),React.createElement("span",{className:"screen-reader-text"},Object(a.__)("Site Kit by Google Logo","google-site-kit")))}}}]);
|
dist/assets/js/commons.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{14:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),f=n.n(p),h=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.onClick,n=e.href,a=e.children,i=e.className,o=e.arrow,r=e.external,s=e.inverse,c=e.back,l=e.small,u=e.inherit,d=e.caps,g=e.danger,m=e.disabled,p=e.id,f=n&&!m,h=f?"a":"button";return React.createElement(h,{className:"\n\t\t\t\t\tgooglesitekit-cta-link\n\t\t\t\t\t".concat(i||"","\n\t\t\t\t\t").concat(o?"googlesitekit-cta-link--arrow":"","\n\t\t\t\t\t").concat(r?"googlesitekit-cta-link--external":"","\n\t\t\t\t\t").concat(s?"googlesitekit-cta-link--inverse":"","\n\t\t\t\t\t").concat(c?"googlesitekit-cta-link--back":"","\n\t\t\t\t\t").concat(l?"googlesitekit-cta-link--small":"","\n\t\t\t\t\t").concat(u?"googlesitekit-cta-link--inherit":"","\n\t\t\t\t\t").concat(d?"googlesitekit-cta-link--caps":"","\n\t\t\t\t\t").concat(g?"googlesitekit-cta-link--danger":"","\n\t\t\t\t\t").concat(m?"googlesitekit-cta-link--disabled":"","\n\t\t\t\t"),onClick:t,id:p,href:f?n:void 0,target:f&&r?"_blank":void 0,rel:r?"noopener noreferrer":void 0,disabled:m},a)}}]),t}(m.Component);h.propTypes={onClick:f.a.func,href:f.a.string,children:f.a.oneOfType([f.a.string.isRequired,f.a.array.isRequired]),className:f.a.string,arrow:f.a.bool,external:f.a.bool,inverse:f.a.bool,back:f.a.bool,small:f.a.bool,inherit:f.a.bool,caps:f.a.bool,danger:f.a.bool,disabled:f.a.bool},h.defaultProps={onClick:null,href:"",className:"",arrow:!1,external:!1,inverse:!1,back:!1,small:!1,inherit:!1,caps:!1,danger:!1,disabled:!1},t.a=h},15:function(e,t,n){"use strict";n.r(t),n.d(t,"extractAnalyticsDataForTrafficChart",(function(){return r})),n.d(t,"extractAnalyticsDashboardData",(function(){return c})),n.d(t,"extractAnalyticsDashboardSparklineData",(function(){return l})),n.d(t,"calculateOverviewData",(function(){return u})),n.d(t,"translateAnalyticsError",(function(){return d})),n.d(t,"getAnalyticsErrorMessageFromData",(function(){return g})),n.d(t,"isDataZeroForReporting",(function(){return m})),n.d(t,"analyticsAdsenseReportDataDefaults",(function(){return p})),n.d(t,"siteAnalyticsReportDataDefaults",(function(){return f})),n.d(t,"overviewReportDataDefaults",(function(){return h})),n.d(t,"trafficSourcesReportDataDefaults",(function(){return b})),n.d(t,"getTopPagesReportDataDefaults",(function(){return v}));var a=n(2),i=n(11),o=n(0),r=function(e){if(!e||!e.length)return null;var t=e[0].data,n=t.rows,a=t.totals[0].values[0],o=[["Source","Percent"]];return Object(i.each)(n,(function(e){var t=e.metrics[0].values[0]/a;if(1>100*t)return!1;var n=e.dimensions[0].replace(/\(none\)/gi,"direct");o.push([n,t])})),o};function s(e,t){var n=[];return Object(i.each)(e,(function(e){if(e.metrics){var a=e.metrics[0].values,i=e.dimensions[0],o=i.slice(0,4)+"-"+i.slice(4,6)+"-"+i.slice(6,8),r=new Date(o);n.push([r,a[t]])}})),n}var c=function(e,t,n){if(!e||!e.length)return null;var a=e[0].data.rows;if(!a)return!1;var r=a.length;if(2*n>r){for(var c=new Date,l=0;n>l;l++){var u=(c.getMonth()+1).toString(),d=c.getDate().toString(),g=c.getFullYear().toString()+(2>u.length?"0":"")+u+(2>d.length?"0":"")+d;if(l>r){var m={dimensions:[g],metrics:[{values:[0,0,0,0,0]}]};a.unshift(m)}c.setDate(c.getDate()-1)}a.push([0,0])}var p=[Object(o.__)("Users","google-site-kit"),Object(o.__)("Sessions","google-site-kit"),Object(o.__)("Bounce Rate","google-site-kit"),Object(o.__)("Session Duration","google-site-kit")],f=[[{type:"date",label:Object(o.__)("Day","google-site-kit")},{type:"number",label:p[t]},{type:"number",label:Object(o.__)("Previous month","google-site-kit")}]],h=a.slice(a.length-n,a.length),b=a.slice(0,a.length-n),v=s(h,t),k=s(b,t);return Object(i.each)(v,(function(e,t){e[0]&&e[1]&&k[t]&&f.push([e[0],e[1],k[t][1]])})),f},l=function(e){if(!e||!e.length)return null;var t=e[0].data.rows,n=[[{type:"date",label:"Day"},{type:"number",label:"Users"},{type:"number",label:"Sessions"},{type:"number",label:"Goals Completed"}]];return Object(i.each)(t,(function(e){var t=e.metrics[0].values,a=e.dimensions[0],i=a.slice(0,4)+"-"+a.slice(4,6)+"-"+a.slice(6,8),o=new Date(i);n.push([o,t[0],t[1],t[4]])})),n},u=function(e){if(!e||!e.length)return!1;var t=e[0].data.totals,n=t[0].values,i=t[1].values,o=n[0],r=n[1],s=n[2],c=n[3],l=n[4],u=n[5];return{totalUsers:o,totalSessions:r,averageBounceRate:s,averageSessionDuration:c,totalUsersChange:Object(a.c)(i[0],n[0]),totalSessionsChange:Object(a.c)(i[1],n[1]),averageBounceRateChange:Object(a.c)(i[2],n[2]),averageSessionDurationChange:Object(a.c)(i[3],n[3]),goalCompletions:l,goalCompletionsChange:Object(a.c)(i[4],n[4]),totalPageViews:u,totalPageViewsChange:Object(a.c)(i[5],n[5])}},d=function(e,t){var n="";switch(e){case"INVALID_ARGUMENT":n=Object(o.__)("Analytics module needs to be configured.","google-site-kit");break;case"UNAUTHENTICATED":n=Object(o.__)("You need to be authenticated to get this data.","google-site-kit");break;case"PERMISSION_DENIED":n=Object(o.__)("Your account does not have sufficient permission to access this data, please consult to your web administrator.","google-site-kit");break;case"RESOURCE_EXHAUSTED":n=Object(o.__)("Your account exceeded the maximum quota. Please try again later.","google-site-kit");break;case"INTERNAL":n=Object(o.__)("Unexpected internal server error occurred.","google-site-kit");break;case"BACKEND_ERROR":n=Object(o.__)("Analytics server returned unknown error. Please try again later.","google-site-kit");break;case"UNAVAILABLE":n=Object(o.__)("The service was unable to process the request. Please try again later.","google-site-kit");break;default:n=t}return n},g=function(e){return!(!e.error||!e.error.status)&&d(e.error.status,e.error.message)},m=function(e){if(!e||!e.length)return!0;if(e&&e[0]&&e[0].data&&e[0].data.totals&&e[0].data.totals[0]){var t=e[0].data.totals[0].values,n=!0;return Object(i.each)(t,(function(e){0!==parseInt(e)&&(n=!1)})),n}return!1},p={dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:adsenseRevenue",alias:"Earnings"},{expression:"ga:adsenseECPM",alias:"Page RPM"},{expression:"ga:adsensePageImpressions",alias:"Impressions"}],orderby:[{fieldName:"ga:adsenseRevenue",sortOrder:"DESCENDING"}],limit:10},f={compareDateRanges:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"}],limit:180},h={multiDateRange:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"},{expression:"ga:pageviews",alias:"Pageviews"}],limit:10},b={dimensions:"ga:medium",metrics:[{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:users",alias:"Users"},{expression:"ga:newUsers",alias:"New Users"}],orderby:[{fieldName:"ga:sessions",sortOrder:"DESCENDING"}],limit:10},v=function(){var e=[{expression:"ga:pageviews",alias:"Pageviews"},{expression:"ga:uniquePageviews",alias:"Unique Pageviews"},{expression:"ga:bounceRate",alias:"Bounce rate"}];return window.googlesitekit.modules.analytics.adsenseLinked&&e.push({expression:"ga:adsenseRevenue",alias:"AdSense Revenue"},{expression:"ga:adsenseECPM",alias:"AdSense ECPM"}),{dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:e,orderby:[{fieldName:"ga:pageviews",sortOrder:"DESCENDING"}],limit:10}}},157:function(e,t,n){"use strict";var a={};n.r(a),n.d(a,"totalStats",(function(){return u})),n.d(a,"firstPostWin",(function(){return d})),n.d(a,"pageviewIncrease",(function(){return m})),n.d(a,"publishingWin",(function(){return p})),n.d(a,"trafficIncrease",(function(){return f}));var i=n(27),o=n.n(i),r=n(2),s=n(9),c=n(33),l=n(0),u=function(e,t){if(5>=parseInt(googlesitekit.admin.newSitePosts,10))return!1;if(!e||!e.rows)return!1;var n=[],a=Object(l.__)("Here are some high level stats","google-site-kit");if(e&&e.rows){var i=Object(c.extractSearchConsoleDashboardData)(e),o=i.totalClicks,s=i.totalClicksChange,u=i.totalImpressions,d=i.totalImpressionsChange,g=i.averageCTR,m=i.averageCTRChange;0<s&&0<d&&0<m&&(a="".concat(Object(l.__)("Last month was great!","google-site-kit"),". ").concat(a)),n=[{title:Object(l.__)("Total Clicks","google-site-kit"),datapoint:o,datapointUnit:"",change:s,changeDataUnit:"%",period:Object(l.__)("for month","google-site-kit")},{title:Object(l.__)("Total Impressions","google-site-kit"),datapoint:u,datapointUnit:"",change:d,changeDataUnit:"%",period:Object(l.__)("for month","google-site-kit")},{title:Object(l.__)("Average CTR","google-site-kit"),datapoint:g,datapointUnit:"%",change:m,changeDataUnit:"%",period:Object(l.__)("for month","google-site-kit")}]}var p=new Date,f=new Date(p.getFullYear(),p.getMonth()+1,0),h=Object(r.j)(p,f)+1;return{id:t,title:Object(l.__)("Welcome Back!","google-site-kit"),description:a,format:"large",winImage:"".concat(googlesitekit.admin.assetsRoot,"images/g-win.png"),blockData:n,type:"win-stats",dismissExpires:Object(r.p)("day")*h,showOnce:!0}},d=function(e){return!(1!==parseInt(googlesitekit.admin.newSitePosts,10))&&{id:e,title:Object(l.__)("Congrats on your first post!","google-site-kit"),format:"small",smallImage:"".concat(googlesitekit.admin.assetsRoot,"images/thumbs-up.png"),type:"win-success",showOnce:!0}},g=n(15),m=function(e,t){if(!googlesitekit.modules.analytics||!googlesitekit.modules.analytics.active)return!1;if(!e||!e.reports)return!1;var n=Object(g.calculateOverviewData)(e);if(!n)return!1;var a=n.totalPageViewsChange,i=n.totalPageViews;return!(10>a)&&{id:t,title:Object(l.__)("Increased page views!","google-site-kit"),description:Object(l.__)("Over the past 4 weeks","google-site-kit"),format:"large",logo:!1,winImage:"".concat(googlesitekit.admin.assetsRoot,"images/sun-small.png"),blockData:[{title:Object(l.__)("Total Page Views","google-site-kit"),datapoint:Object(r.r)(i),datapointUnit:""},{title:Object(l.__)("Increase","google-site-kit"),datapoint:a,datapointUnit:"%"}],type:"win-stats-increase",dismissExpires:Object(r.p)("month"),showOnce:!0}},p=function(e,t){if(!(5===parseInt(googlesitekit.admin.newSitePosts,10)))return!1;var n=Object(l.__)("That’s out of this world.","google-site-kit"),a=[];if(googlesitekit.modules["search-console"]&&googlesitekit.modules["search-console"].active&&e){var i=Object(c.extractSearchConsoleDashboardData)(e),o=i.totalClicks,s=i.totalImpressions,u=i.averageCTR;a=[{title:Object(l.__)("Total Impressions","google-site-kit"),datapoint:Object(r.t)(s),datapointUnit:""},{title:Object(l.__)("Total Clicks","google-site-kit"),datapoint:Object(r.t)(o),datapointUnit:""},{title:Object(l.__)("Average CTR","google-site-kit"),datapoint:u,datapointUnit:"%"}],n=Object(l.__)("That’s out of this world. Here are the combined stats for your posts","google-site-kit")}return{id:t,title:Object(l.__)("Congrats on five published posts","google-site-kit"),description:n,format:"large",winImage:"".concat(googlesitekit.admin.assetsRoot,"images/rocket.png"),blockData:a,type:"win-stats",showOnce:!0}},f=function(e,t){if(!googlesitekit.modules.analytics||!googlesitekit.modules.analytics.active)return!1;if(!e||!e[0])return!1;var n=Object(g.calculateOverviewData)(e);if(!n)return!1;var a=n.totalUsersChange,i=n.totalUsers;return!(10>a||100<a)&&{id:t,title:Object(l.__)("Congrats on more website visitors!","google-site-kit"),description:Object(l.__)("You had a record-high amount of visitors to your website yesterday.","google-site-kit"),dismiss:Object(l.__)("OK, Got it!","google-site-kit"),format:"large",winImage:"".concat(googlesitekit.admin.assetsRoot,"images/sun.png"),blockData:[{title:Object(l.__)("Site Visitors","google-site-kit"),datapoint:Object(r.t)(i),datapointUnit:""},{title:Object(l.__)("Increase","google-site-kit"),datapoint:a,datapointUnit:"%"}],type:"win-stats",dismissExpires:Object(r.p)("week"),showOnce:!0}},h=n(10);function b(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var v=Object(r.l)("notification");"authentication_success"!==v&&"authentication_failure"!==v&&(Object(h.addFilter)("googlesitekit.winCallbacks","googlesitekit.publisherwinCallbacks",(function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{},a)})),Object(h.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){return e.push({identifier:"first-post-win"}),e}),1),Object(h.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){var t={identifier:"publishing-win",withData:{type:s.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(r.p)("day"),context:"Dashboard"}};return e.push(t),e}),1),Object(h.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){var t={identifier:"total-stats",withData:{type:s.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(r.p)("day"),context:"Dashboard"}};return e.push(t),e}),2),googlesitekit.modules.analytics.active&&(Object(h.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){var t={identifier:"pageview-increase",withData:{type:s.b,identifier:"analytics",datapoint:"reports",data:g.overviewReportDataDefaults,priority:1,maxAge:Object(r.p)("day"),context:"Dashboard"}};return e.push(t),e}),2),Object(h.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){var t={identifier:"traffic-increase",withData:{type:s.b,identifier:"analytics",datapoint:"report",data:g.overviewReportDataDefaults,priority:1,maxAge:Object(r.p)("day"),context:"Dashboard"}};return e.push(t),e}),2)))},160:function(e,t,n){"use strict";var a=n(1),i=n(3),o=n.n(i),r=n(4),s=n.n(r),c=n(5),l=n.n(c),u=n(6),d=n.n(u),g=n(7),m=n.n(g),p=n(2),f=n(26),h=n(12),b=n.n(h),v=n(13),k=n.n(v),_=n(11),y=n(9),O=n(54),w=n(53),R=n(0),j=n(14),E=function(e){function t(e){var n;return o()(this,t),(n=l()(this,d()(t).call(this,e))).setupModuleClick=n.setupModuleClick.bind(k()(n)),n}return m()(t,e),s()(t,[{key:"setupModuleClick",value:function(e){return b.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.setState({isSaving:!0}),t.next=4,b.a.awrap(Object(p.a)(y.c,e,!0));case 4:return t.next=6,b.a.awrap(Object(p.u)());case 6:window.location=Object(p.m)(e,!0),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),Object(p.w)(O.a,{id:"setup-module-error",title:Object(R.__)("Internal Server Error","google-site-kit"),description:t.t0.message,format:"small",type:"win-error"}),this.setState({isSaving:!1});case 13:case"end":return t.stop()}}),null,this,[[0,9]])}},{key:"render",value:function(){var e=this,t=Object.values(window.googlesitekit.modules||{}).filter((function(e){return!e.internal})),n=t.filter((function(e){return e.active&&e.setupComplete})).reduce((function(e,t){return e[t.slug]=t.name,e}),{}),a=t.filter((function(e){return 0===e.required.length})).sort((function(e,t){return e.sort-t.sort}));return React.createElement("div",{className:"googlesitekit-modules-list"},Object(_.map)(a,(function(t){var a=!1,i="",o=t.slug,r=t.name,s=t.setupComplete,c=t.required;return 0<c.length&&c.forEach((function(e){n[e]&&(a=!0,i=n[e])})),React.createElement("div",{key:o,className:"\n\t\t\t\t\t\t\tgooglesitekit-modules-list__module\n\t\t\t\t\t\t\tgooglesitekit-modules-list__module--".concat(o,"\n\t\t\t\t\t\t\t").concat(a?"googlesitekit-modules-list__module--disabled":"","\n\t\t\t\t\t\t")},React.createElement("div",{className:"googlesitekit-settings-connect-module__wrapper"},React.createElement("div",{className:"googlesitekit-settings-connect-module__logo"},Object(p.q)(o,a)),React.createElement("h3",{className:"googlesitekit-settings-connect-module__title"},r)),React.createElement(w.a,{slug:o,context:"modules-list"}),s&&React.createElement("span",{className:"googlesitekit-settings-module__status"},React.createElement("span",{className:"googlesitekit-settings-module__status-icon googlesitekit-settings-module__status-icon--connected"},React.createElement("span",{className:"screen-reader-text"},Object(R.__)("Connected","google-site-kit"))),Object(R.__)("Connected","google-site-kit")),!s&&!a&&React.createElement(j.a,{arrow:!0,small:!0,inherit:!0,onClick:function(){e.setupModuleClick(o)}}," ",Object(R.__)("Connect Service","google-site-kit")),!s&&a&&React.createElement(j.a,{disabled:!0,small:!0,inherit:!0},Object(R.sprintf)(Object(R.__)("Enable %s to start setup","google-site-kit"),i)))})))}}]),t}(a.Component),C=n(10),N=function(e){function t(){return o()(this,t),l()(this,d()(t).apply(this,arguments))}return m()(t,e),s()(t,[{key:"render",value:function(){var e=Object(p.l)("notification");if(!e||""===e)return null;var t={id:"connected-successfully",setupTitle:Object(R.__)("Site Kit","google-site-kit"),description:Object(R.__)("Now you’ll be able to see how your site is doing in search. To get even more detailed stats, activate more modules. Here are our recommendations for what to include in your Site Kit:","google-site-kit"),learnMore:{label:"",url:"",description:""}},n=googlesitekit.permissions.canManageOptions;switch(e){case"authentication_success":if(!n)return null;var i=Object(p.l)("slug");return i&&googlesitekit.modules[i]&&!googlesitekit.modules[i].active?null:(i&&googlesitekit.modules[i]&&(t.id="".concat(t.id,"-").concat(i),t.setupTitle=googlesitekit.modules[i].name,t.description=Object(R.__)("Here are some other services you can connect to see even more stats:","google-site-kit"),t=Object(C.applyFilters)("googlesitekit.SetupWinNotification-".concat(i),t)),React.createElement(a.Fragment,null,React.createElement(f.a,{id:t.id,title:Object(R.sprintf)(Object(R.__)("Congrats on completing the setup for %s!","google-site-kit"),t.setupTitle),description:t.description,handleDismiss:function(){},winImage:googlesitekit.admin.assetsRoot+"images/rocket.png",dismiss:Object(R.__)("OK, Got it!","google-site-kit"),format:"large",type:"win-success",learnMoreLabel:t.learnMore.label,learnMoreDescription:t.learnMore.description,learnMoreURL:t.learnMore.url},React.createElement(E,null))));case"authentication_failure":return React.createElement(a.Fragment,null,React.createElement(f.a,{id:"connection error",title:Object(R.__)("There was a problem connecting to Google!","google-site-kit"),description:"",handleDismiss:function(){},format:"small",type:"win-error"}))}}}]),t}(a.Component),D=n(58),x=function(e){function t(e){var n;return o()(this,t),(n=l()(this,d()(t).call(this,e))).state={data:!1},n}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this,t=Object(D.f)();t&&Object(D.b)(t).then((function(t){e.setState({data:t.results})}))}},{key:"render",value:function(){var e=this.state.data;if(0===Object.keys(e).length)return null;var t=[];return Object.keys(e).forEach((function(n){Object(_.each)(e[n],(function(e){t.push(React.createElement(f.a,{key:e.id,id:e.id,title:e.title||"",description:e.description||"",blockData:e.blockData||[],winImage:e.winImage?"".concat(googlesitekit.admin.assetsRoot,"images/").concat(e.winImage):"",format:e.format||"small",learnMoreURL:e.learnMoreURL||"",learnMoreDescription:e.learnMoreDescription||"",learnMoreLabel:e.learnMoreLabel||"",ctaLink:e.ctaURL||"",ctaLabel:e.ctaLabel||"",ctaTarget:e.ctaTarget||"",type:e.severity||"",dismiss:e.dismiss||Object(R.__)("OK, Got it!","google-site-kit"),isDismissable:e.isDismissable||!0,logo:e.logo||!0,module:n,moduleName:googlesitekit.modules[n].name,pageIndex:e.pageIndex||"",dismissExpires:e.dismissExpires||0,showOnce:e.showOnce||!1}))}))})),React.createElement(a.Fragment,null,t)}}]),t}(a.Component),S=function(e){function t(e){var n;return o()(this,t),(n=l()(this,d()(t).call(this,e))).state={data:!1},n}return m()(t,e),s()(t,[{key:"componentWillMount",value:function(){var e=this;Object(C.addAction)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications",(function(){Object(C.removeAction)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications");var t=Object(D.g)();t&&Object(D.d)(t).then((function(t){e.setState({data:t.results})}))}))}},{key:"render",value:function(){var e=this.state.data;if(0===Object.keys(e).length)return null;var t=[];return Object.keys(e).forEach((function(n){Object(_.each)(e[n],(function(e){t.push(React.createElement(f.a,{key:e.id,id:e.id,title:e.title||"",description:e.description||"",blockData:e.blockData||[],winImage:e.winImage||"",format:e.format||"small",learnMoreURL:e.learnMoreURL||"",learnMoreDescription:e.learnMoreDescription||"",learnMoreLabel:e.learnMoreLabel||"",ctaLink:e.ctaLink||"",ctaLabel:e.ctaLabel||"",type:e.severity||"",dismiss:e.dismiss||Object(R.__)("OK, Got it!","google-site-kit"),isDismissable:e.isDismissable||!0,logo:e.logo||!1,pageIndex:e.pageIndex||"",dismissExpires:e.dismissExpires||0,showOnce:e.showOnce||!1}))}))})),React.createElement(a.Fragment,null,t)}}]),t}(a.Component),A=n(86),L=n(24),I=window.googlesitekit.setup,P=Object(p.l)("notification"),M=Object(L.a)(React.createElement(N,null)),T=Object(L.a)(React.createElement(x,null)),U=Object(L.a)(React.createElement(S,null)),F=Object(L.a)(React.createElement(A.a,null));I.needReauthenticate&&Object(C.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",F,1),"authentication_success"===P||"authentication_failure"===P?Object(C.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.SetupNotification",M,1):I.isAuthenticated&&I.isVerified&&(Object(C.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.ModulesNotification",T,1),Object(C.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.WinsNotification",U,1))},17:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),f=n.n(p),h=n(14),b=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.ctaLabel,a=e.ctaLink;return React.createElement("header",{className:"googlesitekit-layout__header"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:"\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\t\t".concat(a?"mdc-layout-grid__cell--span-6-desktop":"mdc-layout-grid__cell--span-12-desktop","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--align-middle\n\t\t\t\t\t\t\t\t\t").concat(a?"":"mdc-layout-grid__cell--span-8-tablet","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\t\t\t\t\t\t")},React.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},t)),a&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},React.createElement(h.a,{href:a,external:!0,inherit:!0},n)))))}}]),t}(m.Component);b.propTypes={title:f.a.string,ctaLabel:f.a.string,ctaLink:f.a.string},b.defaultProps={title:"",ctaLabel:"",ctaLink:""};var v=b,k=n(60),_=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.ctaLabel,n=e.ctaLink,a=e.footerContent;return React.createElement("footer",{className:"googlesitekit-layout__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n&&t&&React.createElement(k.a,{className:"googlesitekit-data-block__source",name:t,href:n,external:!0}),a))))}}]),t}(m.Component);_.propTypes={ctaLabel:f.a.string,ctaLink:f.a.string};var y=_,O=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.footer,a=e.children,i=e.title,o=e.headerCtaLabel,r=e.headerCtaLink,s=e.footerCtaLabel,c=e.footerCtaLink,l=e.footerContent,u=e.className,d=e.fill,g=e.relative;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-layout\n\t\t\t\t".concat(u&&u,"\n\t\t\t\t").concat(d?"googlesitekit-layout--fill":"","\n\t\t\t\t").concat(g?"googlesitekit-layout--relative":"","\n\t\t\t")},t&&React.createElement(v,{title:i,ctaLabel:o,ctaLink:r}),a,n&&React.createElement(y,{ctaLabel:s,ctaLink:c,footerContent:l}))}}]),t}(m.Component);O.propTypes={header:f.a.bool,footer:f.a.bool,children:f.a.node.isRequired,title:f.a.string,headerCtaLabel:f.a.string,headerCtaLink:f.a.string,footerCtaLabel:f.a.string,footerCtaLink:f.a.string,footerContent:f.a.node,className:f.a.string,fill:f.a.bool,relative:f.a.bool},O.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1};t.a=O},2:function(e,t,n){"use strict";var a,i=n(49),o=n.n(i),r=n(68),s=n.n(r),c=n(27),l=n.n(c),u=n(12),d=n.n(u),g=n(61),m=n.n(g),p=(n(1),n(11)),f=n(9),h=n(20),b=n(18),v=n.n(b),k=n(35),_=n.n(k),y=n(10),O=n(0),w=n(36),R=n(3),j=n.n(R),E=n(4),C=n.n(E),N=function(e){var t=window[e];if(!t)return!1;try{var n="__storage_test__";return t.setItem(n,n),t.removeItem(n),!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}},D=function(){function e(){j()(this,e)}return C()(e,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),e}(),x=function(){return a||(a=N("sessionStorage")?window.sessionStorage:N("localStorage")?window.localStorage:new D),a};function S(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(n,!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"t",(function(){return L})),n.d(t,"r",(function(){return I})),n.d(t,"p",(function(){return P})),n.d(t,"s",(function(){return M})),n.d(t,"j",(function(){return T})),n.d(t,"c",(function(){return U})),n.d(t,"l",(function(){return q})),n.d(t,"f",(function(){return H})),n.d(t,"u",(function(){return G})),n.d(t,"m",(function(){return W})),n.d(t,"g",(function(){return K})),n.d(t,"n",(function(){return B})),n.d(t,"z",(function(){return z})),n.d(t,"A",(function(){return V})),n.d(t,"b",(function(){return Q})),n.d(t,"v",(function(){return J})),n.d(t,"k",(function(){return Y})),n.d(t,"a",(function(){return $})),n.d(t,"y",(function(){return ee})),n.d(t,"w",(function(){return te})),n.d(t,"e",(function(){return ne})),n.d(t,"i",(function(){return ie})),n.d(t,"h",(function(){return oe})),n.d(t,"q",(function(){return re})),n.d(t,"d",(function(){return se})),n.d(t,"x",(function(){return ce})),n.d(t,"o",(function(){return x}));var L=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t=Object(p.isUndefined)(e)?0:1e6<e?(e/=1e6).toFixed(1)+"M":1e3<e?99<(e/=1e3)?Math.round(e)+"K":e.toFixed(1)+"K":e,(Object(p.isNull)(e)||Object(p.isUndefined)(e)||isNaN(e))&&(t="",e=0),0===e)return t="0.00",n?new Intl.NumberFormat(navigator.language,{style:"currency",currency:n}).format(e):e;if(!1!==n&&""!==t){var a=new Intl.NumberFormat(navigator.language,{style:"currency",currency:n}).formatToParts(e),i=a.find((function(e){return"decimal"===e.type}));!Object(p.isUndefined)(i)&&!Object(p.isUndefined)(i.value)&&1e3>e&&(t=Number.isInteger(e)?e:e.replace(".",i.value));var o=a.find((function(e){return"currency"===e.type})),r=o?o.value:"";return"".concat(r).concat(t)}return t.toString()},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t||(t=navigator.language),t=t.replace("_","-").toLocaleLowerCase(),new Intl.NumberFormat(t).format(e)},P=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}},M=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},T=function(e,t){var n=1e3*P("day"),a=e.getTime(),i=t.getTime();return Math.round(Math.abs(a-i)/n)},U=function(e,t){if("0"===e||0===e||isNaN(e))return"";var n=((t-e)/e*100).toFixed(1);return isNaN(n)||"Infinity"===n?"":n},F=function(e){for(var t=location.search.substr(1).split("&"),n={},a=0;a<t.length;a++)n[t[a].split("=")[0]]=decodeURIComponent(t[a].split("=")[1]);return e?n.hasOwnProperty(e)?decodeURIComponent(n[e].replace(/\+/g," ")):"":n},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,n=new URL(t.href);if(e)return n.searchParams&&n.searchParams.get?n.searchParams.get(e):F(e);var a={},i=!0,o=!1,r=void 0;try{for(var s,c=n.searchParams.entries()[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=m()(s.value,2),u=l[0],d=l[1];a[u]=d}}catch(e){o=!0,r=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw r}}return a},H=function(e,t){return Object(p.map)(e,(function(e,n){return[e[0],e[t]||(0===n?"":0)]}))},G=function(){var e,t;return d.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d.a.awrap(f.c.get(f.a,"user","authentication"));case 3:e=n.sent,t=e.grantedScopes.filter((function(t){return-1!==e.requiredScopes.indexOf(t)})),window.googlesitekit.setup=window.googlesitekit.setup||{},window.googlesitekit.setup.isAuthenticated=e.isAuthenticated,window.googlesitekit.setup.requiredScopes=e.requiredScopes,window.googlesitekit.setup.grantedScopes=e.grantedScopes,window.googlesitekit.setup.needReauthenticate=t.length<e.requiredScopes.length,n.next=14;break;case 12:n.prev=12,n.t0=n.catch(0);case 14:case"end":return n.stop()}}),null,null,[[0,12]])},W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:googlesitekit,a=n.admin,i=a.connectURL,o=a.adminRoot,r=n.setup.needReauthenticate,s=n.modules[e].screenID,c="pagespeed-insights"===e?{notification:"authentication_success",reAuth:void 0}:{},l=Object(w.addQueryArgs)(o,A({page:e&&t&&s?s:"googlesitekit-dashboard",slug:e,reAuth:t},c));if(!r)return l;var u=encodeURIComponent(Object(w.getQueryString)(l));return l=o+"?"+u,Object(w.addQueryArgs)(i,{redirect:l,status:t})},K=function(e,t){return function(n){return function(a){return v.a.createElement(e,s()({},a,t,{OriginalComponent:n}))}}},B=function(e,t){var n=googlesitekit.admin.adminRoot;return e||(e="googlesitekit-dashboard"),t=A({page:e},t),Object(w.addQueryArgs)(n,t)},z=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},V=function(e){return e.match(/^GTM-[a-zA-Z\d]{7}$/)},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,n=null,a=document.querySelector("#toplevel_page_googlesitekit-dashboard #googlesitekit-notifications-counter"),i=document.querySelector("#wp-admin-bar-google-site-kit #googlesitekit-notifications-counter");if(a&&i)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),n=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===n)return!1;var o=document.createElement("span");o.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e)),o.setAttribute("id","googlesitekit-notifications-counter");var r=document.createElement("span");r.setAttribute("class","plugin-count"),r.setAttribute("aria-hidden","true"),r.textContent=e;var s=document.createElement("span");return s.setAttribute("class","screen-reader-text"),s.textContent=Object(O.sprintf)(Object(O._n)("%d notification","%d notifications",e,"google-site-kit"),e),o.appendChild(r),o.appendChild(s),t&&null===a&&t.appendChild(o),n&&null===i&&n.appendChild(o),o},J=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if("undefined"!=typeof gtag){var i=googlesitekit.admin,o=i.siteURL,r=i.siteUserID,s=googlesitekit.setup.isFirstAdmin;return googlesitekit.admin.trackingOptin?gtag("event",t,{send_to:googlesitekit.admin.trackingID,event_category:e,event_label:n,event_value:a,dimension1:Object(p.trimEnd)(o,"/"),dimension2:s?"true":"false",dimension3:r}):void 0}},Y=function(e){var t,n,a,i,o;return d.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return t=googlesitekit.admin,n=t.homeURL,a=t.ampMode,i={tagverify:1,timestamp:Date.now()},r.next=4,d.a.awrap(Z(Object(w.addQueryArgs)(n,i),e));case 4:if((o=r.sent)||"secondary"!==a){r.next=9;break}return r.next=8,d.a.awrap(_()({path:"/wp/v2/posts?per_page=1"}).then((function(t){return t.slice(0,1).map((function(t){return d.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,d.a.awrap(Z(Object(w.addQueryArgs)(t.link,A({},i,{amp:1})),e));case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}))})).pop()})));case 8:o=r.sent;case 9:return r.abrupt("return",Promise.resolve(o||null));case 10:case"end":return r.stop()}}))},Z=function(e,t){var n;return d.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,d.a.awrap(fetch(e,{credentials:"omit"}).then((function(e){return e.text()})));case 3:return n=a.sent,a.abrupt("return",X(n,t)||null);case 7:return a.prev=7,a.t0=a.catch(0),a.abrupt("return",null);case 10:case"end":return a.stop()}}),null,null,[[0,7]])},X=function(e,t){var n=!1;switch(t){case"analytics":(n=!!(n=new RegExp(/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/gm).exec(e))&&n[1])||(n=!!(n=new RegExp(/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/gm).exec(e))&&n[1]);break;case"adsense":(n=!!(n=new RegExp(/google_ad_client: ?["|'](.*?)["|']/gm).exec(e))&&n[1])||(n=!!(n=new RegExp(/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/gm).exec(e))&&n[1])}return n},$=function(e,t,n){return e.setModuleActive(t,n).then((function(e){return window.googlesitekit.modules&&window.googlesitekit.modules[t]&&(window.googlesitekit.modules[t].active=e.active),J("".concat(t,"_setup"),e.active?"module_activate":"module_deactivate",t),new Promise((function(t){t(e)}))}))},ee=function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:googlesitekit,o=i.modules[e],r=o.settings,s=o.setupComplete,c=a||document.getElementById("confirm-changes-".concat(e));if(s&&c){var l=[];Object.keys(n).forEach((function(e){-1<Object.keys(t).indexOf(e)&&(l[t[e]]=n[e])}));var u=[];Object.keys(r).forEach((function(e){-1<Object.values(t).indexOf(e)&&(u[e]=r[e])}));var d=Object.keys(u).filter((function(e){return u[e]!==l[e]}));if(0<d.length){if(a)return!0;c.removeAttribute("disabled")}else{if(a)return!1;c.setAttribute("disabled","disabled")}}},te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(y.addFilter)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",K(e,t),1)},ne=function(e){var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(p.unescape)(t)};function ae(){return Object(y.applyFilters)("googlesitekit.dateRange",Object(O.__)("Last 28 days","google-site-kit"))}function ie(){return ae().replace("Last ","")}function oe(){return e=ae(),Object(p.toLower)(Object(p.deburr)(Object(p.trim)(e.replace(/[\s./_]+/g,"-"),"-")));var e}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(googlesitekit){var o=v.a.createElement(h.a,{id:e,width:n,height:a,className:i});return t?o=v.a.createElement(h.a,{id:"".concat(e,"-disabled"),width:n,height:a,className:i}):"pagespeed-insights"===e&&(o=v.a.createElement("img",{src:googlesitekit.admin.assetsRoot+"images/icon-pagespeed.png",width:n,alt:"",className:i})),o}}function se(){window.localStorage&&window.localStorage.clear(),window.sessionStorage&&window.sessionStorage.clear()}function ce(e){var t={};return Object.keys(e).sort().forEach((function(n){var a=e[n];a&&"object"===o()(a)&&!Array.isArray(a)&&(a=ce(a)),t[n]=a})),t}},20:function(e,t,n){"use strict";n(1);var a=n(8),i=n.n(a),o=function(e){var t=e.id,n=e.className,a=e.height,i=e.width,o="".concat(googlesitekit.admin.assetsRoot,"svg/svg.svg");return React.createElement("svg",{className:"svg".concat(" ",n),height:a,width:i},React.createElement("use",{xlinkHref:"".concat(o,"#").concat(t)}))};o.propTypes={id:i.a.string.isRequired,className:i.a.string,height:i.a.string,width:i.a.string},o.defaultProps={className:"",height:20,width:20},t.a=o},21:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(11),f=n(10),h=n(59),b=16;function v(e){return Object(h.createHigherOrderComponent)((function(t){var n,a="core/with-filters/"+e;var o=function(o){function s(){var a;return i()(this,s),a=c()(this,u()(s).apply(this,arguments)),void 0===n&&(n=Object(f.applyFilters)(e,t)),a}return g()(s,o),r()(s,[{key:"componentDidMount",value:function(){s.instances.push(this),1===s.instances.length&&(Object(f.addAction)("hookRemoved",a,l),Object(f.addAction)("hookAdded",a,l))}},{key:"componentWillUnmount",value:function(){s.instances=Object(p.without)(s.instances,this),0===s.instances.length&&(Object(f.removeAction)("hookRemoved",a),Object(f.removeAction)("hookAdded",a))}},{key:"render",value:function(){return React.createElement(n,this.props)}}]),s}(m.Component);o.instances=[];var s=Object(p.debounce)((function(){n=Object(f.applyFilters)(e,t),o.instances.forEach((function(e){e.forceUpdate()}))}),b);function l(t){t===e&&s()}return o}),"withFilters")}},22:function(e,t,n){"use strict";var a=n(81),i=n.n(a);n.d(t,"l",(function(){return i.a})),n.d(t,"a",(function(){return a.HelperText})),n.d(t,"b",(function(){return a.Input}));var o=n(150);n.d(t,"h",(function(){return o.a}));var r=n(161);n.d(t,"e",(function(){return r.a}));var s=n(162);n.d(t,"g",(function(){return s.a}));var c=n(96),l=n.n(c);n.d(t,"k",(function(){return l.a})),n.d(t,"j",(function(){return c.Option}));var u=n(163);n.d(t,"i",(function(){return u.a}));var d=n(159);n.d(t,"d",(function(){return d.a}));var g=n(158);n.d(t,"c",(function(){return g.a}));var m=n(156);n.d(t,"f",(function(){return m.a}))},24:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(1),i=function(e){return function(t){return function(n){return Object(a.createElement)(a.Fragment,{},"",Object(a.createElement)(t,n),e)}}}},25:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(13),g=n.n(d),m=n(7),p=n.n(m),f=n(1),h=n(8),b=n.n(h),v=n(60),k=n(20),_=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).handleClick=n.handleClick.bind(g()(n)),n.handleKeyPress=n.handleKeyPress.bind(g()(n)),n}return p()(t,e),r()(t,[{key:"handleClick",value:function(){var e=this.props,t=e.stat;(0,e.handleStatSelection)(t)}},{key:"handleKeyPress",value:function(e){e.preventDefault();var t=this.props,n=t.stat,a=t.handleStatSelection;"Enter"!==e.key&&" "!==e.key||a(n)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.title,a=e.datapoint,i=e.datapointUnit,o=e.change,r=e.changeDataUnit,s=e.context,c=e.period,l=e.selected,u=e.handleStatSelection,d=e.source,g=e.sparkline,m=e.reverseArrowDirection,p="button"===s?"button":"",h=0<=o?"-positive":"-negative";return React.createElement("div",{className:"\n\t\t\t\t\tgooglesitekit-data-block\n\t\t\t\t\tgooglesitekit-data-block--".concat(s,"\n\t\t\t\t\t").concat(l?"googlesitekit-data-block--selected":"","\n\t\t\t\t\t").concat(t,"\n\t\t\t\t"),tabIndex:"button"===s?"0":"-1",role:u&&p,onClick:u&&this.handleClick,onKeyPress:u&&this.handleKeyPress,"aria-label":u&&n,"aria-pressed":u&&l},React.createElement("div",{className:"googlesitekit-data-block__title-datapoint-wrapper"},React.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-data-block__title "},n),React.createElement("div",{className:"googlesitekit-data-block__datapoint"},"".concat(a).concat(i))),g&&React.createElement("div",{className:"googlesitekit-data-block__sparkline"},g),React.createElement("div",{className:"googlesitekit-data-block__change-source-wrapper"},React.createElement("div",{className:"\n\t\t\t\t\t\tgooglesitekit-data-block__change\n\t\t\t\t\t\tgooglesitekit-data-block__change--".concat(0<=o?"positive":"negative","\n\t\t\t\t\t")},""===o&&React.createElement(f.Fragment,null," "),o&&[React.createElement("span",{key:"arrow",className:"googlesitekit-data-block__arrow ".concat(m?"googlesitekit-data-block__arrow--reverse":"")},React.createElement(k.a,{id:"arrow".concat(h),height:"9",width:"9"})),React.createElement("span",{key:"values",className:"googlesitekit-data-block__value"},"".concat(Math.abs(o)).concat(r," ").concat(c))]),d&&React.createElement(v.a,{className:"googlesitekit-data-block__source",name:d.name,href:d.link})))}}]),t}(f.Component);_.propTypes={stat:b.a.number,onClick:b.a.func,className:b.a.string,title:b.a.string,datapoint:b.a.oneOfType([b.a.string,b.a.number]),datapointUnit:b.a.string,change:b.a.oneOfType([b.a.string,b.a.number]),changeDataUnit:b.a.string,context:b.a.string,period:b.a.string,selected:b.a.bool,handleStatSelection:b.a.func,reverseArrowDirection:b.a.bool},_.defaultProps={stat:null,onClick:null,className:"",title:"",datapoint:null,datapointUnit:"",change:null,changeDataUnit:"",context:"default",period:"",selected:!1,handleStatSelection:null,reverseArrowDirection:!1},t.a=_},26:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(13),g=n.n(d),m=n(7),p=n.n(m),f=n(1),h=n(8),b=n.n(h),v=n(9),k=n(25),_=n(29);var y=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#F9BB2D",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"warning-title warning-desc"},React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))},O=n(87),w=n(14),R=n(20),j=n(11),E=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).state={isClosed:!1},n.cardRef=Object(f.createRef)(),n.handleDismiss=n.handleDismiss.bind(g()(n)),0<n.props.dismissExpires&&n.expireDismiss(),n.props.showOnce&&v.c.setCache("notification::displayed::".concat(n.props.id),new Date),n}return p()(t,e),r()(t,[{key:"handleDismiss",value:function(e){var t=this,n=this.state.isClosed,a=this.cardRef.current;e.preventDefault(),this.setState({isClosed:!n}),setTimeout((function(){v.c.setCache("notification::dismissed::".concat(t.props.id),new Date),a.style.display="none";var e=new Event("notificationDismissed");document.dispatchEvent(e)}),350)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,n=e.dismissExpires,a=v.c.getCache("notification::dismissed::".concat(t));if(a){var i=new Date(a);i.setSeconds(i.getSeconds()+parseInt(n,10)),i<new Date&&v.c.deleteCache("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var e=this.state.isClosed,t=this.props,n=t.children,a=t.id,i=t.title,o=t.description,r=t.blockData,s=t.winImage,c=t.smallImage,l=t.format,u=t.learnMoreURL,d=t.learnMoreDescription,g=t.learnMoreLabel,m=t.ctaLink,p=t.ctaLabel,h=t.ctaTarget,b=t.type,E=t.dismiss,C=t.isDismissable,N=t.logo,D=t.module,x=t.moduleName,S=t.pageIndex;if(v.c.getCache("notification::dismissed::".concat(a)))return null;var A,L=e?"is-closed":"is-open",I="large"===l&&"win-stats-increase"===b,P="mdc-layout-grid__cell--span-12";"large"===l?(P="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",I&&(P="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===l&&(P="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),A="win-warning"===b?React.createElement(y,null):"win-error"===b?React.createElement(O.a,null):"";var M=React.createElement(f.Fragment,null,r&&React.createElement("div",{className:"mdc-layout-grid__inner"},Object(j.map)(r,(function(e,t){return React.createElement("div",{key:t,className:"mdc-layout-grid__cell ".concat(I?"mdc-layout-grid__cell--span-5-desktop":"mdc-layout-grid__cell--span-4-desktop")},React.createElement("div",{className:"googlesitekit-publisher-win__stats"},React.createElement(k.a,e)))})))),T=React.createElement(f.Fragment,null,React.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},i),o&&React.createElement("div",{className:"googlesitekit-publisher-win__desc"},React.createElement("p",null,o,g&&React.createElement(f.Fragment,null," ",React.createElement(w.a,{href:u,external:!0,inherit:!0},g),d),S&&React.createElement("span",{className:"googlesitekit-publisher-win__detect"},S))),n),U=D?React.createElement(R.a,{id:D,height:"19",width:"19"}):React.createElement(R.a,{id:"logo-g",height:"34",width:"32"});return React.createElement("section",{ref:this.cardRef,className:"\n\t\t\t\tgooglesitekit-publisher-win\n\t\t\t\t".concat(l?"googlesitekit-publisher-win--".concat(l):"","\n\t\t\t\t").concat(b?"googlesitekit-publisher-win--".concat(b):"","\n\t\t\t\t").concat(L?"googlesitekit-publisher-win--".concat(L):"","\n\t\t\t")},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},N&&React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12 ".concat(I?"mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet":"")},React.createElement("div",{className:"googlesitekit-publisher-win__logo"},U),x&&React.createElement("div",{className:"googlesitekit-publisher-win__module-name"},x)),c&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},React.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:c})),React.createElement("div",{className:"mdc-layout-grid__cell ".concat(P)},I?React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},T),React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},M)):React.createElement(f.Fragment,null,T,M),m&&React.createElement(_.a,{href:m,target:h},p),C&&E&&React.createElement(w.a,{onClick:this.handleDismiss},E)),s&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement("div",{className:"googlesitekit-publisher-win__image-large"},React.createElement("img",{alt:"",src:s}))),("win-error"===b||"win-warning"===b)&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},React.createElement("div",{className:"googlesitekit-publisher-win__icons"},A)))))}}]),t}(f.Component);E.propTypes={id:b.a.string.isRequired,title:b.a.string.isRequired,description:b.a.string,learnMoreURL:b.a.string,learnMoreDescription:b.a.string,learnMoreLabel:b.a.string,blockData:b.a.array,winImage:b.a.string,smallImage:b.a.string,format:b.a.string,ctaLink:b.a.string,ctaLabel:b.a.string,type:b.a.string,dismiss:b.a.string,isDismissable:b.a.bool,logo:b.a.bool,module:b.a.string,moduleName:b.a.string,pageIndex:b.a.string,dismissExpires:b.a.number,showOnce:b.a.bool},E.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1};t.a=E},29:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(22),f=n(8),h=n.n(f),b=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).buttonRef=Object(m.createRef)(),n}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){new p.h(this.buttonRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onClick,n=e.children,a=e.href,i=e.text,o=e.className,r=e.danger,s=e.disabled,c=e.target,l=e.id,u=e.icon,d=e.trailingIcon,g=e.ariaHaspopup,m=e.ariaExpanded,p=e.ariaControls,f=a?"a":"button";return React.createElement(f,{className:"\n\t\t\t\t\tmdc-button\n\t\t\t\t\t".concat(!i&&"mdc-button--raised","\n\t\t\t\t\t").concat(o&&o,"\n\t\t\t\t\t").concat(r?"mdc-button--danger":"","\n\t\t\t\t"),onClick:t,href:a,ref:this.buttonRef,disabled:s?"disabled":"",target:c||"_self",id:l,"aria-haspopup":g,"aria-expanded":m,"aria-controls":p},u&&u,React.createElement("span",{className:"mdc-button__label"},n),d&&d)}}]),t}(m.Component);b.propTypes={onClick:h.a.func,children:h.a.string.isRequired,href:h.a.string,text:h.a.bool,className:h.a.string,danger:h.a.bool,disabled:h.a.bool,icon:h.a.element,trailingIcon:h.a.element,ariaHaspopup:h.a.string,ariaExpanded:h.a.bool,ariaControls:h.a.string},b.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""},t.a=b},31:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),f=n.n(p),h=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.small,a=e.compress,i=e.height,o=i?Math.round(i/2):null;return React.createElement("div",{role:"progressbar",className:"\n\t\t\t\t\tmdc-linear-progress\n\t\t\t\t\tmdc-linear-progress--indeterminate\n\t\t\t\t\t".concat(t||"","\n\t\t\t\t\t").concat(n?"mdc-linear-progress--small":"","\n\t\t\t\t\t").concat(a?"mdc-linear-progress--compress":"","\n\t\t\t\t"),style:{marginTop:o,marginBottom:o}},React.createElement("div",{className:"mdc-linear-progress__buffering-dots"}),React.createElement("div",{className:"mdc-linear-progress__buffer"}),React.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar"},React.createElement("span",{className:"mdc-linear-progress__bar-inner"})),React.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},React.createElement("span",{className:"mdc-linear-progress__bar-inner"})))}}]),t}(m.Component);h.propTypes={className:f.a.string,small:f.a.bool,compress:f.a.bool},h.defaultProps={className:"",small:!1,compress:!1},t.a=h},32:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),f=n.n(p),h=n(14),b=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.description,a=e.ctaLink,i=e.ctaLabel,o=e.error,r=e.onClick;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-cta\n\t\t\t\t".concat(o?"googlesitekit-cta--error":"","\n\t\t\t")},t&&React.createElement("h3",{className:"googlesitekit-cta__title"},t),n&&React.createElement("p",{className:"googlesitekit-cta__description"},n),i&&React.createElement(h.a,{href:a,onClick:r,inverse:!o,caps:!0,arrow:!0},i))}}]),t}(m.Component);b.propTypes={title:f.a.string.isRequired,description:f.a.string,ctaLink:f.a.string,ctaLabel:f.a.string,error:f.a.bool,onClick:f.a.func},b.defaultProps={title:"",description:"",ctaLink:"",ctaLabel:"",error:!1,onClick:function(){}},t.a=b},33:function(e,t,n){"use strict";n.r(t),n.d(t,"extractSearchConsoleDashboardData",(function(){return r})),n.d(t,"isDataZeroSearchConsole",(function(){return s}));var a=n(2),i=n(11);function o(e){var t=[[{type:"string",label:"Day"},{type:"number",label:"Clicks"},{type:"number",label:"Impressions"},{type:"number",label:"CTR"},{type:"number",label:"Position"}]],n=0,o=0,r=0,s=0,c=e.length;Object(i.each)(e,(function(e){var a=new Date(e.keys[0]);t.push([a.getMonth()+1+"/"+a.getUTCDate(),e.clicks,e.impressions,e.ctr,e.position]),n+=e.clicks,o+=e.impressions,r+=e.ctr,s+=e.position}));var l=n,u=o;n=Object(a.t)(n),o=Object(a.t)(o);var d=(r/c*100).toFixed(1),g=r/c,m=(s/c).toFixed(1);return{dataMap:t,totalClicks:n,totalClicksRaw:l,totalImpressions:o,totalImpressionsRaw:u,averageCTR:d,averageCTRRaw:g,averagePosition:m}}var r=function(e){var t=Math.floor(e.length/2),n=e.slice(e.length-t,e.length),i=e.slice(0,e.length-t),r=o(n),s=o(i),c=Object(a.c)(s.totalClicksRaw,r.totalClicksRaw),l=Object(a.c)(s.totalImpressionsRaw,r.totalImpressionsRaw),u=Object(a.c)(s.averageCTRRaw,r.averageCTRRaw),d=Object(a.c)(s.averagePosition,r.averagePosition);return{dataMap:r.dataMap,totalClicks:r.totalClicks,totalImpressions:r.totalImpressions,averageCTR:r.averageCTR,averagePosition:r.averagePosition,totalClicksChange:c,totalImpressionsChange:l,averageCTRChange:u,averagePositionChange:d}},s=function(e){if(!e.length)return!0;var t=r(e),n=t.totalClicks,a=t.totalImpressions,i=t.averageCTR,o=t.averagePosition;return 0===parseInt(n)&&0===parseInt(a)&&0===parseInt(i)&&0===parseInt(o)}},42:function(e,t,n){"use strict";n(1);var a=n(0),i=n(14);t.a=function(){var e=Object(a.__)("Need help?","google-site-kit");return React.createElement(i.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},e)}},43:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(21),f=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){return null}}]),t}(m.Component),h=Object(p.a)("googlesitekit.ErrorNotification")(f),b=n(80),v=n(12),k=n.n(v),_=n(13),y=n.n(_),O=n(67),w=n(29),R=n(22),j=n(8),E=n.n(j),C=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).menuRef=Object(m.createRef)(),n}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new R.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var e=this.props,t=e.menuOpen,n=e.menuItems,a=e.onSelected,i=e.id;return React.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},React.createElement("ul",{id:i,className:"mdc-list",role:"menu","aria-hidden":!t,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(e,t){return React.createElement("li",{key:t,className:"mdc-list-item",role:"menuitem",onClick:a.bind(null,t),onKeyDown:a.bind(null,t)},React.createElement("span",{className:"mdc-list-item__text"},e))}))))}}]),t}(m.Component);C.propTypes={menuOpen:E.a.bool.isRequired,menuItems:E.a.array.isRequired,id:E.a.string.isRequired};var N=C,D=n(2),x=n(0),S=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).state={dialogActive:!1,menuOpen:!1},n.handleMenu=n.handleMenu.bind(y()(n)),n.handleMenuClose=n.handleMenuClose.bind(y()(n)),n.handleMenuItemSelect=n.handleMenuItemSelect.bind(y()(n)),n.handleDialog=n.handleDialog.bind(y()(n)),n.handleDialogClose=n.handleDialogClose.bind(y()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(y()(n)),n.menuButtonRef=Object(m.createRef)(),n.menuRef=Object(m.createRef)(),n}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){window.addEventListener("mouseup",this.handleMenuClose),window.addEventListener("keyup",this.handleMenuClose),window.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.handleMenuClose),window.removeEventListener("keyup",this.handleMenuClose),window.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(e,t){var n=googlesitekit.admin.proxyPermissionsURL;if("keydown"===t.type&&(13===t.keyCode||32===t.keyCode)||"click"===t.type)switch(e){case 0:this.handleDialog();break;case 1:window.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return k.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(D.d)(),document.location=Object(D.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var e=googlesitekit.admin,t=e.userData,n=t.email,a=void 0===n?"":n,i=t.picture,o=void 0===i?"":i,r=e.proxyPermissionsURL,s=this.state,c=s.dialogActive,l=s.menuOpen;return React.createElement(m.Fragment,null,React.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},React.createElement(w.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:o?React.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},React.createElement("img",{className:"mdc-button__icon--image",src:o,alt:Object(x.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:l,ariaControls:"user-menu"},a),React.createElement(N,{ref:this.menuRef,menuOpen:l,menuItems:[Object(x.__)("Disconnect","google-site-kit")].concat(r?[Object(x.__)("Manage sites...","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),React.createElement(O.a,{dialogActive:c,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(x.__)("Disconnect","google-site-kit"),subtitle:Object(x.__)("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(x.__)("Disconnect","google-site-kit"),provides:[]}))}}]),t}(m.Component),A=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=googlesitekit.setup.isAuthenticated;return React.createElement(m.Fragment,null,React.createElement("header",{className:"googlesitekit-header"},React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(b.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e&&React.createElement(S,null))))),React.createElement(h,null))}}]),t}(m.Component);t.a=A},47:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(69),f=n(8),h=n.n(f),b=n(20),v=n(10),k=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.icon,a=e.iconWidth,i=e.iconHeight,o=e.iconID,r=e.className,s=e.status,c=e.statusText,l=e.fullWidth?"\n\t\t\tmdc-layout-grid__cell\n\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t":"\n\t\t\tmdc-layout-grid__cell\n\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\tmdc-layout-grid__cell--span-4-tablet\n\t\t\tmdc-layout-grid__cell--span-6-desktop\n\t\t\t",u=Object(v.applyFilters)("googlesitekit.showDateRangeSelector-".concat(o),!1),d=!(""===s&&!u);return React.createElement("header",{className:"googlesitekit-page-header"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:l},n&&React.createElement(b.a,{id:o,height:i,width:a,className:"googlesitekit-page-header__icon"}),React.createElement("h1",{className:"googlesitekit-page-header__title ".concat(r)},t)),d&&React.createElement("div",{className:"\n\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\tmdc-layout-grid__cell--align-bottom\n\t\t\t\t\t\t\tmdc-layout-grid__cell--align-right-tablet\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-tablet\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-6-desktop\n\t\t\t\t\t\t"},React.createElement("div",{className:"googlesitekit-page-header__details"},s&&React.createElement("span",{className:"\n\t\t\t\t\t\t\t\t\t\tgooglesitekit-page-header__status\n\t\t\t\t\t\t\t\t\t\tgooglesitekit-page-header__status--".concat(s,"\n\t\t\t\t\t\t\t\t\t")},c),u&&React.createElement("span",{className:"googlesitekit-page-header__range"},React.createElement(p.a,null))))))}}]),t}(m.Component);k.propTypes={title:h.a.string,icon:h.a.bool,iconID:h.a.string,iconWidth:h.a.string,iconHeight:h.a.string,className:h.a.string,status:h.a.string,statusText:h.a.string,fullWidth:h.a.bool},k.defaultProps={title:"",icon:!1,iconID:"",iconWidth:"",iconHeight:"",className:"googlesitekit-heading-3",status:"",statusText:"",fullWidth:!1},t.a=k},53:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(21),f=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.a=Object(p.a)("googlesitekit.ModuleSettingsWarning")(f)},54:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(26),f=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){return React.createElement(p.a,this.props)}}]),t}(m.Component);t.a=f},58:function(e,t,n){"use strict";var a=n(12),i=n.n(a),o=n(9),r=n(2),s=n(3),c=n.n(s),l=n(4),u=n.n(l),d=n(11),g=function(){function e(t){c()(this,e),this.wins=t,this.response=[]}return u()(e,[{key:"get",value:function(){var e,t=this;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return e=Object(d.filter)(this.wins.map((function(e){return!!e.withData&&(e.withData.callback=function(n){t.response[e.identifier]=n},e.withData)}))),n.next=3,i.a.awrap(o.c.combinedGetFromCache(e));case 3:return n.abrupt("return",this.response);case 4:case"end":return n.stop()}}),null,this)}}]),e}(),m=n(10);n.d(t,"g",(function(){return f})),n.d(t,"f",(function(){return h})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return _})),n.d(t,"d",(function(){return y})),n.d(t,"e",(function(){return O})),n.d(t,"a",(function(){return w}));var p=Object(m.applyFilters)("googlesitekit.winCallbacks",{}),f=function(){return Object(m.applyFilters)("googlesitekit.WinsNotificationsRequest",[])},h=function(){return Object(m.applyFilters)("googlesitekit.ModulesNotificationsRequest",[])};function b(){var e,t,n,a;return i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if((e=window.googlesitekit.setup).isSiteKitConnected&&(e.isAuthenticated||e.isVerified)){o.next=3;break}return o.abrupt("return",0);case 3:return t=0,o.next=6,i.a.awrap(_());case 6:return(n=o.sent)&&n.total&&(t+=n.total),o.next=10,i.a.awrap(y());case 10:return(a=o.sent)&&a.total&&(t+=a.total),t=Object(m.applyFilters)("googlesitekit.TotalNotifications",t),t=Math.max(0,Math.abs(t)),window.localStorage&&window.localStorage.setItem("googlesitekit::total-notifications",t),o.abrupt("return",t);case 16:case"end":return o.stop()}}))}var v=function(e){return e?e.length?e.filter((function(e){return!o.c.getCache("notification::dismissed::".concat(e.id))})):e:[]},k=function(e){var t=function(e){return Object.keys(e).slice(0,1).map((function(t){return e[t]}))};if(1>=Object.keys(e).length)return e;var n=Object.values(e).filter((function(e){var t=o.c.getCache("notification::displayed::".concat(e[0].id));if(t){var n=new Date(t),a=new Date,i=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));if(n.setHours(0,0,0),i.setHours(0,0,0),n.getTime()===i.getTime())return!0;7<=Object(r.j)(n,i)&&o.c.deleteCache("notification::displayed::".concat(e[0].id))}return null===t})),a=null,i=[];return 0<Object.keys(n).length?(a=t(n),i[Object.keys(n)[0]]=a):(a=t(e),i[Object.keys(e)[0]]=a)};function _(){var e,t,n,a;return i.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return e={},t=0,s.next=4,i.a.awrap(h());case 4:return n=s.sent,a=[],n.map((function(e){var t;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:t=new Promise((function(t){var n,a;return i.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return n=e.identifier,s.t0=v,s.next=4,i.a.awrap(o.c.getNotifications(n,Object(r.p)("day")));case 4:s.t1=s.sent,a=(0,s.t0)(s.t1),t({identifier:n,notifications:a});case 7:case"end":return s.stop()}}))})),a.push(t);case 2:case"end":return n.stop()}}))})),s.next=9,i.a.awrap(Promise.all(a).then((function(n){n.forEach((function(n){n.notifications.length&&(t+=n.notifications.length,e[n.identifier]=n.notifications)}))})));case 9:return s.abrupt("return",{results:e,total:t});case 10:case"end":return s.stop()}}))}function y(){var e,t,n,a,o;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return e={},t=0,r.next=4,i.a.awrap(f());case 4:return n=r.sent,r.next=7,i.a.awrap(new g(n).get());case 7:return a=r.sent,o=[],n.map((function(e){var t;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:t=new Promise((function(t){var n,o,r,s,c;return i.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:n=e.identifier,o=e.callback||Object(d.camelCase)(n),r=null,s=[],e.withData?(c=a[n]||null,r=p[o](c,n)):r=p[o](n),s=v(s=r?[r]:[]),t({identifier:n,notifications:s});case 8:case"end":return i.stop()}}))})),o.push(t);case 2:case"end":return n.stop()}}))})),r.next=12,i.a.awrap(Promise.all(o).then((function(t){t.forEach((function(t){t.notifications.length&&(e[t.identifier]=t.notifications)}))})));case 12:return e=k(e),t=e.length||Object.keys(e).length||0,r.abrupt("return",{results:e,total:t});case 15:case"end":return r.stop()}}))}var O=function(e){var t=Math.abs(e.count)+1;return window.localStorage&&window.localStorage.setItem("googlesitekit::total-notifications",t),{count:t}},w=function(e){var t=Math.max(0,Math.abs(e.count)-1);return window.localStorage&&window.localStorage.setItem("googlesitekit::total-notifications",t),{count:t}}},60:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),f=n.n(p),h=n(14),b=n(0),v=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.name,n=e.href,a=e.className,i=e.external;return React.createElement("div",{className:"googlesitekit-source-link ".concat(a)},[Object(b.__)("Source:","google-site-kit")," ",React.createElement(h.a,{key:"link",href:n,external:i,inherit:!0},t)])}}]),t}(m.Component);v.propTypes={name:f.a.string,href:f.a.string,className:f.a.string,external:f.a.bool},v.defaultProps={name:"",href:"",className:"",external:!1},t.a=v},62:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.isSaving;return React.createElement("span",{className:"spinner",style:{display:e?"inline-block":"none",float:"none",marginTop:"0",visibility:"visible"}})}}]),t}(m.Component);t.a=p},63:function(e,t,n){"use strict";var a=n(12),i=n.n(a),o=n(3),r=n.n(o),s=n(4),c=n.n(s),l=n(5),u=n.n(l),d=n(6),g=n.n(d),m=n(7),p=n.n(m),f=n(1),h=n(2),b=n(9),v=n(32),k=n(8),_=n.n(k),y=n(54),O=n(0),w=function(e){function t(){return r()(this,t),u()(this,g()(t).apply(this,arguments))}return p()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,n=e.title,a=e.description,i=e.ctaLabel;return googlesitekit.permissions.canManageOptions?React.createElement(v.a,{title:n,description:a,onClick:t.setupAnalyticsClick,ctaLabel:i}):null}}],[{key:"setupAnalyticsClick",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.a.awrap(Object(h.a)(b.c,"analytics",!0));case 3:return e.next=5,i.a.awrap(Object(h.u)());case 5:window.location=Object(h.m)("analytics",!0),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),Object(h.w)(y.a,{id:"analytics-setup-error",title:Object(O.__)("Internal Server Error","google-site-kit"),description:e.t0.message,format:"small",type:"win-error"});case 11:case"end":return e.stop()}}),null,null,[[0,8]])}}]),t}(f.Component);w.propTypes={title:_.a.string,description:_.a.string,ctaLabel:_.a.string},w.defaultProps={title:Object(O.__)("Learn more about what visitors do on your site.","google-site-kit"),description:Object(O.__)("Connecting with Google Analytics to see unique vistors, goal completions, top pages and more.","google-site-kit"),ctaLabel:Object(O.__)("Set up Analytics","google-site-kit")},t.a=w},65:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}));var a=n(18),i=n(1),o=i.Suspense?i.Suspense:a.Suspense,r=i.lazy?i.lazy:a.lazy},67:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),f=n.n(p),h=n(29),b=n(14),v=n(22),k=n(144),_=n.n(k),y=n(0),O=function(e){function t(){var e;return i()(this,t),(e=c()(this,u()(t).call(this))).state={attributes:[Object(y.__)("Audience overview","google-site-kit"),Object(y.__)("Top pages","google-site-kit"),Object(y.__)("Top acquisition sources","google-site-kit"),Object(y.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(m.createRef)(),e}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){new v.d(this.dialogRef.current)}},{key:"render",value:function(){var e=this.props,t=e.dialogActive,n=e.handleDialog,a=e.title,i=e.provides,o=e.handleConfirm,r=e.subtitle,s=e.confirmButton,c=e.dependentModules;return React.createElement("div",{ref:this.dialogRef,className:"mdc-dialog ".concat(t?"mdc-dialog--open":""),role:"alertdialog","aria-modal":"true","aria-labelledby":"remove-module-dialog","aria-describedby":"remove-module-dialog-description","aria-hidden":t?"false":"true",tabIndex:"-1"},React.createElement("div",{className:"mdc-dialog__scrim"}," "),React.createElement(_.a,{active:t},React.createElement("div",null,React.createElement("div",{className:"mdc-dialog__container"},React.createElement("div",{className:"mdc-dialog__surface"},a&&React.createElement("h2",{id:"remove-module-dialog",className:"mdc-dialog__title"},a),r&&React.createElement("p",{className:"mdc-dialog__lead"},r),React.createElement("section",{id:"remove-module-dialog-description",className:"mdc-dialog__content"},React.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},i&&i.map((function(e){return React.createElement("li",{className:"mdc-list-item",key:e},React.createElement("span",{className:"mdc-list-item__text"},e))})))),c&&React.createElement("p",{className:"mdc-dialog__dependecies"},React.createElement("strong",null,Object(y.__)("Note: ","google-site-kit")),c),React.createElement("footer",{className:"mdc-dialog__actions"},React.createElement(h.a,{onClick:o,danger:!0},s||Object(y.__)("Disconnect","google-site-kit")),React.createElement(b.a,{className:"mdc-dialog__cancel-button",onClick:function(){return n()},inherit:!0},Object(y.__)("Cancel","google-site-kit"))))))))}}]),t}(m.Component);O.propTypes={dialogActive:f.a.bool,handleDialog:f.a.func,handleConfirm:f.a.func.isRequired,title:f.a.string,description:f.a.string,confirmButton:f.a.string},O.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null},t.a=O},69:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(13),g=n.n(d),m=n(7),p=n.n(m),f=n(1),h=n(22),b=n(0),v=n(10),k=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).state={context:"Dashboard"},n.dateRangeHook="googlesitekit.dateRange",n.dateRangeHandlerHook="googlesitekit.dateRageHandler",n.dateRangeHookAddedHook="googlesitekit.dateRageHookAddedHandler",Object(v.addAction)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingDataForDateRangeSelector",(function(e){n.setState({context:e}),Object(v.removeAction)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingDataForDateRangeSelector")})),n.handleSelection=n.handleSelection.bind(g()(n)),n}return p()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.addAction)("hookAdded",this.dateRangeHookAddedHook,(function(t){e.dateRangeHook===t&&e.forceUpdate()}))}},{key:"componentWillUnmount",value:function(){Object(v.removeAction)("hookAdded",this.dateRangeHookAddedHook)}},{key:"handleSelection",value:function(e,t){var n=this.state.context,a=t.getAttribute("data-value");return Object(v.removeFilter)(this.dateRangeHook,this.dateRangeHandlerHook),Object(v.addFilter)(this.dateRangeHook,this.dateRangeHandlerHook,(function(){return a})),Object(v.doAction)("googlesitekit.moduleDataReset"),Object(v.doAction)("googlesitekit.moduleLoaded",n),!1}},{key:"render",value:function(){var e=[Object(b.__)("Last 7 days","google-site-kit"),Object(b.__)("Last 14 days","google-site-kit"),Object(b.__)("Last 28 days","google-site-kit"),Object(b.__)("Last 90 days","google-site-kit")];return React.createElement(h.k,{enhanced:!0,className:"mdc-select--minimal",name:"time_period",label:"",onEnhancedChange:this.handleSelection,options:e,value:Object(v.applyFilters)(this.dateRangeHook,Object(b.__)("Last 28 days","google-site-kit"))})}}]),t}(f.Component);t.a=k},80:function(e,t,n){"use strict";n(1);var a=n(20),i=n(0);t.a=function(){return React.createElement("div",{className:"googlesitekit-logo","aria-hidden":"true"},React.createElement(a.a,{id:"logo-g",className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),React.createElement(a.a,{id:"logo-sitekit",className:"\n\t\t\t\t googlesitekit-logo__logo-sitekit\n\t\t\t\t",height:"26",width:"99"}),React.createElement("span",{className:"screen-reader-text"},Object(i.__)("Site Kit by Google Logo","google-site-kit")))}},86:function(e,t,n){"use strict";n(1);var a=n(26),i=n(0);t.a=function(){var e=googlesitekit.admin.connectURL;return React.createElement(a.a,{id:"authentication error",title:Object(i.__)("Issue accessing data","google-site-kit"),description:Object(i.__)("You need to reauthenticate your Google account.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0,ctaLink:e,ctaLabel:Object(i.__)("Click here","google-site-kit")})}},87:function(e,t,n){"use strict";n(1);t.a=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#EA4336",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"error-title error-desc"},React.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}))}},88:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(13),g=n.n(d),m=n(7),p=n.n(m),f=n(1),h=n(58),b=n(0),v=n(10),k=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).state={count:0},n.handleIncrement=n.handleIncrement.bind(g()(n)),n.handleDecrement=n.handleDecrement.bind(g()(n)),n}return p()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.addAction)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications",(function(){Object(v.removeAction)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications"),Object(h.c)().then((function(t){e.setState({count:t})}))})),document.addEventListener("notificationDismissed",this.handleDecrement,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("notificationDismissed",this.handleDecrement)}},{key:"handleIncrement",value:function(){this.setState(h.e)}},{key:"handleDecrement",value:function(){this.setState(h.a)}},{key:"render",value:function(){var e=Object(b.sprintf)(Object(b._n)("%d notification","%d notifications",this.state.count,"google-site-kit"),this.state.count),t=React.createElement("span",{id:"googlesitekit-notifications-counter",className:"googlesitekit-notifications-counter update-plugins count-".concat(this.state.count)},React.createElement("span",{className:"plugin-count","aria-hidden":"true"},this.state.count),React.createElement("span",{className:"screen-reader-text"},e));return Object(f.createPortal)(t,document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"))}}]),t}(f.Component);t.a=k},9:function(e,t,n){"use strict";var a=n(12),i=n.n(a),o=n(27),r=n.n(o),s=n(49),c=n.n(s),l=n(86),u=(n(1),n(26)),d=n(0),g=function(){return React.createElement(u.a,{id:"permission error",title:Object(d.__)("Permissions issue accessing data","google-site-kit"),description:Object(d.__)("This account does not have access to the requested data.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0})},m=n(164),p=n.n(m),f=n(2),h=n(11),b=n(35),v=n.n(b),k=n(36),_=n(10);function y(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(n,!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return R}));var w="core",R="modules",j=function(){googlesitekit.admin=googlesitekit.admin||{},"string"==typeof googlesitekit.admin.datacache&&(googlesitekit.admin.datacache=JSON.parse(googlesitekit.admin.datacache)),"object"!==c()(googlesitekit.admin.datacache)&&(googlesitekit.admin.datacache={})},E=function(e,t){var n=O({data:{}},e);return n.data=O({dateRange:t},n.data),n},C={maxRequests:10,init:function(){googlesitekit.initialized||(googlesitekit.initialized=!0,this.collectModuleData=this.collectModuleData.bind(this),googlesitekit.cache=[],Object(_.addAction)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingData",this.collectModuleData))},combinedGetFromCache:function(e){var t=this;return new Promise((function(n,a){try{var i=[],o=Object(f.h)();Object(h.each)(e,(function(e){var n=E(e,o);n.key=t.getCacheKey(n.type,n.identifier,n.datapoint,n.data);var a=t.getCache(n.key,n.maxAge);void 0!==a&&(i[n.key]=a,t.resolve(n,a))})),n(i)}catch(e){a()}}))},combinedGet:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=[],i=25,o=Object(f.h)();Object(h.each)(e,(function(e){var n=E(e,o);n.key=t.getCacheKey(n.type,n.identifier,n.datapoint,n.data);var r=t.getCache(n.key,n.maxAge);void 0!==r?(setTimeout((function(){t.resolve(n,r)}),i),i+=25):a.push(n)})),a=Object(h.sortBy)(a,"priority");var r=[],s=[],c={},u=!!a.find((function(e){return e.priority<10}));Object(h.each)(a,(function(e,t){!n&&10<=e.priority&&u?s.push(e):c[e.key]?c[e.key].push(t):(c[e.key]=[t],r.push(e))}));var d=10,m=r.slice(0,d),p=r.slice(d);if(p=p.concat(s),0!==m.length||0!==p.length){0<p.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(p,!0)}),50):this.maxRequests=10;var b=null!==Object(f.l)("datacache");return v()({path:Object(k.addQueryArgs)("/google-site-kit/v1/data/".concat(b?"?datacache":""),{request:JSON.stringify(m)}),method:"GET"}).then((function(e){Object(h.each)(e,(function(e,n){if(e.xdebug_message)console.log("data_error",e.xdebug_message);else{if(!c[n])return void console.log("data_error","unknown response key "+n);e.error_data&&e.error_data[403]&&e.error_data[403].reason&&("insufficientPermissions"===e.error_data[403].reason?Object(_.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",Object(f.g)(l.a),1):"forbidden"===e.error_data[403].reason&&Object(_.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",Object(f.g)(g),1),Object(_.addFilter)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return Object(_.removeFilter)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+1}))),Object(h.each)(c[n],(function(n){var i=a[n];t.setCache(i.key,e),t.resolve(i,e)}))}0===p.length&&Object(_.doAction)("googlesitekit.dataLoaded","api")}))})).catch((function(e){console.log("error",e)}))}Object(_.doAction)("googlesitekit.dataLoaded","cache")},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},setCache:function(e,t){if(void 0!==t&&(!t||"object"!==c()(t)||!t.error&&!t.errors)){j(),googlesitekit.admin.datacache[e]=Object(h.cloneDeep)(t);var n={value:t,date:Date.now()/1e3};Object(f.o)().setItem("googlesitekit_"+e,JSON.stringify(n))}},getCache:function(e,t){if(!googlesitekit.admin.nojscache){if(j(),void 0!==googlesitekit.admin.datacache[e])return googlesitekit.admin.datacache[e];var n=JSON.parse(Object(f.o)().getItem("googlesitekit_"+e));return n&&"object"===c()(n)&&n.date&&(!t||Date.now()/1e3-n.date<t)?(googlesitekit.admin.datacache[e]=Object(h.cloneDeep)(n.value),Object(h.cloneDeep)(googlesitekit.admin.datacache[e])):void 0}},deleteCache:function(e){j(),delete googlesitekit.admin.datacache[e],Object(f.o)().removeItem("googlesitekit_"+e)},invalidateCacheGroup:function(e,t,n){var a=this.getCacheKey(e,t,n);j(),Object.keys(googlesitekit.admin.datacache).forEach((function(e){0!==e.indexOf(a+"::")&&e!==a||delete googlesitekit.admin.datacache[e]})),Object.keys(Object(f.o)()).forEach((function(e){0!==e.indexOf("googlesitekit_"+a+"::")&&e!=="googlesitekit_"+a||Object(f.o)().removeItem(e)}))},collectModuleData:function(e,t){var n=Object(_.applyFilters)("googlesitekit.module"+e+"DataRequest",[],t);0!==n.length&&this.combinedGet(n)},get:function(e,t,n){var a=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.getCacheKey(e,t,n,i);if(!o){var s=this.getCache(r,3600);if(void 0!==s)return new Promise((function(e){e(s)}))}return v()({path:Object(k.addQueryArgs)("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),i)}).then((function(e){return o||a.setCache(r,e),new Promise((function(t){t(e)}))})).catch((function(e){return Promise.reject(e)}))},getNotifications:function(e){var t,n,a,o=arguments;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=o.length>1&&void 0!==o[1]?o[1]:0,n=[],e){r.next=4;break}return r.abrupt("return",n);case 4:if(a=this.getCacheKey("modules",e,"notifications"),(n=C.getCache(a,t))&&0!==n.length){r.next=11;break}return r.next=9,i.a.awrap(v()({path:"/google-site-kit/v1/modules/".concat(e,"/notifications/")}));case 9:n=r.sent,C.setCache(a,n);case 11:return r.abrupt("return",n);case 12:case"end":return r.stop()}}),null,this)},set:function(e,t,n,a){var i={};return i.data=a,v()({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),data:i,method:"POST"}).then((function(a){return C.invalidateCacheGroup(e,t,n),new Promise((function(e){e(a)}))}))},getCacheKey:function(e,t,n){for(var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=[],o=[e,t,n],r=0,s=o;r<s.length;r++){var l=s[r];if(!l||!l.length)break;i.push(l)}return 3===i.length&&a&&"object"===c()(a)&&Object.keys(a).length&&i.push(p()(JSON.stringify(Object(f.x)(a)))),i.join("::")},setModuleActive:function(e,t){return v()({path:"/google-site-kit/v1/modules/".concat(e),data:{active:t},method:"POST"}).then((function(e){return new Promise((function(t){t(e)}))})).catch((function(e){return Promise.reject(e)}))}};C.init();t.c=C}}]);
|
1 |
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{14:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),h=n.n(p),f=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.onClick,n=e.href,a=e.children,i=e.className,o=e.arrow,r=e.external,s=e.inverse,c=e.back,l=e.small,u=e.inherit,d=e.caps,g=e.danger,m=e.disabled,p=e.id,h=n&&!m,f=h?"a":"button";return React.createElement(f,{className:"\n\t\t\t\t\tgooglesitekit-cta-link\n\t\t\t\t\t".concat(i||"","\n\t\t\t\t\t").concat(o?"googlesitekit-cta-link--arrow":"","\n\t\t\t\t\t").concat(r?"googlesitekit-cta-link--external":"","\n\t\t\t\t\t").concat(s?"googlesitekit-cta-link--inverse":"","\n\t\t\t\t\t").concat(c?"googlesitekit-cta-link--back":"","\n\t\t\t\t\t").concat(l?"googlesitekit-cta-link--small":"","\n\t\t\t\t\t").concat(u?"googlesitekit-cta-link--inherit":"","\n\t\t\t\t\t").concat(d?"googlesitekit-cta-link--caps":"","\n\t\t\t\t\t").concat(g?"googlesitekit-cta-link--danger":"","\n\t\t\t\t\t").concat(m?"googlesitekit-cta-link--disabled":"","\n\t\t\t\t"),onClick:t,id:p,href:h?n:void 0,target:h&&r?"_blank":void 0,rel:r?"noopener noreferrer":void 0,disabled:m},a)}}]),t}(m.Component);f.propTypes={onClick:h.a.func,href:h.a.string,children:h.a.oneOfType([h.a.string.isRequired,h.a.array.isRequired]),className:h.a.string,arrow:h.a.bool,external:h.a.bool,inverse:h.a.bool,back:h.a.bool,small:h.a.bool,inherit:h.a.bool,caps:h.a.bool,danger:h.a.bool,disabled:h.a.bool},f.defaultProps={onClick:null,href:"",className:"",arrow:!1,external:!1,inverse:!1,back:!1,small:!1,inherit:!1,caps:!1,danger:!1,disabled:!1},t.a=f},15:function(e,t,n){"use strict";n.r(t),n.d(t,"extractAnalyticsDataForTrafficChart",(function(){return r})),n.d(t,"extractAnalyticsDashboardData",(function(){return c})),n.d(t,"extractAnalyticsDashboardSparklineData",(function(){return l})),n.d(t,"calculateOverviewData",(function(){return u})),n.d(t,"translateAnalyticsError",(function(){return d})),n.d(t,"getAnalyticsErrorMessageFromData",(function(){return g})),n.d(t,"isDataZeroForReporting",(function(){return m})),n.d(t,"analyticsAdsenseReportDataDefaults",(function(){return p})),n.d(t,"siteAnalyticsReportDataDefaults",(function(){return h})),n.d(t,"overviewReportDataDefaults",(function(){return f})),n.d(t,"trafficSourcesReportDataDefaults",(function(){return b})),n.d(t,"getTopPagesReportDataDefaults",(function(){return v}));var a=n(2),i=n(11),o=n(0),r=function(e){if(!e||!e.length)return null;var t=e[0].data,n=t.rows,a=t.totals[0].values[0],o=[["Source","Percent"]];return Object(i.each)(n,(function(e){var t=e.metrics[0].values[0]/a;if(1>100*t)return!1;var n=e.dimensions[0].replace(/\(none\)/gi,"direct");o.push([n,t])})),o};function s(e,t){var n=[];return Object(i.each)(e,(function(e){if(e.metrics){var a=e.metrics[0].values,i=e.dimensions[0],o=i.slice(0,4)+"-"+i.slice(4,6)+"-"+i.slice(6,8),r=new Date(o);n.push([r,a[t]])}})),n}var c=function(e,t,n){if(!e||!e.length)return null;var a=e[0].data.rows;if(!a)return!1;var r=a.length;if(2*n>r){for(var c=new Date,l=0;n>l;l++){var u=(c.getMonth()+1).toString(),d=c.getDate().toString(),g=c.getFullYear().toString()+(2>u.length?"0":"")+u+(2>d.length?"0":"")+d;if(l>r){var m={dimensions:[g],metrics:[{values:[0,0,0,0,0]}]};a.unshift(m)}c.setDate(c.getDate()-1)}a.push([0,0])}var p=[Object(o.__)("Users","google-site-kit"),Object(o.__)("Sessions","google-site-kit"),Object(o.__)("Bounce Rate","google-site-kit"),Object(o.__)("Session Duration","google-site-kit")],h=[[{type:"date",label:Object(o.__)("Day","google-site-kit")},{type:"number",label:p[t]},{type:"number",label:Object(o.__)("Previous month","google-site-kit")}]],f=a.slice(a.length-n,a.length),b=a.slice(0,a.length-n),v=s(f,t),k=s(b,t);return Object(i.each)(v,(function(e,t){e[0]&&e[1]&&k[t]&&h.push([e[0],e[1],k[t][1]])})),h},l=function(e){if(!e||!e.length)return null;var t=e[0].data.rows,n=[[{type:"date",label:"Day"},{type:"number",label:"Users"},{type:"number",label:"Sessions"},{type:"number",label:"Goals Completed"}]];return Object(i.each)(t,(function(e){var t=e.metrics[0].values,a=e.dimensions[0],i=a.slice(0,4)+"-"+a.slice(4,6)+"-"+a.slice(6,8),o=new Date(i);n.push([o,t[0],t[1],t[4]])})),n},u=function(e){if(!e||!e.length)return!1;var t=e[0].data.totals,n=t[0].values,i=t[1].values,o=n[0],r=n[1],s=n[2],c=n[3],l=n[4],u=n[5];return{totalUsers:o,totalSessions:r,averageBounceRate:s,averageSessionDuration:c,totalUsersChange:Object(a.c)(i[0],n[0]),totalSessionsChange:Object(a.c)(i[1],n[1]),averageBounceRateChange:Object(a.c)(i[2],n[2]),averageSessionDurationChange:Object(a.c)(i[3],n[3]),goalCompletions:l,goalCompletionsChange:Object(a.c)(i[4],n[4]),totalPageViews:u,totalPageViewsChange:Object(a.c)(i[5],n[5])}},d=function(e,t){var n="";switch(e){case"INVALID_ARGUMENT":n=Object(o.__)("Analytics module needs to be configured.","google-site-kit");break;case"UNAUTHENTICATED":n=Object(o.__)("You need to be authenticated to get this data.","google-site-kit");break;case"PERMISSION_DENIED":n=Object(o.__)("Your account does not have sufficient permission to access this data, please consult to your web administrator.","google-site-kit");break;case"RESOURCE_EXHAUSTED":n=Object(o.__)("Your account exceeded the maximum quota. Please try again later.","google-site-kit");break;case"INTERNAL":n=Object(o.__)("Unexpected internal server error occurred.","google-site-kit");break;case"BACKEND_ERROR":n=Object(o.__)("Analytics server returned unknown error. Please try again later.","google-site-kit");break;case"UNAVAILABLE":n=Object(o.__)("The service was unable to process the request. Please try again later.","google-site-kit");break;default:n=t}return n},g=function(e){return!(!e.error||!e.error.status)&&d(e.error.status,e.error.message)},m=function(e){if(!e||!e.length)return!0;if(e&&e[0]&&e[0].data&&e[0].data.totals&&e[0].data.totals[0]){var t=e[0].data.totals[0].values,n=!0;return Object(i.each)(t,(function(e){0!==parseInt(e)&&(n=!1)})),n}return!1},p={dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:adsenseRevenue",alias:"Earnings"},{expression:"ga:adsenseECPM",alias:"Page RPM"},{expression:"ga:adsensePageImpressions",alias:"Impressions"}],orderby:[{fieldName:"ga:adsenseRevenue",sortOrder:"DESCENDING"}],limit:10},h={compareDateRanges:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"}],limit:180},f={multiDateRange:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"},{expression:"ga:pageviews",alias:"Pageviews"}],limit:10},b={dimensions:"ga:medium",metrics:[{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:users",alias:"Users"},{expression:"ga:newUsers",alias:"New Users"}],orderby:[{fieldName:"ga:sessions",sortOrder:"DESCENDING"}],limit:10},v=function(){var e=[{expression:"ga:pageviews",alias:"Pageviews"},{expression:"ga:uniquePageviews",alias:"Unique Pageviews"},{expression:"ga:bounceRate",alias:"Bounce rate"}];return window.googlesitekit.modules.analytics.adsenseLinked&&e.push({expression:"ga:adsenseRevenue",alias:"AdSense Revenue"},{expression:"ga:adsenseECPM",alias:"AdSense ECPM"}),{dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:e,orderby:[{fieldName:"ga:pageviews",sortOrder:"DESCENDING"}],limit:10}}},158:function(e,t,n){"use strict";var a={};n.r(a),n.d(a,"totalStats",(function(){return u})),n.d(a,"firstPostWin",(function(){return d})),n.d(a,"pageviewIncrease",(function(){return m})),n.d(a,"publishingWin",(function(){return p})),n.d(a,"trafficIncrease",(function(){return h}));var i=n(27),o=n.n(i),r=n(2),s=n(9),c=n(33),l=n(0),u=function(e,t){if(5>=parseInt(googlesitekit.admin.newSitePosts,10))return!1;if(!e||!e.rows)return!1;var n=[],a=Object(l.__)("Here are some high level stats","google-site-kit");if(e&&e.rows){var i=Object(c.extractSearchConsoleDashboardData)(e),o=i.totalClicks,s=i.totalClicksChange,u=i.totalImpressions,d=i.totalImpressionsChange,g=i.averageCTR,m=i.averageCTRChange;0<s&&0<d&&0<m&&(a="".concat(Object(l.__)("Last month was great!","google-site-kit"),". ").concat(a)),n=[{title:Object(l.__)("Total Clicks","google-site-kit"),datapoint:o,datapointUnit:"",change:s,changeDataUnit:"%",period:Object(l.__)("for month","google-site-kit")},{title:Object(l.__)("Total Impressions","google-site-kit"),datapoint:u,datapointUnit:"",change:d,changeDataUnit:"%",period:Object(l.__)("for month","google-site-kit")},{title:Object(l.__)("Average CTR","google-site-kit"),datapoint:g,datapointUnit:"%",change:m,changeDataUnit:"%",period:Object(l.__)("for month","google-site-kit")}]}var p=new Date,h=new Date(p.getFullYear(),p.getMonth()+1,0),f=Object(r.j)(p,h)+1;return{id:t,title:Object(l.__)("Welcome Back!","google-site-kit"),description:a,format:"large",winImage:"".concat(googlesitekit.admin.assetsRoot,"images/g-win.png"),blockData:n,type:"win-stats",dismissExpires:Object(r.p)("day")*f,showOnce:!0}},d=function(e){return!(1!==parseInt(googlesitekit.admin.newSitePosts,10))&&{id:e,title:Object(l.__)("Congrats on your first post!","google-site-kit"),format:"small",smallImage:"".concat(googlesitekit.admin.assetsRoot,"images/thumbs-up.png"),type:"win-success",showOnce:!0}},g=n(15),m=function(e,t){if(!googlesitekit.modules.analytics||!googlesitekit.modules.analytics.active)return!1;if(!e||!e.reports)return!1;var n=Object(g.calculateOverviewData)(e);if(!n)return!1;var a=n.totalPageViewsChange,i=n.totalPageViews;return!(10>a)&&{id:t,title:Object(l.__)("Increased page views!","google-site-kit"),description:Object(l.__)("Over the past 4 weeks","google-site-kit"),format:"large",logo:!1,winImage:"".concat(googlesitekit.admin.assetsRoot,"images/sun-small.png"),blockData:[{title:Object(l.__)("Total Page Views","google-site-kit"),datapoint:Object(r.r)(i),datapointUnit:""},{title:Object(l.__)("Increase","google-site-kit"),datapoint:a,datapointUnit:"%"}],type:"win-stats-increase",dismissExpires:Object(r.p)("month"),showOnce:!0}},p=function(e,t){if(!(5===parseInt(googlesitekit.admin.newSitePosts,10)))return!1;var n=Object(l.__)("That’s out of this world.","google-site-kit"),a=[];if(googlesitekit.modules["search-console"]&&googlesitekit.modules["search-console"].active&&e){var i=Object(c.extractSearchConsoleDashboardData)(e),o=i.totalClicks,s=i.totalImpressions,u=i.averageCTR;a=[{title:Object(l.__)("Total Impressions","google-site-kit"),datapoint:Object(r.t)(s),datapointUnit:""},{title:Object(l.__)("Total Clicks","google-site-kit"),datapoint:Object(r.t)(o),datapointUnit:""},{title:Object(l.__)("Average CTR","google-site-kit"),datapoint:u,datapointUnit:"%"}],n=Object(l.__)("That’s out of this world. Here are the combined stats for your posts","google-site-kit")}return{id:t,title:Object(l.__)("Congrats on five published posts","google-site-kit"),description:n,format:"large",winImage:"".concat(googlesitekit.admin.assetsRoot,"images/rocket.png"),blockData:a,type:"win-stats",showOnce:!0}},h=function(e,t){if(!googlesitekit.modules.analytics||!googlesitekit.modules.analytics.active)return!1;if(!e||!e[0])return!1;var n=Object(g.calculateOverviewData)(e);if(!n)return!1;var a=n.totalUsersChange,i=n.totalUsers;return!(10>a||100<a)&&{id:t,title:Object(l.__)("Congrats on more website visitors!","google-site-kit"),description:Object(l.__)("You had a record-high amount of visitors to your website yesterday.","google-site-kit"),dismiss:Object(l.__)("OK, Got it!","google-site-kit"),format:"large",winImage:"".concat(googlesitekit.admin.assetsRoot,"images/sun.png"),blockData:[{title:Object(l.__)("Site Visitors","google-site-kit"),datapoint:Object(r.t)(i),datapointUnit:""},{title:Object(l.__)("Increase","google-site-kit"),datapoint:a,datapointUnit:"%"}],type:"win-stats",dismissExpires:Object(r.p)("week"),showOnce:!0}},f=n(10);function b(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var v=Object(r.l)("notification");"authentication_success"!==v&&"authentication_failure"!==v&&(Object(f.addFilter)("googlesitekit.winCallbacks","googlesitekit.publisherwinCallbacks",(function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{},a)})),Object(f.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){return e.push({identifier:"first-post-win"}),e}),1),Object(f.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){var t={identifier:"publishing-win",withData:{type:s.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(r.p)("day"),context:"Dashboard"}};return e.push(t),e}),1),Object(f.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){var t={identifier:"total-stats",withData:{type:s.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(r.p)("day"),context:"Dashboard"}};return e.push(t),e}),2),googlesitekit.modules.analytics.active&&(Object(f.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){var t={identifier:"pageview-increase",withData:{type:s.b,identifier:"analytics",datapoint:"reports",data:g.overviewReportDataDefaults,priority:1,maxAge:Object(r.p)("day"),context:"Dashboard"}};return e.push(t),e}),2),Object(f.addFilter)("googlesitekit.WinsNotificationsRequest","googlesitekit.PublisherWinsNotification",(function(e){var t={identifier:"traffic-increase",withData:{type:s.b,identifier:"analytics",datapoint:"report",data:g.overviewReportDataDefaults,priority:1,maxAge:Object(r.p)("day"),context:"Dashboard"}};return e.push(t),e}),2)))},161:function(e,t,n){"use strict";var a=n(1),i=n(3),o=n.n(i),r=n(4),s=n.n(r),c=n(5),l=n.n(c),u=n(6),d=n.n(u),g=n(7),m=n.n(g),p=n(2),h=n(26),f=n(12),b=n.n(f),v=n(13),k=n.n(v),_=n(11),y=n(9),O=n(54),w=n(53),R=n(0),j=n(14),E=function(e){function t(e){var n;return o()(this,t),(n=l()(this,d()(t).call(this,e))).setupModuleClick=n.setupModuleClick.bind(k()(n)),n}return m()(t,e),s()(t,[{key:"setupModuleClick",value:function(e){return b.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.setState({isSaving:!0}),t.next=4,b.a.awrap(Object(p.a)(y.c,e,!0));case 4:return t.next=6,b.a.awrap(Object(p.u)());case 6:window.location=Object(p.m)(e,!0),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),Object(p.w)(O.a,{id:"setup-module-error",title:Object(R.__)("Internal Server Error","google-site-kit"),description:t.t0.message,format:"small",type:"win-error"}),this.setState({isSaving:!1});case 13:case"end":return t.stop()}}),null,this,[[0,9]])}},{key:"render",value:function(){var e=this,t=Object.values(window.googlesitekit.modules||{}).filter((function(e){return!e.internal})),n=t.filter((function(e){return e.active&&e.setupComplete})).reduce((function(e,t){return e[t.slug]=t.name,e}),{}),a=t.filter((function(e){return 0===e.required.length})).sort((function(e,t){return e.sort-t.sort}));return React.createElement("div",{className:"googlesitekit-modules-list"},Object(_.map)(a,(function(t){var a=!1,i="",o=t.slug,r=t.name,s=t.setupComplete,c=t.required;return 0<c.length&&c.forEach((function(e){n[e]&&(a=!0,i=n[e])})),React.createElement("div",{key:o,className:"\n\t\t\t\t\t\t\tgooglesitekit-modules-list__module\n\t\t\t\t\t\t\tgooglesitekit-modules-list__module--".concat(o,"\n\t\t\t\t\t\t\t").concat(a?"googlesitekit-modules-list__module--disabled":"","\n\t\t\t\t\t\t")},React.createElement("div",{className:"googlesitekit-settings-connect-module__wrapper"},React.createElement("div",{className:"googlesitekit-settings-connect-module__logo"},Object(p.q)(o,a)),React.createElement("h3",{className:"googlesitekit-settings-connect-module__title"},r)),React.createElement(w.a,{slug:o,context:"modules-list"}),s&&React.createElement("span",{className:"googlesitekit-settings-module__status"},React.createElement("span",{className:"googlesitekit-settings-module__status-icon googlesitekit-settings-module__status-icon--connected"},React.createElement("span",{className:"screen-reader-text"},Object(R.__)("Connected","google-site-kit"))),Object(R.__)("Connected","google-site-kit")),!s&&!a&&React.createElement(j.a,{arrow:!0,small:!0,inherit:!0,onClick:function(){e.setupModuleClick(o)}}," ",Object(R.__)("Connect Service","google-site-kit")),!s&&a&&React.createElement(j.a,{disabled:!0,small:!0,inherit:!0},Object(R.sprintf)(Object(R.__)("Enable %s to start setup","google-site-kit"),i)))})))}}]),t}(a.Component),C=n(10),D=function(e){function t(){return o()(this,t),l()(this,d()(t).apply(this,arguments))}return m()(t,e),s()(t,[{key:"render",value:function(){var e=Object(p.l)("notification");if(!e||""===e)return null;var t={id:"connected-successfully",setupTitle:Object(R.__)("Site Kit","google-site-kit"),description:Object(R.__)("Now you’ll be able to see how your site is doing in search. To get even more detailed stats, activate more modules. Here are our recommendations for what to include in your Site Kit:","google-site-kit"),learnMore:{label:"",url:"",description:""}},n=googlesitekit.permissions.canManageOptions;switch(e){case"authentication_success":if(!n)return null;var i=Object(p.l)("slug");return i&&googlesitekit.modules[i]&&!googlesitekit.modules[i].active?null:(i&&googlesitekit.modules[i]&&(t.id="".concat(t.id,"-").concat(i),t.setupTitle=googlesitekit.modules[i].name,t.description=Object(R.__)("Here are some other services you can connect to see even more stats:","google-site-kit"),t=Object(C.applyFilters)("googlesitekit.SetupWinNotification-".concat(i),t)),React.createElement(a.Fragment,null,React.createElement(h.a,{id:t.id,title:Object(R.sprintf)(Object(R.__)("Congrats on completing the setup for %s!","google-site-kit"),t.setupTitle),description:t.description,handleDismiss:function(){},winImage:googlesitekit.admin.assetsRoot+"images/rocket.png",dismiss:Object(R.__)("OK, Got it!","google-site-kit"),format:"large",type:"win-success",learnMoreLabel:t.learnMore.label,learnMoreDescription:t.learnMore.description,learnMoreURL:t.learnMore.url},React.createElement(E,null))));case"authentication_failure":return React.createElement(a.Fragment,null,React.createElement(h.a,{id:"connection error",title:Object(R.__)("There was a problem connecting to Google!","google-site-kit"),description:"",handleDismiss:function(){},format:"small",type:"win-error"}))}}}]),t}(a.Component),N=n(58),x=function(e){function t(e){var n;return o()(this,t),(n=l()(this,d()(t).call(this,e))).state={data:!1},n}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this,t=Object(N.f)();t&&Object(N.b)(t).then((function(t){e.setState({data:t.results})}))}},{key:"render",value:function(){var e=this.state.data;if(0===Object.keys(e).length)return null;var t=[];return Object.keys(e).forEach((function(n){Object(_.each)(e[n],(function(e){t.push(React.createElement(h.a,{key:e.id,id:e.id,title:e.title||"",description:e.description||"",blockData:e.blockData||[],winImage:e.winImage?"".concat(googlesitekit.admin.assetsRoot,"images/").concat(e.winImage):"",format:e.format||"small",learnMoreURL:e.learnMoreURL||"",learnMoreDescription:e.learnMoreDescription||"",learnMoreLabel:e.learnMoreLabel||"",ctaLink:e.ctaURL||"",ctaLabel:e.ctaLabel||"",ctaTarget:e.ctaTarget||"",type:e.severity||"",dismiss:e.dismiss||Object(R.__)("OK, Got it!","google-site-kit"),isDismissable:e.isDismissable||!0,logo:e.logo||!0,module:n,moduleName:googlesitekit.modules[n].name,pageIndex:e.pageIndex||"",dismissExpires:e.dismissExpires||0,showOnce:e.showOnce||!1}))}))})),React.createElement(a.Fragment,null,t)}}]),t}(a.Component),S=function(e){function t(e){var n;return o()(this,t),(n=l()(this,d()(t).call(this,e))).state={data:!1},n}return m()(t,e),s()(t,[{key:"componentWillMount",value:function(){var e=this;Object(C.addAction)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications",(function(){Object(C.removeAction)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications");var t=Object(N.g)();t&&Object(N.d)(t).then((function(t){e.setState({data:t.results})}))}))}},{key:"render",value:function(){var e=this.state.data;if(0===Object.keys(e).length)return null;var t=[];return Object.keys(e).forEach((function(n){Object(_.each)(e[n],(function(e){t.push(React.createElement(h.a,{key:e.id,id:e.id,title:e.title||"",description:e.description||"",blockData:e.blockData||[],winImage:e.winImage||"",format:e.format||"small",learnMoreURL:e.learnMoreURL||"",learnMoreDescription:e.learnMoreDescription||"",learnMoreLabel:e.learnMoreLabel||"",ctaLink:e.ctaLink||"",ctaLabel:e.ctaLabel||"",type:e.severity||"",dismiss:e.dismiss||Object(R.__)("OK, Got it!","google-site-kit"),isDismissable:e.isDismissable||!0,logo:e.logo||!1,pageIndex:e.pageIndex||"",dismissExpires:e.dismissExpires||0,showOnce:e.showOnce||!1}))}))})),React.createElement(a.Fragment,null,t)}}]),t}(a.Component),A=n(87),L=n(24),I=window.googlesitekit.setup,P=Object(p.l)("notification"),M=Object(L.a)(React.createElement(D,null)),T=Object(L.a)(React.createElement(x,null)),U=Object(L.a)(React.createElement(S,null)),F=Object(L.a)(React.createElement(A.a,null));I.needReauthenticate&&Object(C.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",F,1),"authentication_success"===P||"authentication_failure"===P?Object(C.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.SetupNotification",M,1):I.isAuthenticated&&I.isVerified&&(Object(C.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.ModulesNotification",T,1),Object(C.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.WinsNotification",U,1))},17:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),h=n.n(p),f=n(14),b=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.ctaLabel,a=e.ctaLink;return React.createElement("header",{className:"googlesitekit-layout__header"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:"\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\t\t\t".concat(a?"mdc-layout-grid__cell--span-6-desktop":"mdc-layout-grid__cell--span-12-desktop","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--align-middle\n\t\t\t\t\t\t\t\t\t").concat(a?"":"mdc-layout-grid__cell--span-8-tablet","\n\t\t\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\t\t\t\t\t\t")},React.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},t)),a&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},React.createElement(f.a,{href:a,external:!0,inherit:!0},n)))))}}]),t}(m.Component);b.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},b.defaultProps={title:"",ctaLabel:"",ctaLink:""};var v=b,k=n(60),_=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.ctaLabel,n=e.ctaLink,a=e.footerContent;return React.createElement("footer",{className:"googlesitekit-layout__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n&&t&&React.createElement(k.a,{className:"googlesitekit-data-block__source",name:t,href:n,external:!0}),a))))}}]),t}(m.Component);_.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string};var y=_,O=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.footer,a=e.children,i=e.title,o=e.headerCtaLabel,r=e.headerCtaLink,s=e.footerCtaLabel,c=e.footerCtaLink,l=e.footerContent,u=e.className,d=e.fill,g=e.relative;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-layout\n\t\t\t\t".concat(u&&u,"\n\t\t\t\t").concat(d?"googlesitekit-layout--fill":"","\n\t\t\t\t").concat(g?"googlesitekit-layout--relative":"","\n\t\t\t")},t&&React.createElement(v,{title:i,ctaLabel:o,ctaLink:r}),a,n&&React.createElement(y,{ctaLabel:s,ctaLink:c,footerContent:l}))}}]),t}(m.Component);O.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},O.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1};t.a=O},2:function(e,t,n){"use strict";var a,i=n(49),o=n.n(i),r=n(68),s=n.n(r),c=n(27),l=n.n(c),u=n(12),d=n.n(u),g=n(61),m=n.n(g),p=(n(1),n(11)),h=n(9),f=n(20),b=n(18),v=n.n(b),k=n(35),_=n.n(k),y=n(10),O=n(0),w=n(36),R=n(3),j=n.n(R),E=n(4),C=n.n(E),D=function(e){var t=window[e];if(!t)return!1;try{var n="__storage_test__";return t.setItem(n,n),t.removeItem(n),!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}},N=function(){function e(){j()(this,e)}return C()(e,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),e}(),x=function(){return a||(a=D("sessionStorage")?window.sessionStorage:D("localStorage")?window.localStorage:new N),a};function S(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(n,!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"t",(function(){return L})),n.d(t,"r",(function(){return I})),n.d(t,"p",(function(){return P})),n.d(t,"s",(function(){return M})),n.d(t,"j",(function(){return T})),n.d(t,"c",(function(){return U})),n.d(t,"l",(function(){return q})),n.d(t,"f",(function(){return H})),n.d(t,"u",(function(){return W})),n.d(t,"m",(function(){return G})),n.d(t,"g",(function(){return K})),n.d(t,"n",(function(){return B})),n.d(t,"z",(function(){return z})),n.d(t,"A",(function(){return V})),n.d(t,"b",(function(){return Q})),n.d(t,"v",(function(){return Y})),n.d(t,"k",(function(){return J})),n.d(t,"a",(function(){return $})),n.d(t,"y",(function(){return ee})),n.d(t,"w",(function(){return te})),n.d(t,"e",(function(){return ne})),n.d(t,"i",(function(){return ie})),n.d(t,"h",(function(){return oe})),n.d(t,"q",(function(){return re})),n.d(t,"d",(function(){return se})),n.d(t,"x",(function(){return ce})),n.d(t,"o",(function(){return x}));var L=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t=Object(p.isUndefined)(e)?0:1e6<e?(e/=1e6).toFixed(1)+"M":1e3<e?99<(e/=1e3)?Math.round(e)+"K":e.toFixed(1)+"K":e,(Object(p.isNull)(e)||Object(p.isUndefined)(e)||isNaN(e))&&(t="",e=0),0===e)return t="0.00",n?new Intl.NumberFormat(navigator.language,{style:"currency",currency:n}).format(e):e;if(!1!==n&&""!==t){var a=new Intl.NumberFormat(navigator.language,{style:"currency",currency:n}).formatToParts(e),i=a.find((function(e){return"decimal"===e.type}));!Object(p.isUndefined)(i)&&!Object(p.isUndefined)(i.value)&&1e3>e&&(t=Number.isInteger(e)?e:e.replace(".",i.value));var o=a.find((function(e){return"currency"===e.type})),r=o?o.value:"";return"".concat(r).concat(t)}return t.toString()},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t||(t=navigator.language),t=t.replace("_","-").toLocaleLowerCase(),new Intl.NumberFormat(t).format(e)},P=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}},M=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},T=function(e,t){var n=1e3*P("day"),a=e.getTime(),i=t.getTime();return Math.round(Math.abs(a-i)/n)},U=function(e,t){if("0"===e||0===e||isNaN(e))return"";var n=((t-e)/e*100).toFixed(1);return isNaN(n)||"Infinity"===n?"":n},F=function(e){for(var t=location.search.substr(1).split("&"),n={},a=0;a<t.length;a++)n[t[a].split("=")[0]]=decodeURIComponent(t[a].split("=")[1]);return e?n.hasOwnProperty(e)?decodeURIComponent(n[e].replace(/\+/g," ")):"":n},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,n=new URL(t.href);if(e)return n.searchParams&&n.searchParams.get?n.searchParams.get(e):F(e);var a={},i=!0,o=!1,r=void 0;try{for(var s,c=n.searchParams.entries()[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=m()(s.value,2),u=l[0],d=l[1];a[u]=d}}catch(e){o=!0,r=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw r}}return a},H=function(e,t){return Object(p.map)(e,(function(e,n){return[e[0],e[t]||(0===n?"":0)]}))},W=function(){var e,t;return d.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d.a.awrap(h.c.get(h.a,"user","authentication"));case 3:e=n.sent,t=e.grantedScopes.filter((function(t){return-1!==e.requiredScopes.indexOf(t)})),window.googlesitekit.setup=window.googlesitekit.setup||{},window.googlesitekit.setup.isAuthenticated=e.isAuthenticated,window.googlesitekit.setup.requiredScopes=e.requiredScopes,window.googlesitekit.setup.grantedScopes=e.grantedScopes,window.googlesitekit.setup.needReauthenticate=t.length<e.requiredScopes.length,n.next=14;break;case 12:n.prev=12,n.t0=n.catch(0);case 14:case"end":return n.stop()}}),null,null,[[0,12]])},G=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:googlesitekit,a=n.admin,i=a.connectURL,o=a.adminRoot,r=n.setup.needReauthenticate,s=n.modules[e].screenID,c="pagespeed-insights"===e?{notification:"authentication_success",reAuth:void 0}:{},l=Object(w.addQueryArgs)(o,A({page:e&&t&&s?s:"googlesitekit-dashboard",slug:e,reAuth:t},c));if(!r)return l;var u=encodeURIComponent(Object(w.getQueryString)(l));return l=o+"?"+u,Object(w.addQueryArgs)(i,{redirect:l,status:t})},K=function(e,t){return function(n){return function(a){return v.a.createElement(e,s()({},a,t,{OriginalComponent:n}))}}},B=function(e,t){var n=googlesitekit.admin.adminRoot;return e||(e="googlesitekit-dashboard"),t=A({page:e},t),Object(w.addQueryArgs)(n,t)},z=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},V=function(e){return e.match(/^GTM-[a-zA-Z\d]{7}$/)},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,n=null,a=document.querySelector("#toplevel_page_googlesitekit-dashboard #googlesitekit-notifications-counter"),i=document.querySelector("#wp-admin-bar-google-site-kit #googlesitekit-notifications-counter");if(a&&i)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),n=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===n)return!1;var o=document.createElement("span");o.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e)),o.setAttribute("id","googlesitekit-notifications-counter");var r=document.createElement("span");r.setAttribute("class","plugin-count"),r.setAttribute("aria-hidden","true"),r.textContent=e;var s=document.createElement("span");return s.setAttribute("class","screen-reader-text"),s.textContent=Object(O.sprintf)(Object(O._n)("%d notification","%d notifications",e,"google-site-kit"),e),o.appendChild(r),o.appendChild(s),t&&null===a&&t.appendChild(o),n&&null===i&&n.appendChild(o),o},Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if("undefined"!=typeof gtag&&window.googlesitekitTrackingEnabled){var i=googlesitekit.admin,o=i.siteURL,r=i.siteUserID,s=googlesitekit.setup.isFirstAdmin;return gtag("event",t,{send_to:googlesitekit.admin.trackingID,event_category:e,event_label:n,event_value:a,dimension1:Object(p.trimEnd)(o,"/"),dimension2:s?"true":"false",dimension3:r})}},J=function(e){var t,n,a,i,o;return d.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return t=googlesitekit.admin,n=t.homeURL,a=t.ampMode,i={tagverify:1,timestamp:Date.now()},r.next=4,d.a.awrap(Z(Object(w.addQueryArgs)(n,i),e));case 4:if((o=r.sent)||"secondary"!==a){r.next=9;break}return r.next=8,d.a.awrap(_()({path:"/wp/v2/posts?per_page=1"}).then((function(t){return t.slice(0,1).map((function(t){return d.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,d.a.awrap(Z(Object(w.addQueryArgs)(t.link,A({},i,{amp:1})),e));case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}))})).pop()})));case 8:o=r.sent;case 9:return r.abrupt("return",Promise.resolve(o||null));case 10:case"end":return r.stop()}}))},Z=function(e,t){var n;return d.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,d.a.awrap(fetch(e,{credentials:"omit"}).then((function(e){return e.text()})));case 3:return n=a.sent,a.abrupt("return",X(n,t)||null);case 7:return a.prev=7,a.t0=a.catch(0),a.abrupt("return",null);case 10:case"end":return a.stop()}}),null,null,[[0,7]])},X=function(e,t){var n=!1;switch(t){case"analytics":(n=!!(n=new RegExp(/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/gm).exec(e))&&n[1])||(n=!!(n=new RegExp(/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/gm).exec(e))&&n[1]);break;case"adsense":(n=!!(n=new RegExp(/google_ad_client: ?["|'](.*?)["|']/gm).exec(e))&&n[1])||(n=!!(n=new RegExp(/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/gm).exec(e))&&n[1])}return n},$=function(e,t,n){return e.setModuleActive(t,n).then((function(e){return window.googlesitekit.modules&&window.googlesitekit.modules[t]&&(window.googlesitekit.modules[t].active=e.active),Y("".concat(t,"_setup"),e.active?"module_activate":"module_deactivate",t),new Promise((function(t){t(e)}))}))},ee=function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:googlesitekit,o=i.modules[e],r=o.settings,s=o.setupComplete,c=a||document.getElementById("confirm-changes-".concat(e));if(s&&c){var l=[];Object.keys(n).forEach((function(e){-1<Object.keys(t).indexOf(e)&&(l[t[e]]=n[e])}));var u=[];Object.keys(r).forEach((function(e){-1<Object.values(t).indexOf(e)&&(u[e]=r[e])}));var d=Object.keys(u).filter((function(e){return u[e]!==l[e]}));if(0<d.length){if(a)return!0;c.removeAttribute("disabled")}else{if(a)return!1;c.setAttribute("disabled","disabled")}}},te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(y.addFilter)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",K(e,t),1)},ne=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(p.unescape)(t)};function ae(){return Object(y.applyFilters)("googlesitekit.dateRange",Object(O.__)("Last 28 days","google-site-kit"))}function ie(){return ae().replace("Last ","")}function oe(){return e=ae(),Object(p.toLower)(Object(p.deburr)(Object(p.trim)(e.replace(/[\s./_]+/g,"-"),"-")));var e}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(googlesitekit){var o=v.a.createElement(f.a,{id:e,width:n,height:a,className:i});return t?o=v.a.createElement(f.a,{id:"".concat(e,"-disabled"),width:n,height:a,className:i}):"pagespeed-insights"===e&&(o=v.a.createElement("img",{src:googlesitekit.admin.assetsRoot+"images/icon-pagespeed.png",width:n,alt:"",className:i})),o}}function se(){window.localStorage&&window.localStorage.clear(),window.sessionStorage&&window.sessionStorage.clear()}function ce(e){var t={};return Object.keys(e).sort().forEach((function(n){var a=e[n];a&&"object"===o()(a)&&!Array.isArray(a)&&(a=ce(a)),t[n]=a})),t}},20:function(e,t,n){"use strict";n(1);var a=n(8),i=n.n(a),o=function(e){var t=e.id,n=e.className,a=e.height,i=e.width,o="".concat(googlesitekit.admin.assetsRoot,"svg/svg.svg");return React.createElement("svg",{className:"svg".concat(" ",n),height:a,width:i},React.createElement("use",{xlinkHref:"".concat(o,"#").concat(t)}))};o.propTypes={id:i.a.string.isRequired,className:i.a.string,height:i.a.string,width:i.a.string},o.defaultProps={className:"",height:20,width:20},t.a=o},21:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(11),h=n(10),f=n(59),b=16;function v(e){return Object(f.createHigherOrderComponent)((function(t){var n,a="core/with-filters/"+e;var o=function(o){function s(){var a;return i()(this,s),a=c()(this,u()(s).apply(this,arguments)),void 0===n&&(n=Object(h.applyFilters)(e,t)),a}return g()(s,o),r()(s,[{key:"componentDidMount",value:function(){s.instances.push(this),1===s.instances.length&&(Object(h.addAction)("hookRemoved",a,l),Object(h.addAction)("hookAdded",a,l))}},{key:"componentWillUnmount",value:function(){s.instances=Object(p.without)(s.instances,this),0===s.instances.length&&(Object(h.removeAction)("hookRemoved",a),Object(h.removeAction)("hookAdded",a))}},{key:"render",value:function(){return React.createElement(n,this.props)}}]),s}(m.Component);o.instances=[];var s=Object(p.debounce)((function(){n=Object(h.applyFilters)(e,t),o.instances.forEach((function(e){e.forceUpdate()}))}),b);function l(t){t===e&&s()}return o}),"withFilters")}},22:function(e,t,n){"use strict";var a=n(82),i=n.n(a);n.d(t,"l",(function(){return i.a})),n.d(t,"a",(function(){return a.HelperText})),n.d(t,"b",(function(){return a.Input}));var o=n(151);n.d(t,"h",(function(){return o.a}));var r=n(162);n.d(t,"e",(function(){return r.a}));var s=n(163);n.d(t,"g",(function(){return s.a}));var c=n(97),l=n.n(c);n.d(t,"k",(function(){return l.a})),n.d(t,"j",(function(){return c.Option}));var u=n(164);n.d(t,"i",(function(){return u.a}));var d=n(160);n.d(t,"d",(function(){return d.a}));var g=n(159);n.d(t,"c",(function(){return g.a}));var m=n(157);n.d(t,"f",(function(){return m.a}))},24:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(1),i=function(e){return function(t){return function(n){return Object(a.createElement)(a.Fragment,{},"",Object(a.createElement)(t,n),e)}}}},25:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(13),g=n.n(d),m=n(7),p=n.n(m),h=n(1),f=n(8),b=n.n(f),v=n(60),k=n(20),_=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).handleClick=n.handleClick.bind(g()(n)),n.handleKeyPress=n.handleKeyPress.bind(g()(n)),n}return p()(t,e),r()(t,[{key:"handleClick",value:function(){var e=this.props,t=e.stat;(0,e.handleStatSelection)(t)}},{key:"handleKeyPress",value:function(e){e.preventDefault();var t=this.props,n=t.stat,a=t.handleStatSelection;"Enter"!==e.key&&" "!==e.key||a(n)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.title,a=e.datapoint,i=e.datapointUnit,o=e.change,r=e.changeDataUnit,s=e.context,c=e.period,l=e.selected,u=e.handleStatSelection,d=e.source,g=e.sparkline,m=e.reverseArrowDirection,p="button"===s?"button":"",f=0<=o?"-positive":"-negative";return React.createElement("div",{className:"\n\t\t\t\t\tgooglesitekit-data-block\n\t\t\t\t\tgooglesitekit-data-block--".concat(s,"\n\t\t\t\t\t").concat(l?"googlesitekit-data-block--selected":"","\n\t\t\t\t\t").concat(t,"\n\t\t\t\t"),tabIndex:"button"===s?"0":"-1",role:u&&p,onClick:u&&this.handleClick,onKeyPress:u&&this.handleKeyPress,"aria-label":u&&n,"aria-pressed":u&&l},React.createElement("div",{className:"googlesitekit-data-block__title-datapoint-wrapper"},React.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-data-block__title "},n),React.createElement("div",{className:"googlesitekit-data-block__datapoint"},"".concat(a).concat(i))),g&&React.createElement("div",{className:"googlesitekit-data-block__sparkline"},g),React.createElement("div",{className:"googlesitekit-data-block__change-source-wrapper"},React.createElement("div",{className:"\n\t\t\t\t\t\tgooglesitekit-data-block__change\n\t\t\t\t\t\tgooglesitekit-data-block__change--".concat(0<=o?"positive":"negative","\n\t\t\t\t\t")},""===o&&React.createElement(h.Fragment,null," "),o&&[React.createElement("span",{key:"arrow",className:"googlesitekit-data-block__arrow ".concat(m?"googlesitekit-data-block__arrow--reverse":"")},React.createElement(k.a,{id:"arrow".concat(f),height:"9",width:"9"})),React.createElement("span",{key:"values",className:"googlesitekit-data-block__value"},"".concat(Math.abs(o)).concat(r," ").concat(c))]),d&&React.createElement(v.a,{className:"googlesitekit-data-block__source",name:d.name,href:d.link})))}}]),t}(h.Component);_.propTypes={stat:b.a.number,onClick:b.a.func,className:b.a.string,title:b.a.string,datapoint:b.a.oneOfType([b.a.string,b.a.number]),datapointUnit:b.a.string,change:b.a.oneOfType([b.a.string,b.a.number]),changeDataUnit:b.a.string,context:b.a.string,period:b.a.string,selected:b.a.bool,handleStatSelection:b.a.func,reverseArrowDirection:b.a.bool},_.defaultProps={stat:null,onClick:null,className:"",title:"",datapoint:null,datapointUnit:"",change:null,changeDataUnit:"",context:"default",period:"",selected:!1,handleStatSelection:null,reverseArrowDirection:!1},t.a=_},26:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(13),g=n.n(d),m=n(7),p=n.n(m),h=n(1),f=n(8),b=n.n(f),v=n(9),k=n(25),_=n(29);var y=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#F9BB2D",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"warning-title warning-desc"},React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))},O=n(88),w=n(14),R=n(20),j=n(11),E=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).state={isClosed:!1},n.cardRef=Object(h.createRef)(),n.handleDismiss=n.handleDismiss.bind(g()(n)),0<n.props.dismissExpires&&n.expireDismiss(),n.props.showOnce&&v.c.setCache("notification::displayed::".concat(n.props.id),new Date),n}return p()(t,e),r()(t,[{key:"handleDismiss",value:function(e){var t=this,n=this.state.isClosed,a=this.cardRef.current;e.preventDefault(),this.setState({isClosed:!n}),setTimeout((function(){v.c.setCache("notification::dismissed::".concat(t.props.id),new Date),a.style.display="none";var e=new Event("notificationDismissed");document.dispatchEvent(e)}),350)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,n=e.dismissExpires,a=v.c.getCache("notification::dismissed::".concat(t));if(a){var i=new Date(a);i.setSeconds(i.getSeconds()+parseInt(n,10)),i<new Date&&v.c.deleteCache("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var e=this.state.isClosed,t=this.props,n=t.children,a=t.id,i=t.title,o=t.description,r=t.blockData,s=t.winImage,c=t.smallImage,l=t.format,u=t.learnMoreURL,d=t.learnMoreDescription,g=t.learnMoreLabel,m=t.ctaLink,p=t.ctaLabel,f=t.ctaTarget,b=t.type,E=t.dismiss,C=t.isDismissable,D=t.logo,N=t.module,x=t.moduleName,S=t.pageIndex;if(v.c.getCache("notification::dismissed::".concat(a)))return null;var A,L=e?"is-closed":"is-open",I="large"===l&&"win-stats-increase"===b,P="mdc-layout-grid__cell--span-12";"large"===l?(P="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",I&&(P="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===l&&(P="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),A="win-warning"===b?React.createElement(y,null):"win-error"===b?React.createElement(O.a,null):"";var M=React.createElement(h.Fragment,null,r&&React.createElement("div",{className:"mdc-layout-grid__inner"},Object(j.map)(r,(function(e,t){return React.createElement("div",{key:t,className:"mdc-layout-grid__cell ".concat(I?"mdc-layout-grid__cell--span-5-desktop":"mdc-layout-grid__cell--span-4-desktop")},React.createElement("div",{className:"googlesitekit-publisher-win__stats"},React.createElement(k.a,e)))})))),T=React.createElement(h.Fragment,null,React.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},i),o&&React.createElement("div",{className:"googlesitekit-publisher-win__desc"},React.createElement("p",null,o,g&&React.createElement(h.Fragment,null," ",React.createElement(w.a,{href:u,external:!0,inherit:!0},g),d),S&&React.createElement("span",{className:"googlesitekit-publisher-win__detect"},S))),n),U=N?React.createElement(R.a,{id:N,height:"19",width:"19"}):React.createElement(R.a,{id:"logo-g",height:"34",width:"32"});return React.createElement("section",{ref:this.cardRef,className:"\n\t\t\t\tgooglesitekit-publisher-win\n\t\t\t\t".concat(l?"googlesitekit-publisher-win--".concat(l):"","\n\t\t\t\t").concat(b?"googlesitekit-publisher-win--".concat(b):"","\n\t\t\t\t").concat(L?"googlesitekit-publisher-win--".concat(L):"","\n\t\t\t")},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},D&&React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12 ".concat(I?"mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet":"")},React.createElement("div",{className:"googlesitekit-publisher-win__logo"},U),x&&React.createElement("div",{className:"googlesitekit-publisher-win__module-name"},x)),c&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},React.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:c})),React.createElement("div",{className:"mdc-layout-grid__cell ".concat(P)},I?React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},T),React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},M)):React.createElement(h.Fragment,null,T,M),m&&React.createElement(_.a,{href:m,target:f},p),C&&E&&React.createElement(w.a,{onClick:this.handleDismiss},E)),s&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement("div",{className:"googlesitekit-publisher-win__image-large"},React.createElement("img",{alt:"",src:s}))),("win-error"===b||"win-warning"===b)&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},React.createElement("div",{className:"googlesitekit-publisher-win__icons"},A)))))}}]),t}(h.Component);E.propTypes={id:b.a.string.isRequired,title:b.a.string.isRequired,description:b.a.string,learnMoreURL:b.a.string,learnMoreDescription:b.a.string,learnMoreLabel:b.a.string,blockData:b.a.array,winImage:b.a.string,smallImage:b.a.string,format:b.a.string,ctaLink:b.a.string,ctaLabel:b.a.string,type:b.a.string,dismiss:b.a.string,isDismissable:b.a.bool,logo:b.a.bool,module:b.a.string,moduleName:b.a.string,pageIndex:b.a.string,dismissExpires:b.a.number,showOnce:b.a.bool},E.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1};t.a=E},29:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(22),h=n(8),f=n.n(h),b=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).buttonRef=Object(m.createRef)(),n}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){new p.h(this.buttonRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onClick,n=e.children,a=e.href,i=e.text,o=e.className,r=e.danger,s=e.disabled,c=e.target,l=e.id,u=e.icon,d=e.trailingIcon,g=e.ariaHaspopup,m=e.ariaExpanded,p=e.ariaControls,h=a?"a":"button";return React.createElement(h,{className:"\n\t\t\t\t\tmdc-button\n\t\t\t\t\t".concat(!i&&"mdc-button--raised","\n\t\t\t\t\t").concat(o&&o,"\n\t\t\t\t\t").concat(r?"mdc-button--danger":"","\n\t\t\t\t"),onClick:t,href:a,ref:this.buttonRef,disabled:s?"disabled":"",target:c||"_self",id:l,"aria-haspopup":g,"aria-expanded":m,"aria-controls":p},u&&u,React.createElement("span",{className:"mdc-button__label"},n),d&&d)}}]),t}(m.Component);b.propTypes={onClick:f.a.func,children:f.a.string.isRequired,href:f.a.string,text:f.a.bool,className:f.a.string,danger:f.a.bool,disabled:f.a.bool,icon:f.a.element,trailingIcon:f.a.element,ariaHaspopup:f.a.string,ariaExpanded:f.a.bool,ariaControls:f.a.string},b.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""},t.a=b},31:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),h=n.n(p),f=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.small,a=e.compress,i=e.height,o=i?Math.round(i/2):null;return React.createElement("div",{role:"progressbar",className:"\n\t\t\t\t\tmdc-linear-progress\n\t\t\t\t\tmdc-linear-progress--indeterminate\n\t\t\t\t\t".concat(t||"","\n\t\t\t\t\t").concat(n?"mdc-linear-progress--small":"","\n\t\t\t\t\t").concat(a?"mdc-linear-progress--compress":"","\n\t\t\t\t"),style:{marginTop:o,marginBottom:o}},React.createElement("div",{className:"mdc-linear-progress__buffering-dots"}),React.createElement("div",{className:"mdc-linear-progress__buffer"}),React.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar"},React.createElement("span",{className:"mdc-linear-progress__bar-inner"})),React.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},React.createElement("span",{className:"mdc-linear-progress__bar-inner"})))}}]),t}(m.Component);f.propTypes={className:h.a.string,small:h.a.bool,compress:h.a.bool},f.defaultProps={className:"",small:!1,compress:!1},t.a=f},32:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),h=n.n(p),f=n(14),b=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.description,a=e.ctaLink,i=e.ctaLabel,o=e.error,r=e.onClick;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-cta\n\t\t\t\t".concat(o?"googlesitekit-cta--error":"","\n\t\t\t")},t&&React.createElement("h3",{className:"googlesitekit-cta__title"},t),n&&React.createElement("p",{className:"googlesitekit-cta__description"},n),i&&React.createElement(f.a,{href:a,onClick:r,inverse:!o,caps:!0,arrow:!0},i))}}]),t}(m.Component);b.propTypes={title:h.a.string.isRequired,description:h.a.string,ctaLink:h.a.string,ctaLabel:h.a.string,error:h.a.bool,onClick:h.a.func},b.defaultProps={title:"",description:"",ctaLink:"",ctaLabel:"",error:!1,onClick:function(){}},t.a=b},33:function(e,t,n){"use strict";n.r(t),n.d(t,"extractSearchConsoleDashboardData",(function(){return r})),n.d(t,"isDataZeroSearchConsole",(function(){return s}));var a=n(2),i=n(11);function o(e){var t=[[{type:"string",label:"Day"},{type:"number",label:"Clicks"},{type:"number",label:"Impressions"},{type:"number",label:"CTR"},{type:"number",label:"Position"}]],n=0,o=0,r=0,s=0,c=e.length;Object(i.each)(e,(function(e){var a=new Date(e.keys[0]);t.push([a.getMonth()+1+"/"+a.getUTCDate(),e.clicks,e.impressions,e.ctr,e.position]),n+=e.clicks,o+=e.impressions,r+=e.ctr,s+=e.position}));var l=n,u=o;n=Object(a.t)(n),o=Object(a.t)(o);var d=(r/c*100).toFixed(1),g=r/c,m=(s/c).toFixed(1);return{dataMap:t,totalClicks:n,totalClicksRaw:l,totalImpressions:o,totalImpressionsRaw:u,averageCTR:d,averageCTRRaw:g,averagePosition:m}}var r=function(e){var t=Math.floor(e.length/2),n=e.slice(e.length-t,e.length),i=e.slice(0,e.length-t),r=o(n),s=o(i),c=Object(a.c)(s.totalClicksRaw,r.totalClicksRaw),l=Object(a.c)(s.totalImpressionsRaw,r.totalImpressionsRaw),u=Object(a.c)(s.averageCTRRaw,r.averageCTRRaw),d=Object(a.c)(s.averagePosition,r.averagePosition);return{dataMap:r.dataMap,totalClicks:r.totalClicks,totalImpressions:r.totalImpressions,averageCTR:r.averageCTR,averagePosition:r.averagePosition,totalClicksChange:c,totalImpressionsChange:l,averageCTRChange:u,averagePositionChange:d}},s=function(e){if(!e.length)return!0;var t=r(e),n=t.totalClicks,a=t.totalImpressions,i=t.averageCTR,o=t.averagePosition;return 0===parseInt(n)&&0===parseInt(a)&&0===parseInt(i)&&0===parseInt(o)}},42:function(e,t,n){"use strict";n(1);var a=n(0),i=n(14);t.a=function(){var e=Object(a.__)("Need help?","google-site-kit");return React.createElement(i.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},e)}},43:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(21),h=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){return null}}]),t}(m.Component),f=Object(p.a)("googlesitekit.ErrorNotification")(h),b=n(81),v=n(12),k=n.n(v),_=n(13),y=n.n(_),O=n(67),w=n(29),R=n(22),j=n(8),E=n.n(j),C=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).menuRef=Object(m.createRef)(),n}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new R.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var e=this.props,t=e.menuOpen,n=e.menuItems,a=e.onSelected,i=e.id;return React.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},React.createElement("ul",{id:i,className:"mdc-list",role:"menu","aria-hidden":!t,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(e,t){return React.createElement("li",{key:t,className:"mdc-list-item",role:"menuitem",onClick:a.bind(null,t),onKeyDown:a.bind(null,t)},React.createElement("span",{className:"mdc-list-item__text"},e))}))))}}]),t}(m.Component);C.propTypes={menuOpen:E.a.bool.isRequired,menuItems:E.a.array.isRequired,id:E.a.string.isRequired};var D=C,N=n(80),x=n(2),S=n(0),A=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).state={dialogActive:!1,menuOpen:!1},n.handleMenu=n.handleMenu.bind(y()(n)),n.handleMenuClose=n.handleMenuClose.bind(y()(n)),n.handleMenuItemSelect=n.handleMenuItemSelect.bind(y()(n)),n.handleDialog=n.handleDialog.bind(y()(n)),n.handleDialogClose=n.handleDialogClose.bind(y()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(y()(n)),n.menuButtonRef=Object(m.createRef)(),n.menuRef=Object(m.createRef)(),n}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){window.addEventListener("mouseup",this.handleMenuClose),window.addEventListener("keyup",this.handleMenuClose),window.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.handleMenuClose),window.removeEventListener("keyup",this.handleMenuClose),window.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(e,t){var n=googlesitekit.admin.proxyPermissionsURL;if("keydown"===t.type&&(13===t.keyCode||32===t.keyCode)||"click"===t.type)switch(e){case 0:this.handleDialog();break;case 1:window.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return k.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(x.d)(),document.location=Object(x.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var e=googlesitekit.admin,t=e.userData,n=t.email,a=void 0===n?"":n,i=t.picture,o=void 0===i?"":i,r=e.proxyPermissionsURL,s=this.state,c=s.dialogActive,l=s.menuOpen;return React.createElement(m.Fragment,null,React.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},React.createElement(w.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:o?React.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},React.createElement("img",{className:"mdc-button__icon--image",src:o,alt:Object(S.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:l,ariaControls:"user-menu"},a),React.createElement(D,{ref:this.menuRef,menuOpen:l,menuItems:[Object(S.__)("Disconnect","google-site-kit")].concat(r?[Object(S.__)("Manage sites...","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),React.createElement(N.a,null,React.createElement(O.a,{dialogActive:c,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(S.__)("Disconnect","google-site-kit"),subtitle:Object(S.__)("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(S.__)("Disconnect","google-site-kit"),provides:[]})))}}]),t}(m.Component),L=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=googlesitekit.setup.isAuthenticated;return React.createElement(m.Fragment,null,React.createElement("header",{className:"googlesitekit-header"},React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(b.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e&&React.createElement(A,null))))),React.createElement(f,null))}}]),t}(m.Component);t.a=L},47:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(69),h=n(8),f=n.n(h),b=n(20),v=n(10),k=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.icon,a=e.iconWidth,i=e.iconHeight,o=e.iconID,r=e.className,s=e.status,c=e.statusText,l=e.fullWidth?"\n\t\t\tmdc-layout-grid__cell\n\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t":"\n\t\t\tmdc-layout-grid__cell\n\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\tmdc-layout-grid__cell--span-4-tablet\n\t\t\tmdc-layout-grid__cell--span-6-desktop\n\t\t\t",u=Object(v.applyFilters)("googlesitekit.showDateRangeSelector-".concat(o),!1),d=!(""===s&&!u);return React.createElement("header",{className:"googlesitekit-page-header"},React.createElement("div",{className:"mdc-layout-grid__inner"},t&&React.createElement("div",{className:l},n&&React.createElement(b.a,{id:o,height:i,width:a,className:"googlesitekit-page-header__icon"}),React.createElement("h1",{className:"googlesitekit-page-header__title ".concat(r)},t)),d&&React.createElement("div",{className:"\n\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\tmdc-layout-grid__cell--align-bottom\n\t\t\t\t\t\t\tmdc-layout-grid__cell--align-right-tablet\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-4-tablet\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-6-desktop\n\t\t\t\t\t\t"},React.createElement("div",{className:"googlesitekit-page-header__details"},s&&React.createElement("span",{className:"\n\t\t\t\t\t\t\t\t\t\tgooglesitekit-page-header__status\n\t\t\t\t\t\t\t\t\t\tgooglesitekit-page-header__status--".concat(s,"\n\t\t\t\t\t\t\t\t\t")},c),u&&React.createElement("span",{className:"googlesitekit-page-header__range"},React.createElement(p.a,null))))))}}]),t}(m.Component);k.propTypes={title:f.a.string,icon:f.a.bool,iconID:f.a.string,iconWidth:f.a.string,iconHeight:f.a.string,className:f.a.string,status:f.a.string,statusText:f.a.string,fullWidth:f.a.bool},k.defaultProps={title:"",icon:!1,iconID:"",iconWidth:"",iconHeight:"",className:"googlesitekit-heading-3",status:"",statusText:"",fullWidth:!1},t.a=k},53:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(21),h=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){return null}}]),t}(m.Component);t.a=Object(p.a)("googlesitekit.ModuleSettingsWarning")(h)},54:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(26),h=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){return React.createElement(p.a,this.props)}}]),t}(m.Component);t.a=h},58:function(e,t,n){"use strict";var a=n(12),i=n.n(a),o=n(9),r=n(2),s=n(3),c=n.n(s),l=n(4),u=n.n(l),d=n(11),g=function(){function e(t){c()(this,e),this.wins=t,this.response=[]}return u()(e,[{key:"get",value:function(){var e,t=this;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return e=Object(d.filter)(this.wins.map((function(e){return!!e.withData&&(e.withData.callback=function(n){t.response[e.identifier]=n},e.withData)}))),n.next=3,i.a.awrap(o.c.combinedGetFromCache(e));case 3:return n.abrupt("return",this.response);case 4:case"end":return n.stop()}}),null,this)}}]),e}(),m=n(10);n.d(t,"g",(function(){return h})),n.d(t,"f",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return _})),n.d(t,"d",(function(){return y})),n.d(t,"e",(function(){return O})),n.d(t,"a",(function(){return w}));var p=Object(m.applyFilters)("googlesitekit.winCallbacks",{}),h=function(){return Object(m.applyFilters)("googlesitekit.WinsNotificationsRequest",[])},f=function(){return Object(m.applyFilters)("googlesitekit.ModulesNotificationsRequest",[])};function b(){var e,t,n,a;return i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if((e=window.googlesitekit.setup).isSiteKitConnected&&(e.isAuthenticated||e.isVerified)){o.next=3;break}return o.abrupt("return",0);case 3:return t=0,o.next=6,i.a.awrap(_());case 6:return(n=o.sent)&&n.total&&(t+=n.total),o.next=10,i.a.awrap(y());case 10:return(a=o.sent)&&a.total&&(t+=a.total),t=Object(m.applyFilters)("googlesitekit.TotalNotifications",t),t=Math.max(0,Math.abs(t)),window.localStorage&&window.localStorage.setItem("googlesitekit::total-notifications",t),o.abrupt("return",t);case 16:case"end":return o.stop()}}))}var v=function(e){return e?e.length?e.filter((function(e){return!o.c.getCache("notification::dismissed::".concat(e.id))})):e:[]},k=function(e){var t=function(e){return Object.keys(e).slice(0,1).map((function(t){return e[t]}))};if(1>=Object.keys(e).length)return e;var n=Object.values(e).filter((function(e){var t=o.c.getCache("notification::displayed::".concat(e[0].id));if(t){var n=new Date(t),a=new Date,i=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));if(n.setHours(0,0,0),i.setHours(0,0,0),n.getTime()===i.getTime())return!0;7<=Object(r.j)(n,i)&&o.c.deleteCache("notification::displayed::".concat(e[0].id))}return null===t})),a=null,i=[];return 0<Object.keys(n).length?(a=t(n),i[Object.keys(n)[0]]=a):(a=t(e),i[Object.keys(e)[0]]=a)};function _(){var e,t,n,a;return i.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return e={},t=0,s.next=4,i.a.awrap(f());case 4:return n=s.sent,a=[],n.map((function(e){var t;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:t=new Promise((function(t){var n,a;return i.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return n=e.identifier,s.t0=v,s.next=4,i.a.awrap(o.c.getNotifications(n,Object(r.p)("day")));case 4:s.t1=s.sent,a=(0,s.t0)(s.t1),t({identifier:n,notifications:a});case 7:case"end":return s.stop()}}))})),a.push(t);case 2:case"end":return n.stop()}}))})),s.next=9,i.a.awrap(Promise.all(a).then((function(n){n.forEach((function(n){n.notifications.length&&(t+=n.notifications.length,e[n.identifier]=n.notifications)}))})));case 9:return s.abrupt("return",{results:e,total:t});case 10:case"end":return s.stop()}}))}function y(){var e,t,n,a,o;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return e={},t=0,r.next=4,i.a.awrap(h());case 4:return n=r.sent,r.next=7,i.a.awrap(new g(n).get());case 7:return a=r.sent,o=[],n.map((function(e){var t;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:t=new Promise((function(t){var n,o,r,s,c;return i.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:n=e.identifier,o=e.callback||Object(d.camelCase)(n),r=null,s=[],e.withData?(c=a[n]||null,r=p[o](c,n)):r=p[o](n),s=v(s=r?[r]:[]),t({identifier:n,notifications:s});case 8:case"end":return i.stop()}}))})),o.push(t);case 2:case"end":return n.stop()}}))})),r.next=12,i.a.awrap(Promise.all(o).then((function(t){t.forEach((function(t){t.notifications.length&&(e[t.identifier]=t.notifications)}))})));case 12:return e=k(e),t=e.length||Object.keys(e).length||0,r.abrupt("return",{results:e,total:t});case 15:case"end":return r.stop()}}))}var O=function(e){var t=Math.abs(e.count)+1;return window.localStorage&&window.localStorage.setItem("googlesitekit::total-notifications",t),{count:t}},w=function(e){var t=Math.max(0,Math.abs(e.count)-1);return window.localStorage&&window.localStorage.setItem("googlesitekit::total-notifications",t),{count:t}}},60:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),h=n.n(p),f=n(14),b=n(0),v=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.name,n=e.href,a=e.className,i=e.external;return React.createElement("div",{className:"googlesitekit-source-link ".concat(a)},[Object(b.__)("Source:","google-site-kit")," ",React.createElement(f.a,{key:"link",href:n,external:i,inherit:!0},t)])}}]),t}(m.Component);v.propTypes={name:h.a.string,href:h.a.string,className:h.a.string,external:h.a.bool},v.defaultProps={name:"",href:"",className:"",external:!1},t.a=v},62:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=function(e){function t(){return i()(this,t),c()(this,u()(t).apply(this,arguments))}return g()(t,e),r()(t,[{key:"render",value:function(){var e=this.props.isSaving;return React.createElement("span",{className:"spinner",style:{display:e?"inline-block":"none",float:"none",marginTop:"0",visibility:"visible"}})}}]),t}(m.Component);t.a=p},63:function(e,t,n){"use strict";var a=n(12),i=n.n(a),o=n(3),r=n.n(o),s=n(4),c=n.n(s),l=n(5),u=n.n(l),d=n(6),g=n.n(d),m=n(7),p=n.n(m),h=n(1),f=n(2),b=n(9),v=n(32),k=n(8),_=n.n(k),y=n(54),O=n(0),w=function(e){function t(){return r()(this,t),u()(this,g()(t).apply(this,arguments))}return p()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,n=e.title,a=e.description,i=e.ctaLabel;return googlesitekit.permissions.canManageOptions?React.createElement(v.a,{title:n,description:a,onClick:t.setupAnalyticsClick,ctaLabel:i}):null}}],[{key:"setupAnalyticsClick",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.a.awrap(Object(f.a)(b.c,"analytics",!0));case 3:return e.next=5,i.a.awrap(Object(f.u)());case 5:window.location=Object(f.m)("analytics",!0),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),Object(f.w)(y.a,{id:"analytics-setup-error",title:Object(O.__)("Internal Server Error","google-site-kit"),description:e.t0.message,format:"small",type:"win-error"});case 11:case"end":return e.stop()}}),null,null,[[0,8]])}}]),t}(h.Component);w.propTypes={title:_.a.string,description:_.a.string,ctaLabel:_.a.string},w.defaultProps={title:Object(O.__)("Learn more about what visitors do on your site.","google-site-kit"),description:Object(O.__)("Connecting with Google Analytics to see unique vistors, goal completions, top pages and more.","google-site-kit"),ctaLabel:Object(O.__)("Set up Analytics","google-site-kit")},t.a=w},65:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}));var a=n(18),i=n(1),o=i.Suspense?i.Suspense:a.Suspense,r=i.lazy?i.lazy:a.lazy},67:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=n(8),h=n.n(p),f=n(29),b=n(14),v=n(22),k=n(145),_=n.n(k),y=n(0),O=function(e){function t(){var e;return i()(this,t),(e=c()(this,u()(t).call(this))).state={attributes:[Object(y.__)("Audience overview","google-site-kit"),Object(y.__)("Top pages","google-site-kit"),Object(y.__)("Top acquisition sources","google-site-kit"),Object(y.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(m.createRef)(),e}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){new v.d(this.dialogRef.current)}},{key:"render",value:function(){var e=this.props,t=e.dialogActive,n=e.handleDialog,a=e.title,i=e.provides,o=e.handleConfirm,r=e.subtitle,s=e.confirmButton,c=e.dependentModules;return React.createElement("div",{ref:this.dialogRef,className:"mdc-dialog ".concat(t?"mdc-dialog--open":""),role:"alertdialog","aria-modal":"true","aria-labelledby":"remove-module-dialog","aria-describedby":"remove-module-dialog-description","aria-hidden":t?"false":"true",tabIndex:"-1"},React.createElement("div",{className:"mdc-dialog__scrim"}," "),React.createElement(_.a,{active:t},React.createElement("div",null,React.createElement("div",{className:"mdc-dialog__container"},React.createElement("div",{className:"mdc-dialog__surface"},a&&React.createElement("h2",{id:"remove-module-dialog",className:"mdc-dialog__title"},a),r&&React.createElement("p",{className:"mdc-dialog__lead"},r),React.createElement("section",{id:"remove-module-dialog-description",className:"mdc-dialog__content"},React.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},i&&i.map((function(e){return React.createElement("li",{className:"mdc-list-item",key:e},React.createElement("span",{className:"mdc-list-item__text"},e))})))),c&&React.createElement("p",{className:"mdc-dialog__dependecies"},React.createElement("strong",null,Object(y.__)("Note: ","google-site-kit")),c),React.createElement("footer",{className:"mdc-dialog__actions"},React.createElement(f.a,{onClick:o,danger:!0},s||Object(y.__)("Disconnect","google-site-kit")),React.createElement(b.a,{className:"mdc-dialog__cancel-button",onClick:function(){return n()},inherit:!0},Object(y.__)("Cancel","google-site-kit"))))))))}}]),t}(m.Component);O.propTypes={dialogActive:h.a.bool,handleDialog:h.a.func,handleConfirm:h.a.func.isRequired,title:h.a.string,description:h.a.string,confirmButton:h.a.string},O.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null},t.a=O},69:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(13),g=n.n(d),m=n(7),p=n.n(m),h=n(1),f=n(22),b=n(0),v=n(10),k=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).state={context:"Dashboard"},n.dateRangeHook="googlesitekit.dateRange",n.dateRangeHandlerHook="googlesitekit.dateRageHandler",n.dateRangeHookAddedHook="googlesitekit.dateRageHookAddedHandler",Object(v.addAction)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingDataForDateRangeSelector",(function(e){n.setState({context:e}),Object(v.removeAction)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingDataForDateRangeSelector")})),n.handleSelection=n.handleSelection.bind(g()(n)),n}return p()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.addAction)("hookAdded",this.dateRangeHookAddedHook,(function(t){e.dateRangeHook===t&&e.forceUpdate()}))}},{key:"componentWillUnmount",value:function(){Object(v.removeAction)("hookAdded",this.dateRangeHookAddedHook)}},{key:"handleSelection",value:function(e,t){var n=this.state.context,a=t.getAttribute("data-value");return Object(v.removeFilter)(this.dateRangeHook,this.dateRangeHandlerHook),Object(v.addFilter)(this.dateRangeHook,this.dateRangeHandlerHook,(function(){return a})),Object(v.doAction)("googlesitekit.moduleDataReset"),Object(v.doAction)("googlesitekit.moduleLoaded",n),!1}},{key:"render",value:function(){var e=[Object(b.__)("Last 7 days","google-site-kit"),Object(b.__)("Last 14 days","google-site-kit"),Object(b.__)("Last 28 days","google-site-kit"),Object(b.__)("Last 90 days","google-site-kit")];return React.createElement(f.k,{enhanced:!0,className:"mdc-select--minimal",name:"time_period",label:"",onEnhancedChange:this.handleSelection,options:e,value:Object(v.applyFilters)(this.dateRangeHook,Object(b.__)("Last 28 days","google-site-kit"))})}}]),t}(h.Component);t.a=k},80:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),m=n(1),p=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).el=document.createElement("div"),n.root=document.querySelector(".googlesitekit-plugin")||document.body,n}return g()(t,e),r()(t,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(m.createPortal)(this.props.children,this.el)}}]),t}(m.Component)},81:function(e,t,n){"use strict";n(1);var a=n(20),i=n(0);t.a=function(){return React.createElement("div",{className:"googlesitekit-logo","aria-hidden":"true"},React.createElement(a.a,{id:"logo-g",className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),React.createElement(a.a,{id:"logo-sitekit",className:"\n\t\t\t\t googlesitekit-logo__logo-sitekit\n\t\t\t\t",height:"26",width:"99"}),React.createElement("span",{className:"screen-reader-text"},Object(i.__)("Site Kit by Google Logo","google-site-kit")))}},87:function(e,t,n){"use strict";n(1);var a=n(26),i=n(0);t.a=function(){var e=googlesitekit.admin.connectURL;return React.createElement(a.a,{id:"authentication error",title:Object(i.__)("Issue accessing data","google-site-kit"),description:Object(i.__)("You need to reauthenticate your Google account.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0,ctaLink:e,ctaLabel:Object(i.__)("Click here","google-site-kit")})}},88:function(e,t,n){"use strict";n(1);t.a=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#EA4336",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"error-title error-desc"},React.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}))}},89:function(e,t,n){"use strict";var a=n(3),i=n.n(a),o=n(4),r=n.n(o),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(13),g=n.n(d),m=n(7),p=n.n(m),h=n(1),f=n(58),b=n(0),v=n(10),k=function(e){function t(e){var n;return i()(this,t),(n=c()(this,u()(t).call(this,e))).state={count:0},n.handleIncrement=n.handleIncrement.bind(g()(n)),n.handleDecrement=n.handleDecrement.bind(g()(n)),n}return p()(t,e),r()(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.addAction)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications",(function(){Object(v.removeAction)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications"),Object(f.c)().then((function(t){e.setState({count:t})}))})),document.addEventListener("notificationDismissed",this.handleDecrement,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("notificationDismissed",this.handleDecrement)}},{key:"handleIncrement",value:function(){this.setState(f.e)}},{key:"handleDecrement",value:function(){this.setState(f.a)}},{key:"render",value:function(){var e=Object(b.sprintf)(Object(b._n)("%d notification","%d notifications",this.state.count,"google-site-kit"),this.state.count),t=React.createElement("span",{id:"googlesitekit-notifications-counter",className:"googlesitekit-notifications-counter update-plugins count-".concat(this.state.count)},React.createElement("span",{className:"plugin-count","aria-hidden":"true"},this.state.count),React.createElement("span",{className:"screen-reader-text"},e));return Object(h.createPortal)(t,document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"))}}]),t}(h.Component);t.a=k},9:function(e,t,n){"use strict";var a=n(12),i=n.n(a),o=n(27),r=n.n(o),s=n(49),c=n.n(s),l=n(87),u=(n(1),n(26)),d=n(0),g=function(){return React.createElement(u.a,{id:"permission error",title:Object(d.__)("Permissions issue accessing data","google-site-kit"),description:Object(d.__)("This account does not have access to the requested data.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0})},m=n(165),p=n.n(m),h=n(2),f=n(11),b=n(35),v=n.n(b),k=n(36),_=n(10);function y(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(n,!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return R}));var w="core",R="modules",j=function(){googlesitekit.admin=googlesitekit.admin||{},"string"==typeof googlesitekit.admin.datacache&&(googlesitekit.admin.datacache=JSON.parse(googlesitekit.admin.datacache)),"object"!==c()(googlesitekit.admin.datacache)&&(googlesitekit.admin.datacache={})},E=function(e,t){var n=O({data:{}},e);return n.data=O({dateRange:t},n.data),n},C={maxRequests:10,init:function(){googlesitekit.initialized||(googlesitekit.initialized=!0,this.collectModuleData=this.collectModuleData.bind(this),googlesitekit.cache=[],Object(_.addAction)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingData",this.collectModuleData))},combinedGetFromCache:function(e){var t=this;return new Promise((function(n,a){try{var i=[],o=Object(h.h)();Object(f.each)(e,(function(e){var n=E(e,o);n.key=t.getCacheKey(n.type,n.identifier,n.datapoint,n.data);var a=t.getCache(n.key,n.maxAge);void 0!==a&&(i[n.key]=a,t.resolve(n,a))})),n(i)}catch(e){a()}}))},combinedGet:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=[],i=25,o=Object(h.h)();Object(f.each)(e,(function(e){var n=E(e,o);n.key=t.getCacheKey(n.type,n.identifier,n.datapoint,n.data);var r=t.getCache(n.key,n.maxAge);void 0!==r?(setTimeout((function(){t.resolve(n,r)}),i),i+=25):a.push(n)})),a=Object(f.sortBy)(a,"priority");var r=[],s=[],c={},u=!!a.find((function(e){return e.priority<10}));Object(f.each)(a,(function(e,t){!n&&10<=e.priority&&u?s.push(e):c[e.key]?c[e.key].push(t):(c[e.key]=[t],r.push(e))}));var d=10,m=r.slice(0,d),p=r.slice(d);if(p=p.concat(s),0!==m.length||0!==p.length){0<p.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(p,!0)}),50):this.maxRequests=10;var b=null!==Object(h.l)("datacache");return v()({path:Object(k.addQueryArgs)("/google-site-kit/v1/data/",{datacache:b||void 0}),data:{request:m},method:"POST"}).then((function(e){Object(f.each)(e,(function(e,n){if(e.xdebug_message)console.log("data_error",e.xdebug_message);else{if(!c[n])return void console.log("data_error","unknown response key "+n);e.error_data&&e.error_data[403]&&e.error_data[403].reason&&("insufficientPermissions"===e.error_data[403].reason?Object(_.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",Object(h.g)(l.a),1):"forbidden"===e.error_data[403].reason&&Object(_.addFilter)("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",Object(h.g)(g),1),Object(_.addFilter)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return Object(_.removeFilter)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+1}))),Object(f.each)(c[n],(function(n){var i=a[n];t.setCache(i.key,e),t.resolve(i,e)}))}0===p.length&&Object(_.doAction)("googlesitekit.dataLoaded","api")}))})).catch((function(e){console.log("error",e)}))}Object(_.doAction)("googlesitekit.dataLoaded","cache")},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},setCache:function(e,t){if(void 0!==t&&(!t||"object"!==c()(t)||!t.error&&!t.errors)){j(),googlesitekit.admin.datacache[e]=Object(f.cloneDeep)(t);var n={value:t,date:Date.now()/1e3};Object(h.o)().setItem("googlesitekit_"+e,JSON.stringify(n))}},getCache:function(e,t){if(!googlesitekit.admin.nojscache){if(j(),void 0!==googlesitekit.admin.datacache[e])return googlesitekit.admin.datacache[e];var n=JSON.parse(Object(h.o)().getItem("googlesitekit_"+e));return n&&"object"===c()(n)&&n.date&&(!t||Date.now()/1e3-n.date<t)?(googlesitekit.admin.datacache[e]=Object(f.cloneDeep)(n.value),Object(f.cloneDeep)(googlesitekit.admin.datacache[e])):void 0}},deleteCache:function(e){j(),delete googlesitekit.admin.datacache[e],Object(h.o)().removeItem("googlesitekit_"+e)},invalidateCacheGroup:function(e,t,n){var a=this.getCacheKey(e,t,n);j(),Object.keys(googlesitekit.admin.datacache).forEach((function(e){0!==e.indexOf(a+"::")&&e!==a||delete googlesitekit.admin.datacache[e]})),Object.keys(Object(h.o)()).forEach((function(e){0!==e.indexOf("googlesitekit_"+a+"::")&&e!=="googlesitekit_"+a||Object(h.o)().removeItem(e)}))},collectModuleData:function(e,t){var n=Object(_.applyFilters)("googlesitekit.module"+e+"DataRequest",[],t);0!==n.length&&this.combinedGet(n)},get:function(e,t,n){var a=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.getCacheKey(e,t,n,i);if(!o){var s=this.getCache(r,3600);if(void 0!==s)return new Promise((function(e){e(s)}))}return v()({path:Object(k.addQueryArgs)("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),i)}).then((function(e){return o||a.setCache(r,e),new Promise((function(t){t(e)}))})).catch((function(e){return Promise.reject(e)}))},getNotifications:function(e){var t,n,a,o=arguments;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=o.length>1&&void 0!==o[1]?o[1]:0,n=[],e){r.next=4;break}return r.abrupt("return",n);case 4:if(a=this.getCacheKey("modules",e,"notifications"),(n=C.getCache(a,t))&&0!==n.length){r.next=11;break}return r.next=9,i.a.awrap(v()({path:"/google-site-kit/v1/modules/".concat(e,"/notifications/")}));case 9:n=r.sent,C.setCache(a,n);case 11:return r.abrupt("return",n);case 12:case"end":return r.stop()}}),null,this)},set:function(e,t,n,a){var i={};return i.data=a,v()({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),data:i,method:"POST"}).then((function(a){return C.invalidateCacheGroup(e,t,n),new Promise((function(e){e(a)}))}))},getCacheKey:function(e,t,n){for(var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=[],o=[e,t,n],r=0,s=o;r<s.length;r++){var l=s[r];if(!l||!l.length)break;i.push(l)}return 3===i.length&&a&&"object"===c()(a)&&Object.keys(a).length&&i.push(p()(JSON.stringify(Object(h.x)(a)))),i.join("::")},setModuleActive:function(e,t){return v()({path:"/google-site-kit/v1/modules/".concat(e),data:{active:t},method:"POST"}).then((function(e){return new Promise((function(t){t(e)}))})).catch((function(e){return Promise.reject(e)}))}};C.init();t.c=C}}]);
|
dist/assets/js/googlesitekit-admin.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function r(r){for(var o,i,u=r[0],a=r[1],c=r[2],l=0,s=[];l<u.length;l++)i=u[l],n[i]&&s.push(n[i][0]),n[i]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(p&&p(r);s.length;)s.shift()();return _.push.apply(_,c||[]),t()}function t(){for(var e,r=0;r<_.length;r++){for(var t=_[r],o=!0,i=1;i<t.length;i++){var u=t[i];0!==n[u]&&(o=!1)}o&&(_.splice(r--,1),e=__webpack_require__(__webpack_require__.s=t[0]))}return e}var o={},n={8:0},_=[];function __webpack_require__(r){if(o[r])return o[r].exports;var t=o[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}__webpack_require__.m=e,__webpack_require__.c=o,__webpack_require__.d=function(e,r,t){__webpack_require__.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,r){if(1&r&&(e=__webpack_require__(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(__webpack_require__.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)__webpack_require__.d(t,o,function(r){return e[r]}.bind(null,o));return t},__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="";var i=window.webpackJsonp=window.webpackJsonp||[],u=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=u;_.push([
|
1 |
+
!function(e){function r(r){for(var o,i,u=r[0],a=r[1],c=r[2],l=0,s=[];l<u.length;l++)i=u[l],n[i]&&s.push(n[i][0]),n[i]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(p&&p(r);s.length;)s.shift()();return _.push.apply(_,c||[]),t()}function t(){for(var e,r=0;r<_.length;r++){for(var t=_[r],o=!0,i=1;i<t.length;i++){var u=t[i];0!==n[u]&&(o=!1)}o&&(_.splice(r--,1),e=__webpack_require__(__webpack_require__.s=t[0]))}return e}var o={},n={8:0},_=[];function __webpack_require__(r){if(o[r])return o[r].exports;var t=o[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}__webpack_require__.m=e,__webpack_require__.c=o,__webpack_require__.d=function(e,r,t){__webpack_require__.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,r){if(1&r&&(e=__webpack_require__(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(__webpack_require__.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)__webpack_require__.d(t,o,function(r){return e[r]}.bind(null,o));return t},__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="";var i=window.webpackJsonp=window.webpackJsonp||[],u=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=u;_.push([185,0,1]),t()}({0:function(e,r){e.exports=wp.i18n},1:function(e,r){e.exports=wp.element},10:function(e,r){e.exports=wp.hooks},11:function(e,r){e.exports=lodash},18:function(e,r){e.exports=React},185:function(e,r,t){"use strict";t.r(r);var o=t(2);if("toplevel_page_googlesitekit-dashboard"!==window.pagenow&&"site-kit_page_googlesitekit-splash"!==window.pagenow&&"admin_page_googlesitekit-splash"!==window.pagenow&&window.localStorage){var n=window.localStorage.getItem("googlesitekit::total-notifications")||0;Object(o.b)(n)}var _=document.querySelector("#wp-admin-bar-logout a");_||(_=document.querySelector(".sidebar__me-signout button")),_&&_.addEventListener("click",(function(){Object(o.d)()}))},35:function(e,r){e.exports=wp.apiFetch},36:function(e,r){e.exports=wp.url},50:function(e,r){e.exports=ReactDOM}});
|
dist/assets/js/googlesitekit-adminbar-loader.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(t){for(var n,a,c=t[0],u=t[1],s=t[2],l=0,p=[];l<c.length;l++)a=c[l],
|
1 |
+
!function(e){function t(t){for(var n,a,c=t[0],u=t[1],s=t[2],l=0,p=[];l<c.length;l++)a=c[l],o[a]&&p.push(o[a][0]),o[a]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(_&&_(t);p.length;)p.shift()();return i.push.apply(i,s||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var n={},o={9:0},i=[];function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,__webpack_require__.nc&&a.setAttribute("nonce",__webpack_require__.nc),a.src=function(e){return __webpack_require__.p+""+({4:"chunk-googlesitekit-adminbar"}[e]||e)+".js"}(e),i=function(t){a.onerror=a.onload=null,clearTimeout(c);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src,u=new Error("Loading chunk "+e+" failed.\n("+n+": "+i+")");u.type=n,u.request=i,r[1](u)}o[e]=void 0}};var c=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(t)},__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__.oe=function(e){throw console.error(e),e};var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var _=c;i.push([184,0,1]),r()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},18:function(e,t){e.exports=React},184:function(e,t,r){"use strict";r.r(t);var n=r(2);window.googlesitekitAdminbar&&window.googlesitekitAdminbar.publicPath&&(r.p=window.googlesitekitAdminbar.publicPath);var o=!1;function i(){r.e(4).then(r.bind(null,208)).then((function(e){return e})).catch((function(){return new Error("Site Kit: An error occurred while loading the Adminbar component files.")})).then((function(e){try{e.init()}catch(e){console.error("Site Kit: An error occurred while loading the Adminbar components."),document.getElementById("js-googlesitekit-adminbar").classList.add("googlesitekit-adminbar--has-error")}document.getElementById("js-googlesitekit-adminbar").classList.remove("googlesitekit-adminbar--loading")}))}window.addEventListener("load",(function(){var e=document.getElementById("wp-admin-bar-google-site-kit"),t=!1;if(e&&window.localStorage){var r=window.localStorage.getItem("googlesitekit::total-notifications")||0;Object(n.b)(r);var a=function(){if(!o){if(window.googlesitekitTrackingEnabled)if("undefined"!=typeof gtag||t)Object(n.v)("admin_bar","page_stats_view");else{t=!0;var e=document.createElement("script");e.type="text/javascript",e.setAttribute("async","true"),e.onload=function(){window.gtag=function(){window.dataLayer.push(arguments)},Object(n.v)("admin_bar","page_stats_view")},e.setAttribute("src","https://www.googletagmanager.com/gtag/js?id=".concat(googlesitekit.admin.trackingID)),document.head.appendChild(e)}var r=window.googlesitekitAdminbar.properties.isAdmin,a=r&&window.googlesitekit.admin.currentScreen&&"post"===window.googlesitekit.admin.currentScreen.id,c="".concat(window.googlesitekitAdminbar.publicPath,"allmodules.js"),u=document.querySelector('script[src="'.concat(c,'"]'));if(!r||r&&a&&!u){var _=document.createElement("script");_.type="text/javascript",_.onload=function(){_.onload=null,i()},document.getElementsByTagName("head")[0].appendChild(_),_.src=c,o=!0}else i(),o=!0}};"true"===Object(n.l)("googlesitekit_adminbar_open")?(a(),e.classList.add("hover")):e.addEventListener("mouseenter",a,!1)}}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
dist/assets/js/googlesitekit-dashboard-details.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(t){for(var a,i,o=t[0],c=t[1],s=t[2],_=0,d=[];_<o.length;_++)i=o[_],n[i]&&d.push(n[i][0]),n[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(u&&u(t);d.length;)d.shift()();return l.push.apply(l,s||[]),r()}function r(){for(var e,t=0;t<l.length;t++){for(var r=l[t],a=!0,i=1;i<r.length;i++){var o=r[i];0!==n[o]&&(a=!1)}a&&(l.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var a={},n={11:0},l=[];function __webpack_require__(t){if(a[t])return a[t].exports;var r=a[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=a,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)__webpack_require__.d(r,a,function(t){return e[t]}.bind(null,a));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var i=window.webpackJsonp=window.webpackJsonp||[],o=i.push.bind(i);i.push=t,i=i.slice();for(var c=0;c<i.length;c++)t(i[c]);var u=o;l.push([
|
1 |
+
!function(e){function t(t){for(var a,i,o=t[0],c=t[1],s=t[2],_=0,d=[];_<o.length;_++)i=o[_],n[i]&&d.push(n[i][0]),n[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(u&&u(t);d.length;)d.shift()();return l.push.apply(l,s||[]),r()}function r(){for(var e,t=0;t<l.length;t++){for(var r=l[t],a=!0,i=1;i<r.length;i++){var o=r[i];0!==n[o]&&(a=!1)}a&&(l.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var a={},n={11:0},l=[];function __webpack_require__(t){if(a[t])return a[t].exports;var r=a[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=a,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)__webpack_require__.d(r,a,function(t){return e[t]}.bind(null,a));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var i=window.webpackJsonp=window.webpackJsonp||[],o=i.push.bind(i);i.push=t,i=i.slice();for(var c=0;c<i.length;c++)t(i[c]);var u=o;l.push([205,0,1]),r()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},18:function(e,t){e.exports=React},205:function(e,t,r){"use strict";r.r(t);var a=r(3),n=r.n(a),l=r(4),i=r.n(l),o=r(5),c=r.n(o),u=r(6),s=r.n(u),_=r(7),d=r.n(_),p=r(1),m=r(26),g=r(39),f=r.n(g),h=r(0),b=r(10),k=r(21),y=function(e){function t(){return n()(this,t),c()(this,s()(t).apply(this,arguments))}return d()(t,e),i()(t,[{key:"render",value:function(){return null}}]),t}(p.Component),v=Object(k.a)("googlesitekit.DashboardDetailsModule")(y),w=function(e){function t(){return n()(this,t),c()(this,s()(t).apply(this,arguments))}return d()(t,e),i()(t,[{key:"render",value:function(){return React.createElement(v,{key:"googlesitekit-dashboard-details-module"})}}]),t}(p.Component),E=r(43),R=r(14),q=r(47),O=r(17),j=r(2),x=r(69),N=r(42),D=function(e){function t(e){var r;return n()(this,t),(r=c()(this,s()(t).call(this,e))).state={},r}return d()(t,e),i()(t,[{key:"render",value:function(){return React.createElement(p.Fragment,null,React.createElement(E.a,null),React.createElement("div",{className:"googlesitekit-module-page"},React.createElement("div",{className:"googlesitekit-dashboard-single-url"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-8-desktop "},React.createElement(R.a,{href:googlesitekit.dashboardPermalink,inherit:!0,back:!0,small:!0},Object(h.__)("Back to the Site Kit Dashboard","google-site-kit")),React.createElement(q.a,{title:Object(h.__)("Detailed Page Stats","google-site-kit"),className:" googlesitekit-heading-2 googlesitekit-dashboard-single-url__heading ",fullWidth:!0})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--align-right mdc-layout-grid__cell--align-bottom "},React.createElement(x.a,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(O.a,null,React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-dashboard-single-url__title "},Object(j.e)(googlesitekit.pageTitle)),React.createElement(R.a,{href:googlesitekit.permaLink,inherit:!0,external:!0},googlesitekit.permaLink)))))),React.createElement(w,null),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(N.a,null)))))))}}]),t}(p.Component),S=function(e){function t(e){var r;return n()(this,t),(r=c()(this,s()(t).call(this,e))).state={hasError:!1},Object(h.setLocaleData)(googlesitekit.locale,"google-site-kit"),r}return d()(t,e),i()(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"render",value:function(){var e=this.state,t=e.hasError,r=e.error,a=e.info;return t?React.createElement(m.a,{id:"googlesitekit-error",key:"googlesitekit-error",title:r,description:a.componentStack,dismiss:"",isDismissable:!1,format:"small",type:"win-error"}):React.createElement(D,null)}}]),t}(p.Component);f()((function(){var e=document.getElementById("js-googlesitekit-dashboard-details");null!==e&&(Object(p.render)(React.createElement(S,null),e),Object(b.doAction)("googlesitekit.moduleLoaded","Dashboard"))}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},39:function(e,t){e.exports=wp.domReady},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
dist/assets/js/googlesitekit-dashboard-splash.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(t){for(var n,r,c=t[0],s=t[1],u=t[2],g=0,d=[];g<c.length;g++)r=c[g],i[r]&&d.push(i[r][0]),i[r]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);d.length;)d.shift()();return a.push.apply(a,u||[]),o()}function o(){for(var e,t=0;t<a.length;t++){for(var o=a[t],n=!0,r=1;r<o.length;r++){var c=o[r];0!==i[c]&&(n=!1)}n&&(a.splice(t--,1),e=__webpack_require__(__webpack_require__.s=o[0]))}return e}var n={},i={12:0},a=[];function __webpack_require__(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}__webpack_require__.e=function(e){var t=[],o=i[e];if(0!==o)if(o)t.push(o[2]);else{var n=new Promise((function(t,n){o=i[e]=[t,n]}));t.push(o[2]=n);var a,r=document.createElement("script");r.charset="utf-8",r.timeout=120,__webpack_require__.nc&&r.setAttribute("nonce",__webpack_require__.nc),r.src=function(e){return __webpack_require__.p+""+({5:"chunk-googlesitekit-setup-wizard",6:"chunk-googlesitekit-setup-wizard-proxy",7:"chunk-googlesitekit-setup-wrapper"}[e]||e)+".js"}(e),a=function(t){r.onerror=r.onload=null,clearTimeout(c);var o=i[e];if(0!==o){if(o){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src,s=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");s.type=n,s.request=a,o[1](s)}i[e]=void 0}};var c=setTimeout((function(){a({type:"timeout",target:r})}),12e4);r.onerror=r.onload=a,document.head.appendChild(r)}return Promise.all(t)},__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,o){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(__webpack_require__.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(o,n,function(t){return e[t]}.bind(null,n));return o},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],c=r.push.bind(r);r.push=t,r=r.slice();for(var s=0;s<r.length;s++)t(r[s]);var l=c;a.push([201,0,1]),o()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},18:function(e,t){e.exports=React},201:function(e,t,o){"use strict";o.r(t);var n=o(3),i=o.n(n),a=o(4),r=o.n(a),c=o(5),s=o.n(c),l=o(6),u=o.n(l),g=o(7),d=o.n(g),p=o(1),_=o(2),m=o(26),h=o(39),k=o.n(h),b=o(0),f=o(10),y=o(13),v=o.n(y),w=o(29),R=o(80),E=o(8),j=o.n(E),O=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,o=e.description,n=e.buttonLabel,i=e.onButtonClick,a=n&&i,r="mdc-layout-grid__cell mdc-layout-grid__cell--span-".concat(a?"4":"8","-tablet mdc-layout-grid__cell--span-").concat(a?"6":"12","-desktop");return React.createElement("section",{className:"googlesitekit-splash-intro"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:r},React.createElement(R.a,null),React.createElement("h1",{className:"googlesitekit-splash-intro__title"},t),o&&React.createElement("p",{className:"googlesitekit-splash-intro__text"},o)),a&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-tablet mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--start-5-tablet mdc-layout-grid__cell--start-7-desktop mdc-layout-grid__cell--offset-1 "},React.createElement("div",{className:"googlesitekit-splash-intro__button"},React.createElement(w.a,{onClick:i},n))))))}}]),t}(p.Component);O.propTypes={title:j.a.string,description:j.a.string,buttonLabel:j.a.string,onButtonClick:j.a.func},O.defaultProps={title:Object(b.__)("Welcome to Site Kit.","google-site-kit")};var S=O,N=o(14),C=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){var e=googlesitekit.admin.assetsRoot+"images/",t=this.props,o=t.image,n=t.title,i=t.content,a=t.link,r=t.linkText,c=t.opposite;return React.createElement("div",{className:"googlesitekit-splash-service ".concat(c?"googlesitekit-splash-service--opposite":""),style:{backgroundImage:"url(".concat(e,"service-").concat(o,".jpg)")}},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"\n\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-5-tablet\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-7-desktop\n\t\t\t\t\t\t\t".concat(c?"mdc-layout-grid__cell--start-3-tablet mdc-layout-grid__cell--start-5-desktop mdc-layout-grid__cell--offset-5-tablet":"","\n\t\t\t\t\t\t")},React.createElement("div",{className:"googlesitekit-splash-service__content"},React.createElement("h3",{className:" googlesitekit-heading-2 googlesitekit-splash-service__title "},n),React.createElement("p",{className:"googlesitekit-splash-service__text"},i),React.createElement(N.a,{href:a,caps:!0,external:!0,arrow:!0},r))))))}}]),t}(p.Component);C.propTypes={image:j.a.string,title:j.a.string,content:j.a.string,link:j.a.string,linkText:j.a.string,opposite:j.a.bool},C.defaultProps={image:"",title:"",content:"",link:"",linkText:"",opposite:!1};var x=C,P=o(20),q=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.description,o=e.buttonLabel,n=e.onButtonClick;return React.createElement("section",{className:"googlesitekit-splash-outro"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-splash-outro__logo"},React.createElement(P.a,{id:"logo-g",height:"33",width:"29"})),React.createElement("h3",{className:" googlesitekit-heading-2 googlesitekit-splash-outro__title "},t),o&&n&&React.createElement("div",{className:"googlesitekit-splash-outro__button"},React.createElement(w.a,{onClick:n},o))))))}}]),t}(p.Component);q.propTypes={title:j.a.string,description:j.a.string,buttonLabel:j.a.string,onButtonClick:j.a.func},q.defaultProps={description:Object(b.__)("Bringing the best of Google tools to WordPress.","google-site-kit")};var L=q,W=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.icon,o=e.title,n=e.content;return React.createElement("div",{className:"googlesitekit-splash-module"},React.createElement("div",{className:"googlesitekit-splash-module__logo"},"pagespeed"===t?React.createElement("img",{alt:"PageSpeed Icon",src:googlesitekit.admin.assetsRoot+"images/icon-pagespeed.png"}):React.createElement(P.a,{id:t,width:"33",height:"33"})),React.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-splash-module__title "},o),React.createElement("p",{className:"googlesitekit-splash-module__text"},n))}}]),t}(p.Component);W.propTypes={icon:j.a.string,title:j.a.string,content:j.a.string},W.defaultProps={icon:"",title:"",content:""};var A=W,z=function(e){function t(e){var o;return i()(this,t),(o=s()(this,u()(t).call(this,e))).handleButtonClick=o.handleButtonClick.bind(v()(o)),o}return d()(t,e),r()(t,[{key:"handleButtonClick",value:function(e){e.preventDefault(),this.props.onButtonClick()}},{key:"render",value:function(){var e=this.props,t=e.introDescription,o=e.outroDescription,n=e.buttonLabel,i={searchConsole:{icon:"search-console",title:Object(b._x)("Search Console","Service name","google-site-kit"),content:Object(b.__)("Keep track of how people find you in Search, and how many of them visit your site.","google-site-kit")},analytics:{icon:"analytics",title:Object(b._x)("Analytics","Service name","google-site-kit"),content:Object(b.__)("Understand your customers better: track how they navigate across your site and evaluate the performance of your products or posts.","google-site-kit")},adsense:{icon:"adsense",title:Object(b._x)("AdSense","Service name","google-site-kit"),content:Object(b.__)("Make your content work for you -- earning money by placing ads on your site.","google-site-kit")},pagespeed:{icon:"pagespeed",title:Object(b._x)("PageSpeed","Service name","google-site-kit"),content:Object(b.__)("Analyze your site’s performance and get actionable tips to improve its speed across all devices.","google-site-kit")}},a={searchConsole:{image:"analytics",title:Object(b.__)("Get to know your customers.","google-site-kit"),content:Object(b.__)("Google Analytics gives you the free tools you need to analyze data for your business in one place.","google-site-kit"),link:"https://marketingplatform.google.com/about/analytics/",linkText:Object(b.__)("Learn More","google-site-kit")},analytics:{image:"search_console",title:Object(b.__)("You want to be found on the web. We want to help.","google-site-kit"),content:Object(b.__)("Track your site’s search performance with Google Search Console and browse around for more webmaster resources.","google-site-kit"),link:"https://search.google.com/search-console/about",linkText:Object(b._x)("Search Console","Service name","google-site-kit"),opposite:!0}};return React.createElement("div",{className:"googlesitekit-splash"},React.createElement(S,{description:t,buttonLabel:n,onButtonClick:this.handleButtonClick}),React.createElement("section",{className:"googlesitekit-splash__wrapper"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("h2",{className:" googlesitekit-splash__title googlesitekit-subheading-2 "},Object(b.__)("Powerful tools integrated into your WordPress dashboard.","google-site-kit"))),Object.keys(i).map((function(e){return React.createElement("div",{key:i[e].title,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(A,{icon:i[e].icon,title:i[e].title,content:i[e].content}))})))),React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},Object.keys(a).map((function(e){return React.createElement("div",{key:a[e].title,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(x,{image:a[e].image,title:a[e].title,content:a[e].content,link:a[e].link,linkText:a[e].linkText,opposite:a[e].opposite}))}))))),React.createElement(L,{description:o,buttonLabel:n,onButtonClick:this.handleButtonClick}))}}]),t}(p.Component),T=o(21),B=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){return null}}]),t}(p.Component),M=Object(T.a)("googlesitekit.DashboardSplashNotifications")(B),D=o(31),U=o(65),F=(o(157),o(160),1),G=2,I=function(e){function t(e){var o;i()(this,t),o=s()(this,u()(t).call(this,e));var n=googlesitekit.admin.connectURL,a=googlesitekit.setup,r=a.showModuleSetupWizard,c=a.isAuthenticated,l=a.isVerified,g=a.hasSearchConsoleProperty,d=googlesitekit.permissions,p=d.canAuthenticate,_=d.canSetup,m=d.canViewDashboard,h=d.canPublishPosts;return o.state={showAuthenticationSetupWizard:_&&(!c||!l||!g),showModuleSetupWizard:r,canViewDashboard:m,canPublishPosts:h,buttonMode:0,connectURL:n},p&&!c&&(o.state.buttonMode=F),!_||c&&l&&g||(o.state.buttonMode=G),o.openAuthenticationSetupWizard=o.openAuthenticationSetupWizard.bind(v()(o)),o.gotoConnectURL=o.gotoConnectURL.bind(v()(o)),o}return d()(t,e),r()(t,[{key:"openAuthenticationSetupWizard",value:function(){Object(_.v)("plugin_setup","setup_sitekit"),this.setState({showAuthenticationSetupWizard:!0})}},{key:"gotoConnectURL",value:function(){this.setState({showAuthenticationInstructionsWizard:!1,showAuthenticationSetupWizard:!1}),Object(_.v)("plugin_setup","connect_account"),document.location=this.state.connectURL}},{key:"render",value:function(){window.googlesitekit&&window.googlesitekit.publicPath&&(o.p=window.googlesitekit.publicPath);var e=googlesitekit.admin.proxySetupURL;if(!e&&!this.state.showAuthenticationSetupWizard&&!this.state.showModuleSetupWizard){var t,n,i,a;switch(this.state.buttonMode){case F:t=Object(b.__)("You’re one step closer to connecting Google services to your WordPress site.","google-site-kit"),n=Object(b.__)("Connecting your account only takes a few minutes. Faster than brewing a cup of coffee.","google-site-kit"),i=Object(b.__)("Connect your account","google-site-kit"),a=this.gotoConnectURL;break;case G:t=Object(b.__)("You’re one step closer to connecting Google services to your WordPress site.","google-site-kit"),n=Object(b.__)("Setup only takes a few minutes. Faster than brewing a cup of coffee.","google-site-kit"),i=Object(b.__)("Set Up Site Kit","google-site-kit"),a=this.openAuthenticationSetupWizard;break;default:t=this.state.canViewDashboard?Object(b.__)("Start gaining insights on how your site is performing in search by visiting the dashboard.","google-site-kit"):this.state.canPublishPosts?Object(b.__)("Start gaining insights on how your site is performing in search by editing one of your posts.","google-site-kit"):Object(b.__)("Start gaining insights on how your site is performing in search by viewing one of your published posts.","google-site-kit")}return React.createElement(p.Fragment,null,React.createElement(M,null),React.createElement(z,{introDescription:t,outroDescription:n,buttonLabel:i,onButtonClick:a}))}var r=null;return r=e?Object(U.b)((function(){return Promise.all([o.e(0),o.e(6)]).then(o.bind(null,208))})):this.state.showAuthenticationSetupWizard?Object(U.b)((function(){return Promise.all([o.e(0),o.e(5)]).then(o.bind(null,209))})):Object(U.b)((function(){return Promise.all([o.e(0),o.e(7)]).then(o.bind(null,155))})),React.createElement(U.a,{fallback:React.createElement(p.Fragment,null,React.createElement("div",{className:"googlesitekit-setup"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-setup__wrapper"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(D.a,null))))))))))},React.createElement(r,null))}}]),t}(p.Component),V=o(88),K=function(e){function t(e){var o;return i()(this,t),(o=s()(this,u()(t).call(this,e))).state={hasError:!1},Object(b.setLocaleData)(googlesitekit.locale,"google-site-kit"),o}return d()(t,e),r()(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"render",value:function(){var e=this.state,t=e.hasError,o=e.error,n=e.info;return t?React.createElement(m.a,{id:"googlesitekit-error",key:"googlesitekit-error",title:o,description:n.componentStack,dismiss:"",isDismissable:!1,format:"small",type:"win-error"}):React.createElement(p.Fragment,null,React.createElement(V.a,null),React.createElement(I,null))}}]),t}(p.Component);k()((function(){googlesitekit.admin.resetSession&&Object(_.d)();var e=document.getElementById("js-googlesitekit-dashboard-splash");null!==e&&(Object(p.render)(React.createElement(K,null),e),Object(f.doAction)("googlesitekit.moduleLoaded","Splash"))}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},39:function(e,t){e.exports=wp.domReady},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
1 |
+
!function(e){function t(t){for(var n,r,c=t[0],s=t[1],u=t[2],g=0,d=[];g<c.length;g++)r=c[g],i[r]&&d.push(i[r][0]),i[r]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);d.length;)d.shift()();return a.push.apply(a,u||[]),o()}function o(){for(var e,t=0;t<a.length;t++){for(var o=a[t],n=!0,r=1;r<o.length;r++){var c=o[r];0!==i[c]&&(n=!1)}n&&(a.splice(t--,1),e=__webpack_require__(__webpack_require__.s=o[0]))}return e}var n={},i={12:0},a=[];function __webpack_require__(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}__webpack_require__.e=function(e){var t=[],o=i[e];if(0!==o)if(o)t.push(o[2]);else{var n=new Promise((function(t,n){o=i[e]=[t,n]}));t.push(o[2]=n);var a,r=document.createElement("script");r.charset="utf-8",r.timeout=120,__webpack_require__.nc&&r.setAttribute("nonce",__webpack_require__.nc),r.src=function(e){return __webpack_require__.p+""+({5:"chunk-googlesitekit-setup-wizard",6:"chunk-googlesitekit-setup-wizard-proxy",7:"chunk-googlesitekit-setup-wrapper"}[e]||e)+".js"}(e),a=function(t){r.onerror=r.onload=null,clearTimeout(c);var o=i[e];if(0!==o){if(o){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src,s=new Error("Loading chunk "+e+" failed.\n("+n+": "+a+")");s.type=n,s.request=a,o[1](s)}i[e]=void 0}};var c=setTimeout((function(){a({type:"timeout",target:r})}),12e4);r.onerror=r.onload=a,document.head.appendChild(r)}return Promise.all(t)},__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,o){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(__webpack_require__.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(o,n,function(t){return e[t]}.bind(null,n));return o},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__.oe=function(e){throw console.error(e),e};var r=window.webpackJsonp=window.webpackJsonp||[],c=r.push.bind(r);r.push=t,r=r.slice();for(var s=0;s<r.length;s++)t(r[s]);var l=c;a.push([202,0,1]),o()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},18:function(e,t){e.exports=React},202:function(e,t,o){"use strict";o.r(t);var n=o(3),i=o.n(n),a=o(4),r=o.n(a),c=o(5),s=o.n(c),l=o(6),u=o.n(l),g=o(7),d=o.n(g),p=o(1),_=o(2),m=o(26),h=o(39),k=o.n(h),b=o(0),f=o(10),y=o(13),v=o.n(y),w=o(29),R=o(81),E=o(8),j=o.n(E),O=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.title,o=e.description,n=e.buttonLabel,i=e.onButtonClick,a=n&&i,r="mdc-layout-grid__cell mdc-layout-grid__cell--span-".concat(a?"4":"8","-tablet mdc-layout-grid__cell--span-").concat(a?"6":"12","-desktop");return React.createElement("section",{className:"googlesitekit-splash-intro"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:r},React.createElement(R.a,null),React.createElement("h1",{className:"googlesitekit-splash-intro__title"},t),o&&React.createElement("p",{className:"googlesitekit-splash-intro__text"},o)),a&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-tablet mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--start-5-tablet mdc-layout-grid__cell--start-7-desktop mdc-layout-grid__cell--offset-1 "},React.createElement("div",{className:"googlesitekit-splash-intro__button"},React.createElement(w.a,{onClick:i},n))))))}}]),t}(p.Component);O.propTypes={title:j.a.string,description:j.a.string,buttonLabel:j.a.string,onButtonClick:j.a.func},O.defaultProps={title:Object(b.__)("Welcome to Site Kit.","google-site-kit")};var S=O,N=o(14),C=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){var e=googlesitekit.admin.assetsRoot+"images/",t=this.props,o=t.image,n=t.title,i=t.content,a=t.link,r=t.linkText,c=t.opposite;return React.createElement("div",{className:"googlesitekit-splash-service ".concat(c?"googlesitekit-splash-service--opposite":""),style:{backgroundImage:"url(".concat(e,"service-").concat(o,".jpg)")}},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"\n\t\t\t\t\t\t\tmdc-layout-grid__cell\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-5-tablet\n\t\t\t\t\t\t\tmdc-layout-grid__cell--span-7-desktop\n\t\t\t\t\t\t\t".concat(c?"mdc-layout-grid__cell--start-3-tablet mdc-layout-grid__cell--start-5-desktop mdc-layout-grid__cell--offset-5-tablet":"","\n\t\t\t\t\t\t")},React.createElement("div",{className:"googlesitekit-splash-service__content"},React.createElement("h3",{className:" googlesitekit-heading-2 googlesitekit-splash-service__title "},n),React.createElement("p",{className:"googlesitekit-splash-service__text"},i),React.createElement(N.a,{href:a,caps:!0,external:!0,arrow:!0},r))))))}}]),t}(p.Component);C.propTypes={image:j.a.string,title:j.a.string,content:j.a.string,link:j.a.string,linkText:j.a.string,opposite:j.a.bool},C.defaultProps={image:"",title:"",content:"",link:"",linkText:"",opposite:!1};var x=C,P=o(20),q=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.description,o=e.buttonLabel,n=e.onButtonClick;return React.createElement("section",{className:"googlesitekit-splash-outro"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-splash-outro__logo"},React.createElement(P.a,{id:"logo-g",height:"33",width:"29"})),React.createElement("h3",{className:" googlesitekit-heading-2 googlesitekit-splash-outro__title "},t),o&&n&&React.createElement("div",{className:"googlesitekit-splash-outro__button"},React.createElement(w.a,{onClick:n},o))))))}}]),t}(p.Component);q.propTypes={title:j.a.string,description:j.a.string,buttonLabel:j.a.string,onButtonClick:j.a.func},q.defaultProps={description:Object(b.__)("Bringing the best of Google tools to WordPress.","google-site-kit")};var L=q,W=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){var e=this.props,t=e.icon,o=e.title,n=e.content;return React.createElement("div",{className:"googlesitekit-splash-module"},React.createElement("div",{className:"googlesitekit-splash-module__logo"},"pagespeed"===t?React.createElement("img",{alt:"PageSpeed Icon",src:googlesitekit.admin.assetsRoot+"images/icon-pagespeed.png"}):React.createElement(P.a,{id:t,width:"33",height:"33"})),React.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-splash-module__title "},o),React.createElement("p",{className:"googlesitekit-splash-module__text"},n))}}]),t}(p.Component);W.propTypes={icon:j.a.string,title:j.a.string,content:j.a.string},W.defaultProps={icon:"",title:"",content:""};var A=W,z=function(e){function t(e){var o;return i()(this,t),(o=s()(this,u()(t).call(this,e))).handleButtonClick=o.handleButtonClick.bind(v()(o)),o}return d()(t,e),r()(t,[{key:"handleButtonClick",value:function(e){e.preventDefault(),this.props.onButtonClick()}},{key:"render",value:function(){var e=this.props,t=e.introDescription,o=e.outroDescription,n=e.buttonLabel,i={searchConsole:{icon:"search-console",title:Object(b._x)("Search Console","Service name","google-site-kit"),content:Object(b.__)("Keep track of how people find you in Search, and how many of them visit your site.","google-site-kit")},analytics:{icon:"analytics",title:Object(b._x)("Analytics","Service name","google-site-kit"),content:Object(b.__)("Understand your customers better: track how they navigate across your site and evaluate the performance of your products or posts.","google-site-kit")},adsense:{icon:"adsense",title:Object(b._x)("AdSense","Service name","google-site-kit"),content:Object(b.__)("Make your content work for you -- earning money by placing ads on your site.","google-site-kit")},pagespeed:{icon:"pagespeed",title:Object(b._x)("PageSpeed","Service name","google-site-kit"),content:Object(b.__)("Analyze your site’s performance and get actionable tips to improve its speed across all devices.","google-site-kit")}},a={searchConsole:{image:"analytics",title:Object(b.__)("Get to know your customers.","google-site-kit"),content:Object(b.__)("Google Analytics gives you the free tools you need to analyze data for your business in one place.","google-site-kit"),link:"https://marketingplatform.google.com/about/analytics/",linkText:Object(b.__)("Learn More","google-site-kit")},analytics:{image:"search_console",title:Object(b.__)("You want to be found on the web. We want to help.","google-site-kit"),content:Object(b.__)("Track your site’s search performance with Google Search Console and browse around for more webmaster resources.","google-site-kit"),link:"https://search.google.com/search-console/about",linkText:Object(b._x)("Search Console","Service name","google-site-kit"),opposite:!0}};return React.createElement("div",{className:"googlesitekit-splash"},React.createElement(S,{description:t,buttonLabel:n,onButtonClick:this.handleButtonClick}),React.createElement("section",{className:"googlesitekit-splash__wrapper"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("h2",{className:" googlesitekit-splash__title googlesitekit-subheading-2 "},Object(b.__)("Powerful tools integrated into your WordPress dashboard.","google-site-kit"))),Object.keys(i).map((function(e){return React.createElement("div",{key:i[e].title,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},React.createElement(A,{icon:i[e].icon,title:i[e].title,content:i[e].content}))})))),React.createElement("section",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},Object.keys(a).map((function(e){return React.createElement("div",{key:a[e].title,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(x,{image:a[e].image,title:a[e].title,content:a[e].content,link:a[e].link,linkText:a[e].linkText,opposite:a[e].opposite}))}))))),React.createElement(L,{description:o,buttonLabel:n,onButtonClick:this.handleButtonClick}))}}]),t}(p.Component),T=o(21),B=function(e){function t(){return i()(this,t),s()(this,u()(t).apply(this,arguments))}return d()(t,e),r()(t,[{key:"render",value:function(){return null}}]),t}(p.Component),M=Object(T.a)("googlesitekit.DashboardSplashNotifications")(B),D=o(31),U=o(65),F=(o(158),o(161),1),G=2,I=function(e){function t(e){var o;i()(this,t),o=s()(this,u()(t).call(this,e));var n=googlesitekit.admin.connectURL,a=googlesitekit.setup,r=a.showModuleSetupWizard,c=a.isAuthenticated,l=a.isVerified,g=a.hasSearchConsoleProperty,d=googlesitekit.permissions,p=d.canAuthenticate,_=d.canSetup,m=d.canViewDashboard,h=d.canPublishPosts;return o.state={showAuthenticationSetupWizard:_&&(!c||!l||!g),showModuleSetupWizard:r,canViewDashboard:m,canPublishPosts:h,buttonMode:0,connectURL:n},p&&!c&&(o.state.buttonMode=F),!_||c&&l&&g||(o.state.buttonMode=G),o.openAuthenticationSetupWizard=o.openAuthenticationSetupWizard.bind(v()(o)),o.gotoConnectURL=o.gotoConnectURL.bind(v()(o)),o}return d()(t,e),r()(t,[{key:"openAuthenticationSetupWizard",value:function(){Object(_.v)("plugin_setup","setup_sitekit"),this.setState({showAuthenticationSetupWizard:!0})}},{key:"gotoConnectURL",value:function(){this.setState({showAuthenticationInstructionsWizard:!1,showAuthenticationSetupWizard:!1}),Object(_.v)("plugin_setup","connect_account"),document.location=this.state.connectURL}},{key:"render",value:function(){window.googlesitekit&&window.googlesitekit.publicPath&&(o.p=window.googlesitekit.publicPath);var e=googlesitekit.admin.proxySetupURL;if(!e&&!this.state.showAuthenticationSetupWizard&&!this.state.showModuleSetupWizard){var t,n,i,a;switch(this.state.buttonMode){case F:t=Object(b.__)("You’re one step closer to connecting Google services to your WordPress site.","google-site-kit"),n=Object(b.__)("Connecting your account only takes a few minutes. Faster than brewing a cup of coffee.","google-site-kit"),i=Object(b.__)("Connect your account","google-site-kit"),a=this.gotoConnectURL;break;case G:t=Object(b.__)("You’re one step closer to connecting Google services to your WordPress site.","google-site-kit"),n=Object(b.__)("Setup only takes a few minutes. Faster than brewing a cup of coffee.","google-site-kit"),i=Object(b.__)("Set Up Site Kit","google-site-kit"),a=this.openAuthenticationSetupWizard;break;default:t=this.state.canViewDashboard?Object(b.__)("Start gaining insights on how your site is performing in search by visiting the dashboard.","google-site-kit"):this.state.canPublishPosts?Object(b.__)("Start gaining insights on how your site is performing in search by editing one of your posts.","google-site-kit"):Object(b.__)("Start gaining insights on how your site is performing in search by viewing one of your published posts.","google-site-kit")}return React.createElement(p.Fragment,null,React.createElement(M,null),React.createElement(z,{introDescription:t,outroDescription:n,buttonLabel:i,onButtonClick:a}))}var r=null;return r=e?Object(U.b)((function(){return Promise.all([o.e(0),o.e(6)]).then(o.bind(null,209))})):this.state.showAuthenticationSetupWizard?Object(U.b)((function(){return Promise.all([o.e(0),o.e(5)]).then(o.bind(null,210))})):Object(U.b)((function(){return Promise.all([o.e(0),o.e(7)]).then(o.bind(null,156))})),React.createElement(U.a,{fallback:React.createElement(p.Fragment,null,React.createElement("div",{className:"googlesitekit-setup"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-setup__wrapper"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(D.a,null))))))))))},React.createElement(r,null))}}]),t}(p.Component),V=o(89),K=function(e){function t(e){var o;return i()(this,t),(o=s()(this,u()(t).call(this,e))).state={hasError:!1},Object(b.setLocaleData)(googlesitekit.locale,"google-site-kit"),o}return d()(t,e),r()(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"render",value:function(){var e=this.state,t=e.hasError,o=e.error,n=e.info;return t?React.createElement(m.a,{id:"googlesitekit-error",key:"googlesitekit-error",title:o,description:n.componentStack,dismiss:"",isDismissable:!1,format:"small",type:"win-error"}):React.createElement(p.Fragment,null,React.createElement(V.a,null),React.createElement(I,null))}}]),t}(p.Component);k()((function(){googlesitekit.admin.resetSession&&Object(_.d)();var e=document.getElementById("js-googlesitekit-dashboard-splash");null!==e&&(Object(p.render)(React.createElement(K,null),e),Object(f.doAction)("googlesitekit.moduleLoaded","Splash"))}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},39:function(e,t){e.exports=wp.domReady},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
dist/assets/js/googlesitekit-dashboard.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(t){for(var r,l,o=t[0],c=t[1],s=t[2],d=0,m=[];d<o.length;d++)l=o[d],a[l]&&m.push(a[l][0]),a[l]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(u&&u(t);m.length;)m.shift()();return i.push.apply(i,s||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,l=1;l<n.length;l++){var o=n[l];0!==a[o]&&(r=!1)}r&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=n[0]))}return e}var r={},a={10:0},i=[];function __webpack_require__(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var l=window.webpackJsonp=window.webpackJsonp||[],o=l.push.bind(l);l.push=t,l=l.slice();for(var c=0;c<l.length;c++)t(l[c]);var u=o;i.push([
|
1 |
+
!function(e){function t(t){for(var r,l,o=t[0],c=t[1],s=t[2],d=0,m=[];d<o.length;d++)l=o[d],a[l]&&m.push(a[l][0]),a[l]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(u&&u(t);m.length;)m.shift()();return i.push.apply(i,s||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,l=1;l<n.length;l++){var o=n[l];0!==a[o]&&(r=!1)}r&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=n[0]))}return e}var r={},a={10:0},i=[];function __webpack_require__(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var l=window.webpackJsonp=window.webpackJsonp||[],o=l.push.bind(l);l.push=t,l=l.slice();for(var c=0;c<l.length;c++)t(l[c]);var u=o;i.push([203,0,1]),n()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},156:function(e,t,n){"use strict";n.r(t);var r=n(13),a=n.n(r),i=n(3),l=n.n(i),o=n(4),c=n.n(o),u=n(5),s=n.n(u),d=n(6),m=n.n(d),_=n(7),p=n.n(_),f=n(1),g=n(11),h=n(43),y=n(14),v=n(42),k=n(2),b=n(21),R=n(0),E=n(10),w=function(e){function t(){return l()(this,t),s()(this,m()(t).apply(this,arguments))}return p()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.children;return React.createElement(f.Fragment,null,e)}}]),t}(f.Component),S=function(e){function t(e){var n;l()(this,t),n=s()(this,m()(t).call(this,e));var r=googlesitekit.setup.moduleToSetup;return n.state={currentModule:r,refresh:!1},n.timeoutID=null,n.unfocusedTime=0,n.autoRefreshModules=Object(E.applyFilters)("googlesitekit.autoRefreshModules",[]),n.moduleRefresh=n.autoRefreshModules.find((function(e){return n.state.currentModule===e.identifier})),n.refreshStatus=n.refreshStatus.bind(a()(n)),n.startUnfocusedTimer=n.startUnfocusedTimer.bind(a()(n)),n}return p()(t,e),c()(t,[{key:"componentDidMount",value:function(){window.addEventListener("focus",this.refreshStatus),window.addEventListener("blur",this.startUnfocusedTimer)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("focus",this.refreshStatus),window.removeEventListener("blur",this.startUnfocusedTimer)}},{key:"startUnfocusedTimer",value:function(){var e=this;if(this.moduleRefresh){var t=!0;this.moduleRefresh.toRefresh&&(t=this.moduleRefresh.toRefresh()),t&&(this.timeoutID=window.setInterval((function(){e.unfocusedTime++}),1e3))}}},{key:"refreshStatus",value:function(){if(this.moduleRefresh){var e=this.moduleRefresh.idleTime||15,t=!0;this.moduleRefresh.toRefresh&&(t=this.moduleRefresh.toRefresh()),t&&(e<this.unfocusedTime&&this.setState({refresh:this.timeoutID}),window.clearTimeout(this.timeoutID),this.unfocusedTime=0,this.timeoutID=null)}}},{key:"render",value:function(){var e=this.state.currentModule,n=t.loadSetupModule(e),r=Object(k.n)("googlesitekit-settings",{});return React.createElement(f.Fragment,null,React.createElement(h.a,null),React.createElement("div",{className:"googlesitekit-setup"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("section",{className:"googlesitekit-setup__wrapper"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("p",{className:" googlesitekit-setup__intro-title googlesitekit-overline "},Object(R.__)("Connect Service","google-site-kit")),n))),React.createElement("div",{className:"googlesitekit-setup__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},React.createElement(y.a,{id:"setup-".concat(e,"-cancel"),href:r},Object(R.__)("Cancel","google-site-kit"))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--align-right "},React.createElement(v.a,null)))))))))))}}],[{key:"loadSetupModule",value:function(e){var n=Object(b.a)("googlesitekit.ModuleSetup-".concat(e))(w);return React.createElement(n,{finishSetup:t.finishSetup,onSettingsPage:!1,isEditing:!0})}},{key:"finishSetup",value:function(){var e={notification:"authentication_success"};googlesitekit.setup&&googlesitekit.setup.moduleToSetup&&(e.slug=googlesitekit.setup.moduleToSetup);var t=Object(k.n)("googlesitekit-dashboard",e);Object(g.delay)((function(){window.location.replace(t)}),500,"later")}}]),t}(f.Component);t.default=S},18:function(e,t){e.exports=React},203:function(e,t,n){"use strict";n.r(t);var r=n(3),a=n.n(r),i=n(4),l=n.n(i),o=n(5),c=n.n(o),u=n(6),s=n.n(u),d=n(7),m=n.n(d),_=n(1),p=n(2),f=n(26),g=n(156),h=n(43),y=n(69),v=n(47),k=(n(158),n(161),n(0)),b=n(21),R=function(e){function t(){return a()(this,t),c()(this,s()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){return null}}]),t}(_.Component),E=Object(b.a)("googlesitekit.DashboardModule")(R),w=n(42),S=n(18),O=function(e){function t(){return a()(this,t),c()(this,s()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){return React.createElement(S.Fragment,null,React.createElement(E,{key:"googlesitekit-dashboard-module"}),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(w.a,null)))}}]),t}(_.Component),j=function(e){function t(){return a()(this,t),c()(this,s()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){return React.createElement(_.Fragment,null,React.createElement(O,null))}}]),t}(_.Component),N=function(e){function t(){return a()(this,t),c()(this,s()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){return null}}]),t}(_.Component),q=Object(b.a)("googlesitekit.DashboardNotifications")(N),M=function(e){function t(){return a()(this,t),c()(this,s()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"render",value:function(){return React.createElement(_.Fragment,null,React.createElement(h.a,null),React.createElement(q,null),React.createElement("div",{className:"googlesitekit-module-page"},React.createElement("div",{className:"googlesitekit-dashboard"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-10-desktop mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-2-phone "},React.createElement(v.a,{className:" googlesitekit-heading-2 googlesitekit-dashboard__heading ",title:Object(k.__)("Site Overview","google-site-kit")})),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-desktop mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right "},React.createElement(y.a,null)),React.createElement(j,null))))))}}]),t}(_.Component),T=n(89),x=n(39),D=n.n(x),C=n(10),F=function(e){function t(e){var n;return a()(this,t),(n=c()(this,s()(t).call(this,e))).state={hasError:!1},Object(k.setLocaleData)(googlesitekit.locale,"google-site-kit"),n}return m()(t,e),l()(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"render",value:function(){if(window.googlesitekit.setup.showModuleSetupWizard)return React.createElement(g.default,null);var e=this.state,t=e.hasError,n=e.error,r=e.info;return t?React.createElement(f.a,{id:"googlesitekit-error",key:"googlesitekit-error",title:n,description:r.componentStack,dismiss:"",isDismissable:!1,format:"small",type:"win-error"}):React.createElement(_.Fragment,null,React.createElement(T.a,null),React.createElement(M,null))}}]),t}(_.Component);D()((function(){googlesitekit.admin.resetSession&&Object(p.d)();var e=document.getElementById("js-googlesitekit-dashboard");null!==e&&(Object(_.render)(React.createElement(F,null),e),Object(C.doAction)("googlesitekit.moduleLoaded","Dashboard"))}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},39:function(e,t){e.exports=wp.domReady},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
dist/assets/js/googlesitekit-module.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(t){for(var n,a,c=t[0],u=t[1],_=t[2],s=0,p=[];s<c.length;s++)a=c[s],o[a]&&p.push(o[a][0]),o[a]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(l&&l(t);p.length;)p.shift()();return i.push.apply(i,_||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var n={},o={13:0},i=[];function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,__webpack_require__.nc&&a.setAttribute("nonce",__webpack_require__.nc),a.src=function(e){return __webpack_require__.p+""+({7:"chunk-googlesitekit-setup-wrapper"}[e]||e)+".js"}(e),i=function(t){a.onerror=a.onload=null,clearTimeout(c);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src,u=new Error("Loading chunk "+e+" failed.\n("+n+": "+i+")");u.type=n,u.request=i,r[1](u)}o[e]=void 0}};var c=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(t)},__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__.oe=function(e){throw console.error(e),e};var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var l=c;i.push([
|
1 |
+
!function(e){function t(t){for(var n,a,c=t[0],u=t[1],_=t[2],s=0,p=[];s<c.length;s++)a=c[s],o[a]&&p.push(o[a][0]),o[a]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(l&&l(t);p.length;)p.shift()();return i.push.apply(i,_||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var n={},o={13:0},i=[];function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,__webpack_require__.nc&&a.setAttribute("nonce",__webpack_require__.nc),a.src=function(e){return __webpack_require__.p+""+({7:"chunk-googlesitekit-setup-wrapper"}[e]||e)+".js"}(e),i=function(t){a.onerror=a.onload=null,clearTimeout(c);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src,u=new Error("Loading chunk "+e+" failed.\n("+n+": "+i+")");u.type=n,u.request=i,r[1](u)}o[e]=void 0}};var c=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(t)},__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__.oe=function(e){throw console.error(e),e};var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var l=c;i.push([206,0,1]),r()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},18:function(e,t){e.exports=React},206:function(e,t,r){"use strict";r.r(t);var n=r(3),o=r.n(n),i=r(4),a=r.n(i),c=r(5),u=r.n(c),l=r(6),_=r.n(l),s=r(7),p=r.n(s),d=r(1),f=r(31),m=r(26),g=(r(9),r(39)),b=r.n(g),w=r(0),k=r(10),h=r(65),v=r(21),y=function(e){function t(){return o()(this,t),u()(this,_()(t).apply(this,arguments))}return p()(t,e),a()(t,[{key:"render",value:function(){return null}}]),t}(d.Component),q=Object(v.a)("googlesitekit.ModuleApp-"+googlesitekitCurrentModule.slug)(y),E=function(e){function t(e){var r;o()(this,t),(r=u()(this,_()(t).call(this,e))).state={hasError:!1},Object(w.setLocaleData)(googlesitekit.locale,"google-site-kit");var n=googlesitekit.setup.showModuleSetupWizard;return r.state={showModuleSetupWizard:n},r}return p()(t,e),a()(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"render",value:function(){var e=this.state,t=e.hasError,n=e.error,o=e.info,i=e.showModuleSetupWizard;if(t)return React.createElement(m.a,{id:"googlesitekit-error",key:"googlesitekit-error",title:n,description:o.componentStack,dismiss:"",isDismissable:!1,format:"small",type:"win-error"});var a=googlesitekit.admin.currentAdminPage,c=Object(k.applyFilters)("googlesitekit.moduleHasSetupWizard",!0,a);if(i&&c){window.googlesitekit&&window.googlesitekit.publicPath&&(r.p=window.googlesitekit.publicPath);var u=Object(h.b)((function(){return Promise.all([r.e(0),r.e(7)]).then(r.bind(null,156))}));return React.createElement(h.a,{fallback:React.createElement(d.Fragment,null,React.createElement("div",{className:"googlesitekit-setup"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-setup__wrapper"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,null))))))))))},React.createElement(u,null))}return React.createElement(q,null)}}]),t}(d.Component);b()((function(){var e=document.getElementById("js-googlesitekit-module");null!==e&&(Object(d.render)(React.createElement(E,null),e),Object(k.doAction)("googlesitekit.moduleLoaded","Single",googlesitekitCurrentModule))}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},39:function(e,t){e.exports=wp.domReady},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
dist/assets/js/googlesitekit-settings.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(t){for(var i,c,l=t[0],s=t[1],d=t[2],g=0,u=[];g<l.length;g++)c=l[g],n[c]&&u.push(n[c][0]),n[c]=0;for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i]);for(r&&r(t);u.length;)u.shift()();return o.push.apply(o,d||[]),a()}function a(){for(var e,t=0;t<o.length;t++){for(var a=o[t],i=!0,c=1;c<a.length;c++){var l=a[c];0!==n[l]&&(i=!1)}i&&(o.splice(t--,1),e=__webpack_require__(__webpack_require__.s=a[0]))}return e}var i={},n={14:0},o=[];function __webpack_require__(t){if(i[t])return i[t].exports;var a=i[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,__webpack_require__),a.l=!0,a.exports}__webpack_require__.m=e,__webpack_require__.c=i,__webpack_require__.d=function(e,t,a){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(__webpack_require__.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)__webpack_require__.d(a,i,function(t){return e[t]}.bind(null,i));return a},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var c=window.webpackJsonp=window.webpackJsonp||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var r=l;o.push([200,0,1]),a()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},143:function(e,t,a){"use strict";var i=a(3),n=a.n(i),o=a(4),c=a.n(o),l=a(5),s=a.n(l),r=a(6),d=a.n(r),g=a(13),u=a.n(g),m=a(7),_=a.n(m),p=a(1),h=a(22),v=a(8),k=a.n(v),f=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).formFieldRef=Object(p.createRef)(),a.checkboxRef=Object(p.createRef)(),a}return _()(t,e),c()(t,[{key:"componentDidMount",value:function(){new h.e(this.formFieldRef.current).input=new h.c(this.checkboxRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.id,i=e.name,n=e.value,o=e.checked,c=e.disabled,l=e.children;return React.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},React.createElement("div",{className:"\n\t\t\t\t\t\tmdc-checkbox\n\t\t\t\t\t\t".concat(c?"mdc-checkbox--disabled":"","\n\t\t\t\t\t"),ref:this.checkboxRef},React.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:a,name:i,value:n,checked:o,disabled:c,onChange:t}),React.createElement("div",{className:"mdc-checkbox__background"},React.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},React.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),React.createElement("div",{className:"mdc-checkbox__mixedmark"}))),React.createElement("label",{htmlFor:a},l))}}]),t}(p.Component);f.propTypes={onChange:k.a.func.isRequired,id:k.a.string.isRequired,name:k.a.string.isRequired,value:k.a.string.isRequired,checked:k.a.bool,disabled:k.a.bool,children:k.a.node.isRequired},f.defaultProps={checked:!1,disabled:!1};var b=f,y=a(35),E=a.n(y),R=a(0),O=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).state={scriptOnPage:!!googlesitekit.admin.trackingOptin,optIn:!!googlesitekit.admin.trackingOptin,error:!1},a.handleOptIn=a.handleOptIn.bind(u()(a)),a}return _()(t,e),c()(t,[{key:"handleOptIn",value:function(e){var t=this,a=e.target.checked,i={googlesitekit_tracking_optin:a};E()({path:"/wp/v2/settings",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(i),method:"POST"}).then((function(){if(a&&!t.state.scriptOnPage){var e=window.document;if(!e)return;window.googlesitekitTrackingEnabled=!!a,e.body.insertAdjacentHTML("beforeend",'\n\t\t\t\t\t\t<script async src="https://www.googletagmanager.com/gtag/js?id='.concat(googlesitekit.admin.trackingID,'"><\/script>\n\t\t\t\t\t')),e.body.insertAdjacentHTML("beforeend","\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\t\t\t\t\tfunction gtag(){dataLayer.push(arguments);}\n\t\t\t\t\t\t\tgtag('js', new Date());\n\t\t\t\t\t\t\tgtag('config', '".concat(googlesitekit.admin.trackingID,"');\n\t\t\t\t\t\t<\/script>\n\t\t\t\t\t"))}t.setState({optIn:!!a,error:!1,scriptOnPage:!0})})).catch((function(a){t.setState({optIn:!e.target.checked,error:{errorCode:a.code,errorMsg:a.message}})}))}},{key:"render",value:function(){var e=this.state,t=e.optIn,a=e.error,i=this.props,n=i.id,o=i.name;return React.createElement("div",{className:"googlesitekit-opt-in"},React.createElement(b,{id:n,name:o,value:"1",checked:t,onChange:this.handleOptIn},Object(R.__)("Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with ","google-site-kit"),React.createElement("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer"},Object(R.__)("Google Privacy Policy","google-site-kit")),"."),a&&React.createElement("div",{className:"googlesitekit-error-text"},a.errorMsg))}}]),t}(p.Component);O.propTypes={id:k.a.string,name:k.a.string},O.defaultProps={id:"googlesitekit-opt-in",name:"optIn"};t.a=O},145:function(e,t,a){"use strict";var i=a(12),n=a.n(i),o=a(3),c=a.n(o),l=a(4),s=a.n(l),r=a(5),d=a.n(r),g=a(6),u=a.n(g),m=a(13),_=a.n(m),p=a(7),h=a.n(p),v=a(1),k=a(9),f=a(2),b=a(67),y=a(0),E=a(14),R=function(e){function t(e){var a;return c()(this,t),(a=d()(this,u()(t).call(this,e))).el=document.createElement("div"),a.root=document.querySelector(".googlesitekit-plugin")||document.body,a}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(v.createPortal)(this.props.children,this.el)}}]),t}(v.Component);a.d(t,"a",(function(){return O}));var O=function(e){function t(e){var a;return c()(this,t),(a=d()(this,u()(t).call(this,e))).state={dialogActive:!1},a.handleDialog=a.handleDialog.bind(_()(a)),a.handleUnlinkConfirm=a.handleUnlinkConfirm.bind(_()(a)),a.handleCloseModal=a.handleCloseModal.bind(_()(a)),a}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){window.addEventListener("keyup",this.handleCloseModal,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keyup",this.handleCloseModal)}},{key:"handleUnlinkConfirm",value:function(){return n.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.a.awrap(k.c.set(k.a,"site","reset"));case 2:Object(f.d)(),this.handleDialog(),document.location=Object(f.n)("googlesitekit-splash",{notification:"reset_success"});case 5:case"end":return e.stop()}}),null,this)}},{key:"handleCloseModal",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1})}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive}}))}},{key:"render",value:function(){var e=this,t=this.props.children,a=this.state.dialogActive;return React.createElement(v.Fragment,null,React.createElement(E.a,{className:"googlesitekit-reset-button",onClick:function(){return e.setState({dialogActive:!0})},inherit:!0},t||Object(y.__)("Reset Site Kit","google-site-kit")),React.createElement(R,null,React.createElement(b.a,{dialogActive:a,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(y.__)("Reset Site Kit","google-site-kit"),subtitle:Object(y.__)("Resetting this site will remove access to all services. After disconnecting, you will need to re-authorize your access to restore service.","google-site-kit"),confirmButton:Object(y.__)("Reset","google-site-kit"),provides:[]})))}}]),t}(v.Component)},18:function(e,t){e.exports=React},200:function(e,t,a){"use strict";a.r(t);var i=a(3),n=a.n(i),o=a(4),c=a.n(o),l=a(5),s=a.n(l),r=a(6),d=a.n(r),g=a(7),u=a.n(g),m=a(1),_=a(13),p=a.n(_),h=a(27),v=a.n(h),k=a(17),f=a(26),b=a(2),y=a(11),E=a(0),R=a(10),O=a(12),w=a.n(O),j=a(8),N=a.n(j),S=a(14),C=a(29),M=a(9),x=a(20),D=a(62),A=a(53),q=a(54),P=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).state={isSaving:!1,active:e.active},a.activateOrDeactivate=a.activateOrDeactivate.bind(p()(a)),a}return u()(t,e),c()(t,[{key:"activateOrDeactivate",value:function(){var e,t;return w.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.state.active,t=this.props.slug,this.setState({isSaving:!0}),a.next=6,w.a.awrap(Object(b.a)(M.c,t,!e));case 6:return a.next=8,w.a.awrap(Object(b.u)());case 8:window.location=Object(b.m)(t,!0),a.next=15;break;case 11:a.prev=11,a.t0=a.catch(0),Object(b.w)(q.a,{id:"activate-module-error",title:Object(E.__)("Internal Server Error","google-site-kit"),description:a.t0.message,format:"small",type:"win-error"}),this.setState({isSaving:!1});case 15:case"end":return a.stop()}}),null,this,[[0,11]])}},{key:"render",value:function(){var e=this.state.isSaving,t=this.props,a=t.slug,i=t.name,n=t.description,o=t.showLink,c=!1,l=googlesitekit.modules;l[a].required.length&&l[a].required.forEach((function(e){l[e].setupComplete||(c=!0)}));return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-settings-connect-module\n\t\t\t\tgooglesitekit-settings-connect-module--".concat(a,"\n\t\t\t\t").concat(c?"googlesitekit-settings-connect-module--disabled":"","\n\t\t\t"),key:a},React.createElement("div",{className:"googlesitekit-settings-connect-module__switch"},React.createElement(D.a,{isSaving:e})),React.createElement("div",{className:"googlesitekit-settings-connect-module__logo"},c?Object(b.q)("".concat(a,"-disabled")):Object(b.q)(a)),React.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-settings-connect-module__title "},i),React.createElement("p",{className:"googlesitekit-settings-connect-module__text"},n),React.createElement(A.a,{slug:a,context:"modules-list"}),Object(R.applyFilters)("googlesitekit.SetupModuleShowLink",o,a)&&React.createElement("p",{className:"googlesitekit-settings-connect-module__cta"},React.createElement(S.a,{onClick:this.activateOrDeactivate,href:"",inherit:!0,disabled:c,arrow:!0},c?Object(E.sprintf)(Object(E.__)("Setup Analytics to gain access to %s","google-site-kit"),i):Object(E.sprintf)(Object(E.__)("Set up %s","google-site-kit"),i))))}}]),t}(m.Component);P.propTypes={slug:N.a.string,name:N.a.string,description:N.a.string,homepage:N.a.string,active:N.a.bool,onActive:N.a.func},P.defaultProps={slug:"",name:"",description:"",homepage:"",active:!1};var T=P,I=a(67),F=function(e){function t(){return n()(this,t),s()(this,d()(t).apply(this,arguments))}return u()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component),L=a(21),U=function(e){function t(){return n()(this,t),s()(this,d()(t).apply(this,arguments))}return u()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.slug;return React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(A.a,{slug:e,context:"settings"}),Object(E.__)("Setup incomplete: ","google-site-kit"),React.createElement(S.a,{className:"googlesitekit-settings-module__edit-button",onClick:function(){window.location=Object(b.m)(e,!0)},inherit:!0},Object(E.__)("continue module setup","google-site-kit")))}}]),t}(m.Component),B=Object(L.a)("googlesitekit.ModuleSetupIncomplete")(U),K=function(e){function t(){return n()(this,t),s()(this,d()(t).apply(this,arguments))}return u()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.compress;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-overlay\n\t\t\t\t".concat(e?"googlesitekit-overlay--compress":"","\n\t\t\t")},React.createElement("div",{className:"googlesitekit-overlay__wrapper"},React.createElement("div",{className:"googlesitekit-overlay__icon"},React.createElement(x.a,{id:"lock",width:"22",height:"30"})),React.createElement("h3",{className:" googlesitekit-heading-2 googlesitekit-overlay__title "},Object(E.__)("Section locked while editing","google-site-kit"))))}}]),t}(m.Component);K.propTypes={compress:N.a.bool},K.defaultProps={compress:!1};var G=K,W=function(e){function t(e){var a;n()(this,t),a=s()(this,d()(t).call(this,e));var i=e.slug,o=googlesitekit.modules[i].setupComplete;return a.state={isSaving:!1,active:e.active,setupComplete:o,dialogActive:!1},a.deactivate=a.deactivate.bind(p()(a)),a.activateOrDeactivate=a.activateOrDeactivate.bind(p()(a)),a.handleDialog=a.handleDialog.bind(p()(a)),a.handleCloseModal=a.handleCloseModal.bind(p()(a)),a.handleConfirmRemoveModule=a.handleConfirmRemoveModule.bind(p()(a)),a}return u()(t,e),c()(t,[{key:"componentDidMount",value:function(){window.addEventListener("keyup",this.handleCloseModal,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keyup",this.handleCloseModal)}},{key:"activateOrDeactivate",value:function(){var e,t;return w.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.state.active,t=!e,this.setState({isSaving:!0}),a.next=6,w.a.awrap(Object(b.a)(M.c,this.props.slug,t));case 6:return a.next=8,w.a.awrap(Object(b.u)());case 8:!1===t&&M.c.invalidateCacheGroup(M.b,this.props.slug),this.setState({isSaving:!1,active:t}),window.location=Object(b.m)(this.props.slug,!1),a.next=17;break;case 13:a.prev=13,a.t0=a.catch(0),Object(b.w)(q.a,{id:"activate-module-error",title:Object(E.__)("Internal Server Error","google-site-kit"),description:a.t0.message,format:"small",type:"win-error"}),this.setState({isSaving:!1});case 17:case"end":return a.stop()}}),null,this,[[0,13]])}},{key:"deactivate",value:function(){this.props.autoActivate||this.activateOrDeactivate()}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive}}))}},{key:"handleConfirmRemoveModule",value:function(){this.deactivate()}},{key:"handleCloseModal",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1})}},{key:"getDependentModules",value:function(){var e=this.props.slug,t=googlesitekit.modules,a={};return t[e].dependants&&t[e].dependants.forEach((function(e){t[e]&&(a[e]=t[e])})),a}},{key:"render",value:function(){var e=this.state,t=e.active,a=e.setupComplete,i=e.dialogActive,n=this.props,o=n.name,c=n.slug,l=n.homepage,s=n.isEditing,r=n.isOpen,d=n.handleAccordion,g=n.handleEdit,u=n.description,_=n.hasSettings,p=n.autoActivate,h=n.provides,v=n.isSaving,k=n.screenID,f=n.error,O="".concat(c,"-module"),w=Object(R.applyFilters)("googlesitekit.Connected-".concat(c),a),j=w?"googlesitekit-settings-module__status-icon--connected":"googlesitekit-settings-module__status-icon--not-connected",N=Object(E.sprintf)(Object(E.__)("By disconnecting the %s module from Site Kit, you will no longer have access to:","google-site-kit"),o),M=v==="".concat(c,"-module"),A=Object(L.a)("googlesitekit.ModuleSettingsDetails-".concat(c))(F),q=0<Object(y.filter)(s,(function(e){return e})).length,P=Object(y.map)(this.getDependentModules(),"name").join(", "),U="pagespeed-insights"===c,K=Object(E.__)("Close","google-site-kit");return _&&a&&(M?K=Object(E.__)("Saving...","google-site-kit"):!1===U&&(K=Object(E.__)("Confirm Changes","google-site-kit"))),React.createElement(m.Fragment,null,t?React.createElement("div",{className:"\n\t\t\t\t\t\t\tgooglesitekit-settings-module\n\t\t\t\t\t\t\tgooglesitekit-settings-module--".concat(c,"\n\t\t\t\t\t\t\tgooglesitekit-settings-module--active\n\t\t\t\t\t\t\t").concat(f&&q&&s[O]?"googlesitekit-settings-module--error":"","\n\t\t\t\t\t\t"),key:O},q&&!s[O]&&React.createElement(G,{compress:!r}),React.createElement("button",{className:"\n\t\t\t\t\t\t\t\tgooglesitekit-settings-module__header\n\t\t\t\t\t\t\t\t".concat(r?"googlesitekit-settings-module__header--open":"","\n\t\t\t\t\t\t\t"),id:"googlesitekit-settings-module__header--".concat(c),type:"button",role:"tab","aria-selected":!!r,"aria-expanded":!!r,"aria-controls":"googlesitekit-settings-module__content--".concat(c),onClick:d.bind(null,c)},f&&q&&s[O]&&React.createElement("div",{className:"googlesitekit-settings-module__error"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},Object(E.__)("Error:","google-site-kit")," ",f.errorMsg)))),React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement("h3",{className:" googlesitekit-heading-4 googlesitekit-settings-module__title "},Object(b.q)(c,!1,"24","26","googlesitekit-settings-module__title-icon"),o)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},React.createElement("p",{className:"googlesitekit-settings-module__status"},w?Object(E.sprintf)(Object(E.__)("%s is connected","google-site-kit"),o):Object(E.sprintf)(Object(E.__)("%s is not connected","google-site-kit"),o),React.createElement("span",{className:"googlesitekit-settings-module__status-icon ".concat(j," ")},React.createElement("span",{className:"screen-reader-text"},w?Object(E.__)("Connected","google-site-kit"):Object(E.__)("Not Connected","google-site-kit")))))))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tgooglesitekit-settings-module__content\n\t\t\t\t\t\t\t\t".concat(r?"googlesitekit-settings-module__content--open":"","\n\t\t\t\t\t\t\t"),id:"googlesitekit-settings-module__content--".concat(c),role:"tabpanel","aria-hidden":!r,"aria-labelledby":"googlesitekit-settings-module__header--".concat(c)},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},a&&React.createElement(m.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(A,{module:O,isEditing:s[O],isOpen:r}))),_&&!a&&React.createElement(B,{screenID:k,slug:c}))),React.createElement("footer",{className:"googlesitekit-settings-module__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},s[O]||M?React.createElement(m.Fragment,null,React.createElement(C.a,{onClick:function(){return g(O,a?"confirm":"cancel",U)},disabled:M,id:_&&a?"confirm-changes-".concat(c):"close-".concat(c)},K),React.createElement(D.a,{isSaving:M}),_&&React.createElement(S.a,{className:"googlesitekit-settings-module__footer-cancel",onClick:function(){return g(O,"cancel")},inherit:!0},Object(E.__)("Cancel","google-site-kit"))):_&&React.createElement(S.a,{className:"googlesitekit-settings-module__edit-button",onClick:function(){g(O,"edit")},inherit:!0},Object(E.__)("Edit","google-site-kit"),React.createElement(x.a,{className:"googlesitekit-settings-module__edit-button-icon",id:"pencil",width:"10",height:"10"}))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-desktop "},s[O]&&!p&&React.createElement(S.a,{className:"googlesitekit-settings-module__remove-button",onClick:this.handleDialog,inherit:!0,danger:!0},Object(E.sprintf)(Object(E.__)("Disconnect %s from Site Kit","google-site-kit"),o),React.createElement(x.a,{className:"googlesitekit-settings-module__remove-button-icon",id:"trash",width:"13",height:"13"})),!s[O]&&React.createElement(S.a,{href:l,className:"googlesitekit-settings-module__cta-button",inherit:!0,external:!0},Object(E.sprintf)(Object(E.__)("See full details in %s","google-site-kit"),o))))))),React.createElement(I.a,{dialogActive:i,handleDialog:this.handleDialog,title:Object(E.sprintf)(Object(E.__)("Disconnect %s from Site Kit?","google-site-kit"),o),subtitle:N,onKeyPress:this.handleCloseModal,provides:h,handleConfirm:this.handleConfirmRemoveModule,dependentModules:!!P&&Object(E.sprintf)(Object(E.__)("these active modules depend on %s and will also be disconnected: ","google-site-kit"),o)+P})):React.createElement(m.Fragment,null,React.createElement(T,{key:"".concat(c,"-module"),slug:c,name:o,description:u,active:t,showLink:!0})))}}]),t}(m.Component);W.propTypes={name:N.a.string,slug:N.a.string,homepage:N.a.string,isEditing:N.a.object,handleEdit:N.a.func,handleDialog:N.a.func,autoActivate:N.a.bool,hasSettings:N.a.bool,required:N.a.array,active:N.a.bool},W.defaultProps={name:"",slug:"",homepage:"",isEditing:{},handleEdit:null,handleDialog:null,active:!1};var H=W;function J(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function z(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?J(a,!0).forEach((function(t){v()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):J(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var Q=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).state={error:!1,isEditing:{},openModules:{},isSaving:!1},a.mapToModule=a.mapToModule.bind(p()(a)),a.updateModulesList=a.updateModulesList.bind(p()(a)),a.handleButtonAction=a.handleButtonAction.bind(p()(a)),a.handleAccordion=a.handleAccordion.bind(p()(a)),a}return u()(t,e),c()(t,[{key:"componentDidMount",value:function(){googlesitekit.editmodule&&googlesitekit.modules[googlesitekit.editmodule].active&&this.handleButtonAction("".concat(googlesitekit.editmodule,"-module"),"edit")}},{key:"updateModulesList",value:function(){this.forceUpdate()}},{key:"handleAccordion",value:function(e,t){t.target.closest(".googlesitekit-settings-module__header").focus(),this.setState((function(t){return{openModules:v()({},e,!t.openModules[e])}}))}},{key:"handleButtonAction",value:function(e,t){var a=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("confirm"===t){var n=Object(R.applyFilters)("googlekit.SettingsConfirmed",!1,e);if(i)return void this.setState((function(t){return{isSaving:!1,error:!1,isEditing:z({},t.isEditing,v()({},e,!t.isEditing[e]))}}));if(this.setState({isSaving:e}),!n)return void Object(b.d)();n.then((function(){Object(b.d)(),a.setState((function(t){return{isSaving:!1,error:!1,isEditing:z({},t.isEditing,v()({},e,!t.isEditing[e]))}}))})).catch((function(e){a.setState({isSaving:!1,error:{errorCode:e.code,errorMsg:e.message}})}))}else this.setState((function(t){return{isEditing:z({},t.isEditing,v()({},e,!t.isEditing[e])),error:!1}}))}},{key:"settingsModuleComponent",value:function(e,t){var a=googlesitekit.modules[e.slug].provides,i=this.state,n=i.isEditing,o=i.openModules,c=i.error,l=o[e.slug]||!1;return React.createElement(H,{key:e.slug+"-module",slug:e.slug,name:e.name,description:e.description,homepage:e.homepage,learnmore:e.learnMore,active:e.active,hasSettings:e.hasSettings,autoActivate:e.autoActivate,updateModulesList:this.updateModulesList,handleEdit:this.handleButtonAction,handleConfirm:!0,isEditing:n,isOpen:l,handleAccordion:this.handleAccordion,handleDialog:this.handleDialog,provides:a,isSaving:t,screenID:e.screenID,error:c})}},{key:"mapToModule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.state.isSaving;return t?Object(y.map)(e,function(e){return React.createElement(m.Fragment,{key:e.slug+"-module-wrapper"},this.settingsModuleComponent(e,a))}.bind(this)):Object(y.map)(e,function(e){return React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-4",key:e.slug+"-module-wrapper"},this.settingsModuleComponent(e,a))}.bind(this))}},{key:"render",value:function(){var e=this.state.isEditing,t=this.props.activeTab,a=0<Object(y.filter)(e,(function(e){return e})).length;if(!window.googlesitekit||!window.googlesitekit.modules)return null;var i=Object(y.filter)(window.googlesitekit.modules,(function(e){return!e.internal})),n=this.mapToModule(Object(y.sortBy)(Object(y.filter)(i,(function(e){return e.active})),"sort"),!0),o=this.mapToModule(Object(y.sortBy)(Object(y.filter)(i,{active:!1}),"sort")),c=0<o.length;return React.createElement(m.Fragment,null,0<n.length&&0===t&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,null,n)),1===t&&c&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,{header:!0,title:Object(E.__)("Connect More Services to Gain More Insights","google-site-kit"),relative:!0},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},0<o.length&&o)),a&&React.createElement(G,null))),1===t&&!c&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,{id:"no-more-modules",title:Object(E.__)("Congrats, you’ve connected all services!","google-site-kit"),description:Object(E.__)("We’re working on adding new services to Site Kit by Google all the time, so please check back in the future.","google-site-kit"),format:"small",smallImage:"".concat(googlesitekit.admin.assetsRoot,"images/thumbs-up.png"),type:"win-success"})))}}]),t}(m.Component),V=a(43),X=a(47),Y=a(70),Z=a.n(Y),$=a(166),ee=a.n($),te=a(143),ae=a(145),ie=function(e){function t(){var e;n()(this,t),e=s()(this,d()(t).call(this));var a=googlesitekit.admin.userData,i=a.email,o=void 0===i?"":i,c=a.picture,l=void 0===c?"":c,r=a.name,g=void 0===r?"":r;return e.state={data:{email:o,img:l,user:g}},e}return u()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(m.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,null,React.createElement("div",{className:" googlesitekit-settings-module googlesitekit-settings-module--active "},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement("h3",{className:" googlesitekit-heading-4 googlesitekit-settings-module__title "},Object(E.__)("Plugin Status","google-site-kit"))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "}),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("p",{className:"googlesitekit-settings-module__status"},Object(E.__)("Site Kit is connected","google-site-kit"),React.createElement("span",{className:" googlesitekit-settings-module__status-icon googlesitekit-settings-module__status-icon--connected "},React.createElement("span",{className:"screen-reader-text"},Object(E.__)("Connected","google-site-kit")))))))),React.createElement("footer",{className:"googlesitekit-settings-module__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(ae.a,null)))))))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,{header:!0,title:Object(E.__)("Tracking","google-site-kit"),className:"googlesitekit-settings-meta",fill:!0},React.createElement("div",{className:" googlesitekit-settings-module googlesitekit-settings-module--active "},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:" googlesitekit-settings-module__meta-item googlesitekit-settings-module__meta-item--nomargin "},React.createElement(te.a,null))))))))))}}]),t}(m.Component),ne=a(42),oe=function(e){function t(e){var a;n()(this,t),a=s()(this,d()(t).call(this,e));var i=window.location.hash.replace("#","");return a.state={activeTab:i?Number(i):0},a.handleTabUpdate=a.handleTabUpdate.bind(p()(a)),a}return u()(t,e),c()(t,[{key:"handleTabUpdate",value:function(e){var t=-1===e?0:e;window.location.hash=t,this.setState({activeTab:t})}},{key:"render",value:function(){var e=this.state.activeTab;return React.createElement(m.Fragment,null,React.createElement(V.a,null),React.createElement("div",{className:"googlesitekit-module-page"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(X.a,{title:Object(E.__)("Settings","google-site-kit")})),React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(k.a,null,React.createElement(ee.a,{activeIndex:e,handleActiveIndexUpdate:this.handleTabUpdate},React.createElement(Z.a,null,React.createElement("span",{className:"mdc-tab__text-label"},Object(E.__)("Connected Services","google-site-kit"))),React.createElement(Z.a,null,React.createElement("span",{className:"mdc-tab__text-label"},Object(E.__)("Connect More Services","google-site-kit"))),React.createElement(Z.a,null,React.createElement("span",{className:"mdc-tab__text-label"},Object(E.__)("Admin Settings","google-site-kit")))))),(0===e||1===e)&&React.createElement(Q,{activeTab:e}),2===e&&React.createElement(m.Fragment,null,React.createElement(ie,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(ne.a,null))))))}}]),t}(m.Component),ce=a(39),le=a.n(ce),se=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).state={hasError:!1},Object(E.setLocaleData)(googlesitekit.locale,"google-site-kit"),a}return u()(t,e),c()(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"render",value:function(){var e=this.state,t=e.hasError,a=e.error,i=e.info;return t?React.createElement(f.a,{id:"googlesitekit-error",key:"googlesitekit-error",title:a,description:i.componentStack,dismiss:"",isDismissable:!1,format:"small",type:"win-error"}):React.createElement(oe,null)}}]),t}(m.Component);le()((function(){var e=document.getElementById("googlesitekit-settings-wrapper");null!==e&&(Object(m.render)(React.createElement(se,null),e),Object(R.doAction)("googlesitekit.moduleLoaded","Settings"))}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},39:function(e,t){e.exports=wp.domReady},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
1 |
+
!function(e){function t(t){for(var i,c,l=t[0],s=t[1],d=t[2],g=0,u=[];g<l.length;g++)c=l[g],n[c]&&u.push(n[c][0]),n[c]=0;for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i]);for(r&&r(t);u.length;)u.shift()();return o.push.apply(o,d||[]),a()}function a(){for(var e,t=0;t<o.length;t++){for(var a=o[t],i=!0,c=1;c<a.length;c++){var l=a[c];0!==n[l]&&(i=!1)}i&&(o.splice(t--,1),e=__webpack_require__(__webpack_require__.s=a[0]))}return e}var i={},n={14:0},o=[];function __webpack_require__(t){if(i[t])return i[t].exports;var a=i[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,__webpack_require__),a.l=!0,a.exports}__webpack_require__.m=e,__webpack_require__.c=i,__webpack_require__.d=function(e,t,a){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(__webpack_require__.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)__webpack_require__.d(a,i,function(t){return e[t]}.bind(null,i));return a},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var c=window.webpackJsonp=window.webpackJsonp||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var r=l;o.push([201,0,1]),a()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},144:function(e,t,a){"use strict";var i=a(3),n=a.n(i),o=a(4),c=a.n(o),l=a(5),s=a.n(l),r=a(6),d=a.n(r),g=a(13),u=a.n(g),m=a(7),_=a.n(m),p=a(1),h=a(22),v=a(8),k=a.n(v),f=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).formFieldRef=Object(p.createRef)(),a.checkboxRef=Object(p.createRef)(),a}return _()(t,e),c()(t,[{key:"componentDidMount",value:function(){new h.e(this.formFieldRef.current).input=new h.c(this.checkboxRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onChange,a=e.id,i=e.name,n=e.value,o=e.checked,c=e.disabled,l=e.children;return React.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},React.createElement("div",{className:"\n\t\t\t\t\t\tmdc-checkbox\n\t\t\t\t\t\t".concat(c?"mdc-checkbox--disabled":"","\n\t\t\t\t\t"),ref:this.checkboxRef},React.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:a,name:i,value:n,checked:o,disabled:c,onChange:t}),React.createElement("div",{className:"mdc-checkbox__background"},React.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},React.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),React.createElement("div",{className:"mdc-checkbox__mixedmark"}))),React.createElement("label",{htmlFor:a},l))}}]),t}(p.Component);f.propTypes={onChange:k.a.func.isRequired,id:k.a.string.isRequired,name:k.a.string.isRequired,value:k.a.string.isRequired,checked:k.a.bool,disabled:k.a.bool,children:k.a.node.isRequired},f.defaultProps={checked:!1,disabled:!1};var b=f,y=a(35),E=a.n(y),R=a(0),O=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).state={scriptOnPage:!!window.googlesitekitTrackingEnabled,optIn:!!window.googlesitekitTrackingEnabled,error:!1},a.handleOptIn=a.handleOptIn.bind(u()(a)),a}return _()(t,e),c()(t,[{key:"handleOptIn",value:function(e){var t=this,a=e.target.checked,i={googlesitekit_tracking_optin:a};E()({path:"/wp/v2/settings",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(i),method:"POST"}).then((function(){if(window.googlesitekitTrackingEnabled=!!a,a&&!t.state.scriptOnPage){var e=window.document;if(!e)return;e.body.insertAdjacentHTML("beforeend",'\n\t\t\t\t\t\t<script async src="https://www.googletagmanager.com/gtag/js?id='.concat(googlesitekit.admin.trackingID,'"><\/script>\n\t\t\t\t\t')),e.body.insertAdjacentHTML("beforeend","\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\t\t\t\t\tfunction gtag(){dataLayer.push(arguments);}\n\t\t\t\t\t\t\tgtag('js', new Date());\n\t\t\t\t\t\t\tgtag('config', '".concat(googlesitekit.admin.trackingID,"');\n\t\t\t\t\t\t<\/script>\n\t\t\t\t\t"))}t.setState({optIn:!!a,error:!1,scriptOnPage:!0})})).catch((function(a){t.setState({optIn:!e.target.checked,error:{errorCode:a.code,errorMsg:a.message}})}))}},{key:"render",value:function(){var e=this.state,t=e.optIn,a=e.error,i=this.props,n=i.id,o=i.name;return React.createElement("div",{className:"googlesitekit-opt-in"},React.createElement(b,{id:n,name:o,value:"1",checked:t,onChange:this.handleOptIn},Object(R.__)("Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with ","google-site-kit"),React.createElement("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer"},Object(R.__)("Google Privacy Policy","google-site-kit")),"."),a&&React.createElement("div",{className:"googlesitekit-error-text"},a.errorMsg))}}]),t}(p.Component);O.propTypes={id:k.a.string,name:k.a.string},O.defaultProps={id:"googlesitekit-opt-in",name:"optIn"};t.a=O},146:function(e,t,a){"use strict";a.d(t,"a",(function(){return O}));var i=a(12),n=a.n(i),o=a(3),c=a.n(o),l=a(4),s=a.n(l),r=a(5),d=a.n(r),g=a(6),u=a.n(g),m=a(13),_=a.n(m),p=a(7),h=a.n(p),v=a(1),k=a(9),f=a(2),b=a(67),y=a(0),E=a(14),R=a(80),O=function(e){function t(e){var a;return c()(this,t),(a=d()(this,u()(t).call(this,e))).state={dialogActive:!1},a.handleDialog=a.handleDialog.bind(_()(a)),a.handleUnlinkConfirm=a.handleUnlinkConfirm.bind(_()(a)),a.handleCloseModal=a.handleCloseModal.bind(_()(a)),a}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){window.addEventListener("keyup",this.handleCloseModal,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keyup",this.handleCloseModal)}},{key:"handleUnlinkConfirm",value:function(){return n.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.a.awrap(k.c.set(k.a,"site","reset"));case 2:Object(f.d)(),this.handleDialog(),document.location=Object(f.n)("googlesitekit-splash",{notification:"reset_success"});case 5:case"end":return e.stop()}}),null,this)}},{key:"handleCloseModal",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1})}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive}}))}},{key:"render",value:function(){var e=this,t=this.props.children,a=this.state.dialogActive;return React.createElement(v.Fragment,null,React.createElement(E.a,{className:"googlesitekit-reset-button",onClick:function(){return e.setState({dialogActive:!0})},inherit:!0},t||Object(y.__)("Reset Site Kit","google-site-kit")),React.createElement(R.a,null,React.createElement(b.a,{dialogActive:a,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(y.__)("Reset Site Kit","google-site-kit"),subtitle:Object(y.__)("Resetting this site will remove access to all services. After disconnecting, you will need to re-authorize your access to restore service.","google-site-kit"),confirmButton:Object(y.__)("Reset","google-site-kit"),provides:[]})))}}]),t}(v.Component)},18:function(e,t){e.exports=React},201:function(e,t,a){"use strict";a.r(t);var i=a(3),n=a.n(i),o=a(4),c=a.n(o),l=a(5),s=a.n(l),r=a(6),d=a.n(r),g=a(7),u=a.n(g),m=a(1),_=a(13),p=a.n(_),h=a(27),v=a.n(h),k=a(17),f=a(26),b=a(2),y=a(11),E=a(0),R=a(10),O=a(12),w=a.n(O),j=a(8),N=a.n(j),S=a(14),C=a(29),M=a(9),x=a(20),D=a(62),A=a(53),T=a(54),q=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).state={isSaving:!1,active:e.active},a.activateOrDeactivate=a.activateOrDeactivate.bind(p()(a)),a}return u()(t,e),c()(t,[{key:"activateOrDeactivate",value:function(){var e,t;return w.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.state.active,t=this.props.slug,this.setState({isSaving:!0}),a.next=6,w.a.awrap(Object(b.a)(M.c,t,!e));case 6:return a.next=8,w.a.awrap(Object(b.u)());case 8:window.location=Object(b.m)(t,!0),a.next=15;break;case 11:a.prev=11,a.t0=a.catch(0),Object(b.w)(T.a,{id:"activate-module-error",title:Object(E.__)("Internal Server Error","google-site-kit"),description:a.t0.message,format:"small",type:"win-error"}),this.setState({isSaving:!1});case 15:case"end":return a.stop()}}),null,this,[[0,11]])}},{key:"render",value:function(){var e=this.state.isSaving,t=this.props,a=t.slug,i=t.name,n=t.description,o=t.showLink,c=!1,l=googlesitekit.modules;l[a].required.length&&l[a].required.forEach((function(e){l[e].setupComplete||(c=!0)}));return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-settings-connect-module\n\t\t\t\tgooglesitekit-settings-connect-module--".concat(a,"\n\t\t\t\t").concat(c?"googlesitekit-settings-connect-module--disabled":"","\n\t\t\t"),key:a},React.createElement("div",{className:"googlesitekit-settings-connect-module__switch"},React.createElement(D.a,{isSaving:e})),React.createElement("div",{className:"googlesitekit-settings-connect-module__logo"},c?Object(b.q)("".concat(a,"-disabled")):Object(b.q)(a)),React.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-settings-connect-module__title "},i),React.createElement("p",{className:"googlesitekit-settings-connect-module__text"},n),React.createElement(A.a,{slug:a,context:"modules-list"}),Object(R.applyFilters)("googlesitekit.SetupModuleShowLink",o,a)&&React.createElement("p",{className:"googlesitekit-settings-connect-module__cta"},React.createElement(S.a,{onClick:this.activateOrDeactivate,href:"",inherit:!0,disabled:c,arrow:!0},c?Object(E.sprintf)(Object(E.__)("Setup Analytics to gain access to %s","google-site-kit"),i):Object(E.sprintf)(Object(E.__)("Set up %s","google-site-kit"),i))))}}]),t}(m.Component);q.propTypes={slug:N.a.string,name:N.a.string,description:N.a.string,homepage:N.a.string,active:N.a.bool,onActive:N.a.func},q.defaultProps={slug:"",name:"",description:"",homepage:"",active:!1};var P=q,I=a(67),F=function(e){function t(){return n()(this,t),s()(this,d()(t).apply(this,arguments))}return u()(t,e),c()(t,[{key:"render",value:function(){return null}}]),t}(m.Component),L=a(21),U=function(e){function t(){return n()(this,t),s()(this,d()(t).apply(this,arguments))}return u()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.slug;return React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(A.a,{slug:e,context:"settings"}),Object(E.__)("Setup incomplete: ","google-site-kit"),React.createElement(S.a,{className:"googlesitekit-settings-module__edit-button",onClick:function(){window.location=Object(b.m)(e,!0)},inherit:!0},Object(E.__)("continue module setup","google-site-kit")))}}]),t}(m.Component),B=Object(L.a)("googlesitekit.ModuleSetupIncomplete")(U),K=function(e){function t(){return n()(this,t),s()(this,d()(t).apply(this,arguments))}return u()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.compress;return React.createElement("div",{className:"\n\t\t\t\tgooglesitekit-overlay\n\t\t\t\t".concat(e?"googlesitekit-overlay--compress":"","\n\t\t\t")},React.createElement("div",{className:"googlesitekit-overlay__wrapper"},React.createElement("div",{className:"googlesitekit-overlay__icon"},React.createElement(x.a,{id:"lock",width:"22",height:"30"})),React.createElement("h3",{className:" googlesitekit-heading-2 googlesitekit-overlay__title "},Object(E.__)("Section locked while editing","google-site-kit"))))}}]),t}(m.Component);K.propTypes={compress:N.a.bool},K.defaultProps={compress:!1};var G=K,H=function(e){function t(e){var a;n()(this,t),a=s()(this,d()(t).call(this,e));var i=e.slug,o=googlesitekit.modules[i].setupComplete;return a.state={isSaving:!1,active:e.active,setupComplete:o,dialogActive:!1},a.deactivate=a.deactivate.bind(p()(a)),a.activateOrDeactivate=a.activateOrDeactivate.bind(p()(a)),a.handleDialog=a.handleDialog.bind(p()(a)),a.handleCloseModal=a.handleCloseModal.bind(p()(a)),a.handleConfirmRemoveModule=a.handleConfirmRemoveModule.bind(p()(a)),a}return u()(t,e),c()(t,[{key:"componentDidMount",value:function(){window.addEventListener("keyup",this.handleCloseModal,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keyup",this.handleCloseModal)}},{key:"activateOrDeactivate",value:function(){var e,t;return w.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.state.active,t=!e,this.setState({isSaving:!0}),a.next=6,w.a.awrap(Object(b.a)(M.c,this.props.slug,t));case 6:return a.next=8,w.a.awrap(Object(b.u)());case 8:!1===t&&M.c.invalidateCacheGroup(M.b,this.props.slug),this.setState({isSaving:!1,active:t}),window.location=Object(b.m)(this.props.slug,!1),a.next=17;break;case 13:a.prev=13,a.t0=a.catch(0),Object(b.w)(T.a,{id:"activate-module-error",title:Object(E.__)("Internal Server Error","google-site-kit"),description:a.t0.message,format:"small",type:"win-error"}),this.setState({isSaving:!1});case 17:case"end":return a.stop()}}),null,this,[[0,13]])}},{key:"deactivate",value:function(){this.props.autoActivate||this.activateOrDeactivate()}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive}}))}},{key:"handleConfirmRemoveModule",value:function(){this.deactivate()}},{key:"handleCloseModal",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1})}},{key:"getDependentModules",value:function(){var e=this.props.slug,t=googlesitekit.modules,a={};return t[e].dependants&&t[e].dependants.forEach((function(e){t[e]&&(a[e]=t[e])})),a}},{key:"render",value:function(){var e=this.state,t=e.active,a=e.setupComplete,i=e.dialogActive,n=this.props,o=n.name,c=n.slug,l=n.homepage,s=n.isEditing,r=n.isOpen,d=n.handleAccordion,g=n.handleEdit,u=n.description,_=n.hasSettings,p=n.autoActivate,h=n.provides,v=n.isSaving,k=n.screenID,f=n.error,O="".concat(c,"-module"),w=Object(R.applyFilters)("googlesitekit.Connected-".concat(c),a),j=w?"googlesitekit-settings-module__status-icon--connected":"googlesitekit-settings-module__status-icon--not-connected",N=Object(E.sprintf)(Object(E.__)("By disconnecting the %s module from Site Kit, you will no longer have access to:","google-site-kit"),o),M=v==="".concat(c,"-module"),A=Object(L.a)("googlesitekit.ModuleSettingsDetails-".concat(c))(F),T=0<Object(y.filter)(s,(function(e){return e})).length,q=Object(y.map)(this.getDependentModules(),"name").join(", "),U="pagespeed-insights"===c,K=Object(E.__)("Close","google-site-kit");return _&&a&&(M?K=Object(E.__)("Saving...","google-site-kit"):!1===U&&(K=Object(E.__)("Confirm Changes","google-site-kit"))),React.createElement(m.Fragment,null,t?React.createElement("div",{className:"\n\t\t\t\t\t\t\tgooglesitekit-settings-module\n\t\t\t\t\t\t\tgooglesitekit-settings-module--".concat(c,"\n\t\t\t\t\t\t\tgooglesitekit-settings-module--active\n\t\t\t\t\t\t\t").concat(f&&T&&s[O]?"googlesitekit-settings-module--error":"","\n\t\t\t\t\t\t"),key:O},T&&!s[O]&&React.createElement(G,{compress:!r}),React.createElement("button",{className:"\n\t\t\t\t\t\t\t\tgooglesitekit-settings-module__header\n\t\t\t\t\t\t\t\t".concat(r?"googlesitekit-settings-module__header--open":"","\n\t\t\t\t\t\t\t"),id:"googlesitekit-settings-module__header--".concat(c),type:"button",role:"tab","aria-selected":!!r,"aria-expanded":!!r,"aria-controls":"googlesitekit-settings-module__content--".concat(c),onClick:d.bind(null,c)},f&&T&&s[O]&&React.createElement("div",{className:"googlesitekit-settings-module__error"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},Object(E.__)("Error:","google-site-kit")," ",f.errorMsg)))),React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement("h3",{className:" googlesitekit-heading-4 googlesitekit-settings-module__title "},Object(b.q)(c,!1,"24","26","googlesitekit-settings-module__title-icon"),o)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},React.createElement("p",{className:"googlesitekit-settings-module__status"},w?Object(E.sprintf)(Object(E.__)("%s is connected","google-site-kit"),o):Object(E.sprintf)(Object(E.__)("%s is not connected","google-site-kit"),o),React.createElement("span",{className:"googlesitekit-settings-module__status-icon ".concat(j," ")},React.createElement("span",{className:"screen-reader-text"},w?Object(E.__)("Connected","google-site-kit"):Object(E.__)("Not Connected","google-site-kit")))))))),React.createElement("div",{className:"\n\t\t\t\t\t\t\t\tgooglesitekit-settings-module__content\n\t\t\t\t\t\t\t\t".concat(r?"googlesitekit-settings-module__content--open":"","\n\t\t\t\t\t\t\t"),id:"googlesitekit-settings-module__content--".concat(c),role:"tabpanel","aria-hidden":!r,"aria-labelledby":"googlesitekit-settings-module__header--".concat(c)},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},a&&React.createElement(m.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(A,{module:O,isEditing:s[O],isOpen:r}))),_&&!a&&React.createElement(B,{screenID:k,slug:c}))),React.createElement("footer",{className:"googlesitekit-settings-module__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},s[O]||M?React.createElement(m.Fragment,null,React.createElement(C.a,{onClick:function(){return g(O,a?"confirm":"cancel",U)},disabled:M,id:_&&a?"confirm-changes-".concat(c):"close-".concat(c)},K),React.createElement(D.a,{isSaving:M}),_&&React.createElement(S.a,{className:"googlesitekit-settings-module__footer-cancel",onClick:function(){return g(O,"cancel")},inherit:!0},Object(E.__)("Cancel","google-site-kit"))):_&&React.createElement(S.a,{className:"googlesitekit-settings-module__edit-button",onClick:function(){g(O,"edit")},inherit:!0},Object(E.__)("Edit","google-site-kit"),React.createElement(x.a,{className:"googlesitekit-settings-module__edit-button-icon",id:"pencil",width:"10",height:"10"}))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-desktop "},s[O]&&!p&&React.createElement(S.a,{className:"googlesitekit-settings-module__remove-button",onClick:this.handleDialog,inherit:!0,danger:!0},Object(E.sprintf)(Object(E.__)("Disconnect %s from Site Kit","google-site-kit"),o),React.createElement(x.a,{className:"googlesitekit-settings-module__remove-button-icon",id:"trash",width:"13",height:"13"})),!s[O]&&React.createElement(S.a,{href:l,className:"googlesitekit-settings-module__cta-button",inherit:!0,external:!0},Object(E.sprintf)(Object(E.__)("See full details in %s","google-site-kit"),o))))))),React.createElement(I.a,{dialogActive:i,handleDialog:this.handleDialog,title:Object(E.sprintf)(Object(E.__)("Disconnect %s from Site Kit?","google-site-kit"),o),subtitle:N,onKeyPress:this.handleCloseModal,provides:h,handleConfirm:this.handleConfirmRemoveModule,dependentModules:!!q&&Object(E.sprintf)(Object(E.__)("these active modules depend on %s and will also be disconnected: ","google-site-kit"),o)+q})):React.createElement(m.Fragment,null,React.createElement(P,{key:"".concat(c,"-module"),slug:c,name:o,description:u,active:t,showLink:!0})))}}]),t}(m.Component);H.propTypes={name:N.a.string,slug:N.a.string,homepage:N.a.string,isEditing:N.a.object,handleEdit:N.a.func,handleDialog:N.a.func,autoActivate:N.a.bool,hasSettings:N.a.bool,required:N.a.array,active:N.a.bool},H.defaultProps={name:"",slug:"",homepage:"",isEditing:{},handleEdit:null,handleDialog:null,active:!1};var J=H;function W(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function z(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?W(a,!0).forEach((function(t){v()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):W(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var Q=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).state={error:!1,isEditing:{},openModules:{},isSaving:!1},a.mapToModule=a.mapToModule.bind(p()(a)),a.updateModulesList=a.updateModulesList.bind(p()(a)),a.handleButtonAction=a.handleButtonAction.bind(p()(a)),a.handleAccordion=a.handleAccordion.bind(p()(a)),a}return u()(t,e),c()(t,[{key:"componentDidMount",value:function(){googlesitekit.editmodule&&googlesitekit.modules[googlesitekit.editmodule].active&&this.handleButtonAction("".concat(googlesitekit.editmodule,"-module"),"edit")}},{key:"updateModulesList",value:function(){this.forceUpdate()}},{key:"handleAccordion",value:function(e,t){t.target.closest(".googlesitekit-settings-module__header").focus(),this.setState((function(t){return{openModules:v()({},e,!t.openModules[e])}}))}},{key:"handleButtonAction",value:function(e,t){var a=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("confirm"===t){var n=Object(R.applyFilters)("googlekit.SettingsConfirmed",!1,e);if(i)return void this.setState((function(t){return{isSaving:!1,error:!1,isEditing:z({},t.isEditing,v()({},e,!t.isEditing[e]))}}));if(this.setState({isSaving:e}),!n)return void Object(b.d)();n.then((function(){Object(b.d)(),a.setState((function(t){return{isSaving:!1,error:!1,isEditing:z({},t.isEditing,v()({},e,!t.isEditing[e]))}}))})).catch((function(e){a.setState({isSaving:!1,error:{errorCode:e.code,errorMsg:e.message}})}))}else this.setState((function(t){return{isEditing:z({},t.isEditing,v()({},e,!t.isEditing[e])),error:!1}}))}},{key:"settingsModuleComponent",value:function(e,t){var a=googlesitekit.modules[e.slug].provides,i=this.state,n=i.isEditing,o=i.openModules,c=i.error,l=o[e.slug]||!1;return React.createElement(J,{key:e.slug+"-module",slug:e.slug,name:e.name,description:e.description,homepage:e.homepage,learnmore:e.learnMore,active:e.active,hasSettings:e.hasSettings,autoActivate:e.autoActivate,updateModulesList:this.updateModulesList,handleEdit:this.handleButtonAction,handleConfirm:!0,isEditing:n,isOpen:l,handleAccordion:this.handleAccordion,handleDialog:this.handleDialog,provides:a,isSaving:t,screenID:e.screenID,error:c})}},{key:"mapToModule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.state.isSaving;return t?Object(y.map)(e,function(e){return React.createElement(m.Fragment,{key:e.slug+"-module-wrapper"},this.settingsModuleComponent(e,a))}.bind(this)):Object(y.map)(e,function(e){return React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-4",key:e.slug+"-module-wrapper"},this.settingsModuleComponent(e,a))}.bind(this))}},{key:"render",value:function(){var e=this.state.isEditing,t=this.props.activeTab,a=0<Object(y.filter)(e,(function(e){return e})).length;if(!window.googlesitekit||!window.googlesitekit.modules)return null;var i=Object(y.filter)(window.googlesitekit.modules,(function(e){return!e.internal})),n=this.mapToModule(Object(y.sortBy)(Object(y.filter)(i,(function(e){return e.active})),"sort"),!0),o=this.mapToModule(Object(y.sortBy)(Object(y.filter)(i,{active:!1}),"sort")),c=0<o.length;return React.createElement(m.Fragment,null,0<n.length&&0===t&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,null,n)),1===t&&c&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,{header:!0,title:Object(E.__)("Connect More Services to Gain More Insights","google-site-kit"),relative:!0},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},0<o.length&&o)),a&&React.createElement(G,null))),1===t&&!c&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(f.a,{id:"no-more-modules",title:Object(E.__)("Congrats, you’ve connected all services!","google-site-kit"),description:Object(E.__)("We’re working on adding new services to Site Kit by Google all the time, so please check back in the future.","google-site-kit"),format:"small",smallImage:"".concat(googlesitekit.admin.assetsRoot,"images/thumbs-up.png"),type:"win-success"})))}}]),t}(m.Component),V=a(43),X=a(47),Y=a(70),Z=a.n(Y),$=a(167),ee=a.n($),te=a(144),ae=a(146),ie=function(e){function t(){var e;n()(this,t),e=s()(this,d()(t).call(this));var a=googlesitekit.admin.userData,i=a.email,o=void 0===i?"":i,c=a.picture,l=void 0===c?"":c,r=a.name,g=void 0===r?"":r;return e.state={data:{email:o,img:l,user:g}},e}return u()(t,e),c()(t,[{key:"render",value:function(){return React.createElement(m.Fragment,null,React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,null,React.createElement("div",{className:" googlesitekit-settings-module googlesitekit-settings-module--active "},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement("h3",{className:" googlesitekit-heading-4 googlesitekit-settings-module__title "},Object(E.__)("Plugin Status","google-site-kit"))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "}),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("p",{className:"googlesitekit-settings-module__status"},Object(E.__)("Site Kit is connected","google-site-kit"),React.createElement("span",{className:" googlesitekit-settings-module__status-icon googlesitekit-settings-module__status-icon--connected "},React.createElement("span",{className:"screen-reader-text"},Object(E.__)("Connected","google-site-kit")))))))),React.createElement("footer",{className:"googlesitekit-settings-module__footer"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},React.createElement(ae.a,null)))))))),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement(k.a,{header:!0,title:Object(E.__)("Tracking","google-site-kit"),className:"googlesitekit-settings-meta",fill:!0},React.createElement("div",{className:" googlesitekit-settings-module googlesitekit-settings-module--active "},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},React.createElement("div",{className:"googlesitekit-settings-module__meta-items"},React.createElement("div",{className:" googlesitekit-settings-module__meta-item googlesitekit-settings-module__meta-item--nomargin "},React.createElement(te.a,null))))))))))}}]),t}(m.Component),ne=a(42),oe=function(e){function t(e){var a;n()(this,t),a=s()(this,d()(t).call(this,e));var i=window.location.hash.replace("#","");return a.state={activeTab:i?Number(i):0},a.handleTabUpdate=a.handleTabUpdate.bind(p()(a)),a}return u()(t,e),c()(t,[{key:"handleTabUpdate",value:function(e){var t=-1===e?0:e;window.location.hash=t,this.setState({activeTab:t})}},{key:"render",value:function(){var e=this.state.activeTab;return React.createElement(m.Fragment,null,React.createElement(V.a,null),React.createElement("div",{className:"googlesitekit-module-page"},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(X.a,{title:Object(E.__)("Settings","google-site-kit")})),React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},React.createElement(k.a,null,React.createElement(ee.a,{activeIndex:e,handleActiveIndexUpdate:this.handleTabUpdate},React.createElement(Z.a,null,React.createElement("span",{className:"mdc-tab__text-label"},Object(E.__)("Connected Services","google-site-kit"))),React.createElement(Z.a,null,React.createElement("span",{className:"mdc-tab__text-label"},Object(E.__)("Connect More Services","google-site-kit"))),React.createElement(Z.a,null,React.createElement("span",{className:"mdc-tab__text-label"},Object(E.__)("Admin Settings","google-site-kit")))))),(0===e||1===e)&&React.createElement(Q,{activeTab:e}),2===e&&React.createElement(m.Fragment,null,React.createElement(ie,null)),React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},React.createElement(ne.a,null))))))}}]),t}(m.Component),ce=a(39),le=a.n(ce),se=function(e){function t(e){var a;return n()(this,t),(a=s()(this,d()(t).call(this,e))).state={hasError:!1},Object(E.setLocaleData)(googlesitekit.locale,"google-site-kit"),a}return u()(t,e),c()(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"render",value:function(){var e=this.state,t=e.hasError,a=e.error,i=e.info;return t?React.createElement(f.a,{id:"googlesitekit-error",key:"googlesitekit-error",title:a,description:i.componentStack,dismiss:"",isDismissable:!1,format:"small",type:"win-error"}):React.createElement(oe,null)}}]),t}(m.Component);le()((function(){var e=document.getElementById("googlesitekit-settings-wrapper");null!==e&&(Object(m.render)(React.createElement(se,null),e),Object(R.doAction)("googlesitekit.moduleLoaded","Settings"))}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},39:function(e,t){e.exports=wp.domReady},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
dist/assets/js/googlesitekit-tests.js
CHANGED
@@ -824,4 +824,4 @@ var le=function(){function e(e){void 0===e&&(e={}),this.adapter_=e}return Object
|
|
824 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
825 |
* THE SOFTWARE.
|
826 |
*/
|
827 |
-
var ve=["touchstart","pointerdown","mousedown","keydown"],_e=["touchend","pointerup","mouseup","contextmenu"],be=[],Ee=function(e){function t(n){var r=e.call(this,ue({},t.defaultAdapter,n))||this;return r.activationAnimationHasEnded_=!1,r.activationTimer_=0,r.fgDeactivationRemovalTimer_=0,r.fgScale_="0",r.frame_={width:0,height:0},r.initialSize_=0,r.layoutFrame_=0,r.maxRadius_=0,r.unboundedCoords_={left:0,top:0},r.activationState_=r.defaultActivationState_(),r.activationTimerCallback_=function(){r.activationAnimationHasEnded_=!0,r.runDeactivationUXLogicIfReady_()},r.activateHandler_=function(e){return r.activate_(e)},r.deactivateHandler_=function(){return r.deactivate_()},r.focusHandler_=function(){return r.handleFocus()},r.blurHandler_=function(){return r.handleBlur()},r.resizeHandler_=function(){return r.layout()},r}return ae(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return he},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return me},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ye},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var r=t.cssClasses,i=r.ROOT,o=r.UNBOUNDED;requestAnimationFrame((function(){e.adapter_.addClass(i),e.adapter_.isUnbounded()&&(e.adapter_.addClass(o),e.layoutInternal_())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,r=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter_.removeClass(r),e.adapter_.removeClass(i),e.removeCssVars_()}))}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){e.layoutInternal_(),e.layoutFrame_=0}))},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter_.addClass(n):this.adapter_.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter_.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter_.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(ve.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.activateHandler_)})),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):_e.forEach((function(e){t.adapter_.registerDocumentInteractionHandler(e,t.deactivateHandler_)}))},t.prototype.deregisterRootHandlers_=function(){var e=this;ve.forEach((function(t){e.adapter_.deregisterInteractionHandler(t,e.activateHandler_)})),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),_e.forEach((function(t){e.adapter_.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)}))},t.prototype.removeCssVars_=function(){var e=this,n=t.strings;Object.keys(n).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter_.updateCssVariable(n[t],null)}))},t.prototype.activate_=function(e){var t=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var r=this.previousActivationEvent_;if(!(r&&void 0!==e&&r.type!==e.type))n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&be.length>0&&be.some((function(e){return t.adapter_.containsEventTarget(e)}))?this.resetActivationState_():(void 0!==e&&(be.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){be=[],n.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(n.wasElementMadeActive=t.checkElementMadeActive_(e),n.wasElementMadeActive&&t.animateActivation_()),n.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())})))}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter_.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,n=t.strings,r=n.VAR_FG_TRANSLATE_START,i=n.VAR_FG_TRANSLATE_END,o=t.cssClasses,a=o.FG_DEACTIVATION,u=o.FG_ACTIVATION,s=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var l="",c="";if(!this.adapter_.isUnbounded()){var f=this.getFgTranslationCoordinates_(),d=f.startPoint,p=f.endPoint;l=d.x+"px, "+d.y+"px",c=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(r,l),this.adapter_.updateCssVariable(i,c),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(a),this.adapter_.computeBoundingRect(),this.adapter_.addClass(u),this.activationTimer_=setTimeout((function(){return e.activationTimerCallback_()}),s)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,n=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var r,i,o=t.x,a=t.y,u=o+n.left,s=a+n.top;if("touchstart"===e.type){var l=e;r=l.changedTouches[0].pageX-u,i=l.changedTouches[0].pageY-s}else{var c=e;r=c.pageX-u,i=c.pageY-s}return{x:r,y:i}}(n,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,r=this.activationState_,i=r.hasDeactivationUXRun,o=r.isActivated;(i||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout((function(){e.adapter_.removeClass(n)}),ye.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return e.previousActivationEvent_=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var n=ue({},t);t.isProgrammatic?(requestAnimationFrame((function(){return e.animateDeactivation_(n)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(n),e.resetActivationState_()})))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){var e=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:Math.sqrt(Math.pow(e.frame_.width,2)+Math.pow(e.frame_.height,2))+t.numbers.PADDING,this.initialSize_=Math.floor(n*t.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,n=e.VAR_FG_SIZE,r=e.VAR_LEFT,i=e.VAR_TOP,o=e.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(o,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(r,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(i,this.unboundedCoords_.top+"px"))},t}(le),Oe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return ae(t,e),t.attachTo=function(e,n){void 0===n&&(n={isUnbounded:void 0});var r=new t(e);return void 0!==n.isUnbounded&&(r.unbounded=n.isUnbounded),r},t.createAdapter=function(e){return{addClass:function(t){return e.root_.classList.add(t)},browserSupportsCssVars:function(){return function(e,t){void 0===t&&(t=!1);var n=e.CSS,r=de;if("boolean"==typeof de&&!t)return de;if(!(n&&"function"==typeof n.supports))return!1;var i=n.supports("--css-vars","yes"),o=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return r=!(!i&&!o)&&!function(e){var t=e.document,n=t.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",t.body.appendChild(n);var r=e.getComputedStyle(n),i=null!==r&&"solid"===r.borderTopStyle;return n.parentNode&&n.parentNode.removeChild(n),i}(e),t||(de=r),r}(window)},computeBoundingRect:function(){return e.root_.getBoundingClientRect()},containsEventTarget:function(t){return e.root_.contains(t)},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,ge())},deregisterInteractionHandler:function(t,n){return e.root_.removeEventListener(t,n,ge())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return fe(e.root_,":active")},isSurfaceDisabled:function(){return Boolean(e.disabled)},isUnbounded:function(){return Boolean(e.unbounded)},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,ge())},registerInteractionHandler:function(t,n){return e.root_.addEventListener(t,n,ge())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},removeClass:function(t){return e.root_.classList.remove(t)},updateCssVariable:function(t,n){return e.root_.style.setProperty(t,n)}}},Object.defineProperty(t.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(e){this.unbounded_=Boolean(e),this.setUnbounded_()},enumerable:!0,configurable:!0}),t.prototype.activate=function(){this.foundation_.activate()},t.prototype.deactivate=function(){this.foundation_.deactivate()},t.prototype.layout=function(){this.foundation_.layout()},t.prototype.getDefaultFoundation=function(){return new Ee(t.createAdapter(this))},t.prototype.initialSyncWithDOM=function(){var e=this.root_;this.unbounded="mdcRippleIsUnbounded"in e.dataset},t.prototype.setUnbounded_=function(){this.foundation_.setUnbounded(Boolean(this.unbounded_))},t}(ce),xe=(n(22),function(e){function t(e){var n;return m()(this,t),(n=_()(this,E()(t).call(this,e))).buttonRef=Object(I.createRef)(),n}return C()(t,e),g()(t,[{key:"componentDidMount",value:function(){new Oe(this.buttonRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onClick,n=e.children,r=e.href,i=e.text,o=e.className,a=e.danger,u=e.disabled,s=e.target,l=e.id,c=e.icon,f=e.trailingIcon,d=e.ariaHaspopup,p=e.ariaExpanded,h=e.ariaControls,m=r?"a":"button";return React.createElement(m,{className:"\n\t\t\t\t\tmdc-button\n\t\t\t\t\t".concat(!i&&"mdc-button--raised","\n\t\t\t\t\t").concat(o&&o,"\n\t\t\t\t\t").concat(a?"mdc-button--danger":"","\n\t\t\t\t"),onClick:t,href:r,ref:this.buttonRef,disabled:u?"disabled":"",target:s||"_self",id:l,"aria-haspopup":d,"aria-expanded":p,"aria-controls":h},c&&c,React.createElement("span",{className:"mdc-button__label"},n),f&&f)}}]),t}(I.Component));xe.propTypes={onClick:S.a.func,children:S.a.string.isRequired,href:S.a.string,text:S.a.bool,className:S.a.string,danger:S.a.bool,disabled:S.a.bool,icon:S.a.element,trailingIcon:S.a.element,ariaHaspopup:S.a.string,ariaExpanded:S.a.bool,ariaControls:S.a.string},xe.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""};var we=xe;var Ce=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#F9BB2D",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"warning-title warning-desc"},React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))};var Te=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#EA4336",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"error-title error-desc"},React.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}))},Se=function(e){function t(e){var n;return m()(this,t),(n=_()(this,E()(t).call(this,e))).state={isClosed:!1},n.cardRef=Object(I.createRef)(),n.handleDismiss=n.handleDismiss.bind(x()(n)),0<n.props.dismissExpires&&n.expireDismiss(),n.props.showOnce&&Lt.setCache("notification::displayed::".concat(n.props.id),new Date),n}return C()(t,e),g()(t,[{key:"handleDismiss",value:function(e){var t=this,n=this.state.isClosed,r=this.cardRef.current;e.preventDefault(),this.setState({isClosed:!n}),setTimeout((function(){Lt.setCache("notification::dismissed::".concat(t.props.id),new Date),r.style.display="none";var e=new Event("notificationDismissed");document.dispatchEvent(e)}),350)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,n=e.dismissExpires,r=Lt.getCache("notification::dismissed::".concat(t));if(r){var i=new Date(r);i.setSeconds(i.getSeconds()+parseInt(n,10)),i<new Date&&Lt.deleteCache("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var e=this.state.isClosed,t=this.props,n=t.children,r=t.id,i=t.title,o=t.description,a=t.blockData,u=t.winImage,s=t.smallImage,l=t.format,c=t.learnMoreURL,f=t.learnMoreDescription,d=t.learnMoreLabel,h=t.ctaLink,m=t.ctaLabel,y=t.ctaTarget,g=t.type,v=t.dismiss,_=t.isDismissable,b=t.logo,E=t.module,O=t.moduleName,x=t.pageIndex;if(Lt.getCache("notification::dismissed::".concat(r)))return null;var w,C=e?"is-closed":"is-open",T="large"===l&&"win-stats-increase"===g,S="mdc-layout-grid__cell--span-12";"large"===l?(S="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",T&&(S="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===l&&(S="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),w="win-warning"===g?React.createElement(Ce,null):"win-error"===g?React.createElement(Te,null):"";var k=React.createElement(I.Fragment,null,a&&React.createElement("div",{className:"mdc-layout-grid__inner"},Object(p.map)(a,(function(e,t){return React.createElement("div",{key:t,className:"mdc-layout-grid__cell ".concat(T?"mdc-layout-grid__cell--span-5-desktop":"mdc-layout-grid__cell--span-4-desktop")},React.createElement("div",{className:"googlesitekit-publisher-win__stats"},React.createElement(ie,e)))})))),A=React.createElement(I.Fragment,null,React.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},i),o&&React.createElement("div",{className:"googlesitekit-publisher-win__desc"},React.createElement("p",null,o,d&&React.createElement(I.Fragment,null," ",React.createElement(D,{href:c,external:!0,inherit:!0},d),f),x&&React.createElement("span",{className:"googlesitekit-publisher-win__detect"},x))),n),P=E?React.createElement(ne,{id:E,height:"19",width:"19"}):React.createElement(ne,{id:"logo-g",height:"34",width:"32"});return React.createElement("section",{ref:this.cardRef,className:"\n\t\t\t\tgooglesitekit-publisher-win\n\t\t\t\t".concat(l?"googlesitekit-publisher-win--".concat(l):"","\n\t\t\t\t").concat(g?"googlesitekit-publisher-win--".concat(g):"","\n\t\t\t\t").concat(C?"googlesitekit-publisher-win--".concat(C):"","\n\t\t\t")},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},b&&React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12 ".concat(T?"mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet":"")},React.createElement("div",{className:"googlesitekit-publisher-win__logo"},P),O&&React.createElement("div",{className:"googlesitekit-publisher-win__module-name"},O)),s&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},React.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:s})),React.createElement("div",{className:"mdc-layout-grid__cell ".concat(S)},T?React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},A),React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},k)):React.createElement(I.Fragment,null,A,k),h&&React.createElement(we,{href:h,target:y},m),_&&v&&React.createElement(D,{onClick:this.handleDismiss},v)),u&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement("div",{className:"googlesitekit-publisher-win__image-large"},React.createElement("img",{alt:"",src:u}))),("win-error"===g||"win-warning"===g)&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},React.createElement("div",{className:"googlesitekit-publisher-win__icons"},w)))))}}]),t}(I.Component);Se.propTypes={id:S.a.string.isRequired,title:S.a.string.isRequired,description:S.a.string,learnMoreURL:S.a.string,learnMoreDescription:S.a.string,learnMoreLabel:S.a.string,blockData:S.a.array,winImage:S.a.string,smallImage:S.a.string,format:S.a.string,ctaLink:S.a.string,ctaLabel:S.a.string,type:S.a.string,dismiss:S.a.string,isDismissable:S.a.bool,logo:S.a.bool,module:S.a.string,moduleName:S.a.string,pageIndex:S.a.string,dismissExpires:S.a.number,showOnce:S.a.bool},Se.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1};var Ie=Se,ke=function(){var e=googlesitekit.admin.connectURL;return React.createElement(Ie,{id:"authentication error",title:Q("Issue accessing data","google-site-kit"),description:Q("You need to reauthenticate your Google account.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0,ctaLink:e,ctaLabel:Q("Click here","google-site-kit")})},Ae=function(){return React.createElement(Ie,{id:"permission error",title:Q("Permissions issue accessing data","google-site-kit"),description:Q("This account does not have access to the requested data.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0})},Pe=n(21),Le=n.n(Pe);function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ne(e,t,n[t])}))}return e}function De(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var je=function(e){function t(e,n){var r=e.headers,i=void 0===r?{}:r;for(var o in i)if("x-wp-nonce"===o.toLowerCase())return n(e);return n(Re({},e,{headers:Re({},i,{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},Fe=function(e,t){var n,r,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),i=(r=e.endpoint.replace(/^\//,""))?n+"/"+r:n),delete e.namespace,delete e.endpoint,t(Re({},e,{path:i}))},Me=function(e){return function(t,n){return Fe(t,(function(t){var r,i=t.url,o=t.path;return"string"==typeof o&&(r=e,-1!==e.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(o=o.replace("?","&")),i=r+o),n(Re({},t,{url:i}))}))}},He=function(e){return function(t,n){var r=t.parse,i=void 0===r||r;if("string"==typeof t.path){var o=t.method||"GET",a=function(e){var t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):r}(t.path);if(i&&"GET"===o&&e[a])return Promise.resolve(e[a].body);if("OPTIONS"===o&&e[o]&&e[o][a])return Promise.resolve(e[o][a])}return n(t)}},Be=n(24),Ue=n.n(Be);function ze(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}var Ve=n(14);function We(e){var t=/^\S+?\?([^\s#]+)/.exec(e);if(t)return t[1]}function Ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(Object(Ve.parse)(e.substr(r+1)),t),n=n.substr(0,r)),n+"?"+Object(Ve.stringify)(t)}function Ke(e,t){return void 0!==function(e,t){var n=e.indexOf("?");return(-1!==n?Object(Ve.parse)(e.substr(n+1)):{})[t]}(e,t)}var qe=function(e){return e.json?e.json():Promise.reject(e)},Xe=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},$e=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),n=e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},Qe=function(){var e,t=(e=Ue.a.mark((function e(t,n){var r,i,o,a,u,s;return Ue.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if($e(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,n(Re({},(c={per_page:100},f=void 0,d=void 0,f=(l=t).path,d=l.url,Re({},De(l,["path","url"]),{url:d&&Ge(d,c),path:f&&Ge(f,c)})),{parse:!1}));case 6:return r=e.sent,e.next=9,qe(r);case 9:if(i=e.sent,Array.isArray(i)){e.next=12;break}return e.abrupt("return",i);case 12:if(o=Xe(r)){e.next=15;break}return e.abrupt("return",i);case 15:a=[].concat(i);case 16:if(!o){e.next=27;break}return e.next=19,n(Re({},t,{path:void 0,url:o,parse:!1}));case 19:return u=e.sent,e.next=22,qe(u);case 22:s=e.sent,a=a.concat(s),o=Xe(u),e.next=16;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}var l,c,f,d}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ze(o,r,i,a,u,"next",e)}function u(e){ze(o,r,i,a,u,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}(),Ye=new Set(["PATCH","PUT","DELETE"]),Ze="GET";var Je=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},et=function(e){var t={code:"invalid_json",message:Q("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},tt=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(Je(e,t)).catch((function(e){return nt(e,t)}))};function nt(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))throw e;return et(e).then((function(e){var t={code:"unknown_error",message:Q("An unknown error occurred.")};throw e||t}))}var rt=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e,t);var n=0;return t(Re({},e,{parse:!1})).catch((function(r){var i=r.headers.get("x-wp-upload-attachment-id");return r.status>=500&&r.status<600&&i?function e(r){return n++,t({path:"/wp/v2/media/".concat(r,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return n<5?e(r):(t({path:"/wp/v2/media/".concat(r,"?force=true"),method:"DELETE"}),Promise.reject())}))}(i).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:Q("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(r)})):nt(r,e.parse)})).then((function(t){return tt(t,e.parse)}))},it={Accept:"application/json, */*;q=0.1"},ot={credentials:"include"},at=[function(e,t){return"string"!=typeof e.url||Ke(e.url,"_locale")||(e.url=Ge(e.url,{_locale:"user"})),"string"!=typeof e.path||Ke(e.path,"_locale")||(e.path=Ge(e.path,{_locale:"user"})),t(e,t)},Fe,function(e,t){var n=e.method,r=void 0===n?Ze:n;return Ye.has(r.toUpperCase())&&(e=Re({},e,{headers:Re({},e.headers,{"X-HTTP-Method-Override":r,"Content-Type":"application/json"}),method:"POST"})),t(e,t)},Qe];var ut=function(e){if(e.status>=200&&e.status<300)return e;throw e},st=function(e){var t=e.url,n=e.path,r=e.data,i=e.parse,o=void 0===i||i,a=De(e,["url","path","data","parse"]),u=e.body,s=e.headers;return s=Re({},it,s),r&&(u=JSON.stringify(r),s["Content-Type"]="application/json"),window.fetch(t||n,Re({},ot,a,{body:u,headers:s})).then(ut).catch((function(e){return nt(e,o)})).then((function(e){return tt(e,o)}))};function lt(e){var t=[].concat(at,[st]);return new Promise((function(n,r){(function e(n){return function(r){var i=t[n];return n===t.length-1?i(r):i(r,e(n+1))}})(0)(e).then(n).catch((function(t){if("rest_cookie_invalid_nonce"!==t.code)return r(t);window.fetch(lt.nonceEndpoint).then(ut).then((function(e){return e.text()})).then((function(t){lt.nonceMiddleware.nonce=t,lt(e).then(n).catch(r)})).catch(r)}))}))}lt.use=function(e){at.unshift(e)},lt.setFetchHandler=function(e){st=e},lt.createNonceMiddleware=je,lt.createPreloadingMiddleware=He,lt.createRootURLMiddleware=Me,lt.fetchAllMiddleware=Qe,lt.mediaUploadMiddleware=rt;var ct=lt;var ft=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var dt=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var pt=function(e){return function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;if(dt(t)&&ft(n))if("function"==typeof r)if("number"==typeof i){var o={callback:r,priority:i,namespace:n};if(e[t]){var a,u=e[t].handlers;for(a=u.length;a>0&&!(i>=u[a-1].priority);a--);a===u.length?u[a]=o:u.splice(a,0,o),(e.__current||[]).forEach((function(e){e.name===t&&e.currentIndex>=a&&e.currentIndex++}))}else e[t]={handlers:[o],runs:0};"hookAdded"!==t&&wt("hookAdded",t,n,r,i)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var ht=function(e,t){return function(n,r){if(dt(n)&&(t||ft(r))){if(!e[n])return 0;var i=0;if(t)i=e[n].handlers.length,e[n]={runs:e[n].runs,handlers:[]};else for(var o=e[n].handlers,a=function(t){o[t].namespace===r&&(o.splice(t,1),i++,(e.__current||[]).forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},u=o.length-1;u>=0;u--)a(u);return"hookRemoved"!==n&&wt("hookRemoved",n,r),i}}};var mt=function(e){return function(t,n){return void 0!==n?t in e&&e[t].handlers.some((function(e){return e.namespace===n})):t in e}};var yt=function(e,t){return function(n){e[n]||(e[n]={handlers:[],runs:0}),e[n].runs++;var r=e[n].handlers;for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(!r||!r.length)return t?o[0]:void 0;var u={name:n,currentIndex:0};for(e.__current.push(u);u.currentIndex<r.length;){var s=r[u.currentIndex],l=s.callback.apply(null,o);t&&(o[0]=l),u.currentIndex++}return e.__current.pop(),t?o[0]:void 0}};var gt=function(e){return function(){return e.__current&&e.__current.length?e.__current[e.__current.length-1].name:null}};var vt=function(e){return function(t){return void 0===t?void 0!==e.__current[0]:!!e.__current[0]&&t===e.__current[0].name}};var _t=function(e){return function(t){if(dt(t))return e[t]&&e[t].runs?e[t].runs:0}};var bt=function(){var e=Object.create(null),t=Object.create(null);return e.__current=[],t.__current=[],{addAction:pt(e),addFilter:pt(t),removeAction:ht(e),removeFilter:ht(t),hasAction:mt(e),hasFilter:mt(t),removeAllActions:ht(e,!0),removeAllFilters:ht(t,!0),doAction:yt(e),applyFilters:yt(t,!0),currentAction:gt(e),currentFilter:gt(t),doingAction:vt(e),doingFilter:vt(t),didAction:_t(e),didFilter:_t(t),actions:e,filters:t}}(),Et=bt.addAction,Ot=bt.addFilter,xt=(bt.removeAction,bt.removeFilter),wt=(bt.hasAction,bt.hasFilter,bt.removeAllActions,bt.removeAllFilters,bt.doAction),Ct=bt.applyFilters;bt.currentAction,bt.currentFilter,bt.doingAction,bt.doingFilter,bt.didAction,bt.didFilter,bt.actions,bt.filters;function Tt(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tt(n,!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var It=function(){googlesitekit.admin=googlesitekit.admin||{},"string"==typeof googlesitekit.admin.datacache&&(googlesitekit.admin.datacache=JSON.parse(googlesitekit.admin.datacache)),"object"!==i()(googlesitekit.admin.datacache)&&(googlesitekit.admin.datacache={})},kt=function(e,t){var n=St({data:{}},e);return n.data=St({dateRange:t},n.data),n},At={maxRequests:10,init:function(){googlesitekit.initialized||(googlesitekit.initialized=!0,this.collectModuleData=this.collectModuleData.bind(this),googlesitekit.cache=[],Et("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingData",this.collectModuleData))},combinedGetFromCache:function(e){var t=this;return new Promise((function(n,r){try{var i=[],o=Gt();Object(p.each)(e,(function(e){var n=kt(e,o);n.key=t.getCacheKey(n.type,n.identifier,n.datapoint,n.data);var r=t.getCache(n.key,n.maxAge);void 0!==r&&(i[n.key]=r,t.resolve(n,r))})),n(i)}catch(e){r()}}))},combinedGet:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[],i=25,o=Gt();Object(p.each)(e,(function(e){var n=kt(e,o);n.key=t.getCacheKey(n.type,n.identifier,n.datapoint,n.data);var a=t.getCache(n.key,n.maxAge);void 0!==a?(setTimeout((function(){t.resolve(n,a)}),i),i+=25):r.push(n)})),r=Object(p.sortBy)(r,"priority");var a=[],u=[],s={},l=!!r.find((function(e){return e.priority<10}));Object(p.each)(r,(function(e,t){!n&&10<=e.priority&&l?u.push(e):s[e.key]?s[e.key].push(t):(s[e.key]=[t],a.push(e))}));var c=10,f=a.slice(0,c),d=a.slice(c);if(d=d.concat(u),0!==f.length||0!==d.length){0<d.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(d,!0)}),50):this.maxRequests=10;var h=null!==Bt("datacache");return ct({path:Ge("/google-site-kit/v1/data/".concat(h?"?datacache":""),{request:JSON.stringify(f)}),method:"GET"}).then((function(e){Object(p.each)(e,(function(e,n){if(e.xdebug_message)console.log("data_error",e.xdebug_message);else{if(!s[n])return void console.log("data_error","unknown response key "+n);e.error_data&&e.error_data[403]&&e.error_data[403].reason&&("insufficientPermissions"===e.error_data[403].reason?Ot("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",Ut(ke),1):"forbidden"===e.error_data[403].reason&&Ot("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",Ut(Ae),1),Ot("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return xt("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+1}))),Object(p.each)(s[n],(function(n){var i=r[n];t.setCache(i.key,e),t.resolve(i,e)}))}0===d.length&&wt("googlesitekit.dataLoaded","api")}))})).catch((function(e){console.log("error",e)}))}wt("googlesitekit.dataLoaded","cache")},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},setCache:function(e,t){if(void 0!==t&&(!t||"object"!==i()(t)||!t.error&&!t.errors)){It(),googlesitekit.admin.datacache[e]=Object(p.cloneDeep)(t);var n={value:t,date:Date.now()/1e3};Dt().setItem("googlesitekit_"+e,JSON.stringify(n))}},getCache:function(e,t){if(!googlesitekit.admin.nojscache){if(It(),void 0!==googlesitekit.admin.datacache[e])return googlesitekit.admin.datacache[e];var n=JSON.parse(Dt().getItem("googlesitekit_"+e));return n&&"object"===i()(n)&&n.date&&(!t||Date.now()/1e3-n.date<t)?(googlesitekit.admin.datacache[e]=Object(p.cloneDeep)(n.value),Object(p.cloneDeep)(googlesitekit.admin.datacache[e])):void 0}},deleteCache:function(e){It(),delete googlesitekit.admin.datacache[e],Dt().removeItem("googlesitekit_"+e)},invalidateCacheGroup:function(e,t,n){var r=this.getCacheKey(e,t,n);It(),Object.keys(googlesitekit.admin.datacache).forEach((function(e){0!==e.indexOf(r+"::")&&e!==r||delete googlesitekit.admin.datacache[e]})),Object.keys(Dt()).forEach((function(e){0!==e.indexOf("googlesitekit_"+r+"::")&&e!=="googlesitekit_"+r||Dt().removeItem(e)}))},collectModuleData:function(e,t){var n=Ct("googlesitekit.module"+e+"DataRequest",[],t);0!==n.length&&this.combinedGet(n)},get:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.getCacheKey(e,t,n,i);if(!o){var u=this.getCache(a,3600);if(void 0!==u)return new Promise((function(e){e(u)}))}return ct({path:Ge("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),i)}).then((function(e){return o||r.setCache(a,e),new Promise((function(t){t(e)}))})).catch((function(e){return Promise.reject(e)}))},getNotifications:function(e){var t,n,r,i=arguments;return c.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=i.length>1&&void 0!==i[1]?i[1]:0,n=[],e){o.next=4;break}return o.abrupt("return",n);case 4:if(r=this.getCacheKey("modules",e,"notifications"),(n=At.getCache(r,t))&&0!==n.length){o.next=11;break}return o.next=9,c.a.awrap(ct({path:"/google-site-kit/v1/modules/".concat(e,"/notifications/")}));case 9:n=o.sent,At.setCache(r,n);case 11:return o.abrupt("return",n);case 12:case"end":return o.stop()}}),null,this)},set:function(e,t,n,r){var i={};return i.data=r,ct({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),data:i,method:"POST"}).then((function(r){return At.invalidateCacheGroup(e,t,n),new Promise((function(e){e(r)}))}))},getCacheKey:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=[],a=[e,t,n],u=0,s=a;u<s.length;u++){var l=s[u];if(!l||!l.length)break;o.push(l)}return 3===o.length&&r&&"object"===i()(r)&&Object.keys(r).length&&o.push(Le()(JSON.stringify(Kt(r)))),o.join("::")},setModuleActive:function(e,t){return ct({path:"/google-site-kit/v1/modules/".concat(e),data:{active:t},method:"POST"}).then((function(e){return new Promise((function(t){t(e)}))})).catch((function(e){return Promise.reject(e)}))}};At.init();var Pt,Lt=At,Nt=function(e){var t=window[e];if(!t)return!1;try{var n="__storage_test__";return t.setItem(n,n),t.removeItem(n),!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}},Rt=function(){function e(){m()(this,e)}return g()(e,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),e}(),Dt=function(){return Pt||(Pt=Nt("sessionStorage")?window.sessionStorage:Nt("localStorage")?window.localStorage:new Rt),Pt};function jt(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jt(n,!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mt=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}},Ht=function(e){for(var t=location.search.substr(1).split("&"),n={},r=0;r<t.length;r++)n[t[r].split("=")[0]]=decodeURIComponent(t[r].split("=")[1]);return e?n.hasOwnProperty(e)?decodeURIComponent(n[e].replace(/\+/g," ")):"":n},Bt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,n=new URL(t.href);if(e)return n.searchParams&&n.searchParams.get?n.searchParams.get(e):Ht(e);var r={},i=!0,o=!1,a=void 0;try{for(var u,s=n.searchParams.entries()[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var l=d()(u.value,2),c=l[0],f=l[1];r[c]=f}}catch(e){o=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw a}}return r},Ut=function(e,t){return function(n){return function(r){return k.a.createElement(e,a()({},r,t,{OriginalComponent:n}))}}},zt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if("undefined"!=typeof gtag){var i=googlesitekit.admin,o=i.siteURL,a=i.siteUserID,u=googlesitekit.setup.isFirstAdmin;return googlesitekit.admin.trackingOptin?gtag("event",t,{send_to:googlesitekit.admin.trackingID,event_category:e,event_label:n,event_value:r,dimension1:Object(p.trimEnd)(o,"/"),dimension2:u?"true":"false",dimension3:a}):void 0}},Vt=function(e,t){var n=!1;switch(t){case"analytics":(n=!!(n=new RegExp(/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/gm).exec(e))&&n[1])||(n=!!(n=new RegExp(/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/gm).exec(e))&&n[1]);break;case"adsense":(n=!!(n=new RegExp(/google_ad_client: ?["|'](.*?)["|']/gm).exec(e))&&n[1])||(n=!!(n=new RegExp(/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/gm).exec(e))&&n[1])}return n};function Wt(){return Ct("googlesitekit.dateRange",Q("Last 28 days","google-site-kit"))}function Gt(){return e=Wt(),Object(p.toLower)(Object(p.deburr)(Object(p.trim)(e.replace(/[\s./_]+/g,"-"),"-")));var e}function Kt(e){var t={};return Object.keys(e).sort().forEach((function(n){var r=e[n];r&&"object"===i()(r)&&!Array.isArray(r)&&(r=Kt(r)),t[n]=r})),t}var qt=Lt.setCache,Xt=Lt.getCache,$t=Lt.deleteCache,Qt=Lt.invalidateCacheGroup,Yt=Lt.getCacheKey;window.googlesitekit=window.googlesitekit||{},googlesitekit.testFunctions={getTimeInSeconds:Mt,changeToPercent:function(e,t){if("0"===e||0===e||isNaN(e))return"";var n=((t-e)/e*100).toFixed(1);return isNaN(n)||"Infinity"===n?"":n},prepareSecondsForDisplay:function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},removeURLParameter:function(e,t){var n=new URL(e);return n.searchParams&&n.searchParams.delete?(n.searchParams.delete(t),n.href):function(e,t){var n=e.split("?");if(2<=n.length){var r=encodeURIComponent(t)+"=",i=n[1].split(/[&;]/g).filter((function(e){return-1===e.lastIndexOf(r,0)}));return e=n[0]+"/"+(0<i.length?"?"+i.join("&"):"")}return e}(e,t)},decodeHtmlEntity:function(e){var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(p.unescape)(t)},readableLargeNumber:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t=Object(p.isUndefined)(e)?0:1e6<e?(e/=1e6).toFixed(1)+"M":1e3<e?99<(e/=1e3)?Math.round(e)+"K":e.toFixed(1)+"K":e,(Object(p.isNull)(e)||Object(p.isUndefined)(e)||isNaN(e))&&(t="",e=0),0===e)return t="0.00",n?new Intl.NumberFormat(navigator.language,{style:"currency",currency:n}).format(e):e;if(!1!==n&&""!==t){var r=new Intl.NumberFormat(navigator.language,{style:"currency",currency:n}).formatToParts(e),i=r.find((function(e){return"decimal"===e.type}));!Object(p.isUndefined)(i)&&!Object(p.isUndefined)(i.value)&&1e3>e&&(t=Number.isInteger(e)?e:e.replace(".",i.value));var o=r.find((function(e){return"currency"===e.type})),a=o?o.value:"";return"".concat(a).concat(t)}return t.toString()},numberFormat:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t||(t=navigator.language),t=t.replace("_","-").toLocaleLowerCase(),new Intl.NumberFormat(t).format(e)},getDaysBetweenDates:function(e,t){var n=1e3*Mt("day"),r=e.getTime(),i=t.getTime();return Math.round(Math.abs(r-i)/n)},getQueryParameter:Bt,extractForSparkline:function(e,t){return Object(p.map)(e,(function(e,n){return[e[0],e[t]||(0===n?"":0)]}))},getReAuthURL:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:googlesitekit,r=n.admin,i=r.connectURL,o=r.adminRoot,a=n.setup.needReauthenticate,u=n.modules[e].screenID,s="pagespeed-insights"===e?{notification:"authentication_success",reAuth:void 0}:{},l=Ge(o,Ft({page:e&&t&&u?u:"googlesitekit-dashboard",slug:e,reAuth:t},s));if(!a)return l;var c=encodeURIComponent(We(l));return Ge(i,{redirect:l=o+"?"+c,status:t})},fillFilterWithComponent:Ut,getSiteKitAdminURL:function(e,t){return e||(e="googlesitekit-dashboard"),Ge(googlesitekit.admin.adminRoot,t=Ft({page:e},t))},validateJSON:function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},validateOptimizeID:function(e){return e.match(/^GTM-[a-zA-Z\d]{7}$/)},appendNotificationsCount:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,n=null,r=document.querySelector("#toplevel_page_googlesitekit-dashboard #googlesitekit-notifications-counter"),i=document.querySelector("#wp-admin-bar-google-site-kit #googlesitekit-notifications-counter");if(r&&i)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),n=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===n)return!1;var o=document.createElement("span");o.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e)),o.setAttribute("id","googlesitekit-notifications-counter");var a=document.createElement("span");a.setAttribute("class","plugin-count"),a.setAttribute("aria-hidden","true"),a.textContent=e;var u=document.createElement("span");return u.setAttribute("class","screen-reader-text"),u.textContent=Z(Y("%d notification","%d notifications",e,"google-site-kit"),e),o.appendChild(a),o.appendChild(u),t&&null===r&&t.appendChild(o),n&&null===i&&n.appendChild(o),o},sendAnalyticsTrackingEvent:zt,storageAvailable:Nt,findTagInHtmlContent:function(e,t){return!!e&&Vt(e,t)},activateOrDeactivateModule:function(e,t,n){return e.setModuleActive(t,n).then((function(e){return window.googlesitekit.modules&&window.googlesitekit.modules[t]&&(window.googlesitekit.modules[t].active=e.active),zt("".concat(t,"_setup"),e.active?"module_activate":"module_deactivate",t),new Promise((function(t){t(e)}))}))},toggleConfirmModuleSettings:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:googlesitekit,o=i.modules[e],a=o.settings,u=o.setupComplete,s=r||document.getElementById("confirm-changes-".concat(e));if(u&&s){var l=[];Object.keys(n).forEach((function(e){-1<Object.keys(t).indexOf(e)&&(l[t[e]]=n[e])}));var c=[];Object.keys(a).forEach((function(e){-1<Object.values(t).indexOf(e)&&(c[e]=a[e])}));var f=Object.keys(c).filter((function(e){return c[e]!==l[e]}));if(0<f.length){if(r)return!0;s.removeAttribute("disabled")}else{if(r)return!1;s.setAttribute("disabled","disabled")}}},showErrorNotification:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ot("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Ut(e,t),1)},setCache:qt,getCache:Xt,deleteCache:$t,invalidateCacheGroup:Qt,getCacheKey:Yt},googlesitekit.testUtilities={md5:Le.a}}]);
|
824 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
825 |
* THE SOFTWARE.
|
826 |
*/
|
827 |
+
var ve=["touchstart","pointerdown","mousedown","keydown"],_e=["touchend","pointerup","mouseup","contextmenu"],be=[],Ee=function(e){function t(n){var r=e.call(this,ue({},t.defaultAdapter,n))||this;return r.activationAnimationHasEnded_=!1,r.activationTimer_=0,r.fgDeactivationRemovalTimer_=0,r.fgScale_="0",r.frame_={width:0,height:0},r.initialSize_=0,r.layoutFrame_=0,r.maxRadius_=0,r.unboundedCoords_={left:0,top:0},r.activationState_=r.defaultActivationState_(),r.activationTimerCallback_=function(){r.activationAnimationHasEnded_=!0,r.runDeactivationUXLogicIfReady_()},r.activateHandler_=function(e){return r.activate_(e)},r.deactivateHandler_=function(){return r.deactivate_()},r.focusHandler_=function(){return r.handleFocus()},r.blurHandler_=function(){return r.handleBlur()},r.resizeHandler_=function(){return r.layout()},r}return ae(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return he},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return me},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ye},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var r=t.cssClasses,i=r.ROOT,o=r.UNBOUNDED;requestAnimationFrame((function(){e.adapter_.addClass(i),e.adapter_.isUnbounded()&&(e.adapter_.addClass(o),e.layoutInternal_())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,r=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter_.removeClass(r),e.adapter_.removeClass(i),e.removeCssVars_()}))}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},t.prototype.activate=function(e){this.activate_(e)},t.prototype.deactivate=function(){this.deactivate_()},t.prototype.layout=function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){e.layoutInternal_(),e.layoutFrame_=0}))},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter_.addClass(n):this.adapter_.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter_.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter_.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},t.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers_=function(e){var t=this;e&&(ve.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.activateHandler_)})),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},t.prototype.registerDeactivationHandlers_=function(e){var t=this;"keydown"===e.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):_e.forEach((function(e){t.adapter_.registerDocumentInteractionHandler(e,t.deactivateHandler_)}))},t.prototype.deregisterRootHandlers_=function(){var e=this;ve.forEach((function(t){e.adapter_.deregisterInteractionHandler(t,e.activateHandler_)})),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)},t.prototype.deregisterDeactivationHandlers_=function(){var e=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),_e.forEach((function(t){e.adapter_.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)}))},t.prototype.removeCssVars_=function(){var e=this,n=t.strings;Object.keys(n).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter_.updateCssVariable(n[t],null)}))},t.prototype.activate_=function(e){var t=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var r=this.previousActivationEvent_;if(!(r&&void 0!==e&&r.type!==e.type))n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&be.length>0&&be.some((function(e){return t.adapter_.containsEventTarget(e)}))?this.resetActivationState_():(void 0!==e&&(be.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){be=[],n.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(n.wasElementMadeActive=t.checkElementMadeActive_(e),n.wasElementMadeActive&&t.animateActivation_()),n.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())})))}}},t.prototype.checkElementMadeActive_=function(e){return void 0===e||"keydown"!==e.type||this.adapter_.isSurfaceActive()},t.prototype.animateActivation_=function(){var e=this,n=t.strings,r=n.VAR_FG_TRANSLATE_START,i=n.VAR_FG_TRANSLATE_END,o=t.cssClasses,a=o.FG_DEACTIVATION,u=o.FG_ACTIVATION,s=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var l="",c="";if(!this.adapter_.isUnbounded()){var f=this.getFgTranslationCoordinates_(),d=f.startPoint,p=f.endPoint;l=d.x+"px, "+d.y+"px",c=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(r,l),this.adapter_.updateCssVariable(i,c),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(a),this.adapter_.computeBoundingRect(),this.adapter_.addClass(u),this.activationTimer_=setTimeout((function(){return e.activationTimerCallback_()}),s)},t.prototype.getFgTranslationCoordinates_=function(){var e,t=this.activationState_,n=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var r,i,o=t.x,a=t.y,u=o+n.left,s=a+n.top;if("touchstart"===e.type){var l=e;r=l.changedTouches[0].pageX-u,i=l.changedTouches[0].pageY-s}else{var c=e;r=c.pageX-u,i=c.pageY-s}return{x:r,y:i}}(n,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:e.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},t.prototype.runDeactivationUXLogicIfReady_=function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,r=this.activationState_,i=r.hasDeactivationUXRun,o=r.isActivated;(i||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout((function(){e.adapter_.removeClass(n)}),ye.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses_=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},t.prototype.resetActivationState_=function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return e.previousActivationEvent_=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivate_=function(){var e=this,t=this.activationState_;if(t.isActivated){var n=ue({},t);t.isProgrammatic?(requestAnimationFrame((function(){return e.animateDeactivation_(n)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){e.activationState_.hasDeactivationUXRun=!0,e.animateDeactivation_(n),e.resetActivationState_()})))}},t.prototype.animateDeactivation_=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady_()},t.prototype.layoutInternal_=function(){var e=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:Math.sqrt(Math.pow(e.frame_.width,2)+Math.pow(e.frame_.height,2))+t.numbers.PADDING,this.initialSize_=Math.floor(n*t.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},t.prototype.updateLayoutCssVars_=function(){var e=t.strings,n=e.VAR_FG_SIZE,r=e.VAR_LEFT,i=e.VAR_TOP,o=e.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(o,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(r,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(i,this.unboundedCoords_.top+"px"))},t}(le),Oe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return ae(t,e),t.attachTo=function(e,n){void 0===n&&(n={isUnbounded:void 0});var r=new t(e);return void 0!==n.isUnbounded&&(r.unbounded=n.isUnbounded),r},t.createAdapter=function(e){return{addClass:function(t){return e.root_.classList.add(t)},browserSupportsCssVars:function(){return function(e,t){void 0===t&&(t=!1);var n=e.CSS,r=de;if("boolean"==typeof de&&!t)return de;if(!(n&&"function"==typeof n.supports))return!1;var i=n.supports("--css-vars","yes"),o=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return r=!(!i&&!o)&&!function(e){var t=e.document,n=t.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",t.body.appendChild(n);var r=e.getComputedStyle(n),i=null!==r&&"solid"===r.borderTopStyle;return n.parentNode&&n.parentNode.removeChild(n),i}(e),t||(de=r),r}(window)},computeBoundingRect:function(){return e.root_.getBoundingClientRect()},containsEventTarget:function(t){return e.root_.contains(t)},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,ge())},deregisterInteractionHandler:function(t,n){return e.root_.removeEventListener(t,n,ge())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return fe(e.root_,":active")},isSurfaceDisabled:function(){return Boolean(e.disabled)},isUnbounded:function(){return Boolean(e.unbounded)},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,ge())},registerInteractionHandler:function(t,n){return e.root_.addEventListener(t,n,ge())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},removeClass:function(t){return e.root_.classList.remove(t)},updateCssVariable:function(t,n){return e.root_.style.setProperty(t,n)}}},Object.defineProperty(t.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(e){this.unbounded_=Boolean(e),this.setUnbounded_()},enumerable:!0,configurable:!0}),t.prototype.activate=function(){this.foundation_.activate()},t.prototype.deactivate=function(){this.foundation_.deactivate()},t.prototype.layout=function(){this.foundation_.layout()},t.prototype.getDefaultFoundation=function(){return new Ee(t.createAdapter(this))},t.prototype.initialSyncWithDOM=function(){var e=this.root_;this.unbounded="mdcRippleIsUnbounded"in e.dataset},t.prototype.setUnbounded_=function(){this.foundation_.setUnbounded(Boolean(this.unbounded_))},t}(ce),xe=(n(22),function(e){function t(e){var n;return m()(this,t),(n=_()(this,E()(t).call(this,e))).buttonRef=Object(I.createRef)(),n}return C()(t,e),g()(t,[{key:"componentDidMount",value:function(){new Oe(this.buttonRef.current)}},{key:"render",value:function(){var e=this.props,t=e.onClick,n=e.children,r=e.href,i=e.text,o=e.className,a=e.danger,u=e.disabled,s=e.target,l=e.id,c=e.icon,f=e.trailingIcon,d=e.ariaHaspopup,p=e.ariaExpanded,h=e.ariaControls,m=r?"a":"button";return React.createElement(m,{className:"\n\t\t\t\t\tmdc-button\n\t\t\t\t\t".concat(!i&&"mdc-button--raised","\n\t\t\t\t\t").concat(o&&o,"\n\t\t\t\t\t").concat(a?"mdc-button--danger":"","\n\t\t\t\t"),onClick:t,href:r,ref:this.buttonRef,disabled:u?"disabled":"",target:s||"_self",id:l,"aria-haspopup":d,"aria-expanded":p,"aria-controls":h},c&&c,React.createElement("span",{className:"mdc-button__label"},n),f&&f)}}]),t}(I.Component));xe.propTypes={onClick:S.a.func,children:S.a.string.isRequired,href:S.a.string,text:S.a.bool,className:S.a.string,danger:S.a.bool,disabled:S.a.bool,icon:S.a.element,trailingIcon:S.a.element,ariaHaspopup:S.a.string,ariaExpanded:S.a.bool,ariaControls:S.a.string},xe.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""};var we=xe;var Ce=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#F9BB2D",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"warning-title warning-desc"},React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))};var Te=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#EA4336",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"error-title error-desc"},React.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}))},Se=function(e){function t(e){var n;return m()(this,t),(n=_()(this,E()(t).call(this,e))).state={isClosed:!1},n.cardRef=Object(I.createRef)(),n.handleDismiss=n.handleDismiss.bind(x()(n)),0<n.props.dismissExpires&&n.expireDismiss(),n.props.showOnce&&Lt.setCache("notification::displayed::".concat(n.props.id),new Date),n}return C()(t,e),g()(t,[{key:"handleDismiss",value:function(e){var t=this,n=this.state.isClosed,r=this.cardRef.current;e.preventDefault(),this.setState({isClosed:!n}),setTimeout((function(){Lt.setCache("notification::dismissed::".concat(t.props.id),new Date),r.style.display="none";var e=new Event("notificationDismissed");document.dispatchEvent(e)}),350)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,n=e.dismissExpires,r=Lt.getCache("notification::dismissed::".concat(t));if(r){var i=new Date(r);i.setSeconds(i.getSeconds()+parseInt(n,10)),i<new Date&&Lt.deleteCache("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var e=this.state.isClosed,t=this.props,n=t.children,r=t.id,i=t.title,o=t.description,a=t.blockData,u=t.winImage,s=t.smallImage,l=t.format,c=t.learnMoreURL,f=t.learnMoreDescription,d=t.learnMoreLabel,h=t.ctaLink,m=t.ctaLabel,y=t.ctaTarget,g=t.type,v=t.dismiss,_=t.isDismissable,b=t.logo,E=t.module,O=t.moduleName,x=t.pageIndex;if(Lt.getCache("notification::dismissed::".concat(r)))return null;var w,C=e?"is-closed":"is-open",T="large"===l&&"win-stats-increase"===g,S="mdc-layout-grid__cell--span-12";"large"===l?(S="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",T&&(S="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===l&&(S="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),w="win-warning"===g?React.createElement(Ce,null):"win-error"===g?React.createElement(Te,null):"";var k=React.createElement(I.Fragment,null,a&&React.createElement("div",{className:"mdc-layout-grid__inner"},Object(p.map)(a,(function(e,t){return React.createElement("div",{key:t,className:"mdc-layout-grid__cell ".concat(T?"mdc-layout-grid__cell--span-5-desktop":"mdc-layout-grid__cell--span-4-desktop")},React.createElement("div",{className:"googlesitekit-publisher-win__stats"},React.createElement(ie,e)))})))),A=React.createElement(I.Fragment,null,React.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},i),o&&React.createElement("div",{className:"googlesitekit-publisher-win__desc"},React.createElement("p",null,o,d&&React.createElement(I.Fragment,null," ",React.createElement(D,{href:c,external:!0,inherit:!0},d),f),x&&React.createElement("span",{className:"googlesitekit-publisher-win__detect"},x))),n),P=E?React.createElement(ne,{id:E,height:"19",width:"19"}):React.createElement(ne,{id:"logo-g",height:"34",width:"32"});return React.createElement("section",{ref:this.cardRef,className:"\n\t\t\t\tgooglesitekit-publisher-win\n\t\t\t\t".concat(l?"googlesitekit-publisher-win--".concat(l):"","\n\t\t\t\t").concat(g?"googlesitekit-publisher-win--".concat(g):"","\n\t\t\t\t").concat(C?"googlesitekit-publisher-win--".concat(C):"","\n\t\t\t")},React.createElement("div",{className:"mdc-layout-grid"},React.createElement("div",{className:"mdc-layout-grid__inner"},b&&React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12 ".concat(T?"mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet":"")},React.createElement("div",{className:"googlesitekit-publisher-win__logo"},P),O&&React.createElement("div",{className:"googlesitekit-publisher-win__module-name"},O)),s&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},React.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:s})),React.createElement("div",{className:"mdc-layout-grid__cell ".concat(S)},T?React.createElement("div",{className:"mdc-layout-grid__inner"},React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},A),React.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},k)):React.createElement(I.Fragment,null,A,k),h&&React.createElement(we,{href:h,target:y},m),_&&v&&React.createElement(D,{onClick:this.handleDismiss},v)),u&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},React.createElement("div",{className:"googlesitekit-publisher-win__image-large"},React.createElement("img",{alt:"",src:u}))),("win-error"===g||"win-warning"===g)&&React.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},React.createElement("div",{className:"googlesitekit-publisher-win__icons"},w)))))}}]),t}(I.Component);Se.propTypes={id:S.a.string.isRequired,title:S.a.string.isRequired,description:S.a.string,learnMoreURL:S.a.string,learnMoreDescription:S.a.string,learnMoreLabel:S.a.string,blockData:S.a.array,winImage:S.a.string,smallImage:S.a.string,format:S.a.string,ctaLink:S.a.string,ctaLabel:S.a.string,type:S.a.string,dismiss:S.a.string,isDismissable:S.a.bool,logo:S.a.bool,module:S.a.string,moduleName:S.a.string,pageIndex:S.a.string,dismissExpires:S.a.number,showOnce:S.a.bool},Se.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1};var Ie=Se,ke=function(){var e=googlesitekit.admin.connectURL;return React.createElement(Ie,{id:"authentication error",title:Q("Issue accessing data","google-site-kit"),description:Q("You need to reauthenticate your Google account.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0,ctaLink:e,ctaLabel:Q("Click here","google-site-kit")})},Ae=function(){return React.createElement(Ie,{id:"permission error",title:Q("Permissions issue accessing data","google-site-kit"),description:Q("This account does not have access to the requested data.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0})},Pe=n(21),Le=n.n(Pe);function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ne(e,t,n[t])}))}return e}function De(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var je=function(e){function t(e,n){var r=e.headers,i=void 0===r?{}:r;for(var o in i)if("x-wp-nonce"===o.toLowerCase())return n(e);return n(Re({},e,{headers:Re({},i,{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},Fe=function(e,t){var n,r,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),i=(r=e.endpoint.replace(/^\//,""))?n+"/"+r:n),delete e.namespace,delete e.endpoint,t(Re({},e,{path:i}))},Me=function(e){return function(t,n){return Fe(t,(function(t){var r,i=t.url,o=t.path;return"string"==typeof o&&(r=e,-1!==e.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(o=o.replace("?","&")),i=r+o),n(Re({},t,{url:i}))}))}},He=function(e){return function(t,n){var r=t.parse,i=void 0===r||r;if("string"==typeof t.path){var o=t.method||"GET",a=function(e){var t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):r}(t.path);if(i&&"GET"===o&&e[a])return Promise.resolve(e[a].body);if("OPTIONS"===o&&e[o]&&e[o][a])return Promise.resolve(e[o][a])}return n(t)}},Be=n(24),Ue=n.n(Be);function ze(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}var Ve=n(14);function We(e){var t=/^\S+?\?([^\s#]+)/.exec(e);if(t)return t[1]}function Ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(Object(Ve.parse)(e.substr(r+1)),t),n=n.substr(0,r)),n+"?"+Object(Ve.stringify)(t)}function Ke(e,t){return void 0!==function(e,t){var n=e.indexOf("?");return(-1!==n?Object(Ve.parse)(e.substr(n+1)):{})[t]}(e,t)}var qe=function(e){return e.json?e.json():Promise.reject(e)},Xe=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},$e=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),n=e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},Qe=function(){var e,t=(e=Ue.a.mark((function e(t,n){var r,i,o,a,u,s;return Ue.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if($e(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,n(Re({},(c={per_page:100},f=void 0,d=void 0,f=(l=t).path,d=l.url,Re({},De(l,["path","url"]),{url:d&&Ge(d,c),path:f&&Ge(f,c)})),{parse:!1}));case 6:return r=e.sent,e.next=9,qe(r);case 9:if(i=e.sent,Array.isArray(i)){e.next=12;break}return e.abrupt("return",i);case 12:if(o=Xe(r)){e.next=15;break}return e.abrupt("return",i);case 15:a=[].concat(i);case 16:if(!o){e.next=27;break}return e.next=19,n(Re({},t,{path:void 0,url:o,parse:!1}));case 19:return u=e.sent,e.next=22,qe(u);case 22:s=e.sent,a=a.concat(s),o=Xe(u),e.next=16;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}var l,c,f,d}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ze(o,r,i,a,u,"next",e)}function u(e){ze(o,r,i,a,u,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}(),Ye=new Set(["PATCH","PUT","DELETE"]),Ze="GET";var Je=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},et=function(e){var t={code:"invalid_json",message:Q("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},tt=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(Je(e,t)).catch((function(e){return nt(e,t)}))};function nt(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))throw e;return et(e).then((function(e){var t={code:"unknown_error",message:Q("An unknown error occurred.")};throw e||t}))}var rt=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e,t);var n=0;return t(Re({},e,{parse:!1})).catch((function(r){var i=r.headers.get("x-wp-upload-attachment-id");return r.status>=500&&r.status<600&&i?function e(r){return n++,t({path:"/wp/v2/media/".concat(r,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return n<5?e(r):(t({path:"/wp/v2/media/".concat(r,"?force=true"),method:"DELETE"}),Promise.reject())}))}(i).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:Q("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(r)})):nt(r,e.parse)})).then((function(t){return tt(t,e.parse)}))},it={Accept:"application/json, */*;q=0.1"},ot={credentials:"include"},at=[function(e,t){return"string"!=typeof e.url||Ke(e.url,"_locale")||(e.url=Ge(e.url,{_locale:"user"})),"string"!=typeof e.path||Ke(e.path,"_locale")||(e.path=Ge(e.path,{_locale:"user"})),t(e,t)},Fe,function(e,t){var n=e.method,r=void 0===n?Ze:n;return Ye.has(r.toUpperCase())&&(e=Re({},e,{headers:Re({},e.headers,{"X-HTTP-Method-Override":r,"Content-Type":"application/json"}),method:"POST"})),t(e,t)},Qe];var ut=function(e){if(e.status>=200&&e.status<300)return e;throw e},st=function(e){var t=e.url,n=e.path,r=e.data,i=e.parse,o=void 0===i||i,a=De(e,["url","path","data","parse"]),u=e.body,s=e.headers;return s=Re({},it,s),r&&(u=JSON.stringify(r),s["Content-Type"]="application/json"),window.fetch(t||n,Re({},ot,a,{body:u,headers:s})).then(ut).catch((function(e){return nt(e,o)})).then((function(e){return tt(e,o)}))};function lt(e){var t=[].concat(at,[st]);return new Promise((function(n,r){(function e(n){return function(r){var i=t[n];return n===t.length-1?i(r):i(r,e(n+1))}})(0)(e).then(n).catch((function(t){if("rest_cookie_invalid_nonce"!==t.code)return r(t);window.fetch(lt.nonceEndpoint).then(ut).then((function(e){return e.text()})).then((function(t){lt.nonceMiddleware.nonce=t,lt(e).then(n).catch(r)})).catch(r)}))}))}lt.use=function(e){at.unshift(e)},lt.setFetchHandler=function(e){st=e},lt.createNonceMiddleware=je,lt.createPreloadingMiddleware=He,lt.createRootURLMiddleware=Me,lt.fetchAllMiddleware=Qe,lt.mediaUploadMiddleware=rt;var ct=lt;var ft=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var dt=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var pt=function(e){return function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;if(dt(t)&&ft(n))if("function"==typeof r)if("number"==typeof i){var o={callback:r,priority:i,namespace:n};if(e[t]){var a,u=e[t].handlers;for(a=u.length;a>0&&!(i>=u[a-1].priority);a--);a===u.length?u[a]=o:u.splice(a,0,o),(e.__current||[]).forEach((function(e){e.name===t&&e.currentIndex>=a&&e.currentIndex++}))}else e[t]={handlers:[o],runs:0};"hookAdded"!==t&&wt("hookAdded",t,n,r,i)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var ht=function(e,t){return function(n,r){if(dt(n)&&(t||ft(r))){if(!e[n])return 0;var i=0;if(t)i=e[n].handlers.length,e[n]={runs:e[n].runs,handlers:[]};else for(var o=e[n].handlers,a=function(t){o[t].namespace===r&&(o.splice(t,1),i++,(e.__current||[]).forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},u=o.length-1;u>=0;u--)a(u);return"hookRemoved"!==n&&wt("hookRemoved",n,r),i}}};var mt=function(e){return function(t,n){return void 0!==n?t in e&&e[t].handlers.some((function(e){return e.namespace===n})):t in e}};var yt=function(e,t){return function(n){e[n]||(e[n]={handlers:[],runs:0}),e[n].runs++;var r=e[n].handlers;for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(!r||!r.length)return t?o[0]:void 0;var u={name:n,currentIndex:0};for(e.__current.push(u);u.currentIndex<r.length;){var s=r[u.currentIndex],l=s.callback.apply(null,o);t&&(o[0]=l),u.currentIndex++}return e.__current.pop(),t?o[0]:void 0}};var gt=function(e){return function(){return e.__current&&e.__current.length?e.__current[e.__current.length-1].name:null}};var vt=function(e){return function(t){return void 0===t?void 0!==e.__current[0]:!!e.__current[0]&&t===e.__current[0].name}};var _t=function(e){return function(t){if(dt(t))return e[t]&&e[t].runs?e[t].runs:0}};var bt=function(){var e=Object.create(null),t=Object.create(null);return e.__current=[],t.__current=[],{addAction:pt(e),addFilter:pt(t),removeAction:ht(e),removeFilter:ht(t),hasAction:mt(e),hasFilter:mt(t),removeAllActions:ht(e,!0),removeAllFilters:ht(t,!0),doAction:yt(e),applyFilters:yt(t,!0),currentAction:gt(e),currentFilter:gt(t),doingAction:vt(e),doingFilter:vt(t),didAction:_t(e),didFilter:_t(t),actions:e,filters:t}}(),Et=bt.addAction,Ot=bt.addFilter,xt=(bt.removeAction,bt.removeFilter),wt=(bt.hasAction,bt.hasFilter,bt.removeAllActions,bt.removeAllFilters,bt.doAction),Ct=bt.applyFilters;bt.currentAction,bt.currentFilter,bt.doingAction,bt.doingFilter,bt.didAction,bt.didFilter,bt.actions,bt.filters;function Tt(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tt(n,!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var It=function(){googlesitekit.admin=googlesitekit.admin||{},"string"==typeof googlesitekit.admin.datacache&&(googlesitekit.admin.datacache=JSON.parse(googlesitekit.admin.datacache)),"object"!==i()(googlesitekit.admin.datacache)&&(googlesitekit.admin.datacache={})},kt=function(e,t){var n=St({data:{}},e);return n.data=St({dateRange:t},n.data),n},At={maxRequests:10,init:function(){googlesitekit.initialized||(googlesitekit.initialized=!0,this.collectModuleData=this.collectModuleData.bind(this),googlesitekit.cache=[],Et("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingData",this.collectModuleData))},combinedGetFromCache:function(e){var t=this;return new Promise((function(n,r){try{var i=[],o=Gt();Object(p.each)(e,(function(e){var n=kt(e,o);n.key=t.getCacheKey(n.type,n.identifier,n.datapoint,n.data);var r=t.getCache(n.key,n.maxAge);void 0!==r&&(i[n.key]=r,t.resolve(n,r))})),n(i)}catch(e){r()}}))},combinedGet:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[],i=25,o=Gt();Object(p.each)(e,(function(e){var n=kt(e,o);n.key=t.getCacheKey(n.type,n.identifier,n.datapoint,n.data);var a=t.getCache(n.key,n.maxAge);void 0!==a?(setTimeout((function(){t.resolve(n,a)}),i),i+=25):r.push(n)})),r=Object(p.sortBy)(r,"priority");var a=[],u=[],s={},l=!!r.find((function(e){return e.priority<10}));Object(p.each)(r,(function(e,t){!n&&10<=e.priority&&l?u.push(e):s[e.key]?s[e.key].push(t):(s[e.key]=[t],a.push(e))}));var c=10,f=a.slice(0,c),d=a.slice(c);if(d=d.concat(u),0!==f.length||0!==d.length){0<d.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(d,!0)}),50):this.maxRequests=10;var h=null!==Bt("datacache");return ct({path:Ge("/google-site-kit/v1/data/",{datacache:h||void 0}),data:{request:f},method:"POST"}).then((function(e){Object(p.each)(e,(function(e,n){if(e.xdebug_message)console.log("data_error",e.xdebug_message);else{if(!s[n])return void console.log("data_error","unknown response key "+n);e.error_data&&e.error_data[403]&&e.error_data[403].reason&&("insufficientPermissions"===e.error_data[403].reason?Ot("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",Ut(ke),1):"forbidden"===e.error_data[403].reason&&Ot("googlesitekit.DashboardNotifications","googlesitekit.AuthNotification",Ut(Ae),1),Ot("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return xt("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+1}))),Object(p.each)(s[n],(function(n){var i=r[n];t.setCache(i.key,e),t.resolve(i,e)}))}0===d.length&&wt("googlesitekit.dataLoaded","api")}))})).catch((function(e){console.log("error",e)}))}wt("googlesitekit.dataLoaded","cache")},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},setCache:function(e,t){if(void 0!==t&&(!t||"object"!==i()(t)||!t.error&&!t.errors)){It(),googlesitekit.admin.datacache[e]=Object(p.cloneDeep)(t);var n={value:t,date:Date.now()/1e3};Dt().setItem("googlesitekit_"+e,JSON.stringify(n))}},getCache:function(e,t){if(!googlesitekit.admin.nojscache){if(It(),void 0!==googlesitekit.admin.datacache[e])return googlesitekit.admin.datacache[e];var n=JSON.parse(Dt().getItem("googlesitekit_"+e));return n&&"object"===i()(n)&&n.date&&(!t||Date.now()/1e3-n.date<t)?(googlesitekit.admin.datacache[e]=Object(p.cloneDeep)(n.value),Object(p.cloneDeep)(googlesitekit.admin.datacache[e])):void 0}},deleteCache:function(e){It(),delete googlesitekit.admin.datacache[e],Dt().removeItem("googlesitekit_"+e)},invalidateCacheGroup:function(e,t,n){var r=this.getCacheKey(e,t,n);It(),Object.keys(googlesitekit.admin.datacache).forEach((function(e){0!==e.indexOf(r+"::")&&e!==r||delete googlesitekit.admin.datacache[e]})),Object.keys(Dt()).forEach((function(e){0!==e.indexOf("googlesitekit_"+r+"::")&&e!=="googlesitekit_"+r||Dt().removeItem(e)}))},collectModuleData:function(e,t){var n=Ct("googlesitekit.module"+e+"DataRequest",[],t);0!==n.length&&this.combinedGet(n)},get:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.getCacheKey(e,t,n,i);if(!o){var u=this.getCache(a,3600);if(void 0!==u)return new Promise((function(e){e(u)}))}return ct({path:Ge("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),i)}).then((function(e){return o||r.setCache(a,e),new Promise((function(t){t(e)}))})).catch((function(e){return Promise.reject(e)}))},getNotifications:function(e){var t,n,r,i=arguments;return c.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=i.length>1&&void 0!==i[1]?i[1]:0,n=[],e){o.next=4;break}return o.abrupt("return",n);case 4:if(r=this.getCacheKey("modules",e,"notifications"),(n=At.getCache(r,t))&&0!==n.length){o.next=11;break}return o.next=9,c.a.awrap(ct({path:"/google-site-kit/v1/modules/".concat(e,"/notifications/")}));case 9:n=o.sent,At.setCache(r,n);case 11:return o.abrupt("return",n);case 12:case"end":return o.stop()}}),null,this)},set:function(e,t,n,r){var i={};return i.data=r,ct({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),data:i,method:"POST"}).then((function(r){return At.invalidateCacheGroup(e,t,n),new Promise((function(e){e(r)}))}))},getCacheKey:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=[],a=[e,t,n],u=0,s=a;u<s.length;u++){var l=s[u];if(!l||!l.length)break;o.push(l)}return 3===o.length&&r&&"object"===i()(r)&&Object.keys(r).length&&o.push(Le()(JSON.stringify(Kt(r)))),o.join("::")},setModuleActive:function(e,t){return ct({path:"/google-site-kit/v1/modules/".concat(e),data:{active:t},method:"POST"}).then((function(e){return new Promise((function(t){t(e)}))})).catch((function(e){return Promise.reject(e)}))}};At.init();var Pt,Lt=At,Nt=function(e){var t=window[e];if(!t)return!1;try{var n="__storage_test__";return t.setItem(n,n),t.removeItem(n),!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}},Rt=function(){function e(){m()(this,e)}return g()(e,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),e}(),Dt=function(){return Pt||(Pt=Nt("sessionStorage")?window.sessionStorage:Nt("localStorage")?window.localStorage:new Rt),Pt};function jt(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jt(n,!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mt=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}},Ht=function(e){for(var t=location.search.substr(1).split("&"),n={},r=0;r<t.length;r++)n[t[r].split("=")[0]]=decodeURIComponent(t[r].split("=")[1]);return e?n.hasOwnProperty(e)?decodeURIComponent(n[e].replace(/\+/g," ")):"":n},Bt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,n=new URL(t.href);if(e)return n.searchParams&&n.searchParams.get?n.searchParams.get(e):Ht(e);var r={},i=!0,o=!1,a=void 0;try{for(var u,s=n.searchParams.entries()[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var l=d()(u.value,2),c=l[0],f=l[1];r[c]=f}}catch(e){o=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw a}}return r},Ut=function(e,t){return function(n){return function(r){return k.a.createElement(e,a()({},r,t,{OriginalComponent:n}))}}},zt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if("undefined"!=typeof gtag&&window.googlesitekitTrackingEnabled){var i=googlesitekit.admin,o=i.siteURL,a=i.siteUserID,u=googlesitekit.setup.isFirstAdmin;return gtag("event",t,{send_to:googlesitekit.admin.trackingID,event_category:e,event_label:n,event_value:r,dimension1:Object(p.trimEnd)(o,"/"),dimension2:u?"true":"false",dimension3:a})}},Vt=function(e,t){var n=!1;switch(t){case"analytics":(n=!!(n=new RegExp(/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/gm).exec(e))&&n[1])||(n=!!(n=new RegExp(/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/gm).exec(e))&&n[1]),n||(n=!!(n=new RegExp(/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/gm).exec(e))&&n[1]);break;case"adsense":(n=!!(n=new RegExp(/google_ad_client: ?["|'](.*?)["|']/gm).exec(e))&&n[1])||(n=!!(n=new RegExp(/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/gm).exec(e))&&n[1])}return n};function Wt(){return Ct("googlesitekit.dateRange",Q("Last 28 days","google-site-kit"))}function Gt(){return e=Wt(),Object(p.toLower)(Object(p.deburr)(Object(p.trim)(e.replace(/[\s./_]+/g,"-"),"-")));var e}function Kt(e){var t={};return Object.keys(e).sort().forEach((function(n){var r=e[n];r&&"object"===i()(r)&&!Array.isArray(r)&&(r=Kt(r)),t[n]=r})),t}var qt=Lt.setCache,Xt=Lt.getCache,$t=Lt.deleteCache,Qt=Lt.invalidateCacheGroup,Yt=Lt.getCacheKey;window.googlesitekit=window.googlesitekit||{},googlesitekit.testFunctions={getTimeInSeconds:Mt,changeToPercent:function(e,t){if("0"===e||0===e||isNaN(e))return"";var n=((t-e)/e*100).toFixed(1);return isNaN(n)||"Infinity"===n?"":n},prepareSecondsForDisplay:function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},removeURLParameter:function(e,t){var n=new URL(e);return n.searchParams&&n.searchParams.delete?(n.searchParams.delete(t),n.href):function(e,t){var n=e.split("?");if(2<=n.length){var r=encodeURIComponent(t)+"=",i=n[1].split(/[&;]/g).filter((function(e){return-1===e.lastIndexOf(r,0)}));return e=n[0]+"/"+(0<i.length?"?"+i.join("&"):"")}return e}(e,t)},decodeHtmlEntity:function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(p.unescape)(t)},readableLargeNumber:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t=Object(p.isUndefined)(e)?0:1e6<e?(e/=1e6).toFixed(1)+"M":1e3<e?99<(e/=1e3)?Math.round(e)+"K":e.toFixed(1)+"K":e,(Object(p.isNull)(e)||Object(p.isUndefined)(e)||isNaN(e))&&(t="",e=0),0===e)return t="0.00",n?new Intl.NumberFormat(navigator.language,{style:"currency",currency:n}).format(e):e;if(!1!==n&&""!==t){var r=new Intl.NumberFormat(navigator.language,{style:"currency",currency:n}).formatToParts(e),i=r.find((function(e){return"decimal"===e.type}));!Object(p.isUndefined)(i)&&!Object(p.isUndefined)(i.value)&&1e3>e&&(t=Number.isInteger(e)?e:e.replace(".",i.value));var o=r.find((function(e){return"currency"===e.type})),a=o?o.value:"";return"".concat(a).concat(t)}return t.toString()},numberFormat:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t||(t=navigator.language),t=t.replace("_","-").toLocaleLowerCase(),new Intl.NumberFormat(t).format(e)},getDaysBetweenDates:function(e,t){var n=1e3*Mt("day"),r=e.getTime(),i=t.getTime();return Math.round(Math.abs(r-i)/n)},getQueryParameter:Bt,extractForSparkline:function(e,t){return Object(p.map)(e,(function(e,n){return[e[0],e[t]||(0===n?"":0)]}))},getReAuthURL:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:googlesitekit,r=n.admin,i=r.connectURL,o=r.adminRoot,a=n.setup.needReauthenticate,u=n.modules[e].screenID,s="pagespeed-insights"===e?{notification:"authentication_success",reAuth:void 0}:{},l=Ge(o,Ft({page:e&&t&&u?u:"googlesitekit-dashboard",slug:e,reAuth:t},s));if(!a)return l;var c=encodeURIComponent(We(l));return Ge(i,{redirect:l=o+"?"+c,status:t})},fillFilterWithComponent:Ut,getSiteKitAdminURL:function(e,t){return e||(e="googlesitekit-dashboard"),Ge(googlesitekit.admin.adminRoot,t=Ft({page:e},t))},validateJSON:function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},validateOptimizeID:function(e){return e.match(/^GTM-[a-zA-Z\d]{7}$/)},appendNotificationsCount:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,n=null,r=document.querySelector("#toplevel_page_googlesitekit-dashboard #googlesitekit-notifications-counter"),i=document.querySelector("#wp-admin-bar-google-site-kit #googlesitekit-notifications-counter");if(r&&i)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),n=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===n)return!1;var o=document.createElement("span");o.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e)),o.setAttribute("id","googlesitekit-notifications-counter");var a=document.createElement("span");a.setAttribute("class","plugin-count"),a.setAttribute("aria-hidden","true"),a.textContent=e;var u=document.createElement("span");return u.setAttribute("class","screen-reader-text"),u.textContent=Z(Y("%d notification","%d notifications",e,"google-site-kit"),e),o.appendChild(a),o.appendChild(u),t&&null===r&&t.appendChild(o),n&&null===i&&n.appendChild(o),o},sendAnalyticsTrackingEvent:zt,storageAvailable:Nt,findTagInHtmlContent:function(e,t){return!!e&&Vt(e,t)},activateOrDeactivateModule:function(e,t,n){return e.setModuleActive(t,n).then((function(e){return window.googlesitekit.modules&&window.googlesitekit.modules[t]&&(window.googlesitekit.modules[t].active=e.active),zt("".concat(t,"_setup"),e.active?"module_activate":"module_deactivate",t),new Promise((function(t){t(e)}))}))},toggleConfirmModuleSettings:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:googlesitekit,o=i.modules[e],a=o.settings,u=o.setupComplete,s=r||document.getElementById("confirm-changes-".concat(e));if(u&&s){var l=[];Object.keys(n).forEach((function(e){-1<Object.keys(t).indexOf(e)&&(l[t[e]]=n[e])}));var c=[];Object.keys(a).forEach((function(e){-1<Object.values(t).indexOf(e)&&(c[e]=a[e])}));var f=Object.keys(c).filter((function(e){return c[e]!==l[e]}));if(0<f.length){if(r)return!0;s.removeAttribute("disabled")}else{if(r)return!1;s.setAttribute("disabled","disabled")}}},showErrorNotification:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ot("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Ut(e,t),1)},setCache:qt,getCache:Xt,deleteCache:$t,invalidateCacheGroup:Qt,getCacheKey:Yt},googlesitekit.testUtilities={md5:Le.a}}]);
|
dist/assets/js/googlesitekit-wp-dashboard.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(t){for(var n,a,c=t[0],s=t[1],l=t[2],_=0,p=[];_<c.length;_++)a=c[_],o[a]&&p.push(o[a][0]),o[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);p.length;)p.shift()();return i.push.apply(i,l||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var n={},o={15:0},i=[];function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var s=0;s<a.length;s++)t(a[s]);var u=c;i.push([
|
1 |
+
!function(e){function t(t){for(var n,a,c=t[0],s=t[1],l=t[2],_=0,p=[];_<c.length;_++)a=c[_],o[a]&&p.push(o[a][0]),o[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);p.length;)p.shift()();return i.push.apply(i,l||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var n={},o={15:0},i=[];function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var s=0;s<a.length;s++)t(a[s]);var u=c;i.push([204,0,1]),r()}({0:function(e,t){e.exports=wp.i18n},1:function(e,t){e.exports=wp.element},10:function(e,t){e.exports=wp.hooks},11:function(e,t){e.exports=lodash},18:function(e,t){e.exports=React},204:function(e,t,r){"use strict";r.r(t);var n=r(3),o=r.n(n),i=r(4),a=r.n(i),c=r(5),s=r.n(c),u=r(6),l=r.n(u),_=r(7),p=r.n(_),d=r(1),f=r(26),g=r(39),b=r.n(g),k=r(0),h=r(10),m=(r(9),r(21)),w=function(e){function t(){return o()(this,t),s()(this,l()(t).apply(this,arguments))}return p()(t,e),a()(t,[{key:"render",value:function(){return null}}]),t}(d.Component),y=Object(m.a)("googlesitekit.WPDashboardModule")(w),v=function(e){function t(){return o()(this,t),s()(this,l()(t).apply(this,arguments))}return p()(t,e),a()(t,[{key:"render",value:function(){return null}}]),t}(d.Component),q=Object(m.a)("googlesitekit.WPDashboardHeader")(v),O=r(63),j=function(e){function t(){return o()(this,t),s()(this,l()(t).apply(this,arguments))}return p()(t,e),a()(t,[{key:"render",value:function(){return React.createElement(d.Fragment,null,React.createElement("div",{className:"\n\t\t\t\t\tgooglesitekit-wp-dashboard-stats\n\t\t\t\t\t".concat(googlesitekit.modules.analytics&&googlesitekit.modules.analytics.active?"googlesitekit-wp-dashboard-stats--fourup":"","\n\t\t\t\t")},React.createElement(q,{key:"googlesitekit-wp-dashboard-header"}),!googlesitekit.modules.analytics.active&&React.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},React.createElement(O.a,{title:Object(k.__)("See unique vistors, goal completions, top pages and more.","google-site-kit"),ctaLabel:Object(k.__)("Set up analytics","google-site-kit"),description:""}))),React.createElement(y,{key:"googlesitekit-wp-dashboard-module"}))}}]),t}(d.Component),E=r(14),R=function(e){function t(){return o()(this,t),s()(this,l()(t).apply(this,arguments))}return p()(t,e),a()(t,[{key:"render",value:function(){return React.createElement("div",{className:"googlesitekit-wp-dashboard"},React.createElement("div",{className:"googlesitekit-wp-dashboard__cta"},React.createElement(E.a,{className:"googlesitekit-wp-dashboard__cta-link",href:googlesitekit.dashboardPermalink},Object(k.__)("Visit your Site Kit Dashboard","google-site-kit"))),React.createElement(j,null))}}]),t}(d.Component),x=function(e){function t(e){var r;return o()(this,t),(r=s()(this,l()(t).call(this,e))).state={hasError:!1},Object(k.setLocaleData)(googlesitekit.locale,"google-site-kit"),r}return p()(t,e),a()(t,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"render",value:function(){var e=this.state,t=e.hasError,r=e.error,n=e.info;return t?React.createElement(f.a,{id:"googlesitekit-error",key:"googlesitekit-error",title:r,description:n.componentStack,dismiss:"",isDismissable:!1,format:"small",type:"win-error"}):React.createElement(R,null)}}]),t}(d.Component);b()((function(){var e=document.getElementById("js-googlesitekit-wp-dashboard");null!==e&&(Object(d.render)(React.createElement(x,null),e),Object(h.doAction)("googlesitekit.moduleLoaded","WPDashboard"))}))},35:function(e,t){e.exports=wp.apiFetch},36:function(e,t){e.exports=wp.url},39:function(e,t){e.exports=wp.domReady},50:function(e,t){e.exports=ReactDOM},59:function(e,t){e.exports=wp.compose}});
|
dist/assets/js/vendor.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),t}},function(t,e,n){var o=n(49),i=n(13);t.exports=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?i(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var o=n(170);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}},function(t,e,n){t.exports=n(171)()},,,,function(t,e,n){t.exports=n(173)},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},,,function(t,e,n){"use strict";n.d(e,"b",(function(){return __extends})),n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return __values})),n.d(e,"c",(function(){return __spread}));var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function __extends(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}var i=function __assign(){return(i=Object.assign||function __assign(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function __values(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function __read(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,a=n.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(o=a.next()).done;)r.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return r}function __spread(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(__read(arguments[e]));return t}},,,,,,,,,,,function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},,,function(t,e,n){var o;function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var o=i(n);if("string"===o||"number"===o)t.push(n);else if(Array.isArray(n)&&n.length){var s=r.apply(null,n);s&&t.push(s)}else if("object"===o)for(var u in n)a.call(n,u)&&n[u]&&t.push(u)}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):"object"===i(n(82))&&n(82)?void 0===(o=function(){return r}.apply(e,[]))||(t.exports=o):window.classNames=r}()},,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var o=n(16),i=n(34),a=function(){function t(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root_=t,this.initialize.apply(this,o.c(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new i.a({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},t.prototype.initialSyncWithDOM=function(){},t.prototype.destroy=function(){this.foundation_.destroy()},t.prototype.listen=function(t,e){this.root_.addEventListener(t,e)},t.prototype.unlisten=function(t,e){this.root_.removeEventListener(t,e)},t.prototype.emit=function(t,e,n){var o;void 0===n&&(n=!1),"function"==typeof CustomEvent?o=new CustomEvent(t,{bubbles:n,detail:e}):(o=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(o)},t}()},,,function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var o=n(16),i=n(37),a=n(48),r=n(52),s=n(57),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return o.b(e,t),e.attachTo=function(t,n){void 0===n&&(n={isUnbounded:void 0});var o=new e(t);return void 0!==n.isUnbounded&&(o.unbounded=n.isUnbounded),o},e.createAdapter=function(t){return{addClass:function(e){return t.root_.classList.add(e)},browserSupportsCssVars:function(){return s.c(window)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},containsEventTarget:function(e){return t.root_.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,s.a())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,s.a())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return Object(a.b)(t.root_,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,s.a())},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,s.a())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root_.classList.remove(e)},updateCssVariable:function(e,n){return t.root_.style.setProperty(e,n)}}},Object.defineProperty(e.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()},enumerable:!0,configurable:!0}),e.prototype.activate=function(){this.foundation_.activate()},e.prototype.deactivate=function(){this.foundation_.deactivate()},e.prototype.layout=function(){this.foundation_.layout()},e.prototype.getDefaultFoundation=function(){return new r.a(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root_;this.unbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded_=function(){this.foundation_.setUnbounded(Boolean(this.unbounded_))},e}(i.a)},,function(t,e,n){"use strict";function o(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(i(n,e))return n;n=n.parentElement}return null}function i(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}))},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function i(e){return"function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?t.exports=i=function(t){return o(t)}:t.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":o(t)},i(e)}t.exports=i},,,function(t,e,n){"use strict";var o=n(16),i=n(34),a={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},r={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},s={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},u=n(57);n.d(e,"a",(function(){return d}));var c=["touchstart","pointerdown","mousedown","keydown"],l=["touchend","pointerup","mouseup","contextmenu"],p=[],d=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(t){return i.activate_(t)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var o=e.cssClasses,i=o.ROOT,a=o.UNBOUNDED;requestAnimationFrame((function(){t.adapter_.addClass(i),t.adapter_.isUnbounded()&&(t.adapter_.addClass(a),t.layoutInternal_())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,o=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame((function(){t.adapter_.removeClass(o),t.adapter_.removeClass(i),t.removeCssVars_()}))}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){t.layoutInternal_(),t.layoutFrame_=0}))},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter_.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter_.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},e.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers_=function(t){var e=this;t&&(c.forEach((function(t){e.adapter_.registerInteractionHandler(t,e.activateHandler_)})),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},e.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):l.forEach((function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)}))},e.prototype.deregisterRootHandlers_=function(){var t=this;c.forEach((function(e){t.adapter_.deregisterInteractionHandler(e,t.activateHandler_)})),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)},e.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),l.forEach((function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)}))},e.prototype.removeCssVars_=function(){var t=this,n=e.strings;Object.keys(n).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)}))},e.prototype.activate_=function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var o=this.previousActivationEvent_;if(!(o&&void 0!==t&&o.type!==t.type))n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&p.length>0&&p.some((function(t){return e.adapter_.containsEventTarget(t)}))?this.resetActivationState_():(void 0!==t&&(p.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){p=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive_(t),n.wasElementMadeActive&&e.animateActivation_()),n.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())})))}}},e.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()},e.prototype.animateActivation_=function(){var t=this,n=e.strings,o=n.VAR_FG_TRANSLATE_START,i=n.VAR_FG_TRANSLATE_END,a=e.cssClasses,r=a.FG_DEACTIVATION,s=a.FG_ACTIVATION,u=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",l="";if(!this.adapter_.isUnbounded()){var p=this.getFgTranslationCoordinates_(),d=p.startPoint,f=p.endPoint;c=d.x+"px, "+d.y+"px",l=f.x+"px, "+f.y+"px"}this.adapter_.updateCssVariable(o,c),this.adapter_.updateCssVariable(i,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(r),this.adapter_.computeBoundingRect(),this.adapter_.addClass(s),this.activationTimer_=setTimeout((function(){return t.activationTimerCallback_()}),u)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?Object(u.b)(n,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:t.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},e.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,o=this.activationState_,i=o.hasDeactivationUXRun,a=o.isActivated;(i||!a)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout((function(){t.adapter_.removeClass(n)}),s.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses_=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},e.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return t.previousActivationEvent_=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=o.a({},e);e.isProgrammatic?(requestAnimationFrame((function(){return t.animateDeactivation_(n)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()})))}},e.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},e.prototype.layoutInternal_=function(){var t=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING,this.initialSize_=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,o=t.VAR_LEFT,i=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(a,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(o,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(i,this.unboundedCoords_.top+"px"))},e}(i.a)},,,,,function(t,e,n){"use strict";var o,i;function a(t,e){void 0===e&&(e=!1);var n=t.CSS,i=o;if("boolean"==typeof o&&!e)return o;if(!(n&&"function"==typeof n.supports))return!1;var a=n.supports("--css-vars","yes"),r=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=!(!a&&!r)&&!function(t){var e=t.document,n=e.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(n);var o=t.getComputedStyle(n),i=null!==o&&"solid"===o.borderTopStyle;return n.parentNode&&n.parentNode.removeChild(n),i}(t),e||(o=i),i}function r(t,e){if(void 0===t&&(t=window),void 0===e&&(e=!1),void 0===i||e){var n=!1;try{t.document.addEventListener("test",(function(){}),{get passive(){return n=!0}})}catch(t){}i=n}return!!i&&{passive:!0}}function s(t,e,n){if(!t)return{x:0,y:0};var o,i,a=e.x,r=e.y,s=a+n.left,u=r+n.top;if("touchstart"===t.type){var c=t;o=c.changedTouches[0].pageX-s,i=c.changedTouches[0].pageY-u}else{var l=t;o=l.pageX-s,i=l.pageY-u}return{x:o,y:i}}n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return s}))},,,,function(t,e,n){var o=n(177),i=n(178),a=n(179);t.exports=function(t,e){return o(t)||i(t,e)||a()}},,,,,,,function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},n.apply(this,arguments)}t.exports=n},,function(t,e,n){(function(t){var o,i,a,r;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"undefined"!=typeof self&&self,r=function(t,e,n,o){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=196)}({0:function(e,n){e.exports=t},1:function(t,n){t.exports=e},196:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=s(n(197)),p=n(198),d=s(n(202));e.TabRipple=d.default;var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tabRef=u.default.createRef(),e.tabContentRef=u.default.createRef(),e.tabIndicatorRef=u.default.createRef(),e.tabRippleRef=u.default.createRef(),e.state={classList:new Set,"aria-selected":"false",activateIndicator:!1,previousIndicatorClientRect:e.props.previousIndicatorClientRect,tabIndex:-1},e.computeIndicatorClientRect=function(){return e.tabIndicatorRef.current?e.tabIndicatorRef.current.computeContentClientRect():{}},e.computeDimensions=function(){return e.foundation.computeDimensions()},e.focus=function(){e.tabRef.current&&e.tabRef.current.focus()},e.onFocus=function(t){e.tabRippleRef.current&&e.tabRippleRef.current.handleFocus(t)},e.onBlur=function(t){e.tabRippleRef.current&&e.tabRippleRef.current.handleBlur(t)},e}return i(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.active,n=t.focusOnActivate;this.foundation=new p.MDCTabFoundation(this.adapter),this.foundation.init(),this.foundation.setFocusOnActivate(n),e&&this.foundation.activate()},e.prototype.componentWillUnmount=function(){this.foundation.destroy()},e.prototype.componentDidUpdate=function(t){var e=this.props,n=e.active,o=e.focusOnActivate,i=e.previousIndicatorClientRect;o!==t.focusOnActivate&&this.foundation.setFocusOnActivate(o),n!==t.active&&(n?this.activate(i):this.deactivate())},Object.defineProperty(e.prototype,"classes",{get:function(){var t=this.state.classList,e=this.props,n=e.className,o=e.minWidth,i=e.stacked;return c.default("mdc-tab",Array.from(t),n,{"mdc-tab--min-width":o,"mdc-tab--stacked":i})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return{addClass:function(e){var n=new Set(t.state.classList);n.add(e),t.setState({classList:n})},removeClass:function(e){var n=new Set(t.state.classList);n.delete(e),t.setState({classList:n})},hasClass:function(e){return t.classes.split(" ").includes(e)},setAttr:function(e,n){return t.setState((function(t){var o;return a({},t,((o={})[e]=n,o))}))},getOffsetLeft:function(){return Number(t.tabRef.current&&t.tabRef.current.offsetLeft)},getOffsetWidth:function(){return Number(t.tabRef.current&&t.tabRef.current.offsetWidth)},getContentOffsetLeft:function(){return t.tabContentRef.current?t.tabContentRef.current.offsetLeft:0},getContentOffsetWidth:function(){return t.tabContentRef.current?t.tabContentRef.current.offsetWidth:0},focus:function(){return t.tabRef.current&&t.tabRef.current.focus()},notifyInteracted:this.props.onInteraction,activateIndicator:function(e){return t.setState({activateIndicator:!0,previousIndicatorClientRect:e})},deactivateIndicator:function(){return t.setState({activateIndicator:!1})}}},enumerable:!0,configurable:!0}),e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.render=function(){var t=this.props,e=(t.active,t.focusOnActivate,t.previousIndicatorClientRect,t.className,t.isFadingIndicator,t.indicatorContent,t.minWidth,t.onInteraction,t.stacked,t.children),n=t.isMinWidthIndicator,o=r(t,["active","focusOnActivate","previousIndicatorClientRect","className","isFadingIndicator","indicatorContent","minWidth","onInteraction","stacked","children","isMinWidthIndicator"]),i=this.state,s=i.tabIndex,c=i["aria-selected"];return u.default.createElement("button",a({className:this.classes,role:"tab","aria-selected":c,tabIndex:s,onFocus:this.onFocus,onBlur:this.onBlur,ref:this.tabRef},o),u.default.createElement("span",{className:"mdc-tab__content",ref:this.tabContentRef},e,n?this.renderIndicator():null),n?null:this.renderIndicator(),u.default.createElement(d.default,{ref:this.tabRippleRef}))},e.prototype.renderIndicator=function(){var t=this.props,e=t.isFadingIndicator,n=t.indicatorContent,o=this.state,i=o.activateIndicator,a=o.previousIndicatorClientRect;return u.default.createElement(l.default,{icon:!!n,fade:e,active:i,previousIndicatorClientRect:a,ref:this.tabIndicatorRef},n)},e.defaultProps={active:!1,focusOnActivate:!0,className:"",isFadingIndicator:!1,indicatorContent:null,minWidth:!1,isMinWidthIndicator:!1,stacked:!1,onInteraction:function(){return null}},e}(u.default.Component);e.Tab=f,e.default=f},197:function(t,e){t.exports=o},198:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCTabFoundation",(function(){return r}));var o=n(199),i=n(200),a=n(201),r=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.focusOnActivate_=!0,i}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a.b},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},activateIndicator:function(){},deactivateIndicator:function(){},notifyInteracted:function(){},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.handleClick=function(){this.adapter_.notifyInteracted()},e.prototype.isActive=function(){return this.adapter_.hasClass(a.a.ACTIVE)},e.prototype.setFocusOnActivate=function(t){this.focusOnActivate_=t},e.prototype.activate=function(t){this.adapter_.addClass(a.a.ACTIVE),this.adapter_.setAttr(a.b.ARIA_SELECTED,"true"),this.adapter_.setAttr(a.b.TABINDEX,"0"),this.adapter_.activateIndicator(t),this.focusOnActivate_&&this.adapter_.focus()},e.prototype.deactivate=function(){this.isActive()&&(this.adapter_.removeClass(a.a.ACTIVE),this.adapter_.setAttr(a.b.ARIA_SELECTED,"false"),this.adapter_.setAttr(a.b.TABINDEX,"-1"),this.adapter_.deactivateIndicator())},e.prototype.computeDimensions=function(){var t=this.adapter_.getOffsetWidth(),e=this.adapter_.getOffsetLeft(),n=this.adapter_.getContentOffsetWidth(),o=this.adapter_.getContentOffsetLeft();return{contentLeft:e+o,contentRight:e+o+n,rootLeft:e,rootRight:e+t}},e}(i.a);e.default=r},199:function(t,e,n){"use strict";e.b=function __extends(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)},n.d(e,"a",(function(){return i})),"function"==typeof Symbol&&s(Symbol.iterator);var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},i=function __assign(){return(i=Object.assign||function __assign(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)}},2:function(t,e){t.exports=n},200:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},201:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var o={ACTIVE:"mdc-tab--active"},i={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"}},202:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=n(2),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),Object.defineProperty(e.prototype,"classes",{get:function(){return c.default("mdc-tab__ripple",this.props.className)},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=(t.className,t.unbounded,t.initRipple),n=r(t,["className","unbounded","initRipple"]);return u.default.createElement("div",a({className:this.classes},n,{ref:e}))},e}(u.default.Component),d=l.withRipple(p);e.default=d}})},"object"===s(e)&&"object"===s(t)?t.exports=r(n(18),n(30),n(152),n(153)):(i=[n(18),n(30),n(152),n(153)],void 0===(a="function"==typeof(o=r)?o.apply(e,i):o)||(t.exports=a))}).call(this,n(40)(t))},,,,,,,,,,,function(t,e,n){(function(t){var o,i,a,r;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"undefined"!=typeof self&&self,r=function(t,e,n,o,i){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=227)}({0:function(e,n){e.exports=t},1:function(t,n){t.exports=e},22:function(t,e){t.exports=n},227:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=n(228),p=s(n(230));e.Input=p.default;var d=s(n(231));e.Icon=d.default;var f=s(n(234));e.HelperText=f.default;var h=s(n(22)),m=s(n(23)),_=s(n(24)),g=l.MDCTextFieldFoundation.cssClasses,b=function(t){function e(e){var n,o=t.call(this,e)||this;return o.floatingLabelElement=u.default.createRef(),o.inputComponent_=null,e.children&&u.default.Children.only(e.children)&&(n=e.children.props.id),o.state={classList:new Set,inputId:n,isFocused:!1,dir:"ltr",disabled:!1,labelIsFloated:!1,initialLabelWidth:0,notchedLabelWidth:0,activeLineRipple:!1,lineRippleCenter:0,outlineIsNotched:!1,isValid:!0,foundation:void 0},o}return i(e,t),e.prototype.componentDidMount=function(){var t=new l.MDCTextFieldFoundation(this.adapter);this.setState({foundation:t}),t.init()},e.prototype.componentWillUnmount=function(){this.state.foundation.destroy()},Object.defineProperty(e.prototype,"classes",{get:function(){var t,e=this.state,n=e.classList,o=e.disabled,i=e.isFocused,a=e.isValid,r=this.props,s=r.className,u=r.dense,l=r.fullWidth,p=r.textarea,d=r.trailingIcon,f=r.leadingIcon;return c.default(g.ROOT,Array.from(n),s,((t={})[g.DENSE]=u,t[g.DISABLED]=o,t[g.FOCUSED]=i,t[g.INVALID]=!a,t[g.OUTLINED]=this.notchedOutlineAdapter.hasOutline()&&!l,t[g.TEXTAREA]=p,t[g.WITH_LEADING_ICON]=f,t["mdc-text-field--fullwidth"]=l,t["mdc-text-field--with-trailing-icon"]=d,t["mdc-text-field--no-label"]=!this.labelAdapter.hasLabel(),t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"otherProps",{get:function(){var t=this.props;return t.children,t.className,t.dense,t.floatingLabelClassName,t.fullWidth,t.helperText,t.label,t.leadingIcon,t.lineRippleClassName,t.notchedOutlineClassName,t.onLeadingIconSelect,t.onTrailingIconSelect,t.outlined,t.textarea,t.trailingIcon,r(t,["children","className","dense","floatingLabelClassName","fullWidth","helperText","label","leadingIcon","lineRippleClassName","notchedOutlineClassName","onLeadingIconSelect","onTrailingIconSelect","outlined","textarea","trailingIcon"])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this,e={addClass:function(e){return t.setState({classList:t.state.classList.add(e)})},removeClass:function(e){var n=t.state.classList;n.delete(e),t.setState({classList:n})},hasClass:function(e){return t.classes.split(" ").includes(e)},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){},deregisterValidationAttributeChangeHandler:function(){}};return Object.assign({},e,this.inputAdapter,this.labelAdapter,this.lineRippleAdapter,this.notchedOutlineAdapter)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputAdapter",{get:function(){var t=this;return{isFocused:function(){return t.state.isFocused},getNativeInput:function(){var e=t.inputComponent_;if(e)return{disabled:e.isDisabled(),value:e.getValue(),maxLength:e.getMaxLength(),type:e.getInputType(),validity:{badInput:!!e.isBadInput(),valid:!!e.isValid()}};throw Error("MDCReactTextField: The input did not render properly")},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelAdapter",{get:function(){var t=this;return{shakeLabel:function(e){var n=t.floatingLabelElement;e&&n&&n.current&&n.current.shake()},floatLabel:function(e){return t.setState({labelIsFloated:e})},hasLabel:function(){return!!t.props.label&&!t.props.fullWidth},getLabelWidth:function(){return t.state.initialLabelWidth}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineRippleAdapter",{get:function(){var t=this;return{activateLineRipple:function(){return t.setState({activeLineRipple:!0})},deactivateLineRipple:function(){return t.setState({activeLineRipple:!1})},setLineRippleTransformOrigin:function(e){return t.setState({lineRippleCenter:e})}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"notchedOutlineAdapter",{get:function(){var t=this;return{notchOutline:function(e){return t.setState({outlineIsNotched:!0,notchedLabelWidth:e})},closeOutline:function(){return t.setState({outlineIsNotched:!1})},hasOutline:function(){return!!t.props.outlined||!!t.props.textarea}}},enumerable:!0,configurable:!0}),e.prototype.inputProps=function(t){var e=this,n=t.props;return Object.assign({},n,{foundation:this.state.foundation,handleFocusChange:function(t){return e.setState({isFocused:t})},setDisabled:function(t){return e.setState({disabled:t})},setInputId:function(t){return e.setState({inputId:t})},syncInput:function(t){return e.inputComponent_=t},inputType:this.props.textarea?"textarea":"input"})},e.prototype.render=function(){var t=this.props,e=t.fullWidth,n=t.helperText,o=t.characterCounter,i=t.onLeadingIconSelect,r=t.onTrailingIconSelect,s=t.leadingIcon,c=t.trailingIcon,l=t.textarea,p=this.state.foundation;return u.default.createElement(u.default.Fragment,null,u.default.createElement("div",a({},this.otherProps,{className:this.classes,onClick:function(){return p.handleTextFieldInteraction()},onKeyDown:function(){return p.handleTextFieldInteraction()},key:"text-field-container"}),s?this.renderIcon(s,i):null,this.renderInput(),this.notchedOutlineAdapter.hasOutline()?this.renderNotchedOutline():u.default.createElement(u.default.Fragment,null,this.labelAdapter.hasLabel()?this.renderLabel():null,l||e?null:this.renderLineRipple()),c?this.renderIcon(c,r):null),n||o?this.renderHelperLine(n,o):null)},e.prototype.renderInput=function(){var t=u.default.Children.only(this.props.children),e=this.inputProps(t);return u.default.cloneElement(t,e)},e.prototype.renderLabel=function(){var t=this,e=this.props,n=e.label,o=e.floatingLabelClassName,i=this.state.inputId;return u.default.createElement(h.default,{className:o,float:this.state.labelIsFloated,handleWidthChange:function(e){return t.setState({initialLabelWidth:e})},ref:this.floatingLabelElement,htmlFor:i},n)},e.prototype.renderLineRipple=function(){var t=this.props.lineRippleClassName,e=this.state,n=e.activeLineRipple,o=e.lineRippleCenter;return u.default.createElement(m.default,{rippleCenter:o,className:t,active:n})},e.prototype.renderNotchedOutline=function(){var t=this.props.notchedOutlineClassName,e=this.state,n=e.notchedLabelWidth,o=e.outlineIsNotched;return u.default.createElement(_.default,{className:t,notchWidth:n,notch:o},this.labelAdapter.hasLabel()?this.renderLabel():null)},e.prototype.renderHelperLine=function(t,e){return u.default.createElement("div",{className:g.HELPER_LINE},t&&this.renderHelperText(t),e)},e.prototype.renderHelperText=function(t){var e=this.state.isValid,n=Object.assign({isValid:e,key:"text-field-helper-text"},t.props);return u.default.cloneElement(t,n)},e.prototype.renderIcon=function(t,e){var n=this.state.disabled;return u.default.createElement(d.default,{disabled:n,onSelect:e},t)},e.defaultProps={className:"",dense:!1,floatingLabelClassName:"",fullWidth:!1,lineRippleClassName:"",notchedOutlineClassName:"",outlined:!1,textarea:!1},e}(u.default.Component);e.default=b},228:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCTextFieldFoundation",(function(){return u}));var o=n(28),i=n(29),a=n(229),r=["mousedown","touchstart"],s=["click","keydown"],u=function(t){function e(n,i){void 0===i&&(i={});var a=t.call(this,o.a({},e.defaultAdapter,n))||this;return a.isFocused_=!1,a.receivedUserInput_=!1,a.isValid_=!0,a.useNativeValidation_=!0,a.helperText_=i.helperText,a.characterCounter_=i.characterCounter,a.leadingIcon_=i.leadingIcon,a.trailingIcon_=i.trailingIcon,a.inputFocusHandler_=function(){return a.activateFocus()},a.inputBlurHandler_=function(){return a.deactivateFocus()},a.inputInputHandler_=function(){return a.handleInput()},a.setPointerXOffset_=function(t){return a.setTransformOrigin(t)},a.textFieldInteractionHandler_=function(){return a.handleTextFieldInteraction()},a.validationAttributeChangeHandler_=function(t){return a.handleValidationAttributeChange(t)},a}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a.e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return a.d},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat_",{get:function(){var t=this.getNativeInput_().type;return a.a.indexOf(t)>=0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat_||this.isFocused_||Boolean(this.getValue())||this.isBadInput_()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused_&&!this.isValid()&&Boolean(this.getValue())},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.adapter_.isFocused()?this.inputFocusHandler_():this.adapter_.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter_.floatLabel(!0)),this.adapter_.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter_.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter_.registerInputInteractionHandler("input",this.inputInputHandler_),r.forEach((function(e){t.adapter_.registerInputInteractionHandler(e,t.setPointerXOffset_)})),s.forEach((function(e){t.adapter_.registerTextFieldInteractionHandler(e,t.textFieldInteractionHandler_)})),this.validationObserver_=this.adapter_.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_),this.setCharacterCounter_(this.getValue().length)},e.prototype.destroy=function(){var t=this;this.adapter_.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter_.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter_.deregisterInputInteractionHandler("input",this.inputInputHandler_),r.forEach((function(e){t.adapter_.deregisterInputInteractionHandler(e,t.setPointerXOffset_)})),s.forEach((function(e){t.adapter_.deregisterTextFieldInteractionHandler(e,t.textFieldInteractionHandler_)})),this.adapter_.deregisterValidationAttributeChangeHandler(this.validationObserver_)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter_.getNativeInput();t&&t.disabled||(this.receivedUserInput_=!0)},e.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return a.b.indexOf(t)>-1&&(e.styleValidity_(!0),!0)})),t.indexOf("maxlength")>-1&&this.setCharacterCounter_(this.getValue().length)},e.prototype.notchOutline=function(t){if(this.adapter_.hasOutline())if(t){var e=this.adapter_.hasClass(a.c.DENSE)?a.d.DENSE_LABEL_SCALE:a.d.LABEL_SCALE,n=this.adapter_.getLabelWidth()*e;this.adapter_.notchOutline(n)}else this.adapter_.closeOutline()},e.prototype.activateFocus=function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter_.activateLineRipple(),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake)),this.helperText_&&this.helperText_.showToScreenReader()},e.prototype.setTransformOrigin=function(t){var e=t.touches,n=e?e[0]:t,o=n.target.getBoundingClientRect(),i=n.clientX-o.left;this.adapter_.setLineRippleTransformOrigin(i)},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setCharacterCounter_(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput_||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused_=!1,this.adapter_.deactivateLineRipple();var t=this.isValid();this.styleValidity_(t),this.styleFocused_(this.isFocused_),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)},e.prototype.getValue=function(){return this.getNativeInput_().value},e.prototype.setValue=function(t){this.getValue()!==t&&(this.getNativeInput_().value=t,this.setCharacterCounter_(t.length));var e=this.isValid();this.styleValidity_(e),this.adapter_.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter_.floatLabel(this.shouldFloat),this.adapter_.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_},e.prototype.setValid=function(t){this.isValid_=t,this.styleValidity_(t);var e=!t&&!this.isFocused_;this.adapter_.hasLabel()&&this.adapter_.shakeLabel(e)},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation_=t},e.prototype.isDisabled=function(){return this.getNativeInput_().disabled},e.prototype.setDisabled=function(t){this.getNativeInput_().disabled=t,this.styleDisabled_(t)},e.prototype.setHelperTextContent=function(t){this.helperText_&&this.helperText_.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon_&&this.leadingIcon_.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon_&&this.trailingIcon_.setContent(t)},e.prototype.setCharacterCounter_=function(t){if(this.characterCounter_){var e=this.getNativeInput_().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter_.setCounterValue(t,e)}},e.prototype.isBadInput_=function(){return this.getNativeInput_().validity.badInput||!1},e.prototype.isNativeInputValid_=function(){return this.getNativeInput_().validity.valid},e.prototype.styleValidity_=function(t){var n=e.cssClasses.INVALID;t?this.adapter_.removeClass(n):this.adapter_.addClass(n),this.helperText_&&this.helperText_.setValidity(t)},e.prototype.styleFocused_=function(t){var n=e.cssClasses.FOCUSED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.styleDisabled_=function(t){var n=e.cssClasses,o=n.DISABLED,i=n.INVALID;t?(this.adapter_.addClass(o),this.adapter_.removeClass(i)):this.adapter_.removeClass(o),this.leadingIcon_&&this.leadingIcon_.setDisabled(t),this.trailingIcon_&&this.trailingIcon_.setDisabled(t)},e.prototype.getNativeInput_=function(){return(this.adapter_?this.adapter_.getNativeInput():null)||{disabled:!1,maxLength:-1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e}(i.a);e.default=u},229:function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return s}));var o={ARIA_CONTROLS:"aria-controls",ICON_SELECTOR:".mdc-text-field__icon",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline"},i={DENSE:"mdc-text-field--dense",DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon"},a={DENSE_LABEL_SCALE:.923,LABEL_SCALE:.75},r=["pattern","min","max","required","step","minlength","maxlength"],s=["color","date","datetime-local","month","range","time","week"]},23:function(t,e){t.exports=o},230:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var c=u(n(0)),l=u(n(1)),p=["pattern","min","max","required","step","minlength","maxlength"],d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputElement_=c.default.createRef(),e.state={wasUserTriggeredChange:!1},e.handleFocus=function(t){var n=e.props,o=n.foundation,i=n.handleFocusChange,a=n.onFocus,r=void 0===a?function(){}:a;o&&o.activateFocus(),i&&i(!0),r(t)},e.handleBlur=function(t){var n=e.props,o=n.foundation,i=n.handleFocusChange,a=n.onBlur,r=void 0===a?function(){}:a;o&&o.deactivateFocus(),i&&i(!1),r(t)},e.handleMouseDown=function(t){var n=e.props,o=n.foundation,i=n.onMouseDown,a=void 0===i?function(){}:i;o&&o.setTransformOrigin(t.nativeEvent),a(t)},e.handleTouchStart=function(t){var n=e.props,o=n.foundation,i=n.onTouchStart,a=void 0===i?function(){}:i;o&&o.setTransformOrigin(t.nativeEvent),a(t)},e.handleChange=function(t){var n=e.props,o=n.foundation,i=n.onChange,a=void 0===i?function(){}:i;o&&o.autoCompleteFocus(),e.setState({wasUserTriggeredChange:!0}),a(t)},e.handleValidationAttributeUpdate=function(t){var n=t.foundation;p.some((function(o){var i;return i="minlength"===o?"minLength":"maxlength"===o?"maxLength":o,e.props[i]!==t[i]&&(n.handleValidationAttributeChange([o]),!0)}))},e.isBadInput=function(){var t=e.inputElement;return t&&t.validity.badInput},e.isValid=function(){return e.inputElement&&void 0===e.props.isValid?e.inputElement.validity.valid:e.props.isValid},e.isDisabled=function(){return!!e.props.disabled},e.getMaxLength=function(){return"number"==typeof e.props.maxLength?e.props.maxLength:-1},e.getInputType=function(){return String(e.props.inputType)},e.getValue=function(){return e.valueToString(e.props.value)},e}return i(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props,n=e.id,o=e.syncInput,i=e.disabled,a=e.value,r=e.setInputId,s=e.setDisabled,u=e.handleValueChange,c=e.foundation,l=e.isValid;o&&o(this),r&&n&&r(n),s&&i&&s(!0),u&&a&&u(a,(function(){return c&&c.setValue(t.valueToString(a))})),c&&void 0!==l&&(c.setUseNativeValidation(!1),c.setValid(!!l))},e.prototype.componentDidUpdate=function(t){var e=this,n=this.props,o=n.id,i=n.foundation,a=n.value,r=n.disabled,s=n.isValid,u=n.handleValueChange,c=n.setInputId,l=n.setDisabled;this.handleValidationAttributeUpdate(t),r!==t.disabled&&(l&&l(r),i&&i.setDisabled(!!r)),o!==t.id&&c&&c(o),a!==t.value&&u&&u(a,(function(){e.state.wasUserTriggeredChange?e.setState({wasUserTriggeredChange:!1}):i&&i.setValue(e.valueToString(a))})),s!==t.isValid&&i&&(void 0===s?i.setUseNativeValidation(!0):(i.setUseNativeValidation(!1),i.setValid(!!s)))},e.prototype.valueToString=function(t){return"object"===s(t)?t.join(""):"number"==typeof t?t.toString():t||""},Object.defineProperty(e.prototype,"classes",{get:function(){return l.default("mdc-text-field__input",this.props.className)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputElement",{get:function(){return this.inputElement_.current},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=t.inputType,n=t.disabled,o=(t.className,t.foundation,t.syncInput,t.isValid,t.value),i=(t.handleFocusChange,t.handleValueChange,t.setDisabled,t.setInputId,t.onFocus,t.onBlur,t.onMouseDown,t.onTouchStart,t.onChange,r(t,["inputType","disabled","className","foundation","syncInput","isValid","value","handleFocusChange","handleValueChange","setDisabled","setInputId","onFocus","onBlur","onMouseDown","onTouchStart","onChange"])),s=Object.assign({},{onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,onTouchStart:this.handleTouchStart,onChange:this.handleChange,disabled:n,value:o,ref:this.inputElement_,className:this.classes},i);return"input"===e?c.default.createElement("input",a({},s)):c.default.createElement("textarea",a({},s))},e.defaultProps={className:"",inputType:"input",disabled:!1,id:"",handleValueChange:function(){},setDisabled:function(){},setInputId:function(){},handleFocusChange:function(){},value:""},e}(c.default.Component);e.default=d},231:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=r(n(0)),u=r(n(1)),c=n(232),l=function(t){function e(e){var n=t.call(this,e)||this;n.handleClick=function(t){return n.foundation.handleInteraction(t.nativeEvent)},n.handleKeyDown=function(t){return n.foundation.handleInteraction(t.nativeEvent)},n.addIconAttrsToChildren=function(){var t=n.state,e=t.tabindex,o=t.role,i=s.default.Children.only(n.props.children),a=u.default("mdc-text-field__icon",i.props.className),r=Object.assign({},i.props,{className:a,onClick:n.handleClick,onKeyDown:n.handleKeyDown,tabIndex:e,role:o});return s.default.cloneElement(i,r)};var o=e.children.props.role;return n.state={tabindex:n.tabindex,role:o},n}return i(e,t),e.prototype.componentDidMount=function(){this.foundation=new c.MDCTextFieldIconFoundation(this.adapter),this.foundation.init(),this.props.disabled&&this.foundation.setDisabled(!0)},e.prototype.componentDidUpdate=function(t){this.props.disabled!==t.disabled&&this.foundation.setDisabled(!!this.props.disabled),this.props.onSelect!==t.onSelect&&this.setState({tabindex:this.tabindex})},e.prototype.componentWillUnmount=function(){this.foundation.destroy()},Object.defineProperty(e.prototype,"tabindex",{get:function(){return"number"==typeof this.props.children.props.tabIndex?this.props.children.props.tabIndex:this.props.onSelect?0:-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return{getAttr:function(e){var n=t.state[e];return n||"number"==typeof n&&!isNaN(n)?n.toString():""},setAttr:function(e,n){return t.setState((function(t){var o;return a({},t,((o={})[e]="tabindex"===e?Number(n):n,o))}))},removeAttr:function(e){return t.setState((function(t){var n;return a({},t,((n={})[e]=null,n))}))},notifyIconAction:function(){return t.props.onSelect&&t.props.onSelect()},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),e.prototype.render=function(){return this.addIconAttrsToChildren()},e.defaultProps={disabled:!1},e}(s.default.Component);e.default=l},232:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCTextFieldIconFoundation",(function(){return s}));var o=n(28),i=n(29),a=n(233),r=["click","keydown"],s=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(t){return i.handleInteraction(t)},i}return o.b(e,t),Object.defineProperty(e,"strings",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.savedTabIndex_=this.adapter_.getAttr("tabindex"),r.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.interactionHandler_)}))},e.prototype.destroy=function(){var t=this;r.forEach((function(e){t.adapter_.deregisterInteractionHandler(e,t.interactionHandler_)}))},e.prototype.setDisabled=function(t){this.savedTabIndex_&&(t?(this.adapter_.setAttr("tabindex","-1"),this.adapter_.removeAttr("role")):(this.adapter_.setAttr("tabindex",this.savedTabIndex_),this.adapter_.setAttr("role",a.a.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter_.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter_.setContent(t)},e.prototype.handleInteraction=function(t){var e="Enter"===t.key||13===t.keyCode;("click"===t.type||e)&&this.adapter_.notifyIconAction()},e}(i.a);e.default=s},233:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"}},234:function(t,e,n){"use strict";var o,i,a=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=n(235),p=l.MDCTextFieldHelperTextFoundation.cssClasses,d=function(t){function e(e){var n,o=t.call(this,e)||this;return o.state=((n={})["aria-hidden"]=e["aria-hidden"],n.role=e.role,n.classList=new Set,n),o}return a(e,t),e.prototype.componentDidMount=function(){this.foundation=new l.MDCTextFieldHelperTextFoundation(this.adapter),this.foundation.init(),this.props.showToScreenReader&&this.foundation.showToScreenReader(),this.props.isValid||this.foundation.setValidity(!1),this.props.isValidationMessage&&this.foundation.setValidation(!0)},e.prototype.componentDidUpdate=function(t){this.props.showToScreenReader!==t.showToScreenReader&&this.props.showToScreenReader&&this.foundation.showToScreenReader(),this.props.isValid!==t.isValid&&this.foundation.setValidity(!!this.props.isValid),this.props.isValidationMessage!==t.isValidationMessage&&this.props.isValidationMessage&&this.foundation.setValidation(this.props.isValidationMessage)},e.prototype.componentWillUnmount=function(){this.foundation.destroy()},Object.defineProperty(e.prototype,"classes",{get:function(){var t,e=this.props,n=e.className,o=e.persistent,i=e.validation;return c.default(p.ROOT,n,((t={})[p.HELPER_TEXT_PERSISTENT]=o,t[p.HELPER_TEXT_VALIDATION_MSG]=i,t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return{addClass:function(e){return t.setState({classList:t.state.classList.add(e)})},removeClass:function(e){var n=t.state.classList;n.delete(e),t.setState({classList:n})},hasClass:function(e){return t.classes.split(" ").includes(e)},setAttr:function(e,n){return t.setState((function(t){var o;return r({},t,((o={})[e]=n,o))}))},removeAttr:function(e){return t.setState((function(t){var n;return r({},t,((n={})[e]=null,n))}))},setContent:function(){}}},enumerable:!0,configurable:!0}),e.prototype.render=function(){return u.default.createElement("p",{className:this.classes,role:this.state.role,"aria-hidden":this.state["aria-hidden"]},this.props.children)},e.defaultProps=((i={})["aria-hidden"]=!1,i.className="",i.isValid=!0,i.isValidationMessage=!1,i.persistent=!1,i.showToScreenReader=!1,i.validation=!1,i),e}(u.default.Component);e.default=d},235:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCTextFieldHelperTextFoundation",(function(){return r}));var o=n(28),i=n(29),a=n(236),r=function(t){function e(n){return t.call(this,o.a({},e.defaultAdapter,n))||this}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a.b},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),e.prototype.setContent=function(t){this.adapter_.setContent(t)},e.prototype.setPersistent=function(t){t?this.adapter_.addClass(a.a.HELPER_TEXT_PERSISTENT):this.adapter_.removeClass(a.a.HELPER_TEXT_PERSISTENT)},e.prototype.setValidation=function(t){t?this.adapter_.addClass(a.a.HELPER_TEXT_VALIDATION_MSG):this.adapter_.removeClass(a.a.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter_.removeAttr(a.b.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var e=this.adapter_.hasClass(a.a.HELPER_TEXT_PERSISTENT),n=this.adapter_.hasClass(a.a.HELPER_TEXT_VALIDATION_MSG)&&!t;n?this.adapter_.setAttr(a.b.ROLE,"alert"):this.adapter_.removeAttr(a.b.ROLE),e||n||this.hide_()},e.prototype.hide_=function(){this.adapter_.setAttr(a.b.ARIA_HIDDEN,"true")},e}(i.a);e.default=r},236:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var o={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},i={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+o.ROOT}},24:function(t,e){t.exports=i},28:function(t,e,n){"use strict";e.b=function __extends(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)},n.d(e,"a",(function(){return i})),"function"==typeof Symbol&&s(Symbol.iterator);var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},i=function __assign(){return(i=Object.assign||function __assign(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)}},29:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()}})},"object"===s(e)&&"object"===s(t)?t.exports=r(n(18),n(30),n(83),n(84),n(85)):(i=[n(18),n(30),n(83),n(84),n(85)],void 0===(a="function"==typeof(o=r)?o.apply(e,i):o)||(t.exports=a))}).call(this,n(40)(t))},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,n){(function(t){var o,i,a,r;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"undefined"!=typeof self&&self,r=function(t,e){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=104)}({0:function(e,n){e.exports=t},1:function(t,n){t.exports=e},104:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=n(105),p=n(40),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labelElement=u.default.createRef(),e.state={classList:new Set},e.initializeFoundation=function(){e.foundation=new l.MDCFloatingLabelFoundation(e.adapter),e.foundation.init()},e.shake=function(){e.foundation.shake(!0)},e.removeClassFromClassList=function(t){var n=e.state.classList;n.delete(t),e.setState({classList:n})},e.handleWidthChange=function(){e.props.handleWidthChange&&e.labelElement.current&&e.props.handleWidthChange(e.labelElement.current.offsetWidth)},e.onShakeEnd=function(){e.removeClassFromClassList(p.cssClasses.LABEL_SHAKE)},e}return i(e,t),e.prototype.componentDidMount=function(){this.initializeFoundation(),this.handleWidthChange(),this.props.float&&this.foundation.float(!0)},e.prototype.componentWillUnmount=function(){this.foundation.destroy()},e.prototype.componentDidUpdate=function(t){this.props.children!==t.children&&this.handleWidthChange(),this.props.float!==t.float&&this.foundation.float(this.props.float)},Object.defineProperty(e.prototype,"classes",{get:function(){var t=this.state.classList,e=this.props.className;return c.default(p.cssClasses.ROOT,Array.from(t),e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return{addClass:function(e){return t.setState({classList:t.state.classList.add(e)})},removeClass:this.removeClassFromClassList,registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},getWidth:function(){return 0}}},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=(t.className,t.children),n=(t.handleWidthChange,t.float,r(t,["className","children","handleWidthChange","float"]));return u.default.createElement("label",a({className:this.classes,ref:this.labelElement,onAnimationEnd:this.onShakeEnd},n),e)},e.defaultProps={className:"",float:!1},e}(u.default.Component);e.default=d},105:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCFloatingLabelFoundation",(function(){return r}));var o=n(106),i=n(107),a=n(40),r=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},e.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},e.prototype.getWidth=function(){return this.adapter_.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,o=n.LABEL_FLOAT_ABOVE,i=n.LABEL_SHAKE;t?this.adapter_.addClass(o):(this.adapter_.removeClass(o),this.adapter_.removeClass(i))},e.prototype.handleShakeAnimationEnd_=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter_.removeClass(t)},e}(i.a);e.default=r},106:function(t,e,n){"use strict";e.b=function __extends(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)},n.d(e,"a",(function(){return i})),"function"==typeof Symbol&&s(Symbol.iterator);var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},i=function __assign(){return(i=Object.assign||function __assign(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)}},107:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},40:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"cssClasses",(function(){return o}));var o={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"}}})},"object"===s(e)&&"object"===s(t)?t.exports=r(n(18),n(30)):(i=[n(18),n(30)],void 0===(a="function"==typeof(o=r)?o.apply(e,i):o)||(t.exports=a))}).call(this,n(40)(t))},function(t,e,n){(function(t){var o,i,a,r;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"undefined"!=typeof self&&self,r=function(t,e){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=114)}({0:function(e,n){e.exports=t},1:function(t,n){t.exports=e},114:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=n(115),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={classList:new Set,style:{}},e.setStyle=function(t,n){var o=t.replace(/-(\w)/g,(function(t,e){return e.toUpperCase()})),i=Object.assign({},e.state.style);i[o]=n,e.setState({style:i})},e.getMergedStyles=function(){var t=e.props.style,n=e.state.style;return Object.assign({},n,t)},e.onTransitionEnd=function(t){return e.foundation_.handleTransitionEnd(t.nativeEvent)},e}return i(e,t),e.prototype.componentDidMount=function(){this.foundation_=new l.MDCLineRippleFoundation(this.adapter),this.foundation_.init(),this.props.active&&this.foundation_.activate()},e.prototype.componentDidUpdate=function(t){this.props.active!==t.active&&(this.props.active?this.foundation_.activate():this.foundation_.deactivate());var e=this.props.rippleCenter;e&&e!==t.rippleCenter&&!isNaN(e)&&this.foundation_.setRippleCenter(e)},e.prototype.componentWillUnmount=function(){this.foundation_.destroy()},Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return{addClass:function(e){return t.setState({classList:t.state.classList.add(e)})},removeClass:function(e){var n=t.state.classList;n.delete(e),t.setState({classList:n})},hasClass:function(e){return t.state.classList.has(e)},setStyle:this.setStyle,registerEventHandler:function(){return null},deregisterEventHandler:function(){return null}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classes",{get:function(){var t=this.props.className,e=this.state.classList;return c.default("mdc-line-ripple",Array.from(e),t)},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=(t.style,t.className,t.active,t.rippleCenter,r(t,["style","className","active","rippleCenter"]));return u.default.createElement("div",a({className:this.classes,style:this.getMergedStyles(),onTransitionEnd:this.onTransitionEnd},e))},e.defaultProps={className:"",style:{},active:!1,rippleCenter:0},e}(u.default.Component);e.default=p},115:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCLineRippleFoundation",(function(){return r}));var o=n(116),i=n(117),a=n(118),r=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.transitionEndHandler_=function(t){return i.handleTransitionEnd(t)},i}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.registerEventHandler("transitionend",this.transitionEndHandler_)},e.prototype.destroy=function(){this.adapter_.deregisterEventHandler("transitionend",this.transitionEndHandler_)},e.prototype.activate=function(){this.adapter_.removeClass(a.a.LINE_RIPPLE_DEACTIVATING),this.adapter_.addClass(a.a.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter_.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter_.addClass(a.a.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var e=this.adapter_.hasClass(a.a.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter_.removeClass(a.a.LINE_RIPPLE_ACTIVE),this.adapter_.removeClass(a.a.LINE_RIPPLE_DEACTIVATING))},e}(i.a);e.default=r},116:function(t,e,n){"use strict";e.b=function __extends(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)},n.d(e,"a",(function(){return i})),"function"==typeof Symbol&&s(Symbol.iterator);var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},i=function __assign(){return(i=Object.assign||function __assign(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)}},117:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},118:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"}}})},"object"===s(e)&&"object"===s(t)?t.exports=r(n(18),n(30)):(i=[n(18),n(30)],void 0===(a="function"==typeof(o=r)?o.apply(e,i):o)||(t.exports=a))}).call(this,n(40)(t))},function(t,e,n){(function(t){var o,i,a,r;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"undefined"!=typeof self&&self,r=function(t,e){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=153)}({0:function(e,n){e.exports=t},1:function(t,n){t.exports=e},153:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=n(154),p=n(156),d=l.MDCNotchedOutlineFoundation.cssClasses,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notchedEl=u.default.createRef(),e.state={classList:new Set,foundationNotchWidth:void 0},e.addClass=function(t){e.setState((function(e){var n=new Set(e.classList);return n.add(t),{classList:n}}))},e.notch=function(){var t=e.props,n=t.notchWidth,o=t.notch;e.foundation&&(o?e.foundation.notch(n):e.foundation.closeNotch())},e}return i(e,t),e.prototype.componentDidMount=function(){var t=this;this.foundation=new l.MDCNotchedOutlineFoundation(this.adapter),this.foundation.init(),this.notch(),this.label&&(this.label.style.transitionDuration="0s",this.addClass(d.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.label&&(t.label.style.transitionDuration="")})))},e.prototype.componentWillUnmount=function(){this.foundation&&this.foundation.destroy()},e.prototype.componentDidUpdate=function(t){this.props.notchWidth===t.notchWidth&&this.props.notch===t.notch||this.notch()},Object.defineProperty(e.prototype,"classes",{get:function(){var t,e=this.state.classList,n=this.props.className;return c.default("mdc-notched-outline",Array.from(e),n,((t={})[d.NO_LABEL]=!this.label,t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this.notchedEl.current?this.notchedEl.current.querySelector("."+p.MDCFloatingLabelFoundation.cssClasses.ROOT):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return{addClass:this.addClass,removeClass:function(e){t.setState((function(t){var n=new Set(t.classList);return n.delete(e),{classList:n}}))},setNotchWidthProperty:function(e){return t.setState({foundationNotchWidth:e})},removeNotchWidthProperty:function(){return t.setState({foundationNotchWidth:void 0})}}},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=t.children,n=(t.className,t.notchWidth,t.notch,r(t,["children","className","notchWidth","notch"])),o=this.state.foundationNotchWidth,i={width:o?o+"px":void 0};return u.default.createElement("div",a({className:this.classes,ref:this.notchedEl},n),u.default.createElement("div",{className:"mdc-notched-outline__leading"}),e?u.default.createElement("div",{className:"mdc-notched-outline__notch",style:i},u.default.Children.only(e)):null,u.default.createElement("div",{className:"mdc-notched-outline__trailing"}))},e.defaultProps={className:"",notchWidth:0,notch:!1},e}(u.default.Component);e.default=f},154:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCNotchedOutlineFoundation",(function(){return r}));var o=n(42),i=n(43),a=n(155),r=function(t){function e(n){return t.call(this,o.a({},e.defaultAdapter,n))||this}return o.b(e,t),Object.defineProperty(e,"strings",{get:function(){return a.c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return a.b},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=a.b.NOTCH_ELEMENT_PADDING),this.adapter_.setNotchWidthProperty(t),this.adapter_.addClass(n)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter_.removeClass(t),this.adapter_.removeNotchWidthProperty()},e}(i.a);e.default=r},155:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o}));var o={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},i={NOTCH_ELEMENT_PADDING:8},a={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"}},156:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCFloatingLabelFoundation",(function(){return r}));var o=n(42),i=n(43),a=n(157),r=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.shakeAnimationEndHandler_=function(){return i.handleShakeAnimationEnd_()},i}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},e.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},e.prototype.getWidth=function(){return this.adapter_.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,o=n.LABEL_FLOAT_ABOVE,i=n.LABEL_SHAKE;t?this.adapter_.addClass(o):(this.adapter_.removeClass(o),this.adapter_.removeClass(i))},e.prototype.handleShakeAnimationEnd_=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter_.removeClass(t)},e}(i.a);e.default=r},157:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"}},42:function(t,e,n){"use strict";e.b=function __extends(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)},n.d(e,"a",(function(){return i})),"function"==typeof Symbol&&s(Symbol.iterator);var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},i=function __assign(){return(i=Object.assign||function __assign(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)}},43:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()}})},"object"===s(e)&&"object"===s(t)?t.exports=r(n(18),n(30)):(i=[n(18),n(30)],void 0===(a="function"==typeof(o=r)?o.apply(e,i):o)||(t.exports=a))}).call(this,n(40)(t))},,,,,,,,,,,function(t,e,n){(function(t){var o,i,a,r;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"undefined"!=typeof self&&self,r=function(t,e,n,o,i,a){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=174)}({0:function(e,n){e.exports=t},1:function(t,n){t.exports=e},174:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=n(48),p=s(n(22)),d=s(n(23)),f=s(n(24)),h=n(176),m=s(n(181));e.Option=m.default;var _=l.MDCSelectFoundation.cssClasses,g=function(t){function e(e){var n=t.call(this,e)||this;return n.nativeControl=u.default.createRef(),n.classesBeingRemoved=new Set,n.classesBeingAdded=new Set,n.createFoundation=function(t){var e=new l.MDCSelectFoundation(n.adapter,n.foundationMap);e.init(),n.setState({foundation:e},t)},n.destroyFoundation=function(){n.state.foundation&&n.state.foundation.destroy()},n.addClass=function(t){n.classesBeingAdded.add(t),n.setState((function(e){var n=new Set(e.classList);return n.add(t),{classList:n}}),(function(){n.classesBeingAdded.delete(t)}))},n.removeClass=function(t){n.classesBeingRemoved.add(t),n.setState((function(e){var n=new Set(e.classList);return n.delete(t),{classList:n}}),(function(){n.classesBeingRemoved.delete(t)}))},n.closeMenu=function(){return n.setState({open:!1})},n.setValidClasses=function(t){t?n.removeClass(_.INVALID):n.addClass(_.INVALID)},n.setHelperTextFoundation=function(t){n.setState({helperTextFoundation:t})},n.setIconFoundation=function(t){n.setState({iconFoundation:t})},n.state={classList:new Set,disabled:e.disabled,value:e.value,labelIsFloated:!1,labelWidth:0,activeLineRipple:!1,lineRippleCenter:void 0,outlineIsNotched:!1,open:!1,selectElement:u.default.createRef(),isInvalid:!1,helperTextFoundation:void 0,iconFoundation:void 0,foundation:void 0},n}return i(e,t),e.prototype.componentDidMount=function(){var t=this;this.createFoundation((function(){t.state.foundation.handleChange(!1)}))},e.prototype.componentDidUpdate=function(t,e){this.props.value!==t.value&&this.setState({value:this.props.value}),this.state.foundation&&this.state.value!==e.value&&this.state.foundation.handleChange(!0),this.state.helperTextFoundation===e.helperTextFoundation&&this.state.iconFoundation===e.iconFoundation||(this.destroyFoundation(),this.createFoundation())},e.prototype.componentWillUnmount=function(){this.destroyFoundation()},Object.defineProperty(e.prototype,"classes",{get:function(){var t=this.state,e=t.classList,n=t.disabled,o=this.props,i=o.className,a=o.leadingIcon,r=o.required,s=o.outlined;return c.default("mdc-select",Array.from(e),i,{"mdc-select--outlined":s,"mdc-select--disabled":n,"mdc-select--required":r,"mdc-select--with-leading-icon":a})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this,e=this.props.enhanced,n={addClass:this.addClass,removeClass:this.removeClass,hasClass:function(e){var n=t.classes.split(" ").includes(e),o=t.classesBeingAdded.has(e),i=t.classesBeingRemoved.has(e);return(n||o)&&!i},setRippleCenter:function(e){return t.setState({lineRippleCenter:e})},getValue:function(){return t.state.value},setValue:function(e){return t.setState({value:e})},setDisabled:function(e){return t.setState({disabled:e})},setSelectedIndex:function(){},closeMenu:this.closeMenu,openMenu:function(){return t.setState({open:!0})}},o={isMenuOpen:function(){return!1},checkValidity:function(){return!!t.nativeControl.current&&t.nativeControl.current.checkValidity()},setValid:this.setValidClasses};return a({},e?{isMenuOpen:function(){return t.state.open},checkValidity:function(){return!(!t.props.disabled&&t.props.required)||Boolean(t.state.value)},setValid:function(e){t.setState({isInvalid:!e}),t.setValidClasses(e)}}:o,n,{floatLabel:function(e){return t.setState({labelIsFloated:e})},getLabelWidth:function(){return t.state.labelWidth}},{activateBottomLine:function(){return t.setState({activeLineRipple:!0})},deactivateBottomLine:function(){return t.setState({activeLineRipple:!1})},notifyChange:function(e){return t.props.afterChange(e)}},{notchOutline:function(){return t.setState({outlineIsNotched:!0})},closeOutline:function(){return t.setState({outlineIsNotched:!1})},hasOutline:function(){return!!t.props.outlined}})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"foundationMap",{get:function(){var t=this.state;return{helperText:t.helperTextFoundation,leadingIcon:t.iconFoundation}},enumerable:!0,configurable:!0}),e.prototype.render=function(){return u.default.createElement(u.default.Fragment,null,u.default.createElement("div",{className:this.classes,ref:this.state.selectElement},this.renderIcon(),u.default.createElement("i",{className:"mdc-select__dropdown-icon"}),this.renderSelect(),this.props.outlined?null:this.renderLabel(),this.props.outlined?this.renderNotchedOutline():this.renderLineRipple()),this.renderHelperText())},e.prototype.renderSelect=function(){var t=this.props,e=t.selectClassName,n=(t.floatingLabelClassName,t.lineRippleClassName,t.notchedOutlineClassName,t.outlined,t.ref,t.value,t.afterChange,t.onEnhancedChange),o=(t.helperText,t.leadingIcon,t.enhanced),i=r(t,["selectClassName","floatingLabelClassName","lineRippleClassName","notchedOutlineClassName","outlined","ref","value","afterChange","onEnhancedChange","helperText","leadingIcon","enhanced"]),s=this.state,c=s.open,l=s.selectElement,p=s.isInvalid,d=s.value,f={onEnhancedChange:n,closeMenu:this.closeMenu,anchorElement:l.current,enhanced:o,isInvalid:p};return u.default.createElement(h.BaseSelect,a({open:c,value:d,innerRef:this.nativeControl,foundation:this.state.foundation,className:e},o?f:{},i),this.renderOptions())},e.prototype.renderOptions=function(){var t=this.props,e=t.children,n=t.options;return void 0!==n&&n.length?n.map((function(t,e){if("string"==typeof t)return u.default.createElement(m.default,{key:e,value:t},t);var n=t.label,o=r(t,["label"]);return(u.default.createElement(m.default,a({key:e},o),n))})):e},e.prototype.renderLabel=function(){var t=this,e=this.props,n=e.id,o=e.label,i=e.floatingLabelClassName;if(o)return u.default.createElement(p.default,{className:i,float:this.state.labelIsFloated,handleWidthChange:function(e){return t.setState({labelWidth:e})},htmlFor:n},o)},e.prototype.renderLineRipple=function(){var t=this.props.lineRippleClassName,e=this.state,n=e.activeLineRipple,o=e.lineRippleCenter;return u.default.createElement(d.default,{rippleCenter:o,className:t,active:n})},e.prototype.renderNotchedOutline=function(){var t=this.props.notchedOutlineClassName,e=this.state,n=e.outlineIsNotched,o=e.labelWidth;return u.default.createElement(f.default,{className:t,notch:n,notchWidth:o},this.renderLabel())},e.prototype.renderHelperText=function(){var t=this.props.helperText;if(t){var e=a({},t.props,{setHelperTextFoundation:this.setHelperTextFoundation});return u.default.cloneElement(t,e)}},e.prototype.renderIcon=function(){var t=this.props.leadingIcon;if(t){var e=a({},t.props,{setIconFoundation:this.setIconFoundation});return u.default.cloneElement(t,e)}},e.defaultProps={enhanced:!1,className:"",disabled:!1,floatingLabelClassName:"",lineRippleClassName:"",selectClassName:"",notchedOutlineClassName:"",outlined:!1,options:[],onChange:function(){},onEnhancedChange:function(){},value:"",afterChange:function(){}},e}(u.default.Component);e.default=g;var b=n(182);e.SelectHelperText=b.SelectHelperText;var y=n(185);e.SelectIcon=y.SelectIcon;var v=n(25);e.OptionDivider=v.MenuListDivider,e.OptionGroup=v.MenuListGroup,e.OptionGroupSubheader=v.MenuListGroupSubheader,e.OptionGraphic=v.MenuListItemGraphic,e.OptionMeta=v.MenuListItemMeta,e.OptionText=v.MenuListItemText},175:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return a}));var o={DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",SELECTED_ITEM_CLASS:"mdc-list-item--selected",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},i={ARIA_CONTROLS:"aria-controls",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",ENHANCED_VALUE_ATTR:"data-value",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",NATIVE_CONTROL_SELECTOR:".mdc-select__native-control",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_ITEM_SELECTOR:"."+o.SELECTED_ITEM_CLASS,SELECTED_TEXT_SELECTOR:".mdc-select__selected-text"},a={LABEL_SCALE:.75}},176:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var c=s(n(0)),l=u(n(177)),p=u(n(178)),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleFocus=function(t){var n=e.props,o=n.foundation,i=n.onFocus;o&&o.handleFocus(),i&&i(t)},e.handleBlur=function(t){var n=e.props,o=n.foundation,i=n.onBlur;o&&o.handleBlur(),i&&i(t)},e.handleTouchStart=function(t){var n=e.props,o=n.foundation,i=n.onTouchStart;o&&o.handleClick(e.getNormalizedXCoordinate(t)),i&&i(t)},e.handleMouseDown=function(t){var n=e.props,o=n.foundation,i=n.onMouseDown;o&&o.handleClick(e.getNormalizedXCoordinate(t)),i&&i(t)},e.handleClick=function(t){var n=e.props,o=n.foundation,i=n.onClick;o&&o.handleClick(e.getNormalizedXCoordinate(t)),i&&i(t)},e.handleKeyDown=function(t){var n=e.props,o=n.foundation,i=n.onKeyDown;o&&o.handleKeydown(t.nativeEvent),i&&i(t)},e.isTouchEvent=function(t){return Boolean(t.touches)},e.getNormalizedXCoordinate=function(t){var n=t.currentTarget.getBoundingClientRect();return(e.isTouchEvent(t.nativeEvent)?t.nativeEvent.touches[0].clientX:t.nativeEvent.clientX)-n.left},e}return i(e,t),e.prototype.render=function(){var t=this.props,e=(t.onFocus,t.onBlur,t.onClick,t.onMouseDown,t.onTouchStart,t.ref,t.enhanced),n=t.children,o=t.onKeyDown,i=t.selectClassName,s=r(t,["onFocus","onBlur","onClick","onMouseDown","onTouchStart","ref","enhanced","children","onKeyDown","selectClassName"]),u=a({onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,onClick:this.handleClick,onTouchStart:this.handleTouchStart,className:i},s);return e?c.createElement(p.default,a({onKeyDown:this.handleKeyDown},u),n):c.createElement(l.default,a({onKeyDown:o},u),n)},e.defaultProps={enhanced:!1,selectClassName:""},e}(c.Component);e.BaseSelect=d},177:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.NativeSelect=u.default.createRef(),e.attachRef=function(t){var n=e.props.innerRef;e.NativeSelect.current=t,n&&("function"!=typeof n?n.current=t:n(t))},e}return i(e,t),Object.defineProperty(e.prototype,"classes",{get:function(){return c.default("mdc-select__native-control",this.props.className)},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=(t.className,t.children),n=(t.foundation,t.innerRef,r(t,["className","children","foundation","innerRef"]));return u.default.createElement("select",a({className:this.classes,ref:this.attachRef},n),e)},e.defaultProps={className:"",children:null,disabled:!1,value:""},e}(u.default.Component);e.default=l},178:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=r(n(0)),c=n(179),l=r(n(25)),p=s(n(48)),d=c.MDCMenuSurfaceFoundation.Corner,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.nativeControl=u.createRef(),e.selectedTextEl=u.createRef(),e.menuEl=u.createRef(),e.state={"aria-expanded":void 0,selectedItem:null,selectedValue:""},e.setSelected=function(){var t=null!==e.menuEl.current&&e.menuEl.current.listElements;if(t&&t.length){var n=t[e.getIndexByValue(t)],o=n&&n.getAttribute(p.default.strings.ENHANCED_VALUE_ATTR)||"";e.setState({selectedItem:n,selectedValue:o})}},e.getIndexByValue=function(t){var n=e.props.value,o=-1;return o<0&&n&&t.some((function(t,e){return t.getAttribute(p.default.strings.ENHANCED_VALUE_ATTR)===n&&(o=e,!0)})),o},e.handleMenuClose=function(){var t=e.props,n=t.closeMenu,o=t.foundation;n(),e.setState({"aria-expanded":void 0}),o&&document.activeElement!==e.selectedTextEl.current&&o.handleBlur()},e.handleMenuOpen=function(){if(e.setState({"aria-expanded":!0}),e.listElements&&e.listElements.length>0){var t=e.getIndexByValue(e.listElements);t=t>-1?t:0,e.listElements[t].focus()}},e}return i(e,t),e.prototype.componentDidUpdate=function(t){this.props.value!==t.value&&this.setSelected()},Object.defineProperty(e.prototype,"listElements",{get:function(){return null!==this.menuEl.current&&this.menuEl.current.listElements},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=t.children,n=t.required,o=t.open,i=t.disabled,r=t.anchorElement,s=t.onMouseDown,c=t.onTouchStart,p=t.onKeyDown,f=t.onFocus,h=t.onClick,m=t.onBlur,_=t.onEnhancedChange,g=t.isInvalid,b=this.state,y=b["aria-expanded"],v=b.selectedValue,k=b.selectedItem,j={};return n&&(j["aria-required"]=n.toString()),y&&"false"!==y&&(j["aria-expanded"]="true"),g&&(j["aria-invalid"]="true"),j["aria-disabled"]=i?"true":"false",u.createElement(u.Fragment,null,u.createElement("input",{type:"hidden",name:"enhanced-select",disabled:i,value:v}),u.createElement("div",a({className:"mdc-select__selected-text"},j,{ref:this.selectedTextEl,tabIndex:i?-1:0,onMouseDown:s,onTouchStart:c,onKeyDown:p,onFocus:f,onClick:h,onBlur:m}),k?k.textContent.trim():""),u.createElement(l.default,{className:"mdc-select__menu",onClose:this.handleMenuClose,onOpen:this.handleMenuOpen,open:o,onSelected:_,anchorElement:r||void 0,anchorCorner:d.BOTTOM_START,ref:this.menuEl,onMount:this.setSelected},u.createElement(l.MenuList,null,u.Children.map(e,(function(t){var e=t;return u.cloneElement(e,a({},e.props,{enhanced:!0}))})))))},e.defaultProps={disabled:!1,closeMenu:function(){},onEnhancedChange:function(){},value:"",anchorElement:null,isInvalid:!1},e}(u.Component);e.default=f},179:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCMenuSurfaceFoundation",(function(){return r}));var o=n(7),i=n(8),a=n(180),r=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.isOpen_=!1,i.isQuickOpen_=!1,i.isHoistedElement_=!1,i.isFixedPosition_=!1,i.openAnimationEndTimerId_=0,i.closeAnimationEndTimerId_=0,i.animationRequestId_=0,i.anchorCorner_=a.a.TOP_START,i.anchorMargin_={top:0,right:0,bottom:0,left:0},i.position_={x:0,y:0},i}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a.e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return a.d},enumerable:!0,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isFirstElementFocused:function(){return!1},isLastElementFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},focusFirstElement:function(){},focusLastElement:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,n=t.ROOT,o=t.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");this.adapter_.hasClass(o)&&(this.isOpen_=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)},e.prototype.setAnchorCorner=function(t){this.anchorCorner_=t},e.prototype.setAnchorMargin=function(t){this.anchorMargin_.top=t.top||0,this.anchorMargin_.right=t.right||0,this.anchorMargin_.bottom=t.bottom||0,this.anchorMargin_.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement_=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition_=t},e.prototype.setAbsolutePosition=function(t,e){this.position_.x=this.isFinite_(t)?t:0,this.position_.y=this.isFinite_(e)?e:0},e.prototype.setQuickOpen=function(t){this.isQuickOpen_=t},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.open=function(){var t=this;this.adapter_.saveFocus(),this.isQuickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame((function(){t.adapter_.addClass(e.cssClasses.OPEN),t.dimensions_=t.adapter_.getInnerDimensions(),t.autoPosition_(),t.isQuickOpen_?t.adapter_.notifyOpen():t.openAnimationEndTimerId_=setTimeout((function(){t.openAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter_.notifyOpen()}),a.d.TRANSITION_OPEN_DURATION)})),this.isOpen_=!0},e.prototype.close=function(){var t=this;this.isQuickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){t.adapter_.removeClass(e.cssClasses.OPEN),t.isQuickOpen_?t.adapter_.notifyClose():t.closeAnimationEndTimerId_=setTimeout((function(){t.closeAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_CLOSED),t.adapter_.notifyClose()}),a.d.TRANSITION_CLOSE_DURATION)})),this.isOpen_=!1,this.maybeRestoreFocus_()},e.prototype.handleBodyClick=function(t){var e=t.target;this.adapter_.isElementInContainer(e)||this.close()},e.prototype.handleKeydown=function(t){var e=t.keyCode,n=t.key,o=t.shiftKey,i="Tab"===n||9===e;"Escape"===n||27===e?this.close():i&&(this.adapter_.isLastElementFocused()&&!o?(this.adapter_.focusFirstElement(),t.preventDefault()):this.adapter_.isFirstElementFocused()&&o&&(this.adapter_.focusLastElement(),t.preventDefault()))},e.prototype.autoPosition_=function(){var t;this.measurements_=this.getAutoLayoutMeasurements_();var e=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(e),o=this.hasBit_(e,a.b.BOTTOM)?"bottom":"top",i=this.hasBit_(e,a.b.RIGHT)?"right":"left",r=this.getHorizontalOriginOffset_(e),s=this.getVerticalOriginOffset_(e),u=this.measurements_,c=u.anchorSize,l=u.surfaceSize,p=((t={})[i]=r,t[o]=s,t);c.width/l.width>a.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(i="center"),(this.isHoistedElement_||this.isFixedPosition_)&&this.adjustPositionForHoistedElement_(p),this.adapter_.setTransformOrigin(i+" "+o),this.adapter_.setPosition(p),this.adapter_.setMaxHeight(n?n+"px":"")},e.prototype.getAutoLayoutMeasurements_=function(){var t=this.adapter_.getAnchorDimensions(),e=this.adapter_.getBodyDimensions(),n=this.adapter_.getWindowDimensions(),o=this.adapter_.getWindowScroll();return t||(t={top:this.position_.y,right:this.position_.x,bottom:this.position_.y,left:this.position_.x,width:0,height:0}),{anchorSize:t,bodySize:e,surfaceSize:this.dimensions_,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:o}},e.prototype.getOriginCorner_=function(){var t=a.a.TOP_LEFT,e=this.measurements_,n=e.viewportDistance,o=e.anchorSize,i=e.surfaceSize,r=this.hasBit_(this.anchorCorner_,a.b.BOTTOM),s=r?n.top+o.height+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,u=r?n.bottom-this.anchorMargin_.bottom:n.bottom+o.height-this.anchorMargin_.top,c=i.height-s,l=i.height-u;l>0&&c<l&&(t=this.setBit_(t,a.b.BOTTOM));var p=this.adapter_.isRtl(),d=this.hasBit_(this.anchorCorner_,a.b.FLIP_RTL),f=this.hasBit_(this.anchorCorner_,a.b.RIGHT),h=f&&!p||!f&&d&&p,m=h?n.left+o.width+this.anchorMargin_.right:n.left+this.anchorMargin_.left,_=h?n.right-this.anchorMargin_.right:n.right+o.width-this.anchorMargin_.left,g=i.width-m,b=i.width-_;return(g<0&&h&&p||f&&!h&&g<0||b>0&&g<b)&&(t=this.setBit_(t,a.b.RIGHT)),t},e.prototype.getMenuSurfaceMaxHeight_=function(t){var n=this.measurements_.viewportDistance,o=0,i=this.hasBit_(t,a.b.BOTTOM),r=this.hasBit_(this.anchorCorner_,a.b.BOTTOM),s=e.numbers.MARGIN_TO_EDGE;return i?(o=n.top+this.anchorMargin_.top-s,r||(o+=this.measurements_.anchorSize.height)):(o=n.bottom-this.anchorMargin_.bottom+this.measurements_.anchorSize.height-s,r&&(o-=this.measurements_.anchorSize.height)),o},e.prototype.getHorizontalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,a.b.RIGHT),o=this.hasBit_(this.anchorCorner_,a.b.RIGHT);if(n){var i=o?e.width-this.anchorMargin_.left:this.anchorMargin_.right;return this.isHoistedElement_||this.isFixedPosition_?i-(this.measurements_.viewportSize.width-this.measurements_.bodySize.width):i}return o?e.width-this.anchorMargin_.right:this.anchorMargin_.left},e.prototype.getVerticalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,a.b.BOTTOM),o=this.hasBit_(this.anchorCorner_,a.b.BOTTOM);return n?o?e.height-this.anchorMargin_.top:-this.anchorMargin_.bottom:o?e.height+this.anchorMargin_.bottom:this.anchorMargin_.top},e.prototype.adjustPositionForHoistedElement_=function(t){var e,n,i=this.measurements_,a=i.windowScroll,r=i.viewportDistance,s=Object.keys(t);try{for(var u=o.c(s),c=u.next();!c.done;c=u.next()){var l=c.value,p=t[l]||0;p+=r[l],this.isFixedPosition_||("top"===l?p+=a.y:"bottom"===l?p-=a.y:"left"===l?p+=a.x:p-=a.x),t[l]=p}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}},e.prototype.maybeRestoreFocus_=function(){var t=this.adapter_.isFocused(),e=document.activeElement&&this.adapter_.isElementInContainer(document.activeElement);(t||e)&&this.adapter_.restoreFocus()},e.prototype.hasBit_=function(t,e){return Boolean(t&e)},e.prototype.setBit_=function(t,e){return t|e},e.prototype.isFinite_=function(t){return"number"==typeof t&&isFinite(t)},e}(i.a);e.default=r},180:function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"e",(function(){return r})),n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i}));var o,i,a={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},r={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},s={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(o||(o={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(i||(i={}))},181:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=n(25),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.render=function(){var t=this.props,e=t.value,n=t.enhanced,o=t.children,i=r(t,["value","enhanced","children"]);return n?u.createElement(c.MenuListItem,a({"data-value":e},i),o):u.createElement("option",a({value:e},i),o)},e.defaultProps={enhanced:!1},e}(u.Component);e.default=l},182:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var c=s(n(0)),l=u(n(1)),p=n(183),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={"aria-hidden":void 0,role:void 0,classList:new Set},e}return i(e,t),e.prototype.componentDidMount=function(){var t=this.props.setHelperTextFoundation;this.foundation=new p.MDCSelectHelperTextFoundation(this.adapter),this.foundation.init(),t&&t(this.foundation)},e.prototype.componentWillUnmount=function(){var t=this.props.setHelperTextFoundation;this.foundation&&(this.foundation.destroy(),t&&t(void 0))},Object.defineProperty(e.prototype,"classes",{get:function(){var t=this.props,e=t.className,n=t.persistent,o=this.state.classList;return l.default("mdc-select-helper-text",Array.from(o),e,{"mdc-select-helper-text--persistent":n})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return{addClass:function(e){var n=new Set(t.state.classList);n.add(e),t.setState({classList:n})},removeClass:function(e){var n=new Set(t.state.classList);n.delete(e),t.setState({classList:n})},hasClass:function(e){return t.classes.split(" ").includes(e)},setAttr:function(e,n){t.setState((function(t){var o;return a({},t,((o={})[e]=n,o))}))},removeAttr:function(e){t.setState((function(t){var n;return a({},t,((n={})[e]=null,n))}))},setContent:function(){}}},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=t.children,n=(t.persistent,t.className,t.setHelperTextFoundation,r(t,["children","persistent","className","setHelperTextFoundation"])),o=this.state,i=o["aria-hidden"],s=o.role;return c.createElement("p",a({className:this.classes,"aria-hidden":i,role:s},n),e)},e}(c.Component);e.SelectHelperText=d},183:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCSelectHelperTextFoundation",(function(){return r}));var o=n(7),i=n(8),a=n(184),r=function(t){function e(n){return t.call(this,o.a({},e.defaultAdapter,n))||this}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a.b},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!0,configurable:!0}),e.prototype.setContent=function(t){this.adapter_.setContent(t)},e.prototype.setPersistent=function(t){t?this.adapter_.addClass(a.a.HELPER_TEXT_PERSISTENT):this.adapter_.removeClass(a.a.HELPER_TEXT_PERSISTENT)},e.prototype.setValidation=function(t){t?this.adapter_.addClass(a.a.HELPER_TEXT_VALIDATION_MSG):this.adapter_.removeClass(a.a.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter_.removeAttr(a.b.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var e=this.adapter_.hasClass(a.a.HELPER_TEXT_PERSISTENT),n=this.adapter_.hasClass(a.a.HELPER_TEXT_VALIDATION_MSG)&&!t;n?this.adapter_.setAttr(a.b.ROLE,"alert"):this.adapter_.removeAttr(a.b.ROLE),e||n||this.hide_()},e.prototype.hide_=function(){this.adapter_.setAttr(a.b.ARIA_HIDDEN,"true")},e}(i.a);e.default=r},184:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i}));var o={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},i={HELPER_TEXT_PERSISTENT:"mdc-select-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg"}},185:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(n[o[i]]=t[o[i]])}return n},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(n(0)),c=s(n(1)),l=n(186),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={tabindex:void 0,role:void 0},e}return i(e,t),e.prototype.componentDidMount=function(){var t=this.props.setIconFoundation;this.foundation=new l.MDCSelectIconFoundation(this.adapter),this.foundation.init(),t&&t(this.foundation)},e.prototype.componentWillUnmount=function(){var t=this.props.setIconFoundation;this.foundation&&(this.foundation.destroy(),t&&t(void 0))},Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return{getAttr:function(e){if(void 0!==t.state[e])return t.state[e].toString();var n="tabindex"===e?"tabIndex":e;return void 0!==t.props[n]?t.props[n].toString():null},setAttr:function(e,n){t.setState((function(t){var o;return a({},t,((o={})[e]=n,o))}))},removeAttr:function(e){t.setState((function(t){var n;return a({},t,((n={})[e]=null,n))}))},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=t.tag,n=(t.setIconFoundation,t.children),o=t.className,i=r(t,["tag","setIconFoundation","children","className"]),s=this.state,l=s.tabindex,p=s.role;return u.default.createElement(e,a({className:c.default("mdc-select__icon",o),role:p,tabIndex:l},i),n)},e.defaultProps={tag:"i"},e}(u.default.Component);e.SelectIcon=p},186:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCSelectIconFoundation",(function(){return s}));var o=n(7),i=n(8),a=n(187),r=["click","keydown"],s=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.savedTabIndex_=null,i.interactionHandler_=function(t){return i.handleInteraction(t)},i}return o.b(e,t),Object.defineProperty(e,"strings",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.savedTabIndex_=this.adapter_.getAttr("tabindex"),r.forEach((function(e){t.adapter_.registerInteractionHandler(e,t.interactionHandler_)}))},e.prototype.destroy=function(){var t=this;r.forEach((function(e){t.adapter_.deregisterInteractionHandler(e,t.interactionHandler_)}))},e.prototype.setDisabled=function(t){this.savedTabIndex_&&(t?(this.adapter_.setAttr("tabindex","-1"),this.adapter_.removeAttr("role")):(this.adapter_.setAttr("tabindex",this.savedTabIndex_),this.adapter_.setAttr("role",a.a.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter_.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter_.setContent(t)},e.prototype.handleInteraction=function(t){var e="Enter"===t.key||13===t.keyCode;("click"===t.type||e)&&this.adapter_.notifyIconAction()},e}(i.a);e.default=s},187:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"}},22:function(t,e){t.exports=n},23:function(t,e){t.exports=o},24:function(t,e){t.exports=i},25:function(t,e){t.exports=a},48:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCSelectFoundation",(function(){return r}));var o=n(7),i=n(8),a=n(175),r=function(t){function e(n,i){void 0===i&&(i={});var a=t.call(this,o.a({},e.defaultAdapter,n))||this;return a.leadingIcon_=i.leadingIcon,a.helperText_=i.helperText,a}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return a.b},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a.c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},setValue:function(){},getValue:function(){return""},floatLabel:function(){},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},openMenu:function(){},closeMenu:function(){},isMenuOpen:function(){return!1},setSelectedIndex:function(){},setDisabled:function(){},setRippleCenter:function(){},notifyChange:function(){},checkValidity:function(){return!1},setValid:function(){}}},enumerable:!0,configurable:!0}),e.prototype.setSelectedIndex=function(t){this.adapter_.setSelectedIndex(t),this.adapter_.closeMenu(),this.handleChange(!0)},e.prototype.setValue=function(t){this.adapter_.setValue(t),this.handleChange(!0)},e.prototype.getValue=function(){return this.adapter_.getValue()},e.prototype.setDisabled=function(t){t?this.adapter_.addClass(a.a.DISABLED):this.adapter_.removeClass(a.a.DISABLED),this.adapter_.setDisabled(t),this.adapter_.closeMenu(),this.leadingIcon_&&this.leadingIcon_.setDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText_&&this.helperText_.setContent(t)},e.prototype.layout=function(){var t=this.getValue().length>0;this.notchOutline(t)},e.prototype.handleChange=function(t){void 0===t&&(t=!0);var e=this.getValue(),n=e.length>0,o=this.adapter_.hasClass(a.a.REQUIRED);this.notchOutline(n),this.adapter_.hasClass(a.a.FOCUSED)||this.adapter_.floatLabel(n),t&&(this.adapter_.notifyChange(e),o&&(this.setValid(this.isValid()),this.helperText_&&this.helperText_.setValidity(this.isValid())))},e.prototype.handleFocus=function(){this.adapter_.addClass(a.a.FOCUSED),this.adapter_.floatLabel(!0),this.notchOutline(!0),this.adapter_.activateBottomLine(),this.helperText_&&this.helperText_.showToScreenReader()},e.prototype.handleBlur=function(){this.adapter_.isMenuOpen()||(this.adapter_.removeClass(a.a.FOCUSED),this.handleChange(!1),this.adapter_.deactivateBottomLine(),this.adapter_.hasClass(a.a.REQUIRED)&&(this.setValid(this.isValid()),this.helperText_&&this.helperText_.setValidity(this.isValid())))},e.prototype.handleClick=function(t){this.adapter_.isMenuOpen()||(this.adapter_.setRippleCenter(t),this.adapter_.openMenu())},e.prototype.handleKeydown=function(t){if(!this.adapter_.isMenuOpen()){var e="Enter"===t.key||13===t.keyCode,n="Space"===t.key||32===t.keyCode,o="ArrowUp"===t.key||38===t.keyCode,i="ArrowDown"===t.key||40===t.keyCode;this.adapter_.hasClass(a.a.FOCUSED)&&(e||n||o||i)&&(this.adapter_.openMenu(),t.preventDefault())}},e.prototype.notchOutline=function(t){if(this.adapter_.hasOutline()){var e=this.adapter_.hasClass(a.a.FOCUSED);if(t){var n=a.b.LABEL_SCALE,o=this.adapter_.getLabelWidth()*n;this.adapter_.notchOutline(o)}else e||this.adapter_.closeOutline()}},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon_&&this.leadingIcon_.setContent(t)},e.prototype.setValid=function(t){this.adapter_.setValid(t)},e.prototype.isValid=function(){return this.adapter_.checkValidity()},e}(i.a);e.default=r},7:function(t,e,n){"use strict";e.b=function __extends(t,e){function __(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)},n.d(e,"a",(function(){return i})),e.c=__values,"function"==typeof Symbol&&s(Symbol.iterator);var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},i=function __assign(){return(i=Object.assign||function __assign(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function __values(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}},8:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()}})},"object"===s(e)&&"object"===s(t)?t.exports=r(n(18),n(30),n(83),n(84),n(85),n(147)):(i=[n(18),n(30),n(83),n(84),n(85),n(147)],void 0===(a="function"==typeof(o=r)?o.apply(e,i):o)||(t.exports=a))}).call(this,n(40)(t))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){r
|
|