(n=ka()(this,Ca()(t).call(this,e))).navigateItem=n.navigateItem.bind(Os()(n)),n.toggleDropdown=n.toggleDropdown.bind(Os()(n)),n.handleOutsideClick=n.handleOutsideClick.bind(Os()(n)),n._onClick=n._onClick.bind(Os()(n));var r={isOpen:!1};return e.options.length&&(r.selected=n.getInitialSelectedItem(e)),n.state=r,n}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.setState({instanceId:++t.instances})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.state.isOpen&&this.closeDropdown(),void 0!==this.state.selected&&this.props.initialSelected!==e.initialSelected&&this.setState({selected:e.initialSelected})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.handleOutsideClick)}},{key:"componentDidUpdate",value:function(e,t){this.state.isOpen?window.addEventListener("click",this.handleOutsideClick):window.removeEventListener("click",this.handleOutsideClick),this.state.isOpen!==t.isOpen&&this.props.onToggle({target:this,open:this.state.isOpen})}},{key:"getInitialSelectedItem",value:function(e){if((e=e||this.props).initialSelected)return e.initialSelected;if(e.options.length){var t=Object(Dt.find)(e.options,(function(e){return!e.isLabel}));return t&&t.value}}},{key:"dropdownOptions",value:function(){var e=0,t=this;return this.props.children?o.a.Children.map(this.props.children,(function(n,r){if(!n)return null;var i=o.a.cloneElement(n,{ref:n.type===nl?"item-"+e:null,key:"item-"+r,onClick:function(e){t.refs.dropdownContainer.focus(),"function"==typeof n.props.onClick&&n.props.onClick(e)}});return n.type===nl&&e++,i}),this):this.props.options.map((function(t,n){if(!t)return o.a.createElement(rl,{key:"dropdown-separator-"+this.state.instanceId+"-"+n});if(t.isLabel)return o.a.createElement(sl,{key:"dropdown-label-"+this.state.instanceId+"-"+n},t.label);var r=o.a.createElement(nl,{key:"dropdown-item-"+this.state.instanceId+"-"+t.value,ref:"item-"+e,selected:this.state.selected===t.value,onClick:this.onSelectItem(t),path:t.path},t.label);return e++,r}),this)}},{key:"render",value:function(){var e={"dops-select-dropdown":!0,"is-compact":this.props.compact,"is-open":this.state.isOpen,"is-disabled":this.props.disabled};this.props.className&&this.props.className.split(" ").forEach((function(t){e[t]=!0}));var t=Mc()(e),n=this.props.selectedText?this.props.selectedText:Object(Dt.result)(Object(Dt.find)(this.props.options,{value:this.state.selected}),"label");return o.a.createElement("div",{style:this.props.style,className:t},o.a.createElement("div",{ref:"dropdownContainer",className:"dops-select-dropdown__container",tabIndex:this.props.tabIndex||0,role:"listbox","aria-labelledby":"select-dropdown-"+this.state.instanceId,"aria-haspopup":"true","aria-owns":"select-submenu-"+this.state.instanceId,"aria-controls":"select-submenu-"+this.state.instanceId,"aria-expanded":this.state.isOpen,onClick:this._onClick,onKeyDown:this.navigateItem},o.a.createElement("div",{id:"select-dropdown-"+this.state.instanceId,className:"dops-select-dropdown__header"},o.a.createElement("span",{className:"dops-select-dropdown__header-text"},n,"number"==typeof this.props.selectedCount&&o.a.createElement(el,{count:this.props.selectedCount}))),o.a.createElement("ul",{id:"select-submenu-"+this.state.instanceId,className:"dops-select-dropdown__options"},this.dropdownOptions())))}},{key:"_onClick",value:function(){this.props.disabled||this.toggleDropdown()}},{key:"toggleDropdown",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"openDropdown",value:function(){this.setState({isOpen:!0})}},{key:"closeDropdown",value:function(){this.state.isOpen&&(delete this.focused,this.setState({isOpen:!1}))}},{key:"onSelectItem",value:function(e){return this.selectItem.bind(this,e)}},{key:"selectItem",value:function(e){e&&(this.props.onSelect&&this.props.onSelect(e),this.setState({selected:e.value}),this.refs.dropdownContainer.focus())}},{key:"navigateItem",value:function(e){switch(e.keyCode){case 9:this.navigateItemByTabKey(e);break;case 32:case 13:e.preventDefault(),this.activateItem();break;case 38:e.preventDefault(),this.focusSibling("previous"),this.openDropdown();break;case 40:e.preventDefault(),this.focusSibling("next"),this.openDropdown();break;case 27:e.preventDefault(),this.closeDropdown(),this.refs.dropdownContainer.focus()}}},{key:"navigateItemByTabKey",value:function(e){if(this.state.isOpen){e.preventDefault();var t=e.shiftKey?"previous":"next";this.focusSibling(t)}}},{key:"activateItem",value:function(){if(!this.state.isOpen)return this.openDropdown();document.activeElement.click()}},{key:"focusSibling",value:function(e){var t,n;if(this.state.isOpen){this.props.options.length?(t=Object(Dt.map)(Object(Dt.filter)(this.props.options,(function(e){return e&&!e.isLabel})),"value"),n="number"==typeof this.focused?this.focused:t.indexOf(this.state.selected)):(t=Object(Dt.filter)(this.props.children,(function(e){return e.type===nl})),n="number"==typeof this.focused?this.focused:Object(Dt.findIndex)(t,(function(e){return e.props.selected})));var r=n+("previous"===e?-1:1);r>=t.length||r<0||(a.a.findDOMNode(this.refs["item-"+r].refs.itemLink).focus(),this.focused=r)}}},{key:"handleOutsideClick",value:function(e){a.a.findDOMNode(this.refs.dropdownContainer).contains(e.target)||this.closeDropdown()}}]),t}(o.a.Component);cl.defaultProps={options:[],onSelect:ol,onToggle:ol,disabled:!1,style:{}},cl.propTypes={selectedText:u.a.string,selectedCount:u.a.number,initialSelected:u.a.string,className:u.a.string,style:u.a.object,onSelect:u.a.func,onToggle:u.a.func,focusSibling:u.a.func,tabIndex:u.a.number,disabled:u.a.bool,options:u.a.arrayOf(u.a.shape({value:u.a.string.isRequired,label:u.a.string.isRequired,path:u.a.string}))},cl.instances=0;var ll=cl,ul=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{isDropdown:!1}),ha()(Os()(n),"getTabWidths",(function(){var e=0;o.a.Children.forEach(n.props.children,function(t,n){if(t){var r=a.a.findDOMNode(this.refs["tab-"+n]).offsetWidth;e+=r}}.bind(Os()(n))),n.tabsWidth=e})),ha()(Os()(n),"getDropdown",(function(){var e=o.a.Children.map(n.props.children,(function(e,t){return e?o.a.createElement(nl,Bc()({},e.props,{key:"navTabsDropdown-"+t}),e.props.children):null}));return o.a.createElement(ll,{className:"dops-section-nav-tabs__dropdown",selectedText:n.props.selectedText,selectedCount:n.props.selectedCount},e)})),ha()(Os()(n),"setDropdown",(function(){var e;if(window.innerWidth>480){if(!n.refs.navGroup)return;e=n.refs.navGroup.offsetWidth,n.tabsWidth||n.getTabWidths(),e<=n.tabsWidth&&!n.state.isDropdown?n.setState({isDropdown:!0}):e>n.tabsWidth&&n.state.isDropdown&&n.setState({isDropdown:!1})}else window.innerWidth<=480&&n.state.isDropdown&&n.setState({isDropdown:!1})})),ha()(Os()(n),"keyHandler",(function(e){switch(e.keyCode){case 32:case 13:e.preventDefault(),document.activeElement.click()}})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){this.setDropdown(),this.debouncedAfterResize=Object(Dt.debounce)(this.setDropdown,300),window.addEventListener("resize",this.debouncedAfterResize)}},{key:"UNSAFE_componentWillReceiveProps",value:function(){this.setDropdown()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.debouncedAfterResize)}},{key:"render",value:function(){var e=o.a.Children.map(this.props.children,(function(e,t){return e&&o.a.cloneElement(e,{ref:"tab-"+t})})),t=Mc()({"dops-section-nav-tabs":!0,"is-dropdown":this.state.isDropdown,"is-open":this.state.isDropdownOpen,"has-siblings":this.props.hasSiblingControls}),n=Jc?769:window.innerWidth;return o.a.createElement("div",{className:"dops-section-nav-group",ref:"navGroup"},o.a.createElement("div",{className:t},this.props.label&&o.a.createElement("h6",{className:"dops-section-nav-group__label"},this.props.label),o.a.createElement("ul",{className:"dops-section-nav-tabs__list",role:"menu",onKeyDown:this.keyHandler},e),this.state.isDropdown&&n>480&&this.getDropdown()))}}]),t}(o.a.Component);ha()(ul,"propTypes",{selectedText:u.a.string,selectedCount:u.a.number,label:u.a.string,hasSiblingControls:u.a.bool}),ha()(ul,"defaultProps",{hasSiblingControls:!1});var pl=ul,dl=pe()({displayName:"NavItem",mixins:[Zc.a],propTypes:{itemType:u.a.string,path:u.a.string,selected:u.a.bool,tabIndex:u.a.number,onClick:u.a.func,isExternalLink:u.a.bool,disabled:u.a.bool,count:u.a.number},render:function(){var e=this.props.itemType?this.props.itemType:"tab",t={"is-selected":this.props.selected,"is-external":this.props.isExternalLink};t["dops-section-nav-"+e]=!0;var n,r,i=Mc()(t);return this.props.isExternalLink&&(n="_blank"),this.props.disabled||(r=this.props.onClick),o.a.createElement("li",{className:i},o.a.createElement("a",{href:this.props.path,target:n,className:"dops-section-nav-"+e+"__link",onClick:r,tabIndex:this.props.tabIndex||0,disabled:this.props.disabled,role:"menuitem",rel:this.props.isExternalLink?"external":null},o.a.createElement("span",{className:"dops-section-nav-"+e+"__text"},this.props.children,"number"==typeof this.props.count&&o.a.createElement(el,{count:this.props.count}))))}}),hl=(n(222),function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"isSVGCSSAnimationSupported",(function(){var e=window.window?window.window.navigator.userAgent:"";return!/(MSIE |Trident\/)/.test(e)})),ha()(Os()(n),"getClassName",(function(){return Mc()("dops-spinner",n.props.className,{"is-fallback":!n.isSVGCSSAnimationSupported()})})),ha()(Os()(n),"renderFallback",(function(){var e={width:n.props.size,height:n.props.size};return o.a.createElement("div",{className:n.getClassName(),style:e},o.a.createElement("span",{className:"dops-spinner__progress is-left"}),o.a.createElement("span",{className:"dops-spinner__progress is-right"}))})),n}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.setState({instanceId:++t.instances})}},{key:"render",value:function(){var e=parseInt(this.state.instanceId,10);return this.isSVGCSSAnimationSupported()?o.a.createElement("div",{className:this.getClassName()},o.a.createElement("svg",{className:"dops-spinner__image",width:this.props.size,height:this.props.size,viewBox:"0 0 100 100",dangerouslySetInnerHTML:{__html:'\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<mask id="maskBorder'.concat(e,'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="100%" height="100%" fill="white" />\n\t\t\t\t\t\t\t<circle r="46%" cx="50%" cy="50%" fill="black" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskDonut').concat(e,'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="100%" height="100%" fill="black" />\n\t\t\t\t\t\t\t<circle r="46%" cx="50%" cy="50%" fill="white" />\n\t\t\t\t\t\t\t<circle r="30%" cx="50%" cy="50%" fill="black" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskLeft').concat(e,'">\n\t\t\t\t\t\t\t<rect x="0" y="0" width="50%" height="100%" fill="white" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t\t<mask id="maskRight').concat(e,'">\n\t\t\t\t\t\t\t<rect x="50%" y="0" width="50%" height="100%" fill="white" />\n\t\t\t\t\t\t</mask>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<circle class="dops-spinner__border" r="50%" cx="50%" cy="50%" mask="url( #maskBorder').concat(e,' )" />\n\t\t\t\t\t<g mask="url( #maskDonut').concat(e,' )">\n\t\t\t\t\t\t<g mask="url( #maskLeft').concat(e,' )">\n\t\t\t\t\t\t\t<rect class="dops-spinner__progress is-left" x="0" y="0" width="50%" height="100%" />\n\t\t\t\t\t\t</g>\n\t\t\t\t\t\t<g mask="url( #maskRight').concat(e,' )">\n\t\t\t\t\t\t\t<rect class="dops-spinner__progress is-right" x="50%" y="0" width="50%" height="100%" />\n\t\t\t\t\t\t</g>\n\t\t\t\t\t</g>\n\t\t\t\t')}})):this.renderFallback()}}]),t}(o.a.Component));ha()(hl,"propTypes",{className:u.a.string,size:u.a.number,duration:u.a.number}),ha()(hl,"instances",0),ha()(hl,"defaultProps",{size:20,duration:3e3});var fl=hl,ml=(n(223),pe()({displayName:"Gridicon",mixins:[Zc.a],getDefaultProps:function(){return{className:"",size:24}},propTypes:{icon:u.a.string.isRequired,size:u.a.number,onClick:u.a.func,className:u.a.string},needsOffset:function(e,t){return["gridicons-add-outline","gridicons-add","gridicons-align-image-center","gridicons-align-image-left","gridicons-align-image-none","gridicons-align-image-right","gridicons-attachment","gridicons-backspace","gridicons-bold","gridicons-bookmark-outline","gridicons-bookmark","gridicons-calendar","gridicons-cart","gridicons-create","gridicons-custom-post-type","gridicons-external","gridicons-folder","gridicons-heading","gridicons-help-outline","gridicons-help","gridicons-history","gridicons-info-outline","gridicons-info","gridicons-italic","gridicons-layout-blocks","gridicons-link-break","gridicons-link","gridicons-list-checkmark","gridicons-list-ordered","gridicons-list-unordered","gridicons-menus","gridicons-minus","gridicons-my-sites","gridicons-notice-outline","gridicons-notice","gridicons-plans","gridicons-plus-small","gridicons-plus","gridicons-popout","gridicons-posts","gridicons-scheduled","gridicons-share-ios","gridicons-star-outline","gridicons-star","gridicons-stats","gridicons-status","gridicons-thumbs-up","gridicons-textcolor","gridicons-time","gridicons-trophy","gridicons-user-circle"].indexOf(e)>=0&&t%18==0},needsOffsetX:function(e,t){return["gridicons-arrow-down","gridicons-arrow-up","gridicons-comment","gridicons-clear-formatting","gridicons-flag","gridicons-menu","gridicons-reader","gridicons-strikethrough"].indexOf(e)>=0&&t%18==0},needsOffsetY:function(e,t){return["gridicons-align-center","gridicons-align-justify","gridicons-align-left","gridicons-align-right","gridicons-arrow-left","gridicons-arrow-right","gridicons-house","gridicons-indent-left","gridicons-indent-right","gridicons-minus-small","gridicons-print","gridicons-sign-out","gridicons-stats-alt","gridicons-trash","gridicons-underline","gridicons-video-camera"].indexOf(e)>=0&&t%18==0},render:function(){var e,t="gridicons-"+this.props.icon,n=this.needsOffset(t,this.props.size),r=this.needsOffsetX(t,this.props.size),i=this.needsOffsetY(t,this.props.size),a=Mc()("gridicon",t,this.props.className,{"needs-offset":n,"needs-offset-x":r,"needs-offset-y":i});switch(t){default:e=o.a.createElement("svg",{height:this.props.size,width:this.props.size});break;case"gridicons-add-image":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M23 4v2h-3v3h-2V6h-3V4h3V1h2v3h3zm-8.5 7c.828 0 1.5-.672 1.5-1.5S15.328 8 14.5 8 13 8.672 13 9.5s.672 1.5 1.5 1.5zm3.5 3.234l-.513-.57c-.794-.885-2.18-.885-2.976 0l-.655.73L9 9l-3 3.333V6h7V4H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2v-7h-2v3.234z"})));break;case"gridicons-add-outline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 9h-4V7h-2v4H7v2h4v4h2v-4h4v-2z"})));break;case"gridicons-add":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})));break;case"gridicons-align-center":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4 19h16v-2H4v2zm13-6H7v2h10v-2zM4 9v2h16V9H4zm13-4H7v2h10V5z"})));break;case"gridicons-align-image-center":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm5-4h8V9H8v6z"})));break;case"gridicons-align-image-left":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm0-4h8V9H3v6zm10 0h8v-2h-8v2zm0-4h8V9h-8v2z"})));break;case"gridicons-align-image-none":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zM11 9H3v6h8V9z"})));break;case"gridicons-align-image-right":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zm0-8h-8v6h8V9zm-10 4H3v2h8v-2zm0-4H3v2h8V9z"})));break;case"gridicons-align-justify":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4 19h16v-2H4v2zm16-6H4v2h16v-2zM4 9v2h16V9H4zm16-4H4v2h16V5z"})));break;case"gridicons-align-left":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4 19h16v-2H4v2zm10-6H4v2h10v-2zM4 9v2h16V9H4zm10-4H4v2h10V5z"})));break;case"gridicons-align-right":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 17H4v2h16v-2zm-10-2h10v-2H10v2zM4 9v2h16V9H4zm6-2h10V5H10v2z"})));break;case"gridicons-arrow-down":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M11 4v12.17l-5.59-5.59L4 12l8 8 8-8-1.41-1.41L13 16.17V4h-2z"})));break;case"gridicons-arrow-left":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})));break;case"gridicons-arrow-right":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})));break;case"gridicons-arrow-up":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M13 20V7.83l5.59 5.59L20 12l-8-8-8 8 1.41 1.41L11 7.83V20h2z"})));break;case"gridicons-aside":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M14 20l6-6V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h8zM6 6h12v6h-4c-1.105 0-2 .895-2 2v4H6V6zm10 4H8V8h8v2z"})));break;case"gridicons-attachment":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M14 1c-2.762 0-5 2.238-5 5v10c0 1.657 1.343 3 3 3s2.99-1.343 2.99-3V6H13v10c0 .553-.447 1-1 1-.553 0-1-.447-1-1V6c0-1.657 1.343-3 3-3s3 1.343 3 3v10.125C17 18.887 14.762 21 12 21s-5-2.238-5-5v-5H5v5c0 3.866 3.134 7 7 7s6.99-3.134 6.99-7V6c0-2.762-2.228-5-4.99-5z"})));break;case"gridicons-audio":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"})));break;case"gridicons-backspace":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M19 7H8l-5 5 5 5h11c1.104 0 2-.896 2-2V9c0-1.104-.896-2-2-2zm-.647 6.646l-.707.707L16 12.707l-1.647 1.647-.707-.707L15.293 12l-1.647-1.646.707-.707L16 11.293l1.646-1.647.707.707L16.707 12l1.646 1.646z"})));break;case"gridicons-bell":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M6.14 14.97l2.828 2.827c-.362.362-.862.586-1.414.586-1.105 0-2-.895-2-2 0-.552.224-1.052.586-1.414zm8.867 5.324L14.3 21 3 9.7l.706-.707 1.102.157c.754.108 1.69-.122 2.077-.51l3.885-3.884c2.34-2.34 6.135-2.34 8.475 0s2.34 6.135 0 8.475l-3.885 3.886c-.388.388-.618 1.323-.51 2.077l.157 1.1z"})));break;case"gridicons-block":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"})));break;case"gridicons-bold":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M7 5.01h4.547c2.126 0 3.67.302 4.632.906.96.605 1.44 1.567 1.44 2.887 0 .896-.21 1.63-.63 2.205-.42.574-.98.92-1.678 1.036v.103c.95.212 1.637.608 2.057 1.19.42.58.63 1.35.63 2.315 0 1.367-.494 2.434-1.482 3.2-.99.765-2.332 1.148-4.027 1.148H7V5.01zm3 5.936h2.027c.862 0 1.486-.133 1.872-.4.386-.267.578-.708.578-1.323 0-.574-.21-.986-.63-1.236-.42-.25-1.087-.374-1.996-.374H10v3.333zm0 2.523v3.905h2.253c.876 0 1.52-.167 1.94-.502.416-.335.625-.848.625-1.54 0-1.243-.89-1.864-2.668-1.864H10z"})));break;case"gridicons-book":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4 3h2v18H4zM18 3H7v18h11c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 6h-6V8h6v1zm0-2h-6V6h6v1z"})));break;case"gridicons-bookmark-outline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17 5v12.554l-5-2.857-5 2.857V5h10m0-2H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-bookmark":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17 3H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-briefcase":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M21 6h-4V3c0-.5-.5-1-1-1H8c-.5 0-1 .5-1 1v3H3c-.6 0-1 .4-1 1v5h20V7c0-.6-.4-1-1-1zm-6 0H9V4h6v2zM14 15h-4v-2H2v8c0 .6.4 1 1 1h18c.6 0 1-.4 1-1v-8h-8v2z"})));break;case"gridicons-calendar":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"})));break;case"gridicons-camera":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17 12c0 1.7-1.3 3-3 3s-3-1.3-3-3 1.3-3 3-3 3 1.3 3 3zm5-5v11c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2V4h4v1h2l1-2h6l1 2h2c1.1 0 2 .9 2 2zM7.5 9c0-.8-.7-1.5-1.5-1.5S4.5 8.2 4.5 9s.7 1.5 1.5 1.5S7.5 9.8 7.5 9zM19 12c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5 5-2.2 5-5z"})));break;case"gridicons-cart":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"})));break;case"gridicons-checkmark-circle":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})));break;case"gridicons-checkmark":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"})));break;case"gridicons-chevron-down":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"})));break;case"gridicons-chevron-left":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M14 20l-8-8 8-8 1.414 1.414L8.828 12l6.586 6.586"})));break;case"gridicons-chevron-right":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M10 20l8-8-8-8-1.414 1.414L15.172 12l-6.586 6.586"})));break;case"gridicons-chevron-up":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4 15l8-8 8 8-1.414 1.414L12 9.828l-6.586 6.586"})));break;case"gridicons-clear-formatting":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M10.837 10.163l-4.6 4.6L10 4h4l.777 2.223-2.144 2.144-.627-2.092-1.17 3.888zm5.495.506L19.244 19H15.82l-1.05-3.5H11.5L5 22l-1.5-1.5 17-17L22 5l-5.668 5.67zm-2.31 2.31l-.032.03.032-.01v-.02z"})));break;case"gridicons-clipboard":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6c-1.105 0-2 .895-2 2v15c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-4 2V4c0-1.105-.895-2-2-2s-2 .895-2 2v1c-1.105 0-2 .895-2 2v1h8V7c0-1.105-.895-2-2-2z"})));break;case"gridicons-cloud-download":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-6 7l-4-5h3V8h2v3h3l-4 5z"})));break;case"gridicons-cloud-outline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M11.5 5c2.336 0 4.304 1.825 4.48 4.154l.142 1.86 1.867-.012h.092C19.698 11.043 21 12.37 21 14c0 .748-.28 1.452-.783 2H3.28c-.156-.256-.28-.59-.28-1 0-1.074.85-1.953 1.915-1.998.06.007.118.012.178.015l2.66.124-.622-2.587C7.044 10.186 7 9.843 7 9.5 7 7.02 9.02 5 11.5 5m0-2C7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5l-.025.002C17.72 5.646 14.922 3 11.5 3z"})));break;case"gridicons-cloud-upload":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})));break;case"gridicons-cloud":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5z"})));break;case"gridicons-code":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4.83 12l4.58 4.59L8 18l-6-6 6-6 1.41 1.41L4.83 12zm9.76 4.59L16 18l6-6-6-6-1.41 1.41L19.17 12l-4.58 4.59z"})));break;case"gridicons-cog":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 12c0-.568-.06-1.122-.174-1.656l1.834-1.612-2-3.464-2.322.786c-.82-.736-1.787-1.308-2.86-1.657L14 2h-4l-.48 2.396c-1.07.35-2.04.92-2.858 1.657L4.34 5.268l-2 3.464 1.834 1.612C4.06 10.878 4 11.432 4 12s.06 1.122.174 1.656L2.34 15.268l2 3.464 2.322-.786c.82.736 1.787 1.308 2.86 1.657L10 22h4l.48-2.396c1.07-.35 2.038-.92 2.858-1.657l2.322.786 2-3.464-1.834-1.613c.113-.535.174-1.09.174-1.657zm-8 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"})));break;case"gridicons-comment":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"})));break;case"gridicons-computer":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})));break;case"gridicons-create":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M21 11v8c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h8l-2 2H5v14h14v-6l2-2zM7 17h3l7.5-7.5-3-3L7 14v3zm9.94-12.94L15.5 5.5l3 3 1.44-1.44c.585-.585.585-1.535 0-2.12l-.88-.88c-.585-.585-1.535-.585-2.12 0z"})));break;case"gridicons-credit-card":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})));break;case"gridicons-crop":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M22 16h-4V8c0-1.105-.895-2-2-2H8V2H6v4H2v2h4v8c0 1.105.895 2 2 2h8v4h2v-4h4v-2zM8 16V8h8v8H8z"})));break;case"gridicons-cross-small":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})));break;case"gridicons-cross":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"})));break;case"gridicons-custom-post-type":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"})));break;case"gridicons-customize":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"})));break;case"gridicons-dropdown":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M7 10l5 5 5-5"})));break;case"gridicons-ellipsis":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"})));break;case"gridicons-external":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"})));break;case"gridicons-flag":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M15 6c0-1.105-.895-2-2-2H5v17h2v-7h5c0 1.105.895 2 2 2h6V6h-5z"})));break;case"gridicons-flip-horizontal":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 18v-5h3v-2h-3V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v5H1v2h3v5c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2zM6 6h12v5H6V6z"})));break;case"gridicons-flip-vertical":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 4h-5V1h-2v3H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h5v3h2v-3h5c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 18V6h5v12H6z"})));break;case"gridicons-folder-multiple":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4 8c-1.105 0-2 .895-2 2v10c0 1.1.9 2 2 2h14c1.105 0 2-.895 2-2H4V8zm16 10H8c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2h7c1.105 0 2 .895 2 2v8c0 1.105-.895 2-2 2z"})));break;case"gridicons-folder":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"})));break;case"gridicons-globe":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18l2-2 1-1v-2h-2v-1l-1-1H9v3l2 2v1.93c-3.94-.494-7-3.858-7-7.93l1 1h2v-2h2l3-3V6h-2L9 5v-.41C9.927 4.21 10.94 4 12 4s2.073.212 3 .59V6l-1 1v2l1 1 3.13-3.13c.752.897 1.304 1.964 1.606 3.13H18l-2 2v2l1 1h2l.286.286C18.03 18.06 15.24 20 12 20z"})));break;case"gridicons-grid":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M8 8H4V4h4v4zm6-4h-4v4h4V4zm6 0h-4v4h4V4zM8 10H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4zM8 16H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4z"})));break;case"gridicons-heading":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 20h-3v-6H9v6H6V5.01h3V11h6V5.01h3V20z"})));break;case"gridicons-heart-outline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-heart":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-help-outline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-1.962-2v-.528c0-.4.082-.74.246-1.017.163-.276.454-.546.87-.808.333-.21.572-.397.717-.565.146-.168.22-.36.22-.577 0-.172-.078-.308-.234-.41-.156-.1-.358-.15-.608-.15-.62 0-1.34.22-2.168.658l-.854-1.67c1.02-.58 2.084-.872 3.194-.872.913 0 1.63.202 2.15.603.52.4.78.948.78 1.64 0 .495-.116.924-.347 1.287-.23.362-.6.705-1.11 1.03-.43.278-.7.48-.807.61-.108.13-.163.282-.163.458V13h-1.885z"})));break;case"gridicons-help":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm2.003-6.41c-.23.36-.6.704-1.108 1.028-.43.28-.7.482-.808.61-.108.13-.163.283-.163.46V13H11.04v-.528c0-.4.08-.74.245-1.017.163-.276.454-.546.872-.808.332-.21.57-.397.716-.565.145-.168.217-.36.217-.577 0-.172-.077-.308-.233-.41-.156-.1-.358-.15-.608-.15-.62 0-1.342.22-2.17.658l-.854-1.67c1.02-.58 2.084-.872 3.194-.872.913 0 1.63.202 2.15.603.52.4.78.948.78 1.64 0 .495-.116.924-.347 1.286z"})));break;case"gridicons-history":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M2.12 13.526c.742 4.78 4.902 8.47 9.88 8.47 5.5 0 10-4.5 10-9.998S17.5 2 12 2C8.704 2 5.802 3.6 4 6V2H2.003L2 9h7V7H5.8c1.4-1.8 3.702-3 6.202-3C16.4 4 20 7.6 20 11.998s-3.6 8-8 8c-3.877 0-7.13-2.795-7.848-6.472H2.12z"}),o.a.createElement("path",{d:"M11.002 7v5.3l3.2 4.298 1.6-1.197-2.8-3.7V7"})));break;case"gridicons-house":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M22 9L12 1 2 9v2h2v10h5v-4c0-1.657 1.343-3 3-3s3 1.343 3 3v4h5V11h2V9z"})));break;case"gridicons-image-multiple":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"})));break;case"gridicons-image":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"})));break;case"gridicons-indent-left":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 20h2V4h-2v16zM2 11h10.172l-2.086-2.086L11.5 7.5 16 12l-4.5 4.5-1.414-1.414L12.172 13H2v-2z"})));break;case"gridicons-indent-right":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M6 4H4v16h2V4zm16 9H11.828l2.086 2.086L12.5 16.5 8 12l4.5-4.5 1.414 1.414L11.828 11H22v2z"})));break;case"gridicons-info-outline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})));break;case"gridicons-info":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})));break;case"gridicons-ink":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M5 15c0 3.866 3.134 7 7 7s7-3.134 7-7c0-1.387-.41-2.677-1.105-3.765h.007L12 2l-5.903 9.235h.007C5.41 12.323 5 13.613 5 15z"})));break;case"gridicons-institution":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M2 19h20v3H2zM12 2L2 6v2h20V6M17 10h3v7h-3zM10.5 10h3v7h-3zM4 10h3v7H4z"})));break;case"gridicons-italic":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M10.536 5l-.427 2h1.5L9.262 18h-1.5l-.427 2h6.128l.426-2h-1.5l2.347-11h1.5l.427-2"})));break;case"gridicons-layout-blocks":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M21 7h-2V3c0-1.105-.895-2-2-2H7c-1.105 0-2 .895-2 2v2H3c-1.105 0-2 .895-2 2v4c0 1.105.895 2 2 2h2v8c0 1.105.895 2 2 2h10c1.105 0 2-.895 2-2v-2h2c1.105 0 2-.895 2-2V9c0-1.105-.895-2-2-2zm-4 14H7v-8h2c1.105 0 2-.895 2-2V7c0-1.105-.895-2-2-2H7V3h10v4h-2c-1.105 0-2 .895-2 2v8c0 1.105.895 2 2 2h2v2zm4-4h-6V9h6v8z"})));break;case"gridicons-layout":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M8 20H5c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2v12c0 1.105-.895 2-2 2zm8-10h4c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2h-4c-1.105 0-2 .895-2 2v3c0 1.105.895 2 2 2zm5 10v-6c0-1.105-.895-2-2-2h-5c-1.105 0-2 .895-2 2v6c0 1.105.895 2 2 2h5c1.105 0 2-.895 2-2z"})));break;case"gridicons-link-break":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M10 11l-2 2H7v-2h3zm9.64-3.64L22 5l-1.5-1.5-17 17L5 22l9-9h3v-2h-1l2-2c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-1.623-.97-3.013-2.36-3.64zM4.36 16.64L6 15c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4v2c0 1.623.97 3.013 2.36 3.64z"})));break;case"gridicons-link":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17 13H7v-2h10v2zm1-6h-1c-1.63 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-2.21-1.79-4-4-4zM2 11v2c0 2.21 1.79 4 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4z"})));break;case"gridicons-list-checkmark":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M9.5 15.5L5 20l-2.5-2.5 1.06-1.06L5 17.88l3.44-3.44L9.5 15.5zM10 5v2h11V5H10zm0 14h11v-2H10v2zm0-6h11v-2H10v2zM8.44 8.44L5 11.88l-1.44-1.44L2.5 11.5 5 14l4.5-4.5-1.06-1.06zm0-6L5 5.88 3.56 4.44 2.5 5.5 5 8l4.5-4.5-1.06-1.06z"})));break;case"gridicons-list-ordered":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M8 19h13v-2H8v2zm0-6h13v-2H8v2zm0-8v2h13V5H8zm-4.425.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H3.96L2.487 4.915l.6.738.487-.4zm.334 7.764c.474-.426.784-.715.93-.867.145-.153.26-.298.35-.436.087-.138.152-.278.194-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608s-.29-.32-.507-.417c-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067s-.34.11-.49.195c-.15.085-.337.226-.558.423l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.032.304.097.073.064.11.152.11.264 0 .09-.02.176-.055.258-.036.082-.1.18-.192.294-.092.114-.287.328-.586.64L2.42 13.238V14h3.11v-.955H3.91v-.03zm.53 4.746v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.176-.6-.264-1.043-.264-.307 0-.58.033-.816.1s-.47.178-.696.334l.48.773c.293-.183.576-.274.85-.274.147 0 .263.027.35.082s.13.14.13.252c0 .3-.294.45-.882.45h-.27v.87h.264c.217 0 .393.017.527.05.136.03.233.08.294.143.06.064.09.154.09.27 0 .153-.057.265-.173.337-.115.07-.3.106-.554.106-.164 0-.343-.022-.538-.07-.194-.044-.385-.115-.573-.21v.96c.228.088.44.148.637.182.196.033.41.05.64.05.56 0 .998-.114 1.314-.343.315-.228.473-.542.473-.94.002-.585-.356-.923-1.07-1.013z"})));break;case"gridicons-list-unordered":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-location":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M19 9c0-3.866-3.134-7-7-7S5 5.134 5 9c0 1.387.41 2.677 1.105 3.765h-.008C8.457 16.46 12 22 12 22l5.903-9.235h-.007C18.59 11.677 19 10.387 19 9zm-7 3c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z"})));break;case"gridicons-lock":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 8h-1V7c0-2.757-2.243-5-5-5S7 4.243 7 7v1H6c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V10c0-1.105-.895-2-2-2zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v1H9V7zm4 8.723V18h-2v-2.277c-.595-.346-1-.984-1-1.723 0-1.105.895-2 2-2s2 .895 2 2c0 .738-.405 1.376-1 1.723z"})));break;case"gridicons-mail":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 4.236l-8 4.882-8-4.882V6h16v2.236z"})));break;case"gridicons-mention":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10v-2c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8v.5c0 .827-.673 1.5-1.5 1.5s-1.5-.673-1.5-1.5V12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.65 0 3.102-.81 4.013-2.043C16.648 15.6 17.527 16 18.5 16c1.93 0 3.5-1.57 3.5-3.5V12c0-5.523-4.477-10-10-10zm0 13c-1.654 0-3-1.346-3-3s1.346-3 3-3 3 1.346 3 3-1.346 3-3 3z"})));break;case"gridicons-menu":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M21 6v2H3V6h18zM3 18h18v-2H3v2zm0-5h18v-2H3v2z"})));break;case"gridicons-menus":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M9 19h10v-2H9v2zm0-6h6v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-microphone":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 13c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2-1.105 0-2 .896-2 2v5c0 1.104.895 2 2 2zm4-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6c0 2.972 2.164 5.433 5 5.91V20h2v-3.09c2.836-.478 5-2.94 5-5.91h-2z"})));break;case"gridicons-minus-small":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M6 11h12v2H6z"})));break;case"gridicons-minus":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M3 11h18v2H3z"})));break;case"gridicons-my-sites-horizon":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M10.986 13.928l.762-2.284-1.324-3.63c-.458-.026-.892-.08-.892-.08-.458-.027-.405-.727.054-.7 0 0 1.403.107 2.24.107.888 0 2.265-.107 2.265-.107.46-.027.513.646.055.7 0 0-.46.055-.973.082l2.006 5.966c-.875-.034-1.74-.053-2.6-.06l-.428-1.177-.403 1.17c-.252.002-.508.01-.76.015zm-7.156.393c-.21-.737-.33-1.514-.33-2.32 0-1.232.264-2.402.736-3.46l2.036 5.58c.85-.06 1.69-.104 2.526-.138L6.792 8.015c.512-.027.973-.08.973-.08.458-.055.404-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.036-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .674-.244 1.463-.572 2.51.3.02.604.043.907.066l.798-2.307c.486-1.212.647-2.18.647-3.043 0-.313-.02-.603-.057-.874.662 1.21 1.04 2.6 1.04 4.077 0 .807-.128 1.58-.34 2.32.5.05 1.006.112 1.51.17.205-.798.33-1.628.33-2.49 0-5.523-4.477-10-10-10S2 6.477 2 12c0 .862.125 1.692.33 2.49.5-.057 1.003-.12 1.5-.17zm14.638 3.168C16.676 19.672 14.118 20.5 12 20.5c-1.876 0-4.55-.697-6.463-3.012-.585.048-1.174.1-1.77.16C5.572 20.272 8.578 22 12 22c3.422 0 6.43-1.73 8.232-4.35-.593-.063-1.18-.114-1.764-.162zM12 15.01c-3.715 0-7.368.266-10.958.733.18.41.35.825.506 1.247 3.427-.43 6.91-.68 10.452-.68s7.025.25 10.452.68c.156-.422.327-.836.506-1.246-3.59-.467-7.243-.734-10.958-.734z"})));break;case"gridicons-my-sites":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM3.5 12c0-1.232.264-2.402.736-3.46L8.29 19.65C5.456 18.272 3.5 15.365 3.5 12zm8.5 8.5c-.834 0-1.64-.12-2.4-.345l2.55-7.41 2.613 7.157c.017.042.038.08.06.117-.884.31-1.833.48-2.823.48zm1.172-12.485c.512-.027.973-.08.973-.08.458-.055.404-.728-.054-.702 0 0-1.376.108-2.265.108-.835 0-2.24-.107-2.24-.107-.458-.026-.51.674-.053.7 0 0 .434.055.892.082l1.324 3.63-1.86 5.578-3.096-9.208c.512-.027.973-.08.973-.08.458-.055.403-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.037-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .727-.28 1.572-.646 2.748l-.848 2.833-3.072-9.138zm3.1 11.332l2.597-7.506c.484-1.212.645-2.18.645-3.044 0-.313-.02-.603-.057-.874.664 1.21 1.042 2.6 1.042 4.078 0 3.136-1.7 5.874-4.227 7.347z"})));break;case"gridicons-not-visible":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M1 12s4.188-6 11-6c.947 0 1.84.12 2.678.322L8.36 12.64C8.133 12.14 8 11.586 8 11c0-.937.335-1.787.875-2.47C6.483 9.344 4.66 10.917 3.62 12c.68.707 1.696 1.62 2.98 2.398L5.15 15.85C2.498 14.13 1 12 1 12zm22 0s-4.188 6-11 6c-.946 0-1.836-.124-2.676-.323L5 22l-1.5-1.5 17-17L22 5l-3.147 3.147C21.5 9.87 23 12 23 12zm-2.615.006c-.678-.708-1.697-1.624-2.987-2.403L16 11c0 2.21-1.79 4-4 4l-.947.947c.31.03.624.053.947.053 3.978 0 6.943-2.478 8.385-3.994z"})));break;case"gridicons-notice-outline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})));break;case"gridicons-notice":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-pages":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"})));break;case"gridicons-pencil":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M13 6l5 5-9.507 9.507c-.686-.686-.69-1.794-.012-2.485l-.002-.003c-.69.676-1.8.673-2.485-.013-.677-.677-.686-1.762-.036-2.455l-.008-.008c-.694.65-1.78.64-2.456-.036L13 6zm7.586-.414l-2.172-2.172c-.78-.78-2.047-.78-2.828 0L14 5l5 5 1.586-1.586c.78-.78.78-2.047 0-2.828zM3 18v3h3c0-1.657-1.343-3-3-3z"})));break;case"gridicons-phone":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})));break;case"gridicons-plans":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm-1 12H6l5-10v10zm2 6V10h5l-5 10z"})));break;case"gridicons-plugins":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M16 8V3c0-.552-.448-1-1-1s-1 .448-1 1v5h-4V3c0-.552-.448-1-1-1s-1 .448-1 1v5H5v4c0 2.79 1.637 5.193 4 6.317V22h6v-3.683c2.363-1.124 4-3.527 4-6.317V8h-3z"})));break;case"gridicons-plus-small":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 11h-5V6h-2v5H6v2h5v5h2v-5h5"})));break;case"gridicons-plus":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 13h-7v7h-2v-7H4v-2h7V4h2v7h7v2z"})));break;case"gridicons-popout":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M6 7V5c0-1.105.895-2 2-2h11c1.105 0 2 .895 2 2v14c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2v-2h2v2h11V5H8v2H6zm5.5-.5l-1.414 1.414L13.172 11H3v2h10.172l-3.086 3.086L11.5 17.5 17 12l-5.5-5.5z"})));break;case"gridicons-posts":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"})));break;case"gridicons-print":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M9 16h6v2H9v-2zm13 1h-3v3c0 1.105-.895 2-2 2H7c-1.105 0-2-.895-2-2v-3H2V9c0-1.105.895-2 2-2h1V5c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2v2h1c1.105 0 2 .895 2 2v8zM7 7h10V5H7v2zm10 7H7v6h10v-6zm3-3.5c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5z"})));break;case"gridicons-quote":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M11.192 15.757c0-.88-.23-1.618-.69-2.217-.326-.412-.768-.683-1.327-.812-.55-.128-1.07-.137-1.54-.028-.16-.95.1-1.956.76-3.022.66-1.065 1.515-1.867 2.558-2.403L9.373 5c-.8.396-1.56.898-2.26 1.505-.71.607-1.34 1.305-1.9 2.094s-.98 1.68-1.25 2.69-.346 2.04-.217 3.1c.168 1.4.62 2.52 1.356 3.35.735.84 1.652 1.26 2.748 1.26.965 0 1.766-.29 2.4-.878.628-.576.94-1.365.94-2.368l.002.003zm9.124 0c0-.88-.23-1.618-.69-2.217-.326-.42-.77-.692-1.327-.817-.56-.124-1.074-.13-1.54-.022-.16-.94.09-1.95.75-3.02.66-1.06 1.514-1.86 2.557-2.4L18.49 5c-.8.396-1.555.898-2.26 1.505-.708.607-1.34 1.305-1.894 2.094-.556.79-.97 1.68-1.24 2.69-.273 1-.345 2.04-.217 3.1.165 1.4.615 2.52 1.35 3.35.732.833 1.646 1.25 2.742 1.25.967 0 1.768-.29 2.402-.876.627-.576.942-1.365.942-2.368v.01z"})));break;case"gridicons-reader":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M3 4v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4H3zm7 11H5v-1h5v1zm2-2H5v-1h7v1zm0-2H5v-1h7v1zm7 4h-5v-5h5v5zm0-7H5V6h14v2z"})));break;case"gridicons-reader-following":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M23,13.482L15.508,21L12,17.4l1.412-1.388l2.106,2.188l6.094-6.094L23,13.482z M15.545,15.344L20,10.889V2H2v14c0,1.1,0.9,2,2,2h4.538l4.913-4.832L15.545,15.344z M8,13H4v-1h4V13z M11,11H4v-1h7V11z M11,9H4V8h7V9z M18,6H4V4h14V6z"})));break;case"gridicons-reblog":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M22.086 9.914L20 7.828V18c0 1.105-.895 2-2 2h-7v-2h7V7.828l-2.086 2.086L14.5 8.5 19 4l4.5 4.5-1.414 1.414zM6 16.172V6h7V4H6c-1.105 0-2 .895-2 2v10.172l-2.086-2.086L.5 15.5 5 20l4.5-4.5-1.414-1.414L6 16.172z"})));break;case"gridicons-redo":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 6v3.586L14.343 5.93C13.17 4.756 11.636 4.17 10.1 4.17s-3.07.585-4.242 1.757c-2.343 2.342-2.343 6.14 0 8.484l5.364 5.364 1.414-1.414L7.272 13c-1.56-1.56-1.56-4.097 0-5.657.755-.755 1.76-1.172 2.828-1.172 1.068 0 2.073.417 2.828 1.173L16.586 11H13v2h7V6h-2z"})));break;case"gridicons-refresh":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17.91 14c-.478 2.833-2.943 5-5.91 5-3.308 0-6-2.692-6-6s2.692-6 6-6h2.172l-2.086 2.086L13.5 10.5 18 6l-4.5-4.5-1.414 1.414L14.172 5H12c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.08 0 7.438-3.055 7.93-7h-2.02z"})));break;case"gridicons-reply":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M14 8H6.828l2.586-2.586L8 4 3 9l5 5 1.414-1.414L6.828 10H14c2.206 0 4 1.794 4 4s-1.794 4-4 4h-2v2h2c3.314 0 6-2.686 6-6s-2.686-6-6-6z"})));break;case"gridicons-rotate":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 14v6c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2v-6c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2zM13.914 2.914L11.828 5H14c4.418 0 8 3.582 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5 8 6l1.414-1.414L12.5 1.5l1.414 1.414z"})));break;case"gridicons-scheduled":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M10.498 18l-3.705-3.704 1.415-1.415 2.294 2.295 5.293-5.293 1.415 1.415L10.498 18zM21 6v13c0 1.104-.896 2-2 2H5c-1.104 0-2-.896-2-2V6c0-1.104.896-2 2-2h1V2h2v2h8V2h2v2h1c1.104 0 2 .896 2 2zm-2 2H5v11h14V8z"})));break;case"gridicons-search":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"})));break;case"gridicons-share-ios":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17 8h2c1.105 0 2 .895 2 2v9c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2v-9c0-1.105.895-2 2-2h2v2H5v9h14v-9h-2V8zM6.5 5.5l1.414 1.414L11 3.828V14h2V3.828l3.086 3.086L17.5 5.5 12 0 6.5 5.5z"})));break;case"gridicons-share":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 16c-.788 0-1.5.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118c-.053.223-.088.453-.088.692 0 1.657 1.343 3 3 3s3-1.343 3-3-1.343-3-3-3z"})));break;case"gridicons-sign-out":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M16 17v2c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h9c1.105 0 2 .895 2 2v2h-2V5H5v14h9v-2h2zm2.5-10.5l-1.414 1.414L20.172 11H10v2h10.172l-3.086 3.086L18.5 17.5 24 12l-5.5-5.5z"})));break;case"gridicons-spam":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17 2H7L2 7v10l5 5h10l5-5V7l-5-5zm-4 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-speaker":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M19 8v6c1.7 0 3-1.3 3-3s-1.3-3-3-3zM11 7H4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h1v3c0 1.1.9 2 2 2h2v-5h2l4 4h2V3h-2l-4 4z"})));break;case"gridicons-special-character":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12.005 7.418c-1.237 0-2.19.376-2.86 1.128s-1.005 1.812-1.005 3.18c0 1.387.226 2.513.677 3.377.45.865 1.135 1.543 2.05 2.036V20H5v-2.666h3.12c-1.04-.636-1.842-1.502-2.405-2.6-.564-1.097-.846-2.322-.846-3.676 0-1.258.29-2.363.875-3.317.585-.952 1.417-1.685 2.497-2.198s2.334-.77 3.763-.77c2.18 0 3.915.572 5.204 1.713s1.932 2.673 1.932 4.594c0 1.353-.283 2.57-.852 3.65-.567 1.08-1.38 1.947-2.44 2.603H19V20h-5.908v-2.86c.95-.493 1.65-1.18 2.102-2.062s.677-2.006.677-3.374c0-1.36-.336-2.415-1.01-3.164-.672-.747-1.624-1.122-2.855-1.122z"})));break;case"gridicons-star-outline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})));break;case"gridicons-star":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})));break;case"gridicons-stats-alt":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-7h-4v14h4V3zm6 3h-4v11h4V6z"})));break;case"gridicons-stats":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2V7h2v10zm4 0h-2v-7h2v7z"})));break;case"gridicons-status":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM7.55 13c-.02.166-.05.33-.05.5 0 2.485 2.015 4.5 4.5 4.5s4.5-2.015 4.5-4.5c0-.17-.032-.334-.05-.5h-8.9zM10 10V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1zm6 0V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1z"})));break;case"gridicons-strikethrough":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"})));break;case"gridicons-sync":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M23.5 13.5l-3.086 3.086L19 18l-4.5-4.5 1.414-1.414L18 14.172V12c0-3.308-2.692-6-6-6V4c4.418 0 8 3.582 8 8v2.172l2.086-2.086L23.5 13.5zM6 12V9.828l2.086 2.086L9.5 10.5 5 6 3.586 7.414.5 10.5l1.414 1.414L4 9.828V12c0 4.418 3.582 8 8 8v-2c-3.308 0-6-2.692-6-6z"})));break;case"gridicons-tablet":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})));break;case"gridicons-tag":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"})));break;case"gridicons-text-color":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M3 19h18v3H3v-3zM15.82 17h3.424L14 3h-4L4.756 17H8.18l1.067-3.5h5.506L15.82 17zm-1.952-6h-3.73l1.868-5.725L13.868 11z"})));break;case"gridicons-themes":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"})));break;case"gridicons-thumbs-up":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M6.7 22H2v-9h2l2.7 9zM20 9h-6V5c0-1.657-1.343-3-3-3h-1v4L7.1 9.625c-.712.89-1.1 1.996-1.1 3.135V14l2.1 7h8.337c1.836 0 3.435-1.25 3.88-3.03l1.622-6.485C22.254 10.223 21.3 9 20 9z"})));break;case"gridicons-time":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm3.8 13.4L13 11.667V7h-2v5.333l3.2 4.266 1.6-1.2z"})));break;case"gridicons-trash":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M6.187 8h11.625l-.695 11.125C17.05 20.18 16.177 21 15.12 21H8.88c-1.057 0-1.93-.82-1.997-1.875L6.187 8zM19 5v2H5V5h3V4c0-1.105.895-2 2-2h4c1.105 0 2 .895 2 2v1h3zm-9 0h4V4h-4v1z"})));break;case"gridicons-trophy":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18 5.062V3H6v2.062H2V8c0 2.525 1.89 4.598 4.324 4.932.7 2.058 2.485 3.61 4.676 3.978V18c0 1.105-.895 2-2 2H8v2h8v-2h-1c-1.105 0-2-.895-2-2v-1.09c2.19-.368 3.976-1.92 4.676-3.978C20.11 12.598 22 10.525 22 8V5.062h-4zM4 8v-.938h2v3.766C4.836 10.416 4 9.304 4 8zm16 0c0 1.304-.836 2.416-2 2.83V7.06h2V8z"})));break;case"gridicons-types":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M22 17c0 2.76-2.24 5-5 5s-5-2.24-5-5 2.24-5 5-5 5 2.24 5 5zM6.5 6.5h3.8L7 1 1 11h5.5V6.5zm9.5 4.085V8H8v8h2.585c.433-2.783 2.632-4.982 5.415-5.415z"})));break;case"gridicons-underline":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M4 19v2h16v-2H4zM18 3v8c0 3.314-2.686 6-6 6s-6-2.686-6-6V3h3v8c0 1.654 1.346 3 3 3s3-1.346 3-3V3h3z"})));break;case"gridicons-undo":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M18.142 5.93C16.97 4.756 15.435 4.17 13.9 4.17s-3.072.586-4.244 1.757L6 9.585V6H4v7h7v-2H7.414l3.657-3.657c.756-.755 1.76-1.172 2.83-1.172 1.067 0 2.072.417 2.827 1.173 1.56 1.56 1.56 4.097 0 5.657l-5.364 5.364 1.414 1.414 5.364-5.364c2.345-2.343 2.345-6.142.002-8.485z"})));break;case"gridicons-user-circle":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18.5c-4.694 0-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5zm0-8c-3.038 0-5.5 1.728-5.5 3.5s2.462 3.5 5.5 3.5 5.5-1.728 5.5-3.5-2.462-3.5-5.5-3.5zm0-.5c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z"})));break;case"gridicons-user":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 16s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2z"})));break;case"gridicons-video-camera":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M17 9V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h11c1.105 0 2-.895 2-2v-2l5 4V5l-5 4z"})));break;case"gridicons-video":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"})));break;case"gridicons-visible":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M12 6C5.188 6 1 12 1 12s4.188 6 11 6 11-6 11-6-4.188-6-11-6zm0 10c-3.943 0-6.926-2.484-8.38-4 1.04-1.085 2.863-2.657 5.255-3.47C8.335 9.214 8 10.064 8 11c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.937-.335-1.787-.875-2.47 2.393.813 4.216 2.386 5.254 3.47-1.456 1.518-4.438 4-8.38 4z"})));break;case"gridicons-chat":e=o.a.createElement("svg",{className:a,height:this.props.size,width:this.props.size,onClick:this.props.onClick,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},o.a.createElement("g",null,o.a.createElement("path",{d:"M20,4h-8c-1.1,0-2,0.9-2,2v2h2c1.7,0,3,1.3,3,3v2h2v3.5l3.3-2.3c1.1-0.8,1.7-2,1.7-3.3V6C22,4.9,21.1,4,20,4z"}),o.a.createElement("g",null,o.a.createElement("path",{d:"M14,11v5c0,1.1-0.9,2-2,2H7v3.5l-3.3-2.3c-1.1-0.8-1.7-2-1.7-3.3V11c0-1.1,0.9-2,2-2h8C13.1,9,14,9.9,14,11z"}))))}return e}}));n(224);function gl(e,t){switch(t.key){case" ":case"Enter":this[e](t)}}var vl=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{keyword:n.props.initialValue||"",isOpen:!!n.props.isOpen,hasFocus:!1}),ha()(Os()(n),"scrollOverlay",(function(){n.refs.overlay&&window.requestAnimationFrame((function(){n.refs.overlay&&n.refs.searchInput&&(n.refs.overlay.scrollLeft=n.getScrollLeft(n.refs.searchInput))}))})),ha()(Os()(n),"getScrollLeft",(function(e){if(!e.createTextRange)return e.scrollLeft;var t=e.createTextRange(),n=window.getComputedStyle(e,void 0),r=parseFloat(n.paddingLeft),i=t.getBoundingClientRect();return e.getBoundingClientRect().left+e.clientLeft+r-i.left})),ha()(Os()(n),"focus",(function(){setTimeout((function(){return n.refs.searchInput&&a.a.findDOMNode(n.refs.searchInput).focus()}),0)})),ha()(Os()(n),"blur",(function(){a.a.findDOMNode(n.refs.searchInput).blur()})),ha()(Os()(n),"getCurrentSearchValue",(function(){return a.a.findDOMNode(n.refs.searchInput).value})),ha()(Os()(n),"clear",(function(){n.setState({keyword:""})})),ha()(Os()(n),"onBlur",(function(e){n.props.onBlur&&n.props.onBlur(e),n.setState({hasFocus:!1})})),ha()(Os()(n),"onChange",(function(){n.setState({keyword:n.getCurrentSearchValue()})})),ha()(Os()(n),"openSearch",(function(e){n.props.onClick(),e.preventDefault(),n.setState({keyword:"",isOpen:!0}),Uc.ga.recordEvent(n.props.analyticsGroup,"Clicked Open Search")})),ha()(Os()(n),"closeSearch",(function(e){if(e.preventDefault(),!n.props.disabled){var t=a.a.findDOMNode(n.refs.searchInput);n.setState({keyword:"",isOpen:n.props.isOpen||!1}),t.value="",t.blur(),n.props.pinned&&a.a.findDOMNode(n.refs.openIcon).focus(),n.props.onSearchClose(e),Uc.ga.recordEvent(n.props.analyticsGroup,"Clicked Close Search")}})),ha()(Os()(n),"keyUp",(function(e){"Enter"===e.key&&Xc()&&n.blur(),n.props.pinned&&("Escape"===e.key&&n.closeSearch(e),n.scrollOverlay())})),ha()(Os()(n),"keyDown",(function(e){n.scrollOverlay(),"Escape"===e.key&&""===e.target.value&&n.closeSearch(e),n.props.onKeyDown(e)})),ha()(Os()(n),"onFocus",(function(){var e=a.a.findDOMNode(n.refs.searchInput),t=e.value;t&&(e.value="",e.value=t),n.setState({hasFocus:!0}),n.props.onSearchOpen()})),ha()(Os()(n),"renderStylingDiv",(function(){return o.a.createElement("div",{className:"dops-search__text-overlay",ref:"overlay"},n.props.overlayStyling(n.state.keyword))})),ha()(Os()(n),"closeButton",(function(){return n.props.hideClose||!n.state.keyword&&!n.state.isOpen?null:o.a.createElement("div",{role:"button",className:"dops-search__icon-navigation",onClick:n.closeSearch,tabIndex:"0",onKeyDown:n.closeListener,"aria-controls":"dops-search-component-"+n.state.instanceId,"aria-label":"Close Search"},o.a.createElement(ml,{icon:"cross",className:"dops-search__close-icon"}))})),n}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.setState({instanceId:++t.instances}),this.closeListener=gl.bind(this,"closeSearch"),this.openListener=gl.bind(this,"openSearch")}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.onSearch===this.props.onSearch&&e.delaySearch===this.props.delaySearch||(this.onSearch=this.props.delaySearch?Object(Dt.debounce)(this.props.onSearch,this.props.delayTimeout):this.props.onSearch),e.isOpen&&this.setState({isOpen:e.isOpen}),e.initialValue===this.props.initialValue||this.state.keyword!==this.props.initialValue&&""!==this.state.keyword||this.setState({keyword:e.initialValue||""})}},{key:"componentDidUpdate",value:function(e,t){this.scrollOverlay(),(this.state.isOpen&&!t.isOpen||this.props.autoFocus&&!e.autoFocus)&&this.focus(),this.state.keyword!==t.keyword&&(this.state.keyword?this.onSearch(this.state.keyword):(this.props.delaySearch&&this.onSearch.cancel(),this.props.onSearch(this.state.keyword)),this.props.onSearchChange(this.state.keyword))}},{key:"componentDidMount",value:function(){var e=this;this.onSearch=this.props.delaySearch?Object(Dt.debounce)(this.props.onSearch,this.props.delayTimeout):this.props.onSearch,this.props.autoFocus&&setTimeout((function(){return e.focus()}),0)}},{key:"render",value:function(){var e=this.state.keyword,t=this.props.placeholder||"Search…",n=this.props.pinned&&!this.state.isOpen,r=this.state.isOpen||!this.props.pinned||this.props.initialValue,i=this.props.disableAutocorrect&&{autoComplete:"off",autoCorrect:"off",spellCheck:"false"},a=Mc()(this.props.additionalClasses,this.props.dir,{"is-expanded-to-container":this.props.fitsContainer,"is-open":r,"is-searching":this.props.searching,"has-focus":this.state.hasFocus,"dops-search":!0}),s=Mc()("dops-search__input-fade",this.props.dir),c=Mc()("dops-search__input",this.props.dir);return o.a.createElement("div",{dir:this.props.dir||null,className:a,role:"search"},o.a.createElement(fl,null),o.a.createElement("div",{role:"button",className:"dops-search__icon-navigation",ref:"openIcon",onClick:n?this.openSearch:this.focus,tabIndex:n?"0":null,onKeyDown:n?this.openListener:null,"aria-controls":"dops-search-component-"+this.state.instanceId,"aria-label":"Open Search"},o.a.createElement(ml,{icon:"search",className:"dops-search__open-icon"})),o.a.createElement("div",{className:s},o.a.createElement("input",Bc()({type:"search",onChange:this.onChange,id:"dops-search-component-"+this.state.instanceId,className:c,placeholder:t,role:"searchbox",value:e,ref:"searchInput",onKeyUp:this.keyUp,onKeyDown:this.keyDown,onMouseUp:this.props.onClick,onFocus:this.onFocus,onBlur:this.onBlur,disabled:this.props.disabled,"aria-hidden":!r,autoCapitalize:"none",dir:this.props.dir,maxLength:this.props.maxLength},i)),this.props.overlayStyling&&this.renderStylingDiv()),this.closeButton())}}]),t}(o.a.Component);ha()(vl,"displayName","Search"),ha()(vl,"instances",0),ha()(vl,"propTypes",{additionalClasses:u.a.string,initialValue:u.a.string,placeholder:u.a.string,pinned:u.a.bool,delaySearch:u.a.bool,delayTimeout:u.a.number,onSearch:u.a.func.isRequired,onSearchChange:u.a.func,onSearchOpen:u.a.func,onSearchClose:u.a.func,analyticsGroup:u.a.string,overlayStyling:u.a.func,autoFocus:u.a.bool,disabled:u.a.bool,onKeyDown:u.a.func,onClick:u.a.func,disableAutocorrect:u.a.bool,onBlur:u.a.func,searching:u.a.bool,isOpen:u.a.bool,dir:u.a.oneOf(["ltr","rtl"]),fitsContainer:u.a.bool,maxLength:u.a.number,hideClose:u.a.bool}),ha()(vl,"defaultProps",{pinned:!1,delaySearch:!1,delayTimeout:300,autoFocus:!1,disabled:!1,onSearchChange:Dt.noop,onSearchOpen:Dt.noop,onSearchClose:Dt.noop,onKeyDown:Dt.noop,onClick:Dt.noop,overlayStyling:void 0,disableAutocorrect:!1,searching:!1,isOpen:!1,dir:void 0,fitsContainer:!1,hideClose:!1});var bl=vl,yl=(n(225),pe()({displayName:"SectionNav",propTypes:{children:u.a.node,selectedText:u.a.node,selectedCount:u.a.number,hasPinnedItems:u.a.bool,onMobileNavPanelOpen:u.a.func},getInitialState:function(){return{mobileOpen:!1}},getDefaultProps:function(){return{onMobileNavPanelOpen:function(){}}},UNSAFE_componentWillMount:function(){this.checkForSiblingControls(this.props.children)},UNSAFE_componentWillReceiveProps:function(e){Object(Dt.isEqual)(this.props,e)||(this.checkForSiblingControls(e.children),this.hasSiblingControls||this.closeMobilePanel())},render:function(){var e,t=this.getChildren();return t?(e=Mc()({"dops-section-nav":!0,"is-open":this.state.mobileOpen,"has-pinned-items":this.hasPinnedSearch||this.props.hasPinnedItems}),o.a.createElement("div",{className:e},o.a.createElement("div",{className:"dops-section-nav__mobile-header",role:"button",onClick:this.toggleMobileOpenState,tabIndex:0,onKeyUp:this.toggleMobileOpenState},o.a.createElement("span",{className:"dops-section-nav__mobile-header-text"},this.props.selectedText)),o.a.createElement("div",{className:"dops-section-nav__panel"},t))):(e=Mc()({"dops-section-nav":!0,"is-empty":!0}),o.a.createElement("div",{className:e},o.a.createElement("div",{className:"dops-section-nav__panel"},o.a.createElement(dl,null))))},getChildren:function(){return o.a.Children.map(this.props.children,function(e){var t={hasSiblingControls:this.hasSiblingControls,closeSectionNavMobilePanel:this.closeMobilePanel};return e?(e.type!==pl||e.props.selectedText||"string"!=typeof this.props.selectedText||(t.selectedText=this.props.selectedText),e.type===pl&&this.props.selectedCount&&(t.selectedCount=this.props.selectedCount),e.type===bl&&(e.props.pinned&&(this.hasPinnedSearch=!0),t.onSearch=this.generateOnSearch(e.props.onSearch)),o.a.cloneElement(e,t)):null}.bind(this))},closeMobilePanel:function(){window.innerWidth<480&&this.state.mobileOpen&&this.setState({mobileOpen:!1})},toggleMobileOpenState:function(){var e=!this.state.mobileOpen;this.setState({mobileOpen:e}),e&&this.props.onMobileNavPanelOpen()},generateOnSearch:function(e){return function(){e.apply(this,arguments),this.closeMobilePanel()}.bind(this)},checkForSiblingControls:function(e){this.hasSiblingControls=!1,o.a.Children.forEach(e,function(e,t){t&&e&&e.type!==bl&&(this.hasSiblingControls=!0)}.bind(this))}})),_l=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackNavClick",(function(e){Uc.tracks.recordJetpackClick({target:"nav_item",path:e})})),ha()(Os()(n),"trackDashboardClick",(function(){n.trackNavClick("dashboard")})),ha()(Os()(n),"trackMyPlanClick",(function(){n.trackNavClick("my-plan")})),ha()(Os()(n),"trackPlansClick",(function(){n.trackNavClick("plans")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e;return e=this.props.userCanManageModules?o.a.createElement(pl,{selectedText:this.props.route.name},o.a.createElement(dl,{path:"#/dashboard",onClick:this.trackDashboardClick,selected:"/dashboard"===this.props.route.path||"/"===this.props.route.path},Us("At a Glance",{context:"Navigation item."})),!this.props.isDevMode&&this.props.isLinked&&o.a.createElement(dl,{path:"#/my-plan",onClick:this.trackMyPlanClick,selected:"/my-plan"===this.props.route.path},Us("My Plan",{context:"Navigation item."})),!this.props.isDevMode&&this.props.isLinked&&o.a.createElement(dl,{path:"#/plans",onClick:this.trackPlansClick,selected:"/plans"===this.props.route.path},Us("Plans",{context:"Navigation item."}))):o.a.createElement(pl,{selectedText:this.props.route.name},o.a.createElement(dl,{path:"#/dashboard",selected:"/dashboard"===this.props.route.path||"/"===this.props.route.path},Us("At a Glance",{context:"Navigation item."}))),o.a.createElement("div",{id:"jp-navigation",className:"dops-navigation"},o.a.createElement(yl,{selectedText:this.props.route.name},e))}}]),t}(o.a.Component);_l.propTypes={route:u.a.object.isRequired,isDevMode:u.a.bool.isRequired};var wl=le((function(e){return{userCanManageModules:Ei(e),userCanViewStats:Pi(e),isModuleActivated:function(t){return Ga(e,t)},isDevMode:Qs(e),isLinked:Xs(e)}}))(_l),kl=n(108),El=n.n(kl),Cl=n(109),Sl=n.n(Cl),Ml=Oc()("calypso:url-search"),xl={getInitialState:function(){return{searchOpen:!1}},UNSAFE_componentWillReceiveProps:function(e){e.search||this.setState({searchOpen:!1})},doSearch:function(e){var t,n,r,i;(this.setState({searchOpen:!1!==e}),this.onSearch)?this.onSearch(e):(this.buildUrl&&"function"==typeof this.buildUrl?t=this.buildUrl(window.location.href,e):(n=window.location.href,r=e,i=Sl.a.parse(n,!0),r?i.query.s=r:delete i.query.s,i=Object(Dt.pick)(i,"pathname","hash","query"),t=Sl.a.format(i).replace(/\%20/g,"+")),Ml("search posts for:",e),this.props.search&&e?(Ml("replacing URL: "+t),El.a.replace(t)):(Ml("setting URL: "+t),El()(t)))},getSearchOpen:function(){return!1!==this.state.searchOpen||this.props.search}},Al=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.isFetchingPluginsData||this.props.fetchPluginsData()}},{key:"render",value:function(){return null}}]),t}(o.a.Component),jl=le((function(e){return{isFetchingPluginsData:ga(e)}}),(function(e){return{fetchPluginsData:function(){return e(Fa())}}}))(Al),Ol=pe()({displayName:"NavigationSettings",mixins:[xl],UNSAFE_componentWillMount:function(){this.onRouteChange(this.context.router.getCurrentLocation()),this.context.router.listen(this.onRouteChange)},onRouteChange:function(e){var t=(e.search||"").substr(1).split("&").filter((function(e){return 0===e.indexOf("term=")})),n="";t.length>0&&(n=t[0].split("=")[1]),this.props.searchForTerm(decodeURIComponent(n))},maybeShowSearch:function(){if(this.props.userCanManageModules)return o.a.createElement(bl,{onClick:this.handleClickForTracking("search"),pinned:!0,fitsContainer:!0,placeholder:Us("Search for a Jetpack feature."),delaySearch:!0,delayTimeout:500,onSearch:this.doSearch,isOpen:!!this.props.searchTerm,initialValue:this.props.searchTerm})},trackNavClick:function(e){Uc.tracks.recordJetpackClick({target:"nav_item",path:e})},buildUrl:function(e,t){var n=e.split("#")[1].split("?");return this.props.searchForTerm(t),"#"+n[0]+(t?"?term="+t:"")},handleClickForTracking:function(e){var t=this;return function(){return t.trackNavClick(e)}},render:function(){var e,t;return this.props.userCanManageModules?e=o.a.createElement(pl,{selectedText:this.props.route.name},this.props.hasAnySecurityFeature&&o.a.createElement(dl,{path:"#security",onClick:this.handleClickForTracking("security"),selected:"/security"===this.props.route.path||"/settings"===this.props.route.path},Us("Security",{context:"Navigation item."})),this.props.hasAnyPerformanceFeature&&o.a.createElement(dl,{path:"#performance",onClick:this.handleClickForTracking("performance"),selected:"/performance"===this.props.route.path},Us("Performance",{context:"Navigation item."})),this.props.hasAnyOfTheseModules(["masterbar","markdown","custom-content-types","post-by-email","infinite-scroll","copy-post"])&&o.a.createElement(dl,{path:"#writing",onClick:this.handleClickForTracking("writing"),selected:"/writing"===this.props.route.path},Us("Writing",{context:"Navigation item."})),this.props.hasAnyOfTheseModules(["publicize","sharedaddy","likes"])&&o.a.createElement(dl,{path:"#sharing",onClick:this.handleClickForTracking("sharing"),selected:"/sharing"===this.props.route.path},Us("Sharing",{context:"Navigation item."})),this.props.hasAnyOfTheseModules(["comments","gravatar-hovercards","markdown","subscriptions"])&&o.a.createElement(dl,{path:"#discussion",onClick:this.handleClickForTracking("discussion"),selected:"/discussion"===this.props.route.path},Us("Discussion",{context:"Navigation item."})),this.props.hasAnyOfTheseModules(["seo-tools","wordads","stats","related-posts","verification-tools","sitemaps","google-analytics"])&&o.a.createElement(dl,{path:"#traffic",onClick:this.handleClickForTracking("traffic"),selected:"/traffic"===this.props.route.path},Us("Traffic",{context:"Navigation item."}))):this.props.isSubscriber?e=!1:(t=this.props.isModuleActivated("publicize")&&this.props.userCanPublish?this.props.hasAnyOfTheseModules(["publicize"])&&o.a.createElement(dl,{path:"#sharing",onClick:this.handleClickForTracking("sharing"),selected:"/sharing"===this.props.route.path},Us("Sharing",{context:"Navigation item."})):"",e=o.a.createElement(pl,{selectedText:this.props.route.name},this.props.hasAnyOfTheseModules(["post-by-email"])&&o.a.createElement(dl,{path:"#writing",onClick:this.handleClickForTracking("writing"),selected:"/writing"===this.props.route.path||"/settings"===this.props.route.path},Us("Writing",{context:"Navigation item."})),t)),o.a.createElement("div",{id:"jp-navigation",className:"dops-navigation"},o.a.createElement(jl,null),o.a.createElement(yl,{selectedText:this.props.route.name},e,this.maybeShowSearch()))}});Ol.contextTypes={router:u.a.object.isRequired},Ol.propTypes={userCanManageModules:u.a.bool.isRequired,isSubscriber:u.a.bool.isRequired,userCanPublish:u.a.bool.isRequired,isLinked:u.a.bool.isRequired,isSiteConnected:u.a.bool.isRequired,isModuleActivated:u.a.func.isRequired,searchHasFocus:u.a.bool.isRequired},Ol.defaultProps={userCanManageModules:!1,isSubscriber:!1,userCanPublish:!1,isLinked:!1,isSiteConnected:!1,isModuleActivated:Dt.noop,searchHasFocus:!1};var Nl=le((function(e){return{hasAnyOfTheseModules:function(t){return Ka(e,t)},hasAnyPerformanceFeature:Ja(e),hasAnySecurityFeature:Wa(e),userCanManageModules:Ei(e),isSubscriber:wi(e),userCanPublish:ki(e),isLinked:Xs(e),isSiteConnected:qs(e),isModuleActivated:function(t){return Ga(e,t)},moduleList:Ha(e),isPluginActive:function(t){return va(e,t)},searchTerm:wo(e)}}),(function(e){return{searchForTerm:function(t){return e(function(e){return function(t){t({type:Rr,term:e})}}(t))}}}))(Ol),Tl=(n(233),function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"_renderWithTitle",(function(){var e="dops-card-section-orient-"+(n.props.vertical?"vertical":"horizontal");return o.a.createElement("div",{className:e},o.a.createElement("h4",{ref:"label",className:"dops-card-section-label"},n.props.title),o.a.createElement("div",{ref:"content",className:"dops-card-section-content"},n.props.children))})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("div",{className:Mc()("dops-card-section",this.props.className),style:this.props.style},this.props.title?this._renderWithTitle():this.props.children)}}]),t}(o.a.Component));ha()(Tl,"propTypes",{title:u.a.any,vertical:u.a.any,style:u.a.object,className:u.a.string,device:u.a.oneOf(["desktop","tablet","phone"])}),ha()(Tl,"defaultProps",{vertical:null});var Pl=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("div",{className:"dops-card-footer"},this.props.children)}}]),t}(o.a.Component),Il=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"_renderIcon",(function(){return o.a.createElement("span",{className:"dops-card-icon",style:{color:n.props.iconColor}},n.props.icon&&o.a.createElement(ml,{icon:n.props.icon,style:{backgroundColor:n.props.iconColor}}),n.props.iconLabel)})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e,t,n=Mc()("dops-card",this.props.className,{"is-card-link":!!this.props.href,"is-compact":this.props.compact}),r=["compact","tagName","meta","iconColor"];return this.props.href?e=o.a.createElement(ml,{className:"dops-card__link-indicator",icon:this.props.target?"external":"chevron-right"}):r.push("href","target"),this.props.title&&(t=o.a.createElement("h2",{className:"dops-card-title"},this.props.title,this.props.meta&&o.a.createElement("span",{className:"dops-card-meta"},this.props.meta),(this.props.icon||this.props.iconLabel)&&this._renderIcon())),o.a.createElement(this.props.href?"a":this.props.tagName,Object(Dt.assign)(Object(Dt.omit)(this.props,r),{className:n}),e,t,this.props.children)}}]),t}(o.a.Component);ha()(Il,"propTypes",{meta:u.a.any,icon:u.a.string,iconLabel:u.a.any,iconColor:u.a.string,style:u.a.object,className:u.a.string,href:u.a.string,onClick:u.a.func,title:u.a.string,tagName:u.a.string,target:u.a.string,compact:u.a.bool,children:u.a.node}),ha()(Il,"defaultProps",{iconColor:"#787878",className:"",tagName:"div",onClick:function(){}}),Il.Section=Tl,Il.Footer=Pl;var Dl=Il,Rl=function(){return{type:dr}},Ul=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=Ms()({progress:Us("Updating settings…"),success:Us("Updated settings."),error:function(e){return Us("Error updating settings. %(error)s",{args:{error:e.message||e.code||e.name||e}})}},t);"object"==typeof e&&Object(Dt.some)(["masterbar","jetpack_testimonial","jetpack_portfolio"],(function(t){return t in e}))&&(r.success=Us("Updated settings. Refreshing page…")),n(Xa("module-setting-update")),n(Xa("module-setting-update-success"));var i=["dismiss_dash_app_card","dismiss_empty_stats_card"];return"object"!=typeof e||Object(Dt.some)(i,(function(t){return t in e}))||n(Qa("is-info",r.progress,{id:"module-setting-update"})),n({type:cr,updatedOptions:e}),Da.updateSettings(e).then((function(t){n({type:ur,updatedOptions:Ll(t,e),success:t}),Fs(e),zs(e),n(Xa("module-setting-update")),n(Xa("module-setting-update-success")),"object"!=typeof e||Object(Dt.some)(i,(function(t){return t in e}))||n(Qa("is-success",r.success,{id:"module-setting-update-success",duration:2e3}))})).catch((function(t){n({type:lr,success:!1,error:t,updatedOptions:e}),n(Xa("module-setting-update")),n(Qa("is-error",r.error(t),{id:"module-setting-update"}))}))}};function Ll(e,t){var n=t;return"regenerate"===Object(Dt.get)(t,"post_by_email_address")&&(n={post_by_email_address:e.post_by_email_address}),n}var Fl=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.isFetchingSiteData||this.props.isDevMode||!Object(Dt.isEmpty)(this.props.sitePlan)||(this.props.fetchSiteData(),this.props.fetchSiteFeatures(),this.props.fetchAvailablePlans(),this.props.fetchSitePurchases())}},{key:"render",value:function(){return null}}]),t}(s.Component);ha()(Fl,"propTypes",{isFetchingSiteData:u.a.bool,isDevMode:u.a.bool,sitePlan:u.a.object}),ha()(Fl,"defaultProps",{isFetchingSiteData:!1,isDevMode:!1,sitePlan:{}});var zl=le((function(e){return{isFetchingSiteData:Bo(e),isDevMode:Qs(e),sitePlan:qo(e)}}),(function(e){return{fetchSiteData:function(){return e((function(e){return e({type:hr}),Da.fetchSiteData().then((function(t){return e({type:fr,siteData:t}),t})).catch((function(t){e({type:mr,error:t})}))}))},fetchSiteFeatures:function(){return e((function(e){return e({type:yr}),Da.fetchSiteFeatures().then((function(t){return e({type:_r,siteFeatures:t}),t})).catch((function(t){e({type:wr,error:t})}))}))},fetchAvailablePlans:function(){return e((function(e){return e({type:kr}),Da.getPlans().then((function(t){return e({type:Er,plans:t}),t})).catch((function(t){e({type:Cr,error:t})}))}))},fetchSitePurchases:function(){return e((function(e){return e({type:Sr}),Da.fetchSitePurchases().then((function(t){return e({type:Mr,purchases:t}),t})).catch((function(t){e({type:xr,error:t})}))}))}}}))(Fl),Bl=(n(234),function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"focus",(function(){n.refs.textField.focus()})),ha()(Os()(n),"selectOnFocus",(function(e){e.target.select()})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.selectOnFocus,r=Mc()(t,{"dops-text-input":!0,"is-error":this.props.isError,"is-valid":this.props.isValid}),i=Object(Dt.omit)(this.props,"selectOnFocus","isError","isValid");return o.a.createElement("input",Bc()({},i,{ref:"textField",className:r,onClick:n?this.selectOnFocus:null}))}}]),t}(o.a.Component));function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};if(0===e.search("https://")){var r=new URL(e);e="https://".concat(r.host).concat(r.pathname),n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);var i=["site","path","query","anchor"];Object.keys(t).map((function(e){i.includes(e)&&(n[e]=encodeURIComponent(t[e]))}));var a=Object.keys(n).map((function(e){return e+"="+n[e]})).join("&");return"https://jetpack.com/redirect/?"+a}ha()(Bl,"displayName","TextInput"),ha()(Bl,"defaultProps",{isError:!1,isValid:!1,selectOnFocus:!1,type:"text"});var Hl=function(e){return o.a.createElement("fieldset",Bc()({},Object(Dt.omit)(e,"className"),{className:Mc()(e.className,"jp-form-fieldset")}),e.children)},ql=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.htmlFor,r=Cc()(e,["className","htmlFor"]);return o.a.createElement("label",Bc()({},r,{htmlFor:n,className:Mc()(t,"jp-form-label")}),this.props.children)}}]),t}(o.a.Component);ha()(ql,"displayName","FormLabel");var Kl=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("legend",Bc()({},Object(Dt.omit)(this.props,"className"),{className:Mc()(this.props.className,"jp-form-legend")}),this.props.children)}}]),t}(o.a.Component);ha()(Kl,"displayName","FormLegend");var Jl=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=Object(Dt.omit)(this.props,["className","type"]);return o.a.createElement("input",Bc()({},e,{type:"checkbox",className:Mc()(this.props.className,"jp-form-checkbox")}))}}]),t}(o.a.Component);ha()(Jl,"displayName","FormInputCheckbox");var Wl=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"focus",(function(){n.refs.textField.focus()})),ha()(Os()(n),"selectOnFocus",(function(e){e.target.select()})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.selectOnFocus,r=Mc()(t,{"jp-form-text-input":!0,"is-error":this.props.isError,"is-valid":this.props.isValid}),i={};for(var a in this.props)["isError","isValid","selectOnFocus"].includes(a)||(i[a]=this.props[a]);return o.a.createElement("input",Bc()({},i,{ref:"textField",className:r,onClick:n?this.selectOnFocus:null}))}}]),t}(o.a.Component);ha()(Wl,"displayName","FormTextInput"),ha()(Wl,"defaultProps",{isError:!1,isValid:!1,selectOnFocus:!1,type:"text"});var Gl=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("textarea",Bc()({},Object(Dt.omit)(this.props,"className"),{className:Mc()(this.props.className,"jp-form-textarea")}),this.props.children)}}]),t}(o.a.Component);ha()(Gl,"displayName","FormTextarea");var Yl=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=Object(Dt.omit)(this.props,["className","type"]);return o.a.createElement("input",Bc()({},e,{type:"radio",className:Mc()(this.props.className,"jp-form-radio")}))}}]),t}(o.a.Component);ha()(Yl,"displayName","FormRadio");var $l=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"getDefaultButtonAction",(function(){return n.props.isSubmitting?Us("Saving…"):Us("Save Settings")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=Mc()({"jp-form-button":!0});return o.a.createElement(xc,Bc()({},Object(Dt.omit)(this.props,"className"),{primary:this.props.isPrimary,className:Mc()(this.props.className,e)}),Object(Dt.isEmpty)(this.props.children)?this.getDefaultButtonAction():this.props.children)}}]),t}(o.a.Component);ha()($l,"displayName","FormsButton"),ha()($l,"defaultProps",{isSubmitting:!1,isPrimary:!0,type:"submit"});var Xl=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"handleOnSelect",(function(e){n.props.onOptionChange({target:{type:"select",name:n.props.name,value:e.value}})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=[];return Object(Dt.forOwn)(this.props.validValues,(function(t,n){e.push({label:t,value:n})})),o.a.createElement(ll,{options:e,onSelect:this.handleOnSelect,disabled:this.props.disabled,initialSelected:this.props.value})}}]),t}(o.a.Component),Ql=n(180),Zl=n.n(Ql),eu=n(181),tu=n.n(eu),nu=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"renderChildren",(function(){var e;e=n.props&&(Object.keys(n.props).length>1||!n.props.children)?o.a.createElement("div",n.props,n.props.children):n.props.children,n.context.store&&(e=o.a.createElement(h,{store:n.context.store},e)),a.a.render(e,n.container)})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){this.container=document.createElement("div"),document.body.appendChild(this.container),this.renderChildren()}},{key:"componentDidUpdate",value:function(){this.renderChildren()}},{key:"componentWillUnmount",value:function(){this.container&&(a.a.unmountComponentAtNode(this.container),document.body.removeChild(this.container),delete this.container)}},{key:"render",value:function(){return null}}]),t}(o.a.Component);ha()(nu,"displayName","RootChild"),ha()(nu,"propTypes",{children:u.a.node}),ha()(nu,"contextTypes",{store:u.a.object});var ru=n(60),iu=n.n(ru),au=Oc()("calypso:popover:util");function su(){var e={};return e.top=window.scrollY,e.left=window.scrollX,e.width=window.innerWidth,e.height=window.innerHeight,e.right=e.left+e.width,e.bottom=e.top+e.height,au("viewport: %o",e),e}var ou={top:"bottom",bottom:"top",left:"right",right:"left"},cu={top:"right",left:"top",bottom:"left",right:"bottom"},lu=su();function uu(){lu=su()}var pu=!1,du=function(e,t,n){var r=iu()(n),i=t.clientHeight,a=t.clientWidth,s={top:r.top-i,bottom:lu.height-r.bottom-i,left:r.left-a,right:lu.width-r.right-a},o=e.split(/\s+/),c=Ts()(o,1)[0],l=Ts()(o,2)[1],u=function(e,t){for(var n,r=[e,ou[e],cu[e],ou[cu[e]]],i=-1/0,a=0,s=r.length;a<s;a++){var o=r[a],c=t[o];if(c>0)return o;c>i&&(i=c,n=e)}return n}(c,s);return l!==u&&l!==ou[u]||(l=null),function(e,t,n,r,i,a){for(var s,o=t?[e+" "+t,e,e+" "+ou[t]]:[e,e+" "+cu[e],e+" "+ou[cu[e]]],c=0,l=i*a,u=0,p=o.length;u<p;u++){var d=o[u],h=hu(d,n,r),f=h.left+i,m=h.top+a,g=Math.min(h.top<lu.top?m-lu.top:lu.bottom-h.top,a),v=Math.min(h.left<lu.left?f-lu.left:lu.right-h.left,i)*g;if(v===l)return d;v>c&&(c=v,s=d)}return s}(u,l,t,n,a,i)||e};function hu(e,t,n){var r=iu()(t);if(!r)throw new Error("could not get bounding client rect of Tip element");var i=r.width,a=r.height,s=iu()(n);if(!s)throw new Error("could not get bounding client rect of `target`");var o,c,l,u,p,d,h,f,m=s.width,g=s.height,v=(o=s,c=document,l=c.body||c.getElementsByTagName("body")[0],u=c.documentElement||l.parentNode,p=u.clientTop||l.clientTop||0,d=u.clientLeft||l.clientLeft||0,h=window.pageYOffset||u.scrollTop,f=window.pageXOffset||u.scrollLeft,{top:o.top+h-p,left:o.left+f-d});if(!v)throw new Error("could not determine page offset of `target`");var b={};switch(e){case"top":b={top:v.top-a,left:v.left+m/2-i/2};break;case"bottom":b={top:v.top+g,left:v.left+m/2-i/2};break;case"right":b={top:v.top+g/2-a/2,left:v.left+m};break;case"left":b={top:v.top+g/2-a/2,left:v.left-i};break;case"top left":b={top:v.top-a,left:v.left+m/2-i+15};break;case"top right":b={top:v.top-a,left:v.left+m/2-15};break;case"bottom left":b={top:v.top+g,left:v.left+m/2-i+15};break;case"bottom right":b={top:v.top+g,left:v.left+m/2-15};break;case"left top":b={top:v.top+g/2-a,left:v.left-i};break;case"left bottom":b={top:v.top+g/2,left:v.left-i};break;case"right top":b={top:v.top+g/2-a,left:v.left+m};break;case"right bottom":b={top:v.top+g/2,left:v.left+m};break;default:throw new Error('invalid position "'.concat(e,'"'))}return b}var fu=function(e){try{return e instanceof HTMLElement}catch(t){return"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}},mu=(n(357),Oc()("calypso:popover")),gu=new Set,vu=function(e){function t(e){var n;return _a()(this,t),(n=ka()(this,Ca()(t).call(this,e))).setPopoverId(e.id),n.setDOMBehavior=n.setDOMBehavior.bind(Os()(n)),n.setPosition=n.setPosition.bind(Os()(n)),n.onClickout=n.onClickout.bind(Os()(n)),n.onKeydown=n.onKeydown.bind(Os()(n)),n.onWindowChange=n.onWindowChange.bind(Os()(n)),n.state={show:e.isVisible,left:-99999,top:-99999,positionClass:n.getPositionClass(e.position)},n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){this.bindEscKeyListener(),this.bindDebouncedReposition(),function(){if(pu)return au("window events already bound");pu=!0,au("bind handlers to `resize` and `scroll` events"),window.addEventListener("resize",uu,!0),window.addEventListener("scroll",uu,!0)}()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(fu(e.context)?this.domContext=e.context:this.domContext=a.a.findDOMNode(e.context),!e.isVisible)return null;this.setPosition()}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props.isVisible;return n!==e.isVisible&&(n?this.show():this.hide()),this.domContainer&&this.domContext&&n&&n!==e.isVisible?(this.debug("Update position after render completes"),void setTimeout((function(){return t.setPosition()}),0)):null}},{key:"componentWillUnmount",value:function(){this.debug("unmounting .... "),this.unbindClickoutHandler(),this.unbindDebouncedReposition(),this.unbindEscKeyListener(),function(){if(!pu)return au("window events are not bound");pu=!1,au("unbind handlers to `resize` and `scroll` events"),window.removeEventListener("resize",uu,!0),window.removeEventListener("scroll",uu,!0)}(),gu.delete(this.id),mu("current popover instances: ",gu.size)}},{key:"bindEscKeyListener",value:function(){return this.props.closeOnEsc?this.escEventHandlerAdded?null:(this.debug("adding escKey listener ..."),this.escEventHandlerAdded=!0,void document.addEventListener("keydown",this.onKeydown,!0)):null}},{key:"unbindEscKeyListener",value:function(){return this.props.closeOnEsc&&this.escEventHandlerAdded?(this.debug("unbinding `escKey` listener ..."),void document.removeEventListener("keydown",this.onKeydown,!0)):null}},{key:"onKeydown",value:function(e){if(27!==e.keyCode)return null;this.close(!0)}},{key:"bindClickoutHandler",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.domContainer;return e?this._clickoutHandlerReference?(this.debug("clickout event already bound"),null):(this.debug("binding `clickout` event"),void(this._clickoutHandlerReference=Zl()(e,this.onClickout))):(this.debug("no element to bind clickout side "),null)}},{key:"unbindClickoutHandler",value:function(){this._clickoutHandlerReference&&(this.debug("unbinding `clickout` listener ..."),this._clickoutHandlerReference(),this._clickoutHandlerReference=null)}},{key:"onClickout",value:function(e){var t=this.domContext&&this.domContext.contains&&!this.domContext.contains(e.target);if(this.props.ignoreContext&&t){var n=a.a.findDOMNode(this.props.ignoreContext);t=t&&n&&n.contains&&!n.contains(e.target)}t&&this.close()}},{key:"bindDebouncedReposition",value:function(){window.addEventListener("scroll",this.onWindowChange,!0),window.addEventListener("resize",this.onWindowChange,!0)}},{key:"unbindDebouncedReposition",value:function(){this.willReposition&&(window.cancelAnimationFrame(this.willReposition),this.willReposition=null),window.removeEventListener("scroll",this.onWindowChange,!0),window.removeEventListener("resize",this.onWindowChange,!0),this.debug("unbinding `debounce reposition` ...")}},{key:"onWindowChange",value:function(){this.willReposition=window.requestAnimationFrame(this.setPosition)}},{key:"setDOMBehavior",value:function(e){if(!e)return this.unbindClickoutHandler(),null;this.debug("setting DOM behavior"),this.bindClickoutHandler(e),this.domContainer=e,fu(this.props.context)?this.domContext=this.props.context:this.domContext=a.a.findDOMNode(this.props.context),this.domContainer.focus(),this.setPosition()}},{key:"getPositionClass",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.position;return"is-".concat(e.replace(/\s+/g,"-"))}},{key:"computePosition",value:function(){if(!this.props.isVisible)return null;var e=this.domContainer,t=this.domContext,n=this.props.position;if(!e||!t)return this.debug("[WARN] no DOM elements to work"),null;var r=n;this.debug("position: %o",n),this.props.autoPosition&&(r=du(n,e,t),this.debug("suggested position: %o",r));var i,a,s,o=Object(Dt.assign)({},(i=hu(r,e,t),a=e,s=iu()(a).width,i.left=Math.max(0,Math.min(i.left,lu.width-s)),i),{positionClass:this.getPositionClass(r)});return this.debug("updating reposition: ",o),o}},{key:"debug",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];mu.apply(void 0,["[%s] ".concat(e),this.id].concat(n))}},{key:"setPopoverId",value:function(e){this.id=e||"pop__".concat(tu()(16)),gu.add(this.id),this.debug("creating ..."),mu("current popover instances: ",gu.size)}},{key:"setPosition",value:function(){var e=this.computePosition();if(!e)return null;this.willReposition=null,this.setState(e)}},{key:"getStylePosition",value:function(){var e=this.state;return{left:e.left,top:e.top}}},{key:"show",value:function(){var e=this;if(!this.props.showDelay)return this.setState({show:!0}),null;this.debug("showing in %o","".concat(this.props.showDelay,"ms")),this.clearShowTimer(),this._openDelayTimer=setTimeout((function(){e.setState({show:!0})}),this.props.showDelay)}},{key:"hide",value:function(){this.unbindClickoutHandler(),this.setState({show:!1}),this.clearShowTimer()}},{key:"clearShowTimer",value:function(){if(!this._openDelayTimer)return null;clearTimeout(this._openDelayTimer),this._openDelayTimer=null}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.props.isVisible)return this.debug("popover should be already closed"),null;this.domContext.focus(),this.props.onClose(e)}},{key:"render",value:function(){if(!this.state.show)return this.debug("is hidden. return no render"),null;if(!this.props.context)return this.debug("No `context` to tie. return no render"),null;var e=Mc()("dops-popover",this.props.className,this.state.positionClass);return this.debug("rendering ..."),o.a.createElement(nu,{className:this.props.rootClassName},o.a.createElement("div",{style:this.getStylePosition(),className:e,ref:this.setDOMBehavior},o.a.createElement("div",{className:"dops-popover__arrow"}),o.a.createElement("div",{className:"dops-popover__inner"},this.props.children)))}}]),t}(s.Component);ha()(vu,"propTypes",{autoPosition:u.a.bool,className:u.a.string,closeOnEsc:u.a.bool,id:u.a.string,ignoreContext:u.a.shape({getDOMNode:u.a.function}),position:u.a.string,rootClassName:u.a.string,showDelay:u.a.number,onClose:u.a.func.isRequired,onShow:u.a.func}),ha()(vu,"defaultProps",{autoPosition:!0,className:"dops-popover",closeOnEsc:!0,isVisible:!1,position:"top",showDelay:0,onShow:function(){}});var bu=vu,yu=(n(358),function(e){function t(){var e;return _a()(this,t),e=ka()(this,Ca()(t).apply(this,arguments)),ha()(Os()(e),"state",{showPopover:!1}),ha()(Os()(e),"togglePopover",(function(){e.setState({showPopover:!e.state.showPopover})})),ha()(Os()(e),"_onPopoverClose",(function(){e.setState({showPopover:!1})})),ha()(Os()(e),"renderPopover",(function(){return o.a.createElement(bu,{isVisible:e.state.showPopover,context:e.refs&&e.refs.toggleSwitch,position:e.props.disabledPopoverPosition,onClose:e._onPopoverClose,className:"dops-info-popover__tooltip"},e.props.disabledReason)})),e.onKeyDown=e.onKeyDown.bind(Os()(e)),e.onClick=e.onClick.bind(Os()(e)),e.onLabelClick=e.onLabelClick.bind(Os()(e)),e}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.id=this.constructor.idNum++}},{key:"onKeyDown",value:function(e){this.props.disabled||("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.props.onChange()),this.props.onKeyDown(e))}},{key:"onClick",value:function(){this.props.disabled?this.props.disabledReason&&this.togglePopover():this.props.onChange()}},{key:"onLabelClick",value:function(e){if(!this.props.disabled){var t=e.target.nodeName.toLowerCase();"a"!==t&&"input"!==t&&"select"!==t&&(e.preventDefault(),this.props.onChange())}}},{key:"render",value:function(){var e=this.props.id||"toggle-"+this.id,t=Mc()("form-toggle",this.props.className,{"is-toggling":this.props.toggling});return o.a.createElement("span",null,o.a.createElement("input",{className:t,type:"checkbox",checked:this.props.checked,readOnly:!0,disabled:this.props.disabled}),o.a.createElement("label",{className:"form-toggle__label",htmlFor:e},o.a.createElement("span",{className:"form-toggle__switch",disabled:this.props.disabled,id:e,onClick:this.onClick,onKeyDown:this.onKeyDown,role:"checkbox","aria-checked":this.props.checked,"aria-label":this.props["aria-label"],tabIndex:this.props.disabled?-1:0,ref:"toggleSwitch"}),o.a.createElement("span",{className:"form-toggle__label-content",onClick:this.onLabelClick},this.props.children)),this.renderPopover())}}]),t}(s.Component));ha()(yu,"propTypes",{onChange:u.a.func,onKeyDown:u.a.func,checked:u.a.bool,disabled:u.a.bool,id:u.a.string,className:u.a.string,toggling:u.a.bool,"aria-label":u.a.string,children:u.a.node,disabledReason:u.a.node}),ha()(yu,"defaultProps",{checked:!1,disabled:!1,onKeyDown:function(){},onChange:function(){},disabledPopoverPosition:"bottom",disabledReason:""}),ha()(yu,"idNum",0);var _u=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement(yu,Bc()({},Object(Dt.omit)(this.props,"className"),{className:Mc()(this.props.className,"is-compact")}),this.props.children)}}]),t}(o.a.Component);ha()(_u,"displayName","CompactFormToggle");var wu=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"toggleModule",(function(){return n.trackModuleToggle(n.props.slug,n.props.activated),n.props.toggleModule(n.props.slug,n.props.activated)})),ha()(Os()(n),"trackModuleToggle",(function(e,t){"stats"!==e&&Uc.tracks.recordEvent("jetpack_wpa_module_toggle",{module:e,toggled:t?"off":"on"})})),ha()(Os()(n),"isDisabledByOverride",(function(){var e=n.props.getModuleOverride(n.props.slug);return n.props.overrideCondition?n.props.overrideCondition===e:!!e})),ha()(Os()(n),"getDisabledReason",(function(){if(!n.isDisabledByOverride())return null;var e=n.props.getModuleOverride(n.props.slug),t={components:{link:o.a.createElement("a",{href:Vl("jetpack-support-module-overrides"),target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"underline"}})}};switch(e){case"active":return Us("This feature has been enabled by a site administrator. {{link}}Learn more{{/link}}.",t);case"inactive":return Us("This feature has been disabled by a site administrator. {{link}}Learn more{{/link}}.",t);default:return Us("This feature is being managed by a site administrator. {{link}}Learn more{{/link}}.",t)}})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement(_u,{checked:this.props.activated||this.props.isModuleActivated,toggling:this.props.toggling,className:this.props.className,disabled:this.props.disabled||this.isDisabledByOverride(),id:this.props.id,onChange:this.toggleModule,disabledReason:this.getDisabledReason()},this.props.children)}}]),t}(s.Component);ha()(wu,"displayName","ModuleToggle"),ha()(wu,"propTypes",{toggleModule:u.a.func,activated:u.a.bool,disabled:u.a.bool,className:u.a.string,compact:u.a.bool,id:u.a.string,overrideCondition:u.a.string}),ha()(wu,"defaultProps",{activated:!1,disabled:!1,overrideCondition:""});var ku=le((function(e){return{getModuleOverride:function(t){return $a(e,t)}}}))(wu);function Eu(e){return le((function(e,t){return{validValues:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof Object(Dt.get)(t,["module","module"])&&(r=t.module.module),Va(e,r,n)},getOptionCurrentValue:function(t,n){return function(e,t,n){return Object(Dt.get)(e.jetpack.modules.items,[t,"options",n,"current_value"])}(e,t,n)},getSettingCurrentValue:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Mo(e,t,n)},getSiteRoles:function(){return function(e){return Object(Dt.get)(e.jetpack.initialState.stats,"roles",{})}(e)},isUpdating:function(t){return xo(e,t)},adminEmailAddress:gi(e),currentIp:Fi(e),siteAdminUrl:bi(e),isCurrentUserLinked:Xs(e)}}),(function(e){return{updateOptions:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(Ul(t,n))},regeneratePostByEmailAddress:function(){var t={progress:Us("Updating Post by Email address…"),success:Us("Regenerated Post by Email address."),error:function(e){return Us("Error regenerating Post by Email address. %(error)s",{args:{error:e}})}};return e(Ul({post_by_email_address:"regenerate"},t))},setUnsavedSettingsFlag:function(){return e({type:pr})},clearUnsavedSettingsFlag:function(){return e(Rl())},refreshSettings:function(){return e((function(e){return e({type:nr}),Da.fetchSettings().then((function(t){return e({type:rr,settings:t}),t})).catch((function(t){e({type:ir,error:t})}))}))}}}))(e)}function Cu(e){return Eu(function(t){function n(){var e,t;_a()(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=ka()(this,(e=Ca()(n)).call.apply(e,[this].concat(i))),ha()(Os()(t),"state",{options:{}}),ha()(Os()(t),"onOptionChange",(function(e){var n,r=e.target.name;n="checkbox"===e.target.type&&void 0!==e.target.checked?e.target.checked:e.target.value,t.updateFormStateOptionValue(r,n)})),ha()(Os()(t),"updateFormStateOptionValue",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;"string"==typeof e&&(e=ha()({},e,n));var r=Ms()({},t.state.options,{},e);return t.setState({options:r}),!0})),ha()(Os()(t),"resetFormStateOption",(function(e){return t.setState({options:Object(Dt.omit)(t.state.options,[e])}),!0})),ha()(Os()(t),"updateFormStateModuleOption",(function(e,n){var r,i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.trackSettingsToggle(e,n,!t.getOptionValue(n)),t.getOptionValue(e))?a?t.props.updateOptions((r={},ha()(r,e,!1),ha()(r,n,!t.getOptionValue(n)),r)):t.props.updateOptions(ha()({},n,!t.getOptionValue(n))):t.props.updateOptions((i={},ha()(i,e,!0),ha()(i,n,!0),i))})),ha()(Os()(t),"toggleModuleNow",(function(e){t.props.updateOptions(ha()({},e,!t.getOptionValue(e)))})),ha()(Os()(t),"onSubmit",(function(e){e.preventDefault(),t.props.updateOptions(t.state.options).then((function(){var e={};Object(Dt.each)(t.state.options,(function(t,n){n=n.replace(/\-/,"_"),e[n]=t})),t.trackFormSubmission(e),t.setState({options:{}})})).then((function(){t.props.refreshSettings(),t.props.clearUnsavedSettingsFlag()}))})),ha()(Os()(t),"getOptionValue",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(Dt.get)(t.state.options,e,t.props.getSettingCurrentValue(e,n))})),ha()(Os()(t),"shouldSaveButtonBeDisabled",(function(){return t.isSavingAnyOption()||!t.isDirty()})),ha()(Os()(t),"isDirty",(function(){return!!Object.keys(t.state.options).length})),ha()(Os()(t),"isSavingAnyOption",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.props.isUpdating(e)})),ha()(Os()(t),"trackFormSubmission",(function(e){Uc.tracks.recordEvent("jetpack_wpa_settings_form_submit",e)})),ha()(Os()(t),"trackSettingsToggle",(function(e,t,n){Uc.tracks.recordEvent("jetpack_wpa_settings_toggle",{module:e,setting:t,toggled:n?"on":"off"})})),t}return Ma()(n,t),As()(n,[{key:"componentDidUpdate",value:function(){this.isDirty()&&this.props.setUnsavedSettingsFlag()}},{key:"render",value:function(){return o.a.createElement(e,Bc()({getOptionValue:this.getOptionValue,onSubmit:this.onSubmit,onOptionChange:this.onOptionChange,updateFormStateOptionValue:this.updateFormStateOptionValue,toggleModuleNow:this.toggleModuleNow,updateFormStateModuleOption:this.updateFormStateModuleOption,shouldSaveButtonBeDisabled:this.shouldSaveButtonBeDisabled,isSavingAnyOption:this.isSavingAnyOption,isDirty:this.isDirty,resetFormStateOption:this.resetFormStateOption},this.props))}}]),n}(o.a.Component))}var Su=function(e){return function(t){return t({type:Wn}),Da.fetchStatsData(e).then((function(e){t({type:Yn,statsData:e})})).catch((function(e){t({type:Gn,error:e})}))}},Mu=function(){return function(e){return e({type:An}),Da.getProtectCount().then((function(t){e({type:On,protectCount:t})})).catch((function(t){e({type:jn,error:t})}))}},xu=function(){return function(e){return e({type:In}),Da.getVaultPressData().then((function(t){e({type:Rn,vaultPressData:t})})).catch((function(t){e({type:Dn,error:t})}))}},Au=function(){return function(e){return e({type:Un}),Da.getAkismetData().then((function(t){e({type:Fn,akismetData:t})})).catch((function(t){e({type:Ln,error:t})}))}},ju=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t){return t({type:zn}),(""===e?Da.checkAkismetKey().then((function(e){t({type:Vn,akismet:e})})):Da.checkAkismetKeyTyped(e).then((function(e){t({type:Vn,akismet:e})}))).catch((function(e){t({type:Bn,error:e})}))}},Ou=function(){return function(e){return e({type:Hn}),Da.getPluginUpdates().then((function(t){e({type:Kn,pluginUpdates:t})})).catch((function(t){e({type:qn,error:t})}))}},Nu=(n(359),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=Mc()(this.props.className,"dops-section-header");return o.a.createElement(Dl,{compact:!0,className:e},o.a.createElement("div",{className:"dops-section-header__label"},o.a.createElement("span",{className:"dops-section-header__label-text"},this.props.label)),o.a.createElement("div",{className:"dops-section-header__actions"},this.props.children))}}]),t}(o.a.Component));ha()(Nu,"displayName","SectionHeader"),ha()(Nu,"propTypes",{label:u.a.string}),ha()(Nu,"defaultProps",{label:""});var Tu=function(e){return function(t){13!==t.which&&32!==t.which||e(t)}},Pu=(n(172),function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"dismissTimeout",null),ha()(Os()(n),"getIcon",(function(){var e;switch(n.props.status){case"is-info":e="info";break;case"is-success":e="checkmark";break;case"is-error":case"is-warning":e="notice";break;default:e="info"}return e})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){this.props.duration>0&&(this.dismissTimeout=setTimeout(this.props.onDismissClick,this.props.duration))}},{key:"componentWillUnmount",value:function(){this.dismissTimeout&&clearTimeout(this.dismissTimeout)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.icon,i=e.isCompact,a=e.onDismissClick,s=e.showDismiss,c=void 0===s?!i:s,l=e.status,u=e.text,p=e.dismissText,d=Mc()("dops-notice",l,n,{"is-compact":i,"is-dismissable":c});return o.a.createElement("div",{className:d},o.a.createElement("span",{className:"dops-notice__icon-wrapper"},o.a.createElement(ml,{className:"dops-notice__icon",icon:r||this.getIcon(),size:24})),o.a.createElement("span",{className:"dops-notice__content"},o.a.createElement("span",{className:"dops-notice__text"},u||t)),u?t:null,c&&o.a.createElement("span",{role:"button",onKeyDown:Tu(a),tabIndex:"0",className:"dops-notice__dismiss",onClick:a},o.a.createElement(ml,{icon:"cross",size:24}),o.a.createElement("span",{className:"dops-notice__screen-reader-text screen-reader-text"},p)))}}]),t}(o.a.Component));ha()(Pu,"displayName","SimpleNotice"),ha()(Pu,"defaultProps",{duration:0,status:null,showDismiss:!0,className:"",onDismissClick:Dt.noop}),ha()(Pu,"propTypes",{status:u.a.string,showDismiss:u.a.bool,isCompact:u.a.bool,duration:u.a.number,text:u.a.oneOfType([u.a.oneOfType([u.a.string,u.a.node]),u.a.arrayOf(u.a.oneOfType([u.a.string,u.a.node]))]),icon:u.a.string,className:u.a.string});var Iu=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){!this.props.fetchingVaultPressData&&this.props.isModuleActivated("vaultpress")&&this.props.fetchVaultPressData()}},{key:"render",value:function(){return null}}]),t}(s.Component);Iu.defaultProps={fetchVaultPressData:function(){}};var Du=le((function(e){return{fetchVaultPressData:xu(),fetchingVaultPressData:sa(e),isModuleActivated:function(t){return Ga(e,t)}}}),(function(e){return P({fetchVaultPressData:xu},e)}))(Iu),Ru=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.isCheckingAkismetKey||this.props.checkAkismetKey()}},{key:"render",value:function(){return null}}]),t}(s.Component);Ru.defaultProps={checkAkismetKey:function(){}};var Uu=le((function(e){return{checkAkismetKey:ju(),isCheckingAkismetKey:na(e)}}),(function(e){return P({checkAkismetKey:ju},e)}))(Ru),Lu=function(e,t){return function(){return function(e,t){return Uc.tracks.recordJetpackClick({target:"pro-status",type:e,feature:t})}(e,t)}},Fu=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"getProActions",(function(e,t){var r="",i=!1,a=!1,s="";switch(e){case"threats":r="is-error",a=n.props.isCompact?Us("Threats",{context:"A caption for a small button to fix security issues."}):Us("See threats",{context:"A caption for a small button to fix security issues."}),s=Vl("vaultpress-dashboard");break;case"free":case"personal":case"pro":return;case"secure":r="is-success",i=Us("Secure",{context:"Short message informing user that the site is secure."});break;case"invalid_key":return;case"rewind_connected":var c=n.getRewindMessage();return o.a.createElement(Pu,{showDismiss:!1,status:c.status,isCompact:!0},c.text);case"active":return o.a.createElement("span",{className:"jp-dash-item__active-label"},Us("ACTIVE"))}return o.a.createElement(Pu,{showDismiss:!1,status:r,isCompact:!0},i,a&&o.a.createElement("a",{className:"dops-notice__text-no-underline",onClick:Lu(e,t),href:s},a))})),ha()(Os()(n),"getSetUpButton",(function(e){return o.a.createElement(xc,{onClick:Lu("set_up",e),compact:!0,primary:!0,href:Vl("calypso-plugins-setup",{site:n.props.siteRawUrl,query:"only=".concat(e)})},Us("Set up",{context:"Caption for a button to set up a feature."}))})),n}return Ma()(t,e),As()(t,[{key:"getRewindMessage",value:function(){switch(this.props.rewindStatus.state){case"provisioning":return{status:"is-info",text:Us("Setting up")};case"awaiting_credentials":return{status:"is-warning",text:Us("Action needed")};case"active":return{status:"is-success",text:Us("Connected")};default:return{status:"",text:""}}}},{key:"render",value:function(){var e=this,t=this.props.sitePlan(),n=this.props.getVaultPressData(),r="";"scan"!==this.props.proFeature&&"backups"!==this.props.proFeature&&"vaultpress"!==this.props.proFeature||(r="vaultpress/vaultpress.php"),"akismet"===this.props.proFeature&&(r="akismet/akismet.php");var i=/jetpack_personal*/.test(t.product_slug),a=/jetpack_free*/.test(t.product_slug),s=/jetpack_premium*/.test(t.product_slug),c=Object(Dt.get)(n,["data","features","backups"],!1),l=Object(Dt.get)(n,["data","features","security"],!1),u=["is-daily-backup-plan","is-realtime-backup-plan"].includes(this.props.planClass);return o.a.createElement("div",null,o.a.createElement(jl,null),o.a.createElement(Uu,null),o.a.createElement(Du,null),!this.props.isDevMode&&function(o,p,d){switch(o){case"rewind":return e.getProActions("rewind_connected","rewind");case"backups":if(a&&!c&&e.props.isCompact)return e.getProActions("free","backups");break;case"scan":if(e.props.fetchingSiteData||e.props.isFetchingVaultPressData||u)return"";if((a||i)&&!l)return e.props.isCompact?e.getProActions("free","scan"):i&&!c?e.getSetUpButton("backups"):"";if("N/A"!==n)return l?e.getProActions(0===e.props.getScanThreats()?"secure":"threats","scan"):e.getSetUpButton("scan");break;case"search":return a||i||s?e.getProActions("pro","search"):"";case"akismet":if(a&&(!p||!d))return e.props.isCompact?e.getProActions("free","anti-spam"):"";if(!e.props.isAkismetKeyValid&&!e.props.fetchingAkismetData&&p&&d&&!a)return e.getSetUpButton(o)}return t.product_slug&&r&&!a?p&&d?e.getProActions("active"):e.getSetUpButton(o):""}(this.props.proFeature,this.props.pluginActive(r),this.props.pluginInstalled(r)))}}]),t}(o.a.Component);ha()(Fu,"propTypes",{isCompact:u.a.bool,proFeature:u.a.string,rewindStatus:u.a.object.isRequired}),ha()(Fu,"defaultProps",{isCompact:!0,proFeature:""});var zu=le((function(e){var t=qo(e);return{siteRawUrl:vi(e),siteAdminUrl:bi(e),getScanThreats:function(){return ca(e)},getVaultPressData:function(){return oa(e)},getAkismetData:function(){return ta(e)},isFetchingVaultPressData:sa(e),sitePlan:function(){return t},planClass:Lo(Object(Dt.get)(t,"product_slug","")),fetchingPluginsData:ga(e),pluginActive:function(t){return va(e,t)},pluginInstalled:function(t){return ba(e,t)},isDevMode:Qs(e),fetchingSiteData:Bo(e),isAkismetKeyValid:ra(e),fetchingAkismetData:ea(e),paidFeatureUpgradeUrl:Yi(e,"upgrade"),planProUpgradeUrl:Yi(e,"plans-business"),rewindStatus:yo(e)}}))(Fu),Bu=(n(360),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"getIconClassNames",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.plan,r=t.className,i=Lo(n);return Mc()("dops-plan-icon",i,r,e)}},{key:"getPersonalIcon",value:function(){return o.a.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__personal"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 124 125"},o.a.createElement("circle",{className:"dops-plan-icon__personal-0",cx:"62",cy:"62.1",r:"62"}),o.a.createElement("path",{className:"dops-plan-icon__personal-1",d:"M64 106.1l4-9.8v-3.5H62v14.6C62.9 107.4 63.6 106.9 64 106.1z"}),o.a.createElement("path",{className:"dops-plan-icon__personal-2",d:"M56.2 92.8v3.5l4 9.8c0.3 0.8 1.1 1.3 1.9 1.3V92.8H56.2z"}),o.a.createElement("path",{className:"dops-plan-icon__personal-2",d:"M62 32.9h17.1V2.5C73.7 0.9 68 0.1 62 0.1V32.9z"}),o.a.createElement("path",{className:"dops-plan-icon__personal-3",d:"M62 32.9V0.1c0 0 0 0 0 0 -5.9 0-11.6 0.8-17 2.4v30.5H62z"}),o.a.createElement("polygon",{className:"dops-plan-icon__personal-4",points:"62 32.9 45 32.9 48.3 48.7 53.3 92.8 62 92.8 "}),o.a.createElement("polygon",{className:"dops-plan-icon__personal-5",points:"62 32.9 79.2 32.9 75.9 48.7 70.9 92.8 62 92.8 "}))}},{key:"getPremiumIcon",value:function(){return o.a.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__premium"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 62 61.5"},o.a.createElement("ellipse",{className:"dops-plan-icon__premium-0",cx:"31",cy:"30.8",rx:"31",ry:"30.8"}),o.a.createElement("path",{className:"dops-plan-icon__premium-1",d:"M27.8 46.3v1.9l2.2 5.4c0.2 0.5 0.5 0.7 1 0.7v-7.9L27.8 46.3z"}),o.a.createElement("path",{className:"dops-plan-icon__premium-2",d:"M32 53.6l2.2-5.4v-1.9H31v3.8 4.1C31.5 54.3 31.9 54 32 53.6z"}),o.a.createElement("path",{className:"dops-plan-icon__premium-3",d:"M21.6 18c0.2 2 4.8 28.3 4.8 28.3l4.6 0.1V18H21.6z"}),o.a.createElement("path",{className:"dops-plan-icon__premium-4",d:"M40.5 18H31v23.4 5l4.5-0.1C35.5 46.3 40.1 20.4 40.5 18z"}),o.a.createElement("path",{className:"dops-plan-icon__premium-5",d:"M31 18V0c-3.9 0-7.7 0.7-11.2 2.1 0.7 6 1.8 15.9 1.8 15.9H31z"}),o.a.createElement("path",{className:"dops-plan-icon__premium-6",d:"M31 18h9.5c0 0 1.1-9.9 1.8-15.9C38.8 0.7 35 0 31 0V18z"}))}},{key:"getBusinessIcon",value:function(){return o.a.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__business"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 124 124"},o.a.createElement("circle",{className:"dops-plan-icon__business-0",cx:"62",cy:"62",r:"62"}),o.a.createElement("path",{className:"dops-plan-icon__business-1",d:"M57.4 73.8c0-2.5 2-4.6 4.6-4.6V36.8h-9.6v12.1c-8 3.7-13.5 11.7-13.5 21.1 0 4.9 1.5 9.4 4.1 13.1l0 0c15.4 22.4 15.4 22.4 17 24.8h0.3V78.1C58.6 77.4 57.4 75.7 57.4 73.8L57.4 73.8z"}),o.a.createElement("path",{className:"dops-plan-icon__business-2",d:"M85.2 69.8c0-9.4-5.6-17.4-13.5-21.1v-12H62v32.5c2.5 0 4.6 2 4.6 4.6 0 1.9-1.2 3.5-2.9 4.2v29.8H64c1.6-2.4 1.6-2.4 17-24.8l0 0C83.6 79.2 85.2 74.7 85.2 69.8L85.2 69.8z"}),o.a.createElement("path",{className:"dops-plan-icon__business-3",d:"M48.6 32h-2.4c-3.2 0-5.8 2.6-5.8 5.8V38c0 3.2 2.6 5.8 5.8 5.8H62v-4.7V32 0c-7.2 0-14.1 1.2-20.6 3.5 1.1 5.5 2.5 11 4.1 16.5L48.6 32z"}),o.a.createElement("path",{className:"dops-plan-icon__business-4",d:"M62 39.1v4.7h15.8c3.2 0 5.8-2.6 5.8-5.8v-0.2c0-3.2-2.6-5.8-5.8-5.8h-2.4l3.1-12c1.6-5.5 3-11 4.1-16.5C76.1 1.2 69.2 0 62 0v32V39.1z"}))}},{key:"getSearchIcon",value:function(){return o.a.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__search"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 64 64"},o.a.createElement("circle",{className:"dops-plan-icon__search-0",cx:"32",cy:"32",r:"32",fill:"#2fb41f"}),o.a.createElement("path",{className:"dops-plan-icon__search-1",d:"M48 43.6L39.4 35c1.2-1.8 1.9-4 1.9-6.4 0-6.4-5.2-11.6-11.6-11.6S18 22.2 18 28.7s5.2 11.6 11.6 11.6c2.4 0 4.6-.7 6.4-1.9l8.6 8.6 3.4-3.4zM21.4 28.7c0-4.6 3.7-8.3 8.3-8.3s8.3 3.7 8.3 8.3-3.7 8.3-8.3 8.3-8.3-3.7-8.3-8.3z",fill:"#fff"}))}},{key:"getDefaultIcon",value:function(){return o.a.createElement("svg",{className:this.getIconClassNames("dops-plan-icon__free"),xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0",y:"0",viewBox:"0 0 61.8 61.8"},o.a.createElement("circle",{className:"dops-plan-icon__free-0",cx:"30.9",cy:"30.9",r:"30.9"}),o.a.createElement("polygon",{className:"dops-plan-icon__free-1",points:"41.4 32.8 30.9 22.5 20.3 32.8 30.9 51.8 "}),o.a.createElement("path",{className:"dops-plan-icon__free-2",d:"M30.9 41.6L30.9 41.6c-2 0-3.7 1.6-3.7 3.6l3.7 6.5 3.7-6.5C34.5 43.2 32.9 41.6 30.9 41.6L30.9 41.6z"}),o.a.createElement("path",{className:"dops-plan-icon__free-3",d:"M25.6 27.7c0 2.9 2.3 5.2 5.2 5.2h0.1c2.9 0 5.2-2.3 5.2-5.2v-0.1V0.4c-1.7-0.3-3.5-0.5-5.3-0.5s-3.6 0.2-5.3 0.5v27.3H25.6z"}),o.a.createElement("path",{className:"dops-plan-icon__free-4",d:"M25.6 27.6V0.4c-1.8 0.3-3.6 0.8-5.3 1.4v31C23.2 32.8 25.6 30.5 25.6 27.6z"}),o.a.createElement("path",{className:"dops-plan-icon__free-2",d:"M41.4 32.8v-31c-1.7-0.6-3.5-1.1-5.3-1.4v27.2C36.1 30.5 38.5 32.8 41.4 32.8z"}))}},{key:"render",value:function(){switch(this.props.plan){case"personal-bundle":case"personal-bundle-2y":case"jetpack_personal":case"jetpack_personal_monthly":return this.getPersonalIcon();case"value_bundle":case"value_bundle-2y":case"jetpack_premium":case"jetpack_premium_monthly":return this.getPremiumIcon();case"business-bundle":case"business-bundle-2y":case"jetpack_business":case"jetpack_business_monthly":case"vip":return this.getBusinessIcon();case"jetpack_search":case"jetpack_search_monthly":return this.getSearchIcon();default:return this.getDefaultIcon()}}}]),t}(s.Component));Bu.propTypes={classNames:u.a.string,plan:u.a.oneOf(["free_plan","value_bundle","value_bundle-2y","business-bundle","business-bundle-2y","jetpack_free","jetpack_business","jetpack_business_monthly","jetpack_premium","jetpack_premium_monthly","jetpack_personal","jetpack_personal_monthly","personal-bundle","personal-bundle-2y","vip"]).isRequired};n(361);var Vu=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"handleClick",(function(){n.props.onClick();var e=n.props,t=e.eventFeature,r=e.path,i=e.currentVersion;if(t||r){var a=t?{feature:t}:{},s=r?{path:r}:{},o=Ms()({target:"banner",type:"upgrade",current_version:i},a,{},s);Uc.tracks.recordJetpackClick(o)}})),n}return Ma()(t,e),As()(t,[{key:"getHref",value:function(){var e=this.props,t=e.href,n=e.feature,r=e.siteSlug;return!t&&r?n?"/plans/".concat(r,"?feature=").concat(n):"/plans/".concat(r):t}},{key:"getIcon",value:function(){var e=this.props,t=e.icon,n=e.plan;return n&&!t?o.a.createElement("div",{className:"dops-banner__icon-plan"},o.a.createElement(Bu,{plan:n})):o.a.createElement("div",{className:"dops-banner__icons"},o.a.createElement("div",{className:"dops-banner__icon"},o.a.createElement(ml,{icon:t||"info-outline",size:18})),o.a.createElement("div",{className:"dops-banner__icon-circle"},o.a.createElement(ml,{icon:t||"info-outline",size:18})))}},{key:"getContent",value:function(){var e=this.props,t=e.callToAction,n=e.description,r=e.list,i=e.title;return o.a.createElement("div",{className:"dops-banner__content"},o.a.createElement("div",{className:"dops-banner__info"},o.a.createElement("div",{className:"dops-banner__title"},i),n&&o.a.createElement("div",{className:"dops-banner__description"},n),Object(Dt.size)(r)>0&&o.a.createElement("ul",{className:"dops-banner__list"},r.map((function(e,t){return o.a.createElement("li",{key:t},o.a.createElement(ml,{icon:"checkmark",size:18}),e)})))),t&&o.a.createElement("div",{className:"dops-banner__action"},t&&o.a.createElement(xc,{compact:!0,href:this.getHref(),onClick:this.handleClick,primary:!0},t)))}},{key:"render",value:function(){var e=this.props,t=e.callToAction,n=e.className,r=Lo(e.plan),i=Mc()("dops-banner",n,{"has-call-to-action":t},{"is-upgrade-personal":"is-personal-plan"===r},{"is-upgrade-premium":"is-premium-plan"===r},{"is-upgrade-business":"is-business-plan"===r});return o.a.createElement(Dl,{className:i,href:t?null:this.getHref(),onClick:t?Dt.noop:this.handleClick},this.getIcon(),this.getContent())}}]),t}(s.Component);ha()(Vu,"propTypes",{callToAction:u.a.string,className:u.a.string,currentVersion:u.a.string.isRequired,description:u.a.node,eventFeature:u.a.string,feature:u.a.string,href:u.a.string,icon:u.a.string,list:u.a.arrayOf(u.a.string),onClick:u.a.func,path:u.a.string,plan:u.a.string,siteSlug:u.a.string,title:u.a.string.isRequired}),ha()(Vu,"defaultProps",{onClick:Dt.noop});var Hu=le((function(e){return{currentVersion:fi(e)}}))(Vu),qu=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return!(this.props.plan&&!this.props.userCanPurchasePlan)&&(this.props.arePromotionsActive?o.a.createElement(Hu,this.props):null)}}]),t}(Hu);ha()(qu,"propTypes",{callToAction:u.a.string,className:u.a.string,description:u.a.node,eventFeature:u.a.string,feature:u.a.string,href:u.a.string,icon:u.a.string,list:u.a.arrayOf(u.a.string),onClick:u.a.func,path:u.a.string,plan:u.a.string,siteSlug:u.a.string,title:u.a.string.isRequired}),ha()(qu,"defaultProps",{onClick:Dt.noop,plan:""});var Ku=le((function(e){return{arePromotionsActive:Bi(e),userCanPurchasePlan:Ei(e)}}))(qu),Ju=(n(362),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){if(!this.props.moduleName)return null;var e={args:{moduleName:this.props.moduleName},components:{link:o.a.createElement("a",{href:Vl("jetpack-support-module-overrides"),target:"_blank",rel:"noopener noreferrer"})}},t=Mc()("module-overridden-banner",{"is-compact":this.props.compact});return o.a.createElement(Ku,{className:t,title:this.props.moduleName,icon:"cog",description:Us("%(moduleName)s has been disabled by a site administrator. {{link}}Learn more{{/link}}.",e)})}}]),t}(Ku));ha()(Ju,"propTypes",{moduleName:u.a.string.isRequired});var Wu=Ju,Gu=function(e){var t=function(e){return function(){return function(e){Uc.tracks.recordJetpackClick({target:"upgrade-banner",feature:e,type:"upgrade"})}(e)}},n=!!e.module&&e.getModule(e.module),r=e.vaultPressData,i=Object(Dt.get)(r,["data","features","backups"],!1),a=Object(Dt.get)(r,["data","features","security"],!1);if(!e.userCanManageModules&&!Object(Dt.includes)(["post-by-email","publicize"],e.module))return o.a.createElement("span",null);var s=e.saveDisabled,c=!!e.feature&&e.feature,l=e.header?e.header:"";""===l&&n&&(l=n.name);var u=function(){switch(c){case"video-hosting-jetpack":return"inactive"===e.getModuleOverride("videopress");case"wordads-jetpack":return"inactive"===e.getModuleOverride("wordads");case"google-analytics-jetpack":return"inactive"===e.getModuleOverride("google-analytics");case"seo-tools-jetpack":return"inactive"===e.getModuleOverride("seo-tools");case"search-jetpack":return"inactive"===e.getModuleOverride("search");default:return!1}},p=function(){if(e.fetchingSiteData)return!0;var t=Lo(e.sitePlan.product_slug);switch(c){case"security-scanning-jetpack":if("is-free-plan"===t&&!a)return!1;break;case"wordads-jetpack":if("is-premium-plan"!==t&&"is-business-plan"!==t&&-1===e.activeFeatures.indexOf("wordads-jetpack"))return!1;break;case"google-analytics-jetpack":if("is-business-plan"!==t&&"is-premium-plan"!==t)return!1;break;case"spam-akismet-plus":if((Object(Dt.includes)(["is-free-plan"],t)||Object(Dt.isEmpty)(t))&&!e.isAkismetKeyValid&&!e.isCheckingAkismetKey)return!1}return!0}()&&e.children,d=!e.fetchingSiteData&&!u()&&function(){var n=Lo(e.sitePlan.product_slug),r=Us("Upgrade",{context:"A caption for a button to upgrade an existing paid feature to a higher tier."});switch(c){case"video-hosting-jetpack":return"is-premium-plan"===n||"is-business-plan"===n?"":o.a.createElement(Ku,{title:Us("Host fast, high-quality, ad-free video."),callToAction:r,plan:"jetpack_premium",feature:c,onClick:t(c),href:e.videoPremiumUpgradeUrl});case"wordads-jetpack":return"is-premium-plan"===n||"is-business-plan"===n||-1!==e.activeFeatures.indexOf("wordads-jetpack")?"":o.a.createElement(Ku,{title:Us("Generate income with high-quality ads."),callToAction:r,plan:"jetpack_premium",feature:c,onClick:t(c),href:e.adsUpgradeUrl});case"security-scanning-jetpack":return i||"is-business-plan"===n||e.multisite?"":"is-premium-plan"===n?o.a.createElement(Ku,{title:Us("Real-time site backups and automatic threat resolution."),plan:"jetpack_business",callToAction:r,feature:c,onClick:t(c),href:e.securityProUpgradeUrl}):o.a.createElement(Ku,{callToAction:r,title:Us("Protect against data loss, malware, and malicious attacks."),plan:"jetpack_premium",feature:c,onClick:t(c),href:e.securityPremiumUpgradeUrl});case"google-analytics-jetpack":return"is-business-plan"===n||"is-premium-plan"===n?"":o.a.createElement(Ku,{callToAction:r,title:Us("Connect your site to Google Analytics in seconds with Jetpack Premium or Professional."),plan:"jetpack_premium",feature:c,onClick:t(c),href:e.gaUpgradeUrl});case"seo-tools-jetpack":return"is-business-plan"===n||"is-premium-plan"===n?"":o.a.createElement(Ku,{callToAction:r,title:Us("Boost your search engine ranking with the powerful SEO tools in Jetpack Premium or Professional."),plan:"jetpack_premium",feature:c,onClick:t(c),href:e.seoUpgradeUrl});case"search-jetpack":return e.hasActiveSearchPurchase||e.isAtomicSite?"":o.a.createElement(Ku,{callToAction:r,title:Us("Help visitors quickly find answers with highly relevant instant search results and powerful filtering."),plan:"jetpack_search",feature:c,onClick:t(c),href:e.searchUpgradeUrl});case"spam-akismet-plus":return e.isCheckingAkismetKey||e.isAkismetKeyValid||Object(Dt.includes)(["is-personal-plan","is-premium-plan","is-business-plan"],n)?"":o.a.createElement(Ku,{callToAction:r,title:Us("Protect your site from spam."),plan:"jetpack_personal",feature:c,href:e.spamUpgradeUrl});default:return""}}();if(!p&&!d)return null;var h="";return e.feature?h="jp-settings-".concat(e.feature):e.module&&(h="jp-settings-".concat(e.module)),function(){if(!u())return!1;switch(c){case"google-analytics-jetpack":var t=e.getModule("google-analytics");return o.a.createElement(Wu,{moduleName:t.name});case"seo-tools-jetpack":var n=e.getModule("seo-tools");return o.a.createElement(Wu,{moduleName:n.name});default:return null}}()||o.a.createElement("form",Bc()({},h?{id:h}:null,{className:"jp-form-settings-card",onSubmit:s?void 0:e.onSubmit}),o.a.createElement(Nu,{label:l},!e.hideButton&&o.a.createElement(xc,{primary:!0,compact:!0,type:"submit",disabled:s||!e.isDirty()},Us(s?"Saving…":"Save settings",{context:"Button caption"})),e.action&&o.a.createElement(zu,{proFeature:e.action,siteAdminUrl:e.siteAdminUrl,isCompact:!1})),p,d)};Gu.propTypes={action:u.a.string,saveDisabled:u.a.bool},Gu.defaultProps={action:"",saveDisabled:!1};var Yu=le((function(e){return{sitePlan:qo(e),fetchingSiteData:Bo(e),siteAdminUrl:bi(e),userCanManageModules:Ei(e),isAkismetKeyValid:ra(e),isCheckingAkismetKey:na(e),vaultPressData:oa(e),getModuleOverride:function(t){return $a(e,t)},getModule:function(t){return qa(e,t)},activeFeatures:Wo(e),videoPremiumUpgradeUrl:Yi(e,"settings-video-premium"),adsUpgradeUrl:Yi(e,"settings-ads"),securityProUpgradeUrl:Yi(e,"settings-security-pro"),securityPremiumUpgradeUrl:Yi(e,"settings-security-premium"),gaUpgradeUrl:Yi(e,"settings-ga"),seoUpgradeUrl:Yi(e,"settings-seo"),searchUpgradeUrl:Yi(e,"jetpack-search"),spamUpgradeUrl:Yi(e,"settings-spam"),multisite:Ji(e),hasActiveSearchPurchase:Zo(e),isAtomicSite:Vi(e)}}))(Gu),$u=(n(363),pe()({displayName:"InfoPopover",propTypes:{id:u.a.string,position:u.a.string,className:u.a.string,rootClassName:u.a.string,gaEventCategory:u.a.string,popoverName:u.a.string,onClick:u.a.func,ignoreContext:u.a.shape({getDOMNode:u.a.function})},getDefaultProps:function(){return{position:"bottom",onClick:Dt.noop}},getInitialState:function(){return{showPopover:!1}},render:function(){var e=Mc()("dops-info-popover","dops-info-popover-button",{is_active:this.state.showPopover},this.props.className);return o.a.createElement("button",{ref:"infoPopover",className:e,onClick:this._onClick},o.a.createElement(ml,{icon:"info-outline",size:18}),this.props.screenReaderText?o.a.createElement("span",{className:"screen-reader-text"},this.props.screenReaderText):"",o.a.createElement(bu,{id:this.props.id,isVisible:this.state.showPopover,context:this.refs&&this.refs.infoPopover,ignoreContext:this.props.ignoreContext,position:this.props.position,onClose:this._onClose,className:Mc()("dops-info-popover__tooltip",this.props.className),rootClassName:this.props.rootClassName},this.props.children))},_onClick:function(e){this.props.onClick(),e.preventDefault(),this.setState({showPopover:!this.state.showPopover},this._recordStats)},_onClose:function(){this.setState({showPopover:!1},this._recordStats)},_recordStats:function(){var e=this.props,t=e.gaEventCategory,n=e.popoverName;if(t&&n){var r=this.state.showPopover?" Opened":" Closed";Uc.ga.recordEvent(t,"InfoPopover: "+n+r)}}})),Xu=(n(364),pe()({displayName:"ExternalLink",mixins:[Zc.a],propTypes:{className:u.a.string,href:u.a.string,onClick:u.a.func,icon:u.a.bool,iconSize:u.a.number},getDefaultProps:function(){return{iconSize:18}},render:function(){var e=Mc()("dops-external-link",this.props.className,{"has-icon":!!this.props.icon}),t=Object(Dt.assign)({},Object(Dt.omit)(this.props,"icon","iconSize"),{className:e,rel:"external"});return o.a.createElement("a",t,this.props.children,this.props.icon?o.a.createElement(ml,{icon:"external",size:this.props.iconSize}):null)}})),Qu=(n(365),function(e){function t(){var e;return _a()(this,t),(e=ka()(this,Ca()(t).apply(this,arguments))).getModule=e.getModule.bind(Os()(e)),e.trackInfoClick=e.trackInfoClick.bind(Os()(e)),e.trackLearnMoreClick=e.trackLearnMoreClick.bind(Os()(e)),e.trackPrivacyInfoClick=e.trackPrivacyInfoClick.bind(Os()(e)),e}return Ma()(t,e),As()(t,[{key:"getModule",value:function(){return this.props.module||{}}},{key:"trackInfoClick",value:function(){Uc.tracks.recordJetpackClick({target:"info-icon",feature:this.getModule().module})}},{key:"trackLearnMoreClick",value:function(){Uc.tracks.recordJetpackClick({target:"learn-more",feature:this.getModule().module})}},{key:"trackPrivacyInfoClick",value:function(){Uc.tracks.recordJetpackClick({target:"privacy-info",feature:this.getModule().module})}},{key:"render",value:function(){var e=this.props,t=e.text,n=e.link,r=this.props.privacyLink;return!r&&n&&(r=n+"#privacy"),o.a.createElement("div",{className:"jp-support-info"},o.a.createElement($u,{position:"left",onClick:this.trackInfoClick,screenReaderText:Us("Learn more")},t+" ",o.a.createElement("span",{className:"jp-support-info__learn-more"},o.a.createElement(Xu,{href:n,onClick:this.trackLearnMoreClick,target:"_blank",rel:"noopener noreferrer"},Us("Learn more"))),o.a.createElement("span",{className:"jp-support-info__privacy"},o.a.createElement(Xu,{href:r,onClick:this.trackPrivacyInfoClick,target:"_blank",rel:"noopener noreferrer"},Us("Privacy information")))))}}]),t}(s.Component));ha()(Qu,"propTypes",{module:u.a.object,text:u.a.string,link:u.a.string,privacyLink:u.a.string}),ha()(Qu,"defaultProps",{module:void 0,text:"",link:"",privacyLink:""});var Zu=function(e){var t=e.module;if(t.module&&!e.userCanManageModules&&!Object(Dt.includes)(["post-by-email","publicize"],t.module))return o.a.createElement("span",null);var n=e.disableInDevMode&&e.isUnavailableInDevMode(t.module),r=n;return"post-by-email"!==t.module||e.isLinked||(r=!0),o.a.createElement("div",{className:Mc()("jp-form-settings-group",e.className)},o.a.createElement(Dl,{className:Mc()({"jp-form-has-child":e.hasChild,"jp-form-settings-disable":n})},r&&o.a.createElement("div",{className:"jp-form-block-fade"}),e.support.link&&o.a.createElement(Qu,Bc()({module:t},e.support)),e.children))};Zu.propTypes={support:u.a.object,module:u.a.object,disableInDevMode:u.a.bool.isRequired,isDevMode:u.a.bool.isRequired,isSitePublic:u.a.bool.isRequired,userCanManageModules:u.a.bool.isRequired,isLinked:u.a.bool.isRequired,isUnavailableInDevMode:u.a.func.isRequired,className:u.a.string},Zu.defaultProps={support:{text:"",link:""},module:{},disableInDevMode:!1,isDevMode:!1,isSitePublic:!0,userCanManageModules:!1,isLinked:!1,isUnavailableInDevMode:Dt.noop,className:""};var ep=le((function(e){return{isDevMode:Qs(e),isSitePublic:_i(e),userCanManageModules:Ei(e),userCanEditPosts:Si(e),isLinked:Xs(e),isModuleActivated:function(t){return Ga(e,t)},isUnavailableInDevMode:function(t){return no(e,t)}}}))(Zu),tp=(n(366),Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"updateFormStateByMarkdown",(function(e){return n.props.getSettingCurrentValue("wpcom_publish_posts_with_markdown",e)?n.props.updateFormStateModuleOption(e,"wpcom_publish_comments_with_markdown"):n.props.updateFormStateModuleOption(e,"wpcom_publish_comments_with_markdown",!0)})),ha()(Os()(n),"handleMarkdownCommentsToggle",(function(){n.props.updateFormStateModuleOption("markdown","wpcom_publish_comments_with_markdown")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.isModuleFound("comments"),t=this.props.isModuleFound("gravatar-hovercards"),n=this.props.isModuleFound("markdown"),r=this.props.isModuleFound("comment-likes");if(!(e||t||n||r))return null;var i=this.props,a=i.isUnavailableInDevMode,s=i.getOptionValue,c=this.props.getModule("comments"),l=this.props.getOptionValue("comments"),u=this.props.isUnavailableInDevMode("comments"),p=this.props.getModule("gravatar-hovercards"),d=this.props.getModule("markdown"),h=a("comment-likes"),f=s("comment-likes");return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Comments"),module:"comments",saveDisabled:this.props.isSavingAnyOption(["highlander_comment_form_prompt","jetpack_comment_form_color_scheme"])}),e&&o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:c,support:{text:Us("Replaces the standard WordPress comment form with a new comment system that includes social media login options."),link:Vl("jetpack-support-comments")}},o.a.createElement(ku,{slug:"comments",compact:!0,disabled:u,activated:this.props.getOptionValue("comments"),toggling:this.props.isSavingAnyOption("comments"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},c.description)),o.a.createElement(Hl,null,o.a.createElement(ql,null,o.a.createElement("span",{className:"jp-form-label-wide"},Us("Comment form introduction")),o.a.createElement(Bl,{name:"highlander_comment_form_prompt",value:this.props.getOptionValue("highlander_comment_form_prompt"),disabled:!l||u||this.props.isSavingAnyOption("highlander_comment_form_prompt"),onChange:this.props.onOptionChange})),o.a.createElement("span",{className:"jp-form-setting-explanation"},Us("A few catchy words to motivate your visitors to comment.")),o.a.createElement(ql,null,o.a.createElement("span",{className:"jp-form-label-wide"},Us("Color scheme")),o.a.createElement(Xl,Bc()({name:"jetpack_comment_form_color_scheme",value:this.props.getOptionValue("jetpack_comment_form_color_scheme"),disabled:!l||u||this.props.isSavingAnyOption("jetpack_comment_form_color_scheme"),onChange:this.props.onOptionChange},this.props,{validValues:this.props.validValues("jetpack_comment_form_color_scheme","comments")}))))),(t||n||r)&&o.a.createElement(ep,null,t&&o.a.createElement("div",{className:"jp-toggle-set"},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:"gravatar-hovercards",compact:!0,activated:this.props.getOptionValue("gravatar-hovercards"),toggling:this.props.isSavingAnyOption("gravatar-hovercards"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},p.description))),o.a.createElement(Qu,{text:Us("Show Gravatar hovercards alongside comments."),link:p.learn_more_button,privacyLink:p.learn_more_button+"#privacy"})),n&&o.a.createElement("div",{className:"jp-toggle-set"},o.a.createElement(Hl,null,o.a.createElement(_u,{checked:!!this.props.getOptionValue("wpcom_publish_comments_with_markdown","markdown"),disabled:this.props.isSavingAnyOption(["markdown","wpcom_publish_comments_with_markdown"])||"inactive"===this.props.getModuleOverride("markdown"),toggling:this.props.isSavingAnyOption(["markdown","wpcom_publish_comments_with_markdown"]),onChange:this.handleMarkdownCommentsToggle},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable Markdown use for comments.")))),o.a.createElement(Qu,{text:Us("Allow readers to use markdown in comments."),link:d.learn_more_button,privacyLink:d.learn_more_button+"#privacy"})),r&&o.a.createElement("div",{className:"jp-toggle-set"},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:"comment-likes",compact:!0,disabled:h,activated:f,toggling:this.props.isSavingAnyOption("comment-likes"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable comment likes.")))),o.a.createElement(Qu,{text:Us("Allow readers to like individual comments."),link:Vl("jetpack-support-comment-likes"),privacyLink:Vl("jetpack-support-comment-likes",{anchor:"privacy"})}))))}}]),t}(o.a.Component))),np=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{stb_enabled:n.props.getOptionValue("stb_enabled","subscriptions"),stc_enabled:n.props.getOptionValue("stc_enabled","subscriptions")}),ha()(Os()(n),"updateOptions",(function(e){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption("subscriptions",e))})),ha()(Os()(n),"trackConfigureClick",(function(){Uc.tracks.recordJetpackClick("view-followers")})),ha()(Os()(n),"handleSubscribeToBlogToggleChange",(function(){n.updateOptions("stb_enabled")})),ha()(Os()(n),"handleSubscribeToCommentToggleChange",(function(){n.updateOptions("stc_enabled")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this,t=this.props.getModule("subscriptions"),n=this.props.getOptionValue("subscriptions"),r=this.props.isUnavailableInDevMode("subscriptions");return o.a.createElement(Yu,Bc()({},this.props,{hideButton:!0,module:"subscriptions"}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:t,support:{text:Us("Allows readers to subscribe to your posts or comments, and receive notifications of new content by email."),link:Vl("jetpack-support-subscriptions")}},o.a.createElement(ku,{slug:"subscriptions",disabled:r,activated:n,toggling:this.props.isSavingAnyOption("subscriptions"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},t.description)),o.a.createElement(Hl,null,o.a.createElement(_u,{checked:this.state.stb_enabled,disabled:!n||r||this.props.isSavingAnyOption(["subscriptions","stb_enabled"]),onChange:this.handleSubscribeToBlogToggleChange},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable the “subscribe to site” option on your comment form"))),o.a.createElement(_u,{checked:this.state.stc_enabled,disabled:!n||r||this.props.isSavingAnyOption(["subscriptions","stc_enabled"]),onChange:this.handleSubscribeToCommentToggleChange},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable the “subscribe to comments” option on your comment form"))))),r||!n?"":e.props.isLinked?o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackConfigureClick,href:Vl("calypso-people-email-followers",{site:e.props.siteRawUrl})},Us("View your Email Followers")):o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",href:"".concat(e.props.connectUrl,"&from=unlinked-user-connect-masterbar")},Us("Create a Jetpack account to view your email followers")," "))}}]),t}(o.a.Component)),rp=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode},t=this.props.isModuleFound("comments"),n=this.props.isModuleFound("markdown"),r=this.props.isModuleFound("gravatar-hovercards"),i=this.props.isModuleFound("subscriptions"),a=this.props.isModuleFound("comment-likes");return(this.props.searchTerm||this.props.active)&&(t||i||n||r||a)?o.a.createElement("div",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:this.props.searchTerm?Us("Discussion"):Us("Manage advanced comment settings and grow your audience with email subscriptions."),className:"jp-settings-description"}),o.a.createElement(tp,Bc()({},e,{isModuleFound:this.props.isModuleFound,getModuleOverride:this.props.getModuleOverride})),i&&o.a.createElement(np,Bc()({},e,{isLinked:this.props.isLinked,connectUrl:this.props.connectUrl,siteRawUrl:this.props.siteRawUrl}))):null}}]),t}(o.a.Component);ha()(rp,"displayName","DiscussionSettings");var ip=le((function(e){return{module:function(t){return qa(e,t)},settings:So(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},isModuleFound:function(t){return ko(e,t)},connectUrl:Js(e),isLinked:Xs(e),getModuleOverride:function(t){return $a(e,t)}}}))(rp),ap=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.isModuleFound("videopress");if(!e)return null;var t=this.props.module("videopress"),n=Lo(this.props.sitePlan.product_slug),r=Object(Dt.includes)(["is-premium-plan","is-business-plan"],n)&&o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:t,support:{link:Vl("jetpack-support-videopress")}},o.a.createElement(Kl,{className:"jp-form-label-wide"},Us("Video")),o.a.createElement("p",null," ",Us("Make the content you publish more engaging with high-resolution video. With Jetpack Video you can customize your media player and deliver high-speed, ad-free, and unbranded videos to your visitors. Videos are hosted on our WordPress.com servers and do not subtract space from your hosting plan!")," "),o.a.createElement(ku,{slug:"videopress",disabled:this.props.isUnavailableInDevMode("videopress"),activated:this.props.getOptionValue("videopress"),toggling:this.props.isSavingAnyOption("videopress"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable high-speed, ad-free video player")))),i="inactive"===this.props.getModuleOverride("videopress");return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Media"),feature:!i&&"video-hosting-jetpack",hideButton:!0}),e&&r)}}]),t}(o.a.Component),sp=le((function(e){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)},sitePlan:qo(e),getModuleOverride:function(t){return $a(e,t)}}}))(Cu(ap)),op=Us("Jetpack Backup"),cp=Us("Always-on backups ensure you never lose your site."),lp=Us("Always-on backups ensure you never lose your site. Your changes are saved as you edit and you have unlimited backup archives."),up=Us("Jetpack Backup {{em}}Daily{{/em}}",{components:{em:o.a.createElement("em",null)}}),pp=Us("Jetpack Backup {{em}}Real-Time{{/em}}",{components:{em:o.a.createElement("em",null)}}),dp=Us("Jetpack Search"),hp=Us("Incredibly powerful and customizable, Jetpack Search helps your visitors instantly find the right content – right when they need it."),fp=Us("Customize your Search experience."),mp=Us("Search supports many customizations. ");var gp=le((function(e){var t=Lo(qo(e).product_slug);return{isAtomicSite:Vi(e),isLoading:Ho(e),hasActiveSearchPurchase:Zo(e),isBusinessPlan:"is-business-plan"===t,failedToEnableSearch:!jo(e,"search")&&!xo(e,"search")&&!1===Ao(e,"search")}}))(Cu((function(e){var t=e.getOptionValue("search"),n=e.getOptionValue("instant_search_enabled","search"),r=Object(s.useMemo)((function(){return function(e){var t=e.getOptionValue,n=e.hasActiveSearchPurchase,r=e.toggleModuleNow,i=e.updateOptions;return function(e){r(e),n&&t("search")&&i({instant_search_enabled:!0})}}(e)}),[e.hasActiveSearchPurchase]),i=Object(s.useMemo)((function(){return function(e){var t=e.hasActiveSearchPurchase,n=e.getOptionValue,r=e.updateOptions;return function(){t&&n("search")&&r({instant_search_enabled:!n("instant_search_enabled","search")})}}(e)}),[e.hasActiveSearchPurchase]);return Object(s.useEffect)((function(){e.failedToEnableSearch&&e.hasActiveSearchPurchase&&(e.updateOptions({has_jetpack_search_product:!0}),r("search"))}),[e.failedToEnableSearch,e.hasActiveSearchPurchase,r]),o.a.createElement(Yu,Bc()({},e,{module:"search",feature:"search-jetpack",hideButton:!0}),o.a.createElement(ep,{hasChild:!0,module:{module:"search"},support:{text:mp,link:Vl("jetpack-support-search")}},o.a.createElement("p",null,hp," "),e.isLoading&&Us("Loading…"),!e.isLoading&&(e.isBusinessPlan||e.hasActiveSearchPurchase)&&o.a.createElement(s.Fragment,null,o.a.createElement(ku,{activated:t,compact:!0,slug:"search",toggleModule:r,toggling:e.isSavingAnyOption("search")},Us("Enable Search")),!e.isAtomicSite&&o.a.createElement(Hl,null,o.a.createElement(_u,{checked:n,disabled:!e.hasActiveSearchPurchase||!t,onChange:i,toggling:e.isSavingAnyOption("instant_search_enabled")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable instant search experience (recommended)"))),o.a.createElement("p",{className:"jp-form-setting-explanation jp-form-search-setting-explanation"},Us("Instant search will allow your visitors to get search results as soon as they start typing. If deactivated, Jetpack Search will still optimize your search results but visitors will have to submit a search query before seeing any results."))))),!e.isLoading&&(e.isBusinessPlan||e.hasActiveSearchPurchase)&&t&&!n&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",href:"customize.php?autofocus[panel]=widgets"},Us("Add Jetpack Search Widget")),e.hasActiveSearchPurchase&&t&&n&&o.a.createElement(Dl,{className:"jp-settings-card__configure-link",compact:!0,href:"customize.php?autofocus[section]=jetpack_search"},fp))}))),vp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"toggleModule",(function(e,t){"photon"===e?!1==!t?n.props.updateOptions({photon:!1,"tiled-gallery":!1,tiled_galleries:!1}):n.props.updateOptions({photon:!0,"tiled-gallery":!0,tiled_galleries:!0}):n.props.updateOptions(ha()({},e,!t))})),ha()(Os()(n),"handleSiteAcceleratorChange",(function(){var e=n.props.getOptionValue("photon"),t=n.props.getOptionValue("photon-cdn"),r=e||t,i=n.props.getModuleOverride("photon"),a=n.props.getModuleOverride("photon-cdn");if(!0===r){var s={progress:Us("Disabling site accelerator…"),success:Us("Site accelerator is no longer speeding up your site!"),error:function(e){return Us("Error disabling site accelerator. %(error)s",{args:{error:e}})}},o={};!1==!e&&"active"!==i&&(e=!1,o={photon:!1,"tiled-gallery":!1,tiled_galleries:!1}),!1==!t&&"active"!==a&&(t=!1,o=Ms()({},o,{"photon-cdn":!1})),n.props.updateOptions(o,s)}else{var c={progress:Us("Enabling Site accelerator…"),success:Us("Site accelerator is now speeding up your site!"),error:function(e){return Us("Error enabling Site accelerator. %(error)s",{args:{error:e}})}},l={};!1===e&&"inactive"!==i&&(e=!0,l={photon:!0,"tiled-gallery":!0,tiled_galleries:!0}),!1===t&&"inactive"!==a&&(t=!0,l=Ms()({},l,{"photon-cdn":!0})),n.props.updateOptions(l,c)}!0===e||!0===t?Uc.tracks.recordJetpackClick({target:"jetpack_site_accelerator_toggle",toggled:"on"}):Uc.tracks.recordJetpackClick({target:"jetpack_site_accelerator_toggle",toggled:"off"}),n.props.getOptionValue("photon")!==e&&Uc.tracks.recordEvent("jetpack_wpa_module_toggle",{module:"photon",toggled:!1===e?"off":"on"}),n.props.getOptionValue("photon-cdn")!==t&&Uc.tracks.recordEvent("jetpack_wpa_module_toggle",{module:"photon-cdn",toggled:!1===t?"off":"on"})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.isModuleFound("photon"),t=this.props.isModuleFound("photon-cdn"),n=this.props.isModuleFound("lazy-images");if(!e&&!n&&!t)return null;var r,i=this.props.module("lazy-images"),a=this.props.getOptionValue("photon")||this.props.getOptionValue("photon-cdn"),s=this.props.getModuleOverride("photon"),c=this.props.getModuleOverride("photon-cdn"),l=e&&t&&("inactive"!==s||"inactive"!==c),u=(e||t)&&("inactive"!==s||"inactive"!==c);return!this.props.getOptionValue("photon")&&this.props.isSavingAnyOption("photon")?r=!this.props.getOptionValue("photon-cdn"):!this.props.getOptionValue("photon-cdn")&&this.props.isSavingAnyOption("photon-cdn")?r=!this.props.getOptionValue("photon"):this.props.getOptionValue("photon")&&this.props.isSavingAnyOption("photon")?(r=!this.props.getOptionValue("photon-cdn"),this.props.getOptionValue("photon-cdn")&&this.props.isSavingAnyOption("photon-cdn")&&(r=!0)):r=!(!this.props.getOptionValue("photon-cdn")||!this.props.isSavingAnyOption("photon-cdn"))&&!this.props.getOptionValue("photon"),o.a.createElement(Yu,Bc()({},this.props,{header:Us("Performance & speed"),hideButton:!0,module:"performance-speed"}),(e||t)&&o.a.createElement(ep,{hasChild:!0,support:{link:Vl("jetpack-support-site-accelerator")}},o.a.createElement("p",null,Us("Load pages faster by allowing Jetpack to optimize your images and serve your images and static files (like CSS and JavaScript) from our global network of servers.")),u&&o.a.createElement(_u,{checked:a,toggling:r,onChange:this.handleSiteAcceleratorChange,disabled:!l},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable site accelerator"))),o.a.createElement(Hl,null,e&&o.a.createElement(ku,{slug:"photon",disabled:this.props.isUnavailableInDevMode("photon"),activated:this.props.getOptionValue("photon"),toggling:this.props.isSavingAnyOption("photon"),toggleModule:this.toggleModule},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Speed up image load times"))),t&&o.a.createElement(ku,{slug:"photon-cdn",activated:this.props.getOptionValue("photon-cdn"),toggling:this.props.isSavingAnyOption("photon-cdn"),toggleModule:this.toggleModule},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Speed up static file load times"))))),n&&o.a.createElement(ep,{hasChild:!0,module:i,support:{link:Vl("jetpack-support-lazy-images")}},o.a.createElement("p",null,Us("Lazy-loading images will improve your site’s speed and create a smoother viewing experience. Images will load as visitors scroll down the screen, instead of all at once.")),o.a.createElement(ku,{slug:"lazy-images",disabled:this.props.isUnavailableInDevMode("lazy-images"),activated:this.props.getOptionValue("lazy-images"),toggling:this.props.isSavingAnyOption("lazy-images"),toggleModule:this.toggleModule},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable Lazy Loading for images")))))}}]),t}(s.Component)),bp=le((function(e){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)},getModuleOverride:function(t){return $a(e,t)}}}))(vp),yp=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={getModule:this.props.module,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isModuleFound:this.props.isModuleFound,getModuleOverride:this.props.getModuleOverride},t=["photon","videopress","lazy-images","photon-cdn","search"].some(this.props.isModuleFound);return(this.props.searchTerm||this.props.active)&&t?o.a.createElement("div",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:this.props.searchTerm?Us("Performance"):Us("Load pages faster, optimize images, and speed up your visitors’ experience."),className:"jp-settings-description"}),o.a.createElement(gp,e),o.a.createElement(bp,e),o.a.createElement(sp,e)):null}}]),t}(s.Component),_p=le((function(e){return{module:function(t){return qa(e,t)},isUnavailableInDevMode:function(t){return no(e,t)},isModuleFound:function(t){return ko(e,t)},getModuleOverride:function(t){return $a(e,t)}}}))(yp),wp=function(){return Uc.tracks.recordJetpackClick({target:"privacy-policy",feature:"privacy"})},kp=function(){return Uc.tracks.recordJetpackClick({target:"cookie-policy",feature:"privacy"})},Ep=function(){return Uc.tracks.recordJetpackClick({target:"privacy-center",feature:"privacy"})},Cp=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"isPrivacyFound",(function(){return!n.props.searchTerm||[Us("privacy",{context:"Search term."}),Us("tracks",{context:"Search term."}),Us("data",{context:"Search term."}),Us("gdpr",{context:"Search term."}),Us("tos",{context:"Search term."}),Us("terms of service",{context:"Search term."})].join(" ").toLowerCase().indexOf(n.props.searchTerm.toLowerCase())>-1})),ha()(Os()(n),"togglePrivacy",(function(){var e=n.props.trackingSettings.tracks_opt_out;n.props.setTrackingSettings(!e)})),n}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.fetchTrackingSettings()}},{key:"render",value:function(){var e=this.props,t=e.searchTerm,n=e.active;return t||n?this.isPrivacyFound()&&o.a.createElement("div",null,o.a.createElement(Yu,Bc()({},this.props,{header:Us("Privacy Settings",{context:"Settings header"}),hideButton:!0}),o.a.createElement(ep,{hasChild:!0},o.a.createElement("p",null,Us("We are committed to your privacy and security. ")),o.a.createElement("p",null,o.a.createElement(_u,{compact:!0,checked:!this.props.trackingSettings.tracks_opt_out,disabled:this.props.isFetchingTrackingSettings||this.props.isUpdatingTrackingSettings,onChange:this.togglePrivacy,id:"privacy-settings"},Us("Share information with our analytics tool about your use of services while logged in to your WordPress.com account. {{cookiePolicyLink}}Learn more{{/cookiePolicyLink}}.",{components:{cookiePolicyLink:o.a.createElement(Xu,{href:Vl("a8c-cookies"),onClick:kp,target:"_blank",rel:"noopener noreferrer"})}}))),o.a.createElement("p",null,Us("This information helps us improve our products, make marketing to you more relevant, personalize your WordPress.com experience, and more as detailed in our {{pp}}privacy policy{{/pp}}.",{components:{pp:o.a.createElement(Xu,{href:Vl("a8c-privacy"),onClick:wp,target:"_blank",rel:"noopener noreferrer"})}})),o.a.createElement("p",null,Us("We use other tracking tools, including some from third parties. {{cookiePolicyLink}}Read about these{{/cookiePolicyLink}} and how to control them.",{components:{cookiePolicyLink:o.a.createElement(Xu,{href:Vl("a8c-cookies"),onClick:kp,target:"_blank",rel:"noopener noreferrer"})}})),o.a.createElement("p",null,Us("For more information on how specific Jetpack features use data and track activity, please refer to our {{privacyCenterLink}}Privacy Center{{/privacyCenterLink}}.",{components:{privacyCenterLink:o.a.createElement(Xu,{href:Vl("jetpack-support-privacy"),onClick:Ep,target:"_blank",rel:"noopener noreferrer"})}}))))):null}}]),t}(o.a.Component);ha()(Cp,"displayName","PrivacySettings"),ha()(Cp,"propTypes",{searchTerm:u.a.string,active:u.a.bool,toggleTracking:u.a.func,getOptionValue:u.a.func,isSavingAnyOption:u.a.func}),ha()(Cp,"defaultProps",{searchTerm:"",active:!1});var Sp=le((function(e){return{settings:So(e),trackingSettings:mc(e),isUpdatingTrackingSettings:vc(e),isFetchingTrackingSettings:gc(e)}}),(function(e){return{setTrackingSettings:function(t){var n;Uc.tracks.setOptOut(t),e((n={tracks_opt_out:t},function(e){var t={progress:Us("Updating privacy settings…"),success:Us("Updated privacy settings."),error:function(e){return Us("Error updating privacy settings. %(error)s",{args:{error:e.message||e.code||e.name||e}})}};return e(Xa("tracking-settings-update")),e(Xa("tracking-settings-update-success")),e(Qa("is-info",t.progress,{id:"tracking-settings-update"})),e({type:cn,updatedSettings:n}),Da.updateUserTrackingSettings(n).then((function(r){e({type:un,updatedSettings:n,success:r}),e(Xa("tracking-settings-update")),e(Xa("tracking-settings-update-success")),e(Qa("is-success",t.success,{id:"tracking-settings-update-success",duration:2e3}))})).catch((function(r){e({type:ln,updatedSettings:n,success:!1,error:r}),e(Xa("tracking-settings-update")),e(Xa("tracking-settings-update-success")),e(Qa("is-error",t.error(r),{id:"tracking-settings-update"}))}))}))},fetchTrackingSettings:function(){return e((function(e){return e({type:an}),Da.fetchUserTrackingSettings().then((function(t){return e({type:on,settings:t}),t})).catch((function(t){e({type:sn,error:t})}))}))}}}))(Cu(Cp)),Mp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"handleBannerClick",(function(e){return function(){return n.props.updateOptions(ha()({},e,!0))}})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this;if(!this.props.canManageModules)return null;if(this.props.searchTerm.length<3)return null;var t=["contact-form","enhanced-distribution","json-api","notes"],n=this.props.modules,r=[];return Object(Dt.forEach)(n,(function(n,i){if(e.props.isModuleFound(i)&&Object(Dt.includes)(t,i)){if(e.props.isDevMode&&e.props.isUnavailableInDevMode(n.module))return r.push(o.a.createElement(xp,{key:i,moduleData:n,devMode:!0}));e.props.getOptionValue(n.module)?r.push(o.a.createElement(xp,{key:i,moduleData:n})):r.push(o.a.createElement(Hu,{className:"jp-searchable-banner",key:i,callToAction:Us("Activate"),description:n.description,href:"javascript:void( 0 )",icon:"cog",onClick:e.handleBannerClick(n.module),title:n.name}))}})),o.a.createElement("div",null,r)}}]),t}(s.Component));Mp.propTypes={searchTerm:u.a.string},Mp.defaultProps={searchTerm:""};var xp=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.moduleData,t=this.props.devMode;return o.a.createElement(Yu,{module:e.module,header:e.name,action:e.module,hideButton:!0},o.a.createElement(ep,{disableInDevMode:t,module:{module:e.module},support:{link:e.learn_more_button}},e.description))}}]),t}(s.Component),Ap=le((function(e){return{modules:Ha(e),isModuleFound:function(t){return ko(e,t)},canManageModules:Ei(e),isUnavailableInDevMode:function(t){return no(e,t)},isDevMode:Qs(e)}}))(Mp),jp=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement(Yu,{header:Us("Backups and security scanning",{context:"Settings header"}),hideButton:!0,action:"scan"},o.a.createElement(ep,{disableInDevMode:!0,module:{module:"backups"},support:{text:Us("Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error."),link:Vl("vaultpress-help-get-to-know")}},Us("Checking site status…")))}}]),t}(s.Component),Op=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"getCardText",(function(){if(n.props.isDevMode)return Us("Unavailable in Dev Mode.");var e=n.getRewindMessage(),t=e.title,r=e.icon,i=e.description,a=e.url;return o.a.createElement(Hu,{title:t,icon:r,feature:"rewind",description:i,className:"is-upgrade-premium jp-banner__no-border",href:a})})),n}return Ma()(t,e),As()(t,[{key:"getRewindMessage",value:function(){var e=this.props,t=e.siteRawUrl;switch(e.rewindState){case"provisioning":return{title:Us("Provisioning"),icon:"info",description:Us("Backups and Scan are being configured for your site."),url:""};case"awaiting_credentials":return{title:Us("Awaiting credentials"),icon:"notice",description:Us("You need to enter your server credentials to finish configuring Backups and Scan."),url:Vl("calypso-settings-security",{site:t})};case"active":return{title:Us("Active"),icon:"checkmark-circle",description:Us("Your site is being backed up in real time and regularly scanned for security threats."),url:Vl("calypso-activity-log",{site:t})};default:return{title:Us("Oops!"),icon:"info",description:Us("The Jetpack Backup and Scan status could not be retrieved at this time."),url:""}}}},{key:"render",value:function(){return o.a.createElement(Yu,Bc()({feature:"rewind"},this.props,{header:Us("Backups and security scanning",{context:"Settings header"}),action:"rewind",hideButton:!0}),this.getCardText())}}]),t}(s.Component);ha()(Op,"propTypes",{isDevMode:u.a.bool,siteRawUrl:u.a.string,rewindState:u.a.string}),ha()(Op,"defaultProps",{isDevMode:!1,siteRawUrl:"",rewindState:""});var Np=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"toggleModule",(function(e,t){n.props.updateFormStateOptionValue(e,!t)})),ha()(Os()(n),"trackConfigureClick",(function(){Uc.tracks.recordJetpackClick("configure-scan")})),n}return Ma()(t,e),As()(t,[{key:"getCardText",value:function(){var e=Object(Dt.get)(this.props.vaultPressData,["data","features","backups"],!1),t=Object(Dt.get)(this.props.vaultPressData,["data","features","security"],!1),n=Lo(this.props.sitePlan.product_slug),r="";if(this.props.isDevMode)return Us("Unavailable in Dev Mode.");if(e&&t){var i=this.props.hasThreats;return i?o.a.createElement("div",null,o.a.createElement("strong",null,Us("Uh oh, %(number)s threat found.","Uh oh, %(number)s threats found.",{count:i,args:{number:Rs(i)}})),o.a.createElement("br",null),o.a.createElement("br",null),Us("{{a}}View details{{/a}}",{components:{a:o.a.createElement("a",{href:Vl("vaultpress-dashboard")})}}),o.a.createElement("br",null),Us("{{a}}Contact Support{{/a}}",{components:{a:o.a.createElement("a",{href:Vl("jetpack-support")})}})):Us("Your site is backed up and threat-free.")}if(e&&Object(Dt.includes)(["is-free-plan","is-personal-plan","is-daily-backup-plan","is-realtime-backup-plan"],n))return Us("Your site is backed up.");switch(n){case"is-personal-plan":r=Us("You have paid for backups but they're not yet active."),r+=" "+Us('Click "Set Up" to finish installation.');break;case"is-premium-plan":case"is-business-plan":r=Us("You have paid for backups and security scanning but they’re not yet active."),r+=" "+Us('Click "Set Up" to finish installation.')}return r}},{key:"render",value:function(){if(!this.props.showBackups)return null;var e=Object(Dt.get)(this.props.vaultPressData,["data","features","security"],!1),t=Object(Dt.get)(this.props.rewindStatus,["state"],!1),n=!1!==t,r="N/A"!==this.props.vaultPressData&&!1!==Object(Dt.get)(this.props.vaultPressData,["data"],!1);return n||!this.props.vaultPressActive||r?Object(Dt.includes)(["provisioning","awaiting_credentials","active"],t)?o.a.createElement(Op,Bc()({},this.props,{rewindState:t})):o.a.createElement(Yu,Bc()({feature:"security-scanning-jetpack"},this.props,{header:Us("Backups and security scanning",{context:"Settings header"}),action:"scan",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:"backups"},support:{text:Us("Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error."),link:Vl("vaultpress-help-get-to-know")}},this.getCardText()),!this.props.isUnavailableInDevMode("backups")&&e&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,target:"_blank",href:Vl("vaultpress-dashboard")},Us("Configure your Security Scans"))):o.a.createElement(jp,null)}}]),t}(s.Component)),Tp=le((function(e){return{sitePlan:qo(e),vaultPressData:oa(e),hasThreats:ca(e),vaultPressActive:Ga(e,"vaultpress"),showBackups:qi(e)}}))(Np),Pp=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=Object(Dt.assign)({},this.props,{className:Mc()(this.props.className,"is-compact")});return o.a.createElement(Dl,e,this.props.children)}}]),t}(o.a.Component);ha()(Pp,"displayName","CompactCard");n(367);var Ip=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{expanded:n.props.expanded}),ha()(Os()(n),"onClick",(function(){n.props.children&&n.setState({expanded:!n.state.expanded}),n.props.onClick&&n.props.onClick(),n.state.expanded?n.props.onClose(n.props.cardKey):n.props.onOpen(n.props.cardKey)})),ha()(Os()(n),"getClickAction",(function(){if(!n.props.disabled)return n.onClick})),ha()(Os()(n),"getActionButton",(function(){return n.state.expanded&&n.props.actionButtonExpanded||n.props.actionButton})),ha()(Os()(n),"renderActionButton",(function(){var e=n.props.clickableHeader?null:n.getClickAction();if(n.props.actionButton)return o.a.createElement("button",{className:"dops-foldable-card__action",onClick:e},n.getActionButton());if(n.props.children){return o.a.createElement("button",{type:"button",disabled:n.props.disabled,className:"dops-foldable-card__action dops-foldable-card__expand",onClick:e},o.a.createElement("span",{className:"screen-reader-text"},"More"),o.a.createElement(ml,{icon:n.props.icon,size:24}))}})),ha()(Os()(n),"renderContent",(function(){return o.a.createElement("div",{className:"dops-foldable-card__content"},n.props.children)})),ha()(Os()(n),"renderHeader",(function(){var e=n.props.summary?o.a.createElement("span",{className:"dops-foldable-card__summary"},n.props.summary," "):null,t=n.props.expandedSummary?o.a.createElement("span",{className:"dops-foldable-card__summary_expanded"},n.props.expandedSummary," "):null,r=n.props.header?o.a.createElement("div",{className:"dops-foldable-card__header-text"},n.props.header):null,i=n.props.subheader?o.a.createElement("div",{className:"dops-foldable-card__subheader"},n.props.subheader):null,a={role:"button",tabIndex:0,onClick:n.getClickAction(),onKeyDown:Tu(n.getClickAction())},s=Mc()("dops-foldable-card__header",{"is-clickable":!!n.props.clickableHeader,"has-border":!!n.props.summary}),c=Mc()("dops-foldable-card__header-text",{"is-clickable":!!n.props.clickableHeaderText});return o.a.createElement("div",Bc()({className:s},n.props.clickableHeader?a:{}),o.a.createElement("span",{className:"dops-foldable-card__main"},o.a.createElement("div",Bc()({className:c},n.props.clickableHeaderText?a:{}),r,i)),o.a.createElement("span",{className:"dops-foldable-card__secondary"},e,t,n.renderActionButton()))})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.compact?Pp:Dl,t=Mc()("dops-foldable-card",this.props.className,{"is-disabled":!!this.props.disabled,"is-expanded":!!this.state.expanded,"has-expanded-summary":!!this.props.expandedSummary});return o.a.createElement(e,{className:t},this.renderHeader(),this.state.expanded&&this.renderContent())}}]),t}(o.a.Component);ha()(Ip,"propTypes",{actionButton:u.a.element,actionButtonExpanded:u.a.element,cardKey:u.a.string,compact:u.a.bool,disabled:u.a.bool,expandedSummary:u.a.oneOfType([u.a.string,u.a.element]),expanded:u.a.bool,icon:u.a.string,onClick:u.a.func,onClose:u.a.func,onOpen:u.a.func,summary:u.a.oneOfType([u.a.string,u.a.element]),clickableHeader:u.a.bool,clickableHeaderText:u.a.bool}),ha()(Ip,"defaultProps",{onOpen:Dt.noop,onClose:Dt.noop,cardKey:"",icon:"chevron-down",isExpanded:!1,clickableHeader:!1,clickableHeaderText:!1});var Dp=Ip,Rp=(n(368),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=Mc()({"form-input-validation":!0,"is-warning":this.props.isWarning,"is-error":this.props.isError}),t=this.props.isError||this.props.isWarning?"notice-outline":"checkmark";return o.a.createElement("div",{className:e},o.a.createElement("span",null,o.a.createElement(ml,{size:24,icon:this.props.icon?this.props.icon:t})," ",this.props.text))}}]),t}(o.a.Component));ha()(Rp,"displayName","FormInputValidation"),ha()(Rp,"propTypes",{isError:u.a.bool,isWarning:u.a.bool,text:u.a.node,icon:u.a.string}),ha()(Rp,"defaultProps",{isError:!1});var Up=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{apiKey:n.props.getOptionValue("wordpress_api_key"),delayKeyCheck:!1,currentEvent:{}}),ha()(Os()(n),"keyChanged",!1),ha()(Os()(n),"checkApiKeyTyped",(function(e){0<e.currentTarget.value.length&&n.props.checkAkismetKey(e.currentTarget.value),n.keyChanged=!0,n.setState({delayKeyCheck:!1})})),ha()(Os()(n),"updateText",(function(e){var t=Object(Dt.assign)({},e);t.currentTarget.value=Object(Dt.trim)(t.currentTarget.value),n.setState({apiKey:t.currentTarget.value,delayKeyCheck:!0,currentEvent:t},n.debouncedCheckApiKeyTyped(t))})),ha()(Os()(n),"trackOpenCard",(function(){Uc.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"anti-spam"})})),n}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.debouncedCheckApiKeyTyped=Object(Dt.debounce)(this.checkApiKeyTyped,500)}},{key:"componentDidUpdate",value:function(){!this.props.isCheckingAkismetKey&&this.props.isAkismetKeyValid&&this.keyChanged&&!Object(Dt.isEmpty)(this.state.currentEvent)&&(this.keyChanged=!1,this.props.onOptionChange(this.state.currentEvent))}},{key:"render",value:function(){var e={name:"wordpress_api_key",value:this.state.apiKey,disabled:this.props.isSavingAnyOption("wordpress_api_key"),onChange:this.updateText},t="",n=Us("Checking your spam protection…"),r=!0;return null===this.props.isAkismetKeyValid?(e.value=Us("Fetching key…"),e.disabled=!0,r=!1):""===this.state.apiKey?(e.value="",n=Us("Your site needs an Antispam key.")):this.state.delayKeyCheck||this.props.isCheckingAkismetKey?this.props.isCheckingAkismetKey&&(t=o.a.createElement("div",{className:"form-input-validation is-warning"},o.a.createElement("span",null,o.a.createElement(ml,{size:24,icon:"sync"}),Us("Checking key…"))),r=!1):!1===this.props.isAkismetKeyValid?(t=o.a.createElement(Rp,{isError:!0,text:Us("There's a problem with your Antispam API key. {{a}}Learn more{{/a}}.",{components:{a:o.a.createElement("a",{href:"https://docs.akismet.com/getting-started/api-key/"})}})}),e.isError=!0,n=Us("Your site is not protected from spam.")):(t=o.a.createElement(Rp,{text:Us("Your Antispam key is valid.")}),e.isValid=!0,n=Us("Your site is protected from spam."),r=!1),o.a.createElement(Yu,Bc()({},this.props,{header:Us("Anti-spam",{context:"Settings header"}),saveDisabled:this.props.isSavingAnyOption("wordpress_api_key"),feature:"spam-akismet-plus"}),o.a.createElement(Dp,{onOpen:this.trackOpenCard,header:n},o.a.createElement(ep,{support:{text:Us("Removes spam from comments and contact forms."),link:"https://akismet.com/jetpack/"}},o.a.createElement(Hl,null,o.a.createElement(ql,null,o.a.createElement("span",{className:"jp-form-label-wide"},Us("Your API key")),o.a.createElement(Bl,e),t),r&&o.a.createElement("p",{className:"jp-form-setting-explanation"},Us("If you don't already have an API key, then {{a}}get your API key here{{/a}}, and you'll be guided through the process of getting one.",{components:{a:o.a.createElement("a",{href:"https://akismet.com/wordpress/"})}}))))))}}]),t}(s.Component)),Lp=le((function(e){return{isAkismetKeyValid:ra(e),isCheckingAkismetKey:na(e)}}),(function(e){return{checkAkismetKey:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e(ju(t))}}}))(Up),Fp=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"getVaultPressContent",(function(){return o.a.createElement(ep,{module:{module:"backups"},support:{text:Us("Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error."),link:Vl("jetpack-support-backup")}},Us("Your site is backed up."))})),ha()(Os()(n),"getRewindBanner",(function(){var e=n.getRewindMessage(),t=e.title,r=e.icon,i=e.description,a=e.url;return o.a.createElement(Hu,{title:t,icon:r,feature:"rewind",description:i,className:"is-upgrade-premium jp-banner__no-border",href:a})})),n}return Ma()(t,e),As()(t,[{key:"getRewindMessage",value:function(){var e=this.props,t=e.siteRawUrl,n=e.rewindStatus;switch(Object(Dt.get)(n,"state",!1)){case"provisioning":return{title:Us("Provisioning"),icon:"info",description:Us("Jetpack Backup is being configured for your site."),url:""};case"awaiting_credentials":return{title:Us("Awaiting credentials"),icon:"notice",description:Us("You need to enter your server credentials to finish configuring Jetpack Backup."),url:Vl("calypso-settings-security",{site:t})};case"active":return{title:Us("Active"),icon:"checkmark-circle",description:Us("Your site is being backed up."),url:Vl("calypso-activity-log",{site:t})};default:return{title:Us("Oops!"),icon:"info",description:Us("The Jetpack Backup status could not be retrieved at this time."),url:""}}}},{key:"render",value:function(){var e=this.props,t=e.rewindStatus,n=e.vaultPressData,r=Object(Dt.get)(t,"state",!1),i=Object(Dt.get)(n,["data","features","backups"],!1);return!1!==r||i?o.a.createElement(Yu,Bc()({feature:"site-backups-jetpack"},this.props,{header:Us("Jetpack Backup",{context:"Settings header"}),hideButton:!0}),"unavailable"===r?this.getVaultPressContent():this.getRewindBanner()):o.a.createElement(Yu,{header:Us("Jetpack Backup",{context:"Settings header"}),hideButton:!0,action:"site-backups-jetpack"},o.a.createElement(ep,{module:{module:"backups"},support:{text:Us("Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error."),link:Vl("jetpack-support-backup")}},Us("Checking site status…")))}}]),t}(s.Component);ha()(Fp,"propTypes",{siteRawUrl:u.a.string,rewindState:u.a.string}),ha()(Fp,"defaultProps",{siteRawUrl:"",rewindState:""});var zp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackOpenCard",(function(){Uc.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"manage-plugins"})})),ha()(Os()(n),"configLink",(function(){return o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:n.trackClickConfigure,target:"_blank",rel:"noopener noreferrer",href:Vl("calypso-plugins-manage",{site:n.props.siteRawUrl})},Us("Choose which plugins to auto-update"))})),n}return Ma()(t,e),As()(t,[{key:"trackClickConfigure",value:function(){Uc.tracks.recordJetpackClick({target:"configure-plugins",page:"plugins-manage"})}},{key:"render",value:function(){return o.a.createElement(Yu,Bc()({},this.props,{module:"manage",header:Us("Auto-update plugins",{context:"Settings header"}),hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:this.props.getModule("manage")},o.a.createElement("div",null,Us("With Jetpack you can choose to have your plugins auto-updated with each new plugin release. You’ll get the latest security and bug fixes right away, ensuring your site stays secure."))),this.configLink())}}]),t}(s.Component)),Bp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackConfigureClick",(function(){Uc.tracks.recordJetpackClick("configure-monitor")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.getOptionValue("monitor"),t=this.props.isUnavailableInDevMode("monitor");return o.a.createElement(Yu,Bc()({},this.props,{hideButton:!0,module:"monitor",header:Us("Downtime monitoring",{context:"Settings header"})}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("monitor"),support:{text:Us("Jetpack will continuously monitor your site, and alert you the moment downtime is detected."),link:Vl("jetpack-support-monitor")}},o.a.createElement(ku,{slug:"monitor",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("monitor"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Get alerts if your site goes offline. We’ll let you know when it’s back up, too.")))),o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,target:"_blank",href:Vl("calypso-settings-security",{site:this.props.siteRawUrl})},Us("Configure your notification settings")))}}]),t}(s.Component)),Vp=(n(369),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("textarea",Bc()({},Object(Dt.omit)(this.props,"className"),{className:Mc()(this.props.className,"dops-textarea")}),this.props.children)}}]),t}(o.a.Component));ha()(Vp,"displayName","Textarea");var Hp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{whitelist:n.props.getOptionValue("jetpack_protect_global_whitelist")?n.props.getOptionValue("jetpack_protect_global_whitelist").local:""}),ha()(Os()(n),"currentIpIsWhitelisted",(function(){return!!Object(Dt.includes)(n.state.whitelist,n.props.currentIp)})),ha()(Os()(n),"updateText",(function(e){n.currentIpIsWhitelisted(),n.setState({whitelist:e.target.value}),n.props.onOptionChange(e)})),ha()(Os()(n),"addToWhitelist",(function(){var e=n.state.whitelist+(0>=n.state.whitelist.length?"":"\n")+n.props.currentIp;n.props.updateFormStateOptionValue("jetpack_protect_global_whitelist",e),n.setState({whitelist:e}),Uc.tracks.recordJetpackClick({target:"add-to-whitelist",feature:"protect"})})),ha()(Os()(n),"trackOpenCard",(function(){Uc.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"protect"})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.getOptionValue("protect"),t=this.props.isUnavailableInDevMode("protect"),n=o.a.createElement(ku,{slug:"protect",compact:!0,disabled:t,activated:e,toggling:this.props.isSavingAnyOption("protect"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},this.props.getModule("protect").description));return o.a.createElement(Yu,Bc()({},this.props,{module:"protect",header:Us("Brute force attack protection",{context:"Settings header"}),saveDisabled:this.props.isSavingAnyOption("jetpack_protect_global_whitelist")}),o.a.createElement(Dp,{onOpen:this.trackOpenCard,header:n,className:Mc()({"jp-foldable-settings-disable":t})},o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("protect"),support:{text:Us("Protects your site from traditional and distributed brute force login attacks."),link:Vl("jetpack-support-protect")}},o.a.createElement(Hl,null,this.props.currentIp&&o.a.createElement("div",null,o.a.createElement("div",{className:"jp-form-label-wide"},Us("Your current IP: %(ip)s",{args:{ip:this.props.currentIp}})),o.a.createElement(xc,{disabled:!e||t||this.currentIpIsWhitelisted()||this.props.isSavingAnyOption(["protect","jetpack_protect_global_whitelist"]),onClick:this.addToWhitelist},Us("Add to whitelist"))),o.a.createElement(ql,null,o.a.createElement(Kl,null,Us("Whitelisted IP addresses")),o.a.createElement(Vp,{disabled:!e||t||this.props.isSavingAnyOption(["protect","jetpack_protect_global_whitelist"]),name:"jetpack_protect_global_whitelist",placeholder:"Example: 12.12.12.1-12.12.12.100",onChange:this.updateText,value:this.state.whitelist})),o.a.createElement("span",{className:"jp-form-setting-explanation"},Us("You may whitelist an IP address or series of addresses preventing them from ever being blocked by Jetpack. IPv4 and IPv6 are acceptable. To specify a range, enter the low value and high value separated by a dash. Example: 12.12.12.1-12.12.12.100",{components:{br:o.a.createElement("br",null)}}))))))}}]),t}(s.Component)),qp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{jetpack_sso_match_by_email:n.props.getOptionValue("jetpack_sso_match_by_email","sso"),jetpack_sso_require_two_step:n.props.getOptionValue("jetpack_sso_require_two_step","sso")}),ha()(Os()(n),"handleTwoStepToggleChange",(function(){n.updateOptions("jetpack_sso_require_two_step")})),ha()(Os()(n),"handleMatchByEmailToggleChange",(function(){n.updateOptions("jetpack_sso_match_by_email")})),ha()(Os()(n),"updateOptions",(function(e){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption("sso",e))})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.getOptionValue("sso"),t=this.props.isUnavailableInDevMode("sso");return o.a.createElement(Yu,Bc()({},this.props,{hideButton:!0,module:"sso",header:Us("WordPress.com login",{context:"Settings header, noun."})}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("sso"),support:{text:Us("Allows registered users to log in to your site with their WordPress.com accounts."),link:Vl("jetpack-support-sso")}},o.a.createElement("p",null,Us("Add an extra layer of security to your website by enabling WordPress.com login and secure authentication. If you have multiple sites with this option enabled, you will be able to log in to every one of them with the same credentials.")),o.a.createElement(ku,{slug:"sso",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("sso"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},this.props.getModule("sso").description)),o.a.createElement(Hl,null,o.a.createElement(_u,{checked:this.state.jetpack_sso_match_by_email,disabled:!e||t||this.props.isSavingAnyOption(["sso","jetpack_sso_match_by_email"]),onChange:this.handleMatchByEmailToggleChange},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Match accounts using email addresses"))),o.a.createElement(_u,{checked:this.state.jetpack_sso_require_two_step,disabled:!e||t||this.props.isSavingAnyOption(["sso","jetpack_sso_require_two_step"]),onChange:this.handleTwoStepToggleChange},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Require accounts to use WordPress.com Two-Step Authentication"))))))}}]),t}(s.Component)),Kp=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"isAkismetFound",(function(){if(!n.props.isPluginActive("akismet/akismet.php"))return!1;if(n.props.searchTerm){var e=n.props.isPluginInstalled("akismet/akismet.php");return["akismet","antispam","spam","comments",e.Description,e.PluginURI].join(" ").toLowerCase().indexOf(n.props.searchTerm.toLowerCase())>-1}return!0})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,rewindStatus:this.props.rewindStatus,siteRawUrl:this.props.siteRawUrl},t=this.props.isModuleFound("protect"),n=this.props.isModuleFound("sso"),r=this.isAkismetFound(),i="active"===Object(Dt.get)(this.props.rewindStatus,["state"],!1),a=this.props.isModuleFound("vaultpress")||i,s=this.props.isModuleFound("monitor"),c=this.props.searchTerm;if(!c&&!this.props.active)return null;if(!(n||t||r||a||s))return null;var l=Lo(Object(Dt.get)(this.props.sitePlan,["product_slug"])),u=this.props.activeSitePurchases.map((function(e){return Lo(e.product_slug)})),p="is-personal-plan"===l,d="is-free-plan"===l&&(u.includes("is-daily-backup-plan")||u.includes("is-realtime-backup-plan")),h=p||d?o.a.createElement(Fp,Bc()({},e,{vaultPressData:this.props.vaultPressData})):o.a.createElement(Tp,e);return o.a.createElement("div",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:Us(c?"Security":"Your site is protected by Jetpack. You’ll be notified if anything needs attention."),className:"jp-settings-description"}),a&&h,s&&o.a.createElement(Bp,e),r&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Lp,e),o.a.createElement(Uu,null)),!c&&o.a.createElement(zp,e),t&&o.a.createElement(Hp,e),n&&o.a.createElement(qp,e))}}]),t}(s.Component);ha()(Kp,"displayName","SecuritySettings");var Jp,Wp=le((function(e){return{activeSitePurchases:$o(e),module:function(t){return qa(e,t)},settings:So(e),sitePlan:qo(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},isModuleFound:function(t){return ko(e,t)},isPluginActive:function(t){return va(e,t)},isPluginInstalled:function(t){return ba(e,t)},vaultPressData:oa(e)}}))(Kp),Gp=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"trackClickConfigure",value:function(){Uc.tracks.recordJetpackClick({target:"configure-publicize",page:"sharing"})}},{key:"render",value:function(){var e=this,t=this.props.isUnavailableInDevMode("publicize"),n=this.props.isLinked,r=this.props.connectUrl,i=this.props.siteRawUrl,a=this.props.getOptionValue("publicize"),s=this.props.userCanManageModules;return s||a?o.a.createElement(Yu,Bc()({},this.props,{header:Us("Publicize connections",{context:"Settings header"}),module:"publicize",hideButton:!0}),s&&o.a.createElement(ep,{disableInDevMode:!0,module:{module:"publicize"},support:{text:Us("Allows you to automatically share your newest content on social media sites, including Facebook and Twitter."),link:Vl("jetpack-support-publicize")}},o.a.createElement("p",null,Us("Connect your website to the social media networks you use and share your content across all your social accounts with a single click. When you publish a post, it will appear on all connected accounts.")),o.a.createElement(ku,{slug:"publicize",disabled:t,activated:a,toggling:this.props.isSavingAnyOption("publicize"),toggleModule:this.props.toggleModuleNow},Us("Automatically share your posts to social networks"))),a&&function(){if(!t)return n?o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackClickConfigure,target:"_blank",rel:"noopener noreferrer",href:Vl("calypso-marketing-connections",{site:i})},Us("Connect your social media accounts")):o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",target:"_blank",rel:"noopener noreferrer",href:"".concat(r,"&from=unlinked-user-connect-publicize")},Us("Create a Jetpack account to use this feature"))}()):null}}]),t}(s.Component)),Yp=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"trackClickConfigure",value:function(){Uc.tracks.recordJetpackClick({target:"configure-sharing",page:"sharing"})}},{key:"render",value:function(){var e=this,t=this.props.isLinked,n=this.props.connectUrl,r=this.props.siteRawUrl,i=this.props.siteAdminUrl,a=this.props.isDevMode,s=this.props.getOptionValue("sharedaddy");return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Sharing buttons",{context:"Settings header"}),module:"sharing",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:"sharing"},support:{text:Us("You can customize the sharing buttons and choose which services to display."),link:Vl("jetpack-support-sharing")}},o.a.createElement("p",null,Us("Add sharing buttons so visitors can share your posts and pages on social media with a couple of quick clicks.")),o.a.createElement(ku,{slug:"sharedaddy",activated:s,toggling:this.props.isSavingAnyOption("sharedaddy"),toggleModule:this.props.toggleModuleNow},Us("Add sharing buttons to your posts and pages"))),s&&(a?o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",href:i+"options-general.php?page=sharing"},Us("Configure your sharing buttons")):t?o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:e.trackClickConfigure,target:"_blank",rel:"noopener noreferrer",href:Vl("calypso-marketing-sharing-buttons",{site:r})},Us("Configure your sharing buttons")):o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",target:"_blank",rel:"noopener noreferrer",href:"".concat(n,"&from=unlinked-user-connect-sharing")},Us("Create a Jetpack account to use this feature"))))}}]),t}(s.Component)),$p=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.isUnavailableInDevMode("likes"),t=this.props.getOptionValue("likes");return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Like buttons",{context:"Settings header"}),module:"likes",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:"likes"},support:{text:Us("Adds like buttons to your content so that visitors can show their appreciation or enjoyment."),link:Vl("jetpack-support-likes")}},o.a.createElement("p",null,Us("When visitors enjoy your content, let them show it with a Like.")),o.a.createElement(ku,{slug:"likes",disabled:e,activated:t,toggling:this.props.isSavingAnyOption("likes"),toggleModule:this.props.toggleModuleNow},Us("Add Like buttons to your posts and pages"))))}}]),t}(s.Component)),Xp=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isLinked:this.props.isLinked,connectUrl:this.props.connectUrl,siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,userCanManageModules:this.props.userCanManageModules},t=this.props.isModuleFound("publicize"),n=this.props.isModuleFound("sharedaddy"),r=this.props.isModuleFound("likes");return(this.props.searchTerm||this.props.active)&&(t||n||r)?o.a.createElement("div",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:this.props.searchTerm?Us("Sharing"):Us("Share your content to social media, reaching new audiences and increasing engagement."),className:"jp-settings-description"}),t&&o.a.createElement(Gp,e),n&&o.a.createElement(Yp,e),r&&o.a.createElement($p,e)):null}}]),t}(s.Component),Qp=le((function(e){return{module:function(t){return qa(e,t)},settings:So(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},isModuleFound:function(t){return ko(e,t)},isLinked:Xs(e),connectUrl:Js(e),siteRawUrl:vi(e),siteAdminUrl:bi(e),userCanManageModules:Ei(e)}}))(Xp),Zp=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackConfigureClick",(function(){Uc.tracks.recordJetpackClick("configure-seo")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=Lo(this.props.sitePlan.product_slug);return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Search engine optimization",{context:"Settings header"}),feature:"seo-tools-jetpack",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:"seo-tools"},support:{text:Us("Allows you to optimize your site and its content for better results in search engines."),link:Vl("jetpack-support-seo-tools")}},o.a.createElement("span",null,Us("Take control of the way search engines represent your site. With Jetpack’s SEO tools you can preview how your content will look on popular search engines and change items like your site name and tagline in seconds."))),!this.props.isUnavailableInDevMode("seo-tools")&&("is-business-plan"===e||"is-premium-plan"===e)&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},Us("Customize your SEO settings")))}}]),t}(o.a.Component),ed=le((function(e){return{sitePlan:qo(e)}}))(Cu(Zp)),td=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"trackConfigureClick",value:function(){Uc.tracks.recordJetpackClick("configure-ga")}},{key:"render",value:function(){return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Google Analytics",{context:"Settings header"}),feature:"google-analytics-jetpack",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:"google-analytics"},support:{text:Us("Integrates your WordPress site with Google Analytics, a platform that offers insights into your traffic, visitors, and conversions."),link:Vl("jetpack-support-google-analytics")}},Us("Google Analytics is a free service that complements our {{a}}built-in stats{{/a}} with different insights into your traffic. WordPress.com stats and Google Analytics use different methods to identify and track activity on your site, so they will normally show slightly different totals for your visits, views, etc.",{components:{a:o.a.createElement("a",{href:Vl("calypso-stats-day",{site:this.props.siteRawUrl})})}})),!this.props.isUnavailableInDevMode("google-analytics")&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},Us("Configure your Google Analytics settings")))}}]),t}(s.Component)),nd=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"updateOptions",(function(e){n.props.updateFormStateModuleOption("wordads",e)})),ha()(Os()(n),"trackConfigureClick",(function(){Uc.tracks.recordJetpackClick("view-earnings")})),ha()(Os()(n),"trackConfigureWidgetClick",(function(){Uc.tracks.recordJetpackClick("place_ad_widget")})),ha()(Os()(n),"handleChange",(function(e){return function(){return n.updateOptions(e)}})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.getOptionValue("wordads"),t=this.props.isUnavailableInDevMode("wordads"),n=this.props.getOptionValue("enable_header_ad","wordads"),r=this.props.getOptionValue("wordads_second_belowpost","wordads"),i=this.props.getOptionValue("wordads_display_front_page","wordads"),a=this.props.getOptionValue("wordads_display_post","wordads"),s=this.props.getOptionValue("wordads_display_page","wordads"),c=this.props.getOptionValue("wordads_display_archive","wordads"),l=this.props.getOptionValue("wordads_custom_adstxt","wordads"),u=-1!==this.props.siteRawUrl.indexOf("::");return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Ads",{context:"Ads header"}),feature:"wordads-jetpack",saveDisabled:this.props.isSavingAnyOption(["wordads_custom_adstxt"])}),o.a.createElement(ep,{disableInDevMode:!0,hasChild:!0,module:{module:"wordads"},support:{text:Us("Displays high-quality ads on your site that allow you to earn income."),link:Vl("jetpack-support-ads")}},o.a.createElement("p",null,Us("Show ads on the first article on your home page or at the end of every page and post. Place additional ads at the top of your site and to any widget area to increase your earnings."),o.a.createElement("br",null),o.a.createElement("small",{className:"jp-form-setting-explanation"},Us("By activating ads, you agree to the Automattic Ads {{link}}Terms of Service{{/link}}.",{components:{link:o.a.createElement("a",{href:Vl("wpcom-automattic-ads-tos"),target:"_blank",rel:"noopener noreferrer",onClick:this.trackConfigureWidgetClick})}}))),o.a.createElement(ku,{slug:"wordads",disabled:t,activated:e,toggling:this.props.isSavingAnyOption("wordads"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enable ads and display an ad below each post"))),o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us("Display ads below posts on")),o.a.createElement(_u,{checked:i,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_front_page"]),onChange:this.handleChange("wordads_display_front_page")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Front page"))),o.a.createElement(_u,{checked:a,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_post"]),onChange:this.handleChange("wordads_display_post")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Posts"))),o.a.createElement(_u,{checked:s,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_page"]),onChange:this.handleChange("wordads_display_page")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Pages"))),o.a.createElement(_u,{checked:c,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_display_archive"]),onChange:this.handleChange("wordads_display_archive")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Archives")))),o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us("Additional ad placements")),o.a.createElement(_u,{checked:n,disabled:!e||t||this.props.isSavingAnyOption(["wordads","enable_header_ad"]),onChange:this.handleChange("enable_header_ad")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Top of each page"))),o.a.createElement(_u,{checked:r,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_second_belowpost"]),onChange:this.handleChange("wordads_second_belowpost")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Second ad below post"))),o.a.createElement("small",{className:"jp-form-setting-explanation"},e&&Us("You can place additional ads using the Ad widget. {{link}}Try it out!{{/link}}",{components:{link:o.a.createElement("a",{className:"jp-module-settings__external-link",href:"customize.php?autofocus[panel]=widgets"})}}))),!u&&o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us("Custom ads.txt entries")),o.a.createElement("p",null,e&&Us("Jetpack automatically generates a custom {{link1}}ads.txt{{/link1}} tailored for your site. If you need to add additional entries for other networks please add them in the space below, one per line. {{link2}}Check here for more details{{/link2}}.",{components:{link1:o.a.createElement("a",{href:"/ads.txt",target:"_blank",rel:"noopener noreferrer"}),link2:o.a.createElement("a",{href:Vl("jetpack-how-jetpack-ads-members-can-increase-their-earnings-with-ads-txt"),target:"_blank",rel:"noopener noreferrer"})}}),!e&&Us("When ads are enabled, Jetpack automatically generates a custom ads.txt tailored for your site.")),o.a.createElement(Vp,{name:"wordads_custom_adstxt",value:l,disabled:!e||t||this.props.isSavingAnyOption(["wordads","wordads_custom_adstxt"]),onChange:this.props.onOptionChange}))),!t&&e&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},Us("View your earnings")))}}]),t}(o.a.Component)),rd=window.Initial_State.pluginBaseUrl+"/images/",id=Vl("jetpack-contact-support"),ad=Vl("jetpack-contact-support-beta-group"),sd=Cu(function(e){function t(e){var n;_a()(this,t),n=ka()(this,Ca()(t).call(this,e)),ha()(Os()(n),"updateOptions",(function(e,t){var r=n.props.getOptionValue(t,"stats"),i=!1;n.state["".concat(t,"_").concat(e)]?Object(Dt.includes)(r,e)&&(r=Object(Dt.filter)(r,(function(t){return t!==e}))):Object(Dt.includes)(r,e)||(r.push(e),i=!0),n.setState(ha()({},"".concat(t,"_").concat(e),!n.state["".concat(t,"_").concat(e)]),(function(){n.props.updateOptions(ha()({},t,r))})),Uc.tracks.recordEvent("jetpack_wpa_settings_toggle",{module:"stats",setting:t,role:e,toggled:i?"on":"off"})})),ha()(Os()(n),"activateStats",(function(){n.props.updateOptions({stats:!0})})),ha()(Os()(n),"trackOpenCard",(function(){Uc.tracks.recordJetpackClick({target:"foldable-settings-open",feature:"stats"})})),ha()(Os()(n),"handleRoleToggleChange",(function(e,t){return function(){return n.updateOptions(e,t)}}));var r=e.getOptionValue("count_roles","stats"),i=e.getOptionValue("roles","stats");return n.state={count_roles:r,roles:i,count_roles_administrator:Object(Dt.includes)(r,"administrator",!1),count_roles_editor:Object(Dt.includes)(r,"editor",!1),count_roles_author:Object(Dt.includes)(r,"author",!1),count_roles_contributor:Object(Dt.includes)(r,"contributor",!1),count_roles_subscriber:Object(Dt.includes)(r,"subscriber",!1),roles_administrator:!0,roles_editor:Object(Dt.includes)(i,"editor",!1),roles_author:Object(Dt.includes)(i,"author",!1),roles_contributor:Object(Dt.includes)(i,"contributor",!1),roles_subscriber:Object(Dt.includes)(i,"subscriber",!1)},n}return Ma()(t,e),As()(t,[{key:"handleStatsOptionToggle",value:function(e){var t=this;return function(){return t.props.updateFormStateModuleOption("stats",e)}}},{key:"render",value:function(){var e=this,t=this.props.getModule("stats"),n=this.props.getOptionValue("stats"),r=this.props.isUnavailableInDevMode("stats"),i=this.props.getSiteRoles();return"inactive"===this.props.getModuleOverride("stats")?o.a.createElement(Wu,{moduleName:t.name}):n?o.a.createElement(Yu,Bc()({},this.props,{header:Us("Site stats",{context:"Settings header"}),hideButton:!0,module:"site-stats"}),o.a.createElement(Dp,{onOpen:this.trackOpenCard,header:Us("Expand to update settings for how visits are counted and manage who can view this information."),clickableHeader:!0,className:Mc()("jp-foldable-settings-standalone",{"jp-foldable-settings-disable":r})},o.a.createElement(ep,{disableInDevMode:!0,module:t,support:{text:Us("Displays information on your site activity, including visitors and popular posts or pages."),link:Vl("jetpack-support-wordpress-com-stats")}},o.a.createElement(Hl,null,o.a.createElement(_u,{checked:!!this.props.getOptionValue("admin_bar"),disabled:!n||r,toggling:this.props.isSavingAnyOption(["stats","admin_bar"]),onChange:this.handleStatsOptionToggle("admin_bar")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Include a small chart in your admin bar with a 48-hour traffic snapshot"))),o.a.createElement(_u,{checked:!!this.props.getOptionValue("hide_smile"),disabled:!n||r,toggling:this.props.isSavingAnyOption(["stats","hide_smile"]),onChange:this.handleStatsOptionToggle("hide_smile")},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Hide the stats smiley face image")),o.a.createElement("span",{className:"jp-form-setting-explanation"},Us("The image helps collect stats, but should work when hidden.")))),o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us("Count logged in page views from")),Object.keys(i).map((function(t){return o.a.createElement(_u,{checked:e.state["count_roles_".concat(t)],disabled:!n||r||e.props.isSavingAnyOption(["stats","count_roles"]),onChange:e.handleRoleToggleChange(t,"count_roles"),key:"count_roles-".concat(t)},o.a.createElement("span",{className:"jp-form-toggle-explanation"},i[t].name))}))),o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us("Allow stats reports to be viewed by")),o.a.createElement(_u,{checked:!0,disabled:!0},o.a.createElement("span",{className:"jp-form-toggle-explanation"},i.administrator.name)),Object.keys(i).map((function(t){return"administrator"!==t&&o.a.createElement(_u,{checked:e.state["roles_".concat(t)],disabled:!n||r||e.props.isSavingAnyOption(["stats","roles"]),onChange:e.handleRoleToggleChange(t,"roles"),key:"roles-".concat(t)},o.a.createElement("span",{className:"jp-form-toggle-explanation"},i[t].name))})))))):o.a.createElement(Dl,{className:"jp-at-a-glance__stats-card "+(this.props.isDevMode?"is-inactive":"")},o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive"},o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive-icon"},o.a.createElement("img",{src:rd+"stats.svg",width:"60",height:"60",alt:Us("Jetpack Stats Icon"),className:"jp-at-a-glance__stats-icon"})),o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive-text"},this.props.isDevMode?Us("Unavailable in Dev Mode"):Us("{{a}}Activate Site Stats{{/a}} to see detailed stats, likes, followers, subscribers, and more! {{a1}}Learn More{{/a1}}",{components:{a:o.a.createElement("a",{href:"javascript:void(0)",onClick:this.activateStats}),a1:o.a.createElement("a",{href:Vl("jetpack-support-wordpress-com-stats"),target:"_blank",rel:"noopener noreferrer"})}})),!this.props.isDevMode&&o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive-button"},o.a.createElement(xc,{onClick:this.activateStats,primary:!0},Us("Activate Site Stats")))))}}]),t}(o.a.Component)),od=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.isSiteConnected;return o.a.createElement(Yu,Bc()({},this.props,{header:Us("WP.me Shortlinks",{context:"Settings header"}),module:"shortlinks",hideButton:!0}),o.a.createElement(ep,{module:{module:"shortlinks"},support:{text:this.props.shortlinksModule.description,link:Vl("jetpack-support-shortlinks")},disableInDevMode:!0},o.a.createElement(ku,{slug:"shortlinks",disabled:!e,activated:this.props.shortlinksActive,toggling:this.props.isSavingAnyOption("shortlinks"),toggleModule:this.props.toggleModuleNow},Us("Generate shortened URLs for simpler sharing."))))}}]),t}(s.Component),cd=Cu(le((function(e,t){return{shortlinksActive:t.getOptionValue("shortlinks"),shortlinksModule:qa(e,"shortlinks")}}))(od)),ld=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{show_headline:n.props.getOptionValue("show_headline","related-posts"),show_thumbnails:n.props.getOptionValue("show_thumbnails","related-posts")}),ha()(Os()(n),"updateOptions",(function(e){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption("related-posts",e))})),ha()(Os()(n),"handleShowHeadlineToggleChange",(function(){n.updateOptions("show_headline")})),ha()(Os()(n),"handleShowThumbnailsToggleChange",(function(){n.updateOptions("show_thumbnails")})),ha()(Os()(n),"trackConfigureClick",(function(){Uc.tracks.recordJetpackClick("configure-related-posts")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this,t=this.props.getOptionValue("related-posts"),n=this.props.isUnavailableInDevMode("related-posts");return o.a.createElement(Yu,Bc()({},this.props,{hideButton:!0,module:"related-posts"}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule("related-posts"),support:{text:Us("The feature helps visitors find more of your content by displaying related posts at the bottom of each post."),link:Vl("jetpack-support-related-posts")}},o.a.createElement("p",null,Us("Keep your visitors engaged with related content at the bottom of each post. These settings won't apply to {{a}}related posts added using the block editor{{/a}}.",{components:{a:o.a.createElement("a",{href:Vl("jetpack-support-jetpack-blocks-related-posts-block"),target:"_blank",rel:"noopener noreferrer"})}})),o.a.createElement(ku,{slug:"related-posts",disabled:n,activated:t,toggling:this.props.isSavingAnyOption("related-posts"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Show related content after posts"))),o.a.createElement(Hl,null,o.a.createElement(_u,{checked:this.state.show_headline,disabled:!t||n||this.props.isSavingAnyOption(["related-posts","show_headline"]),onChange:this.handleShowHeadlineToggleChange},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Highlight related content with a heading"))),o.a.createElement(_u,{checked:this.state.show_thumbnails,disabled:!t||n||this.props.isSavingAnyOption(["related-posts","show_thumbnails"]),onChange:this.handleShowThumbnailsToggleChange},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Show a thumbnail image where available"))),t&&o.a.createElement("div",null,o.a.createElement(ql,{className:"jp-form-label-wide"},Us("Preview",{context:"A header for a preview area in the configuration screen."})),o.a.createElement(Dl,{className:"jp-related-posts-preview"},this.state.show_headline&&o.a.createElement("div",{className:"jp-related-posts-preview__title"},Us("Related")),[{url:"cat-blog.png",text:Us("Big iPhone/iPad Update Now Available"),context:Us('In "Mobile"',{comment:"It refers to the category where a post was found. Used in an example preview."})},{url:"devices.jpg",text:Us("The WordPress for Android App Gets a Big Facelift"),context:Us('In "Mobile"',{comment:"It refers to the category where a post was found. Used in an example preview."})},{url:"mobile-wedding.jpg",text:Us("Upgrade Focus: VideoPress For Weddings"),context:Us('In "Upgrade"',{comment:"It refers to the category where a post was found. Used in an example preview."})}].map((function(t,n){return o.a.createElement("div",{key:"preview_".concat(n),className:"jp-related-posts-preview__item"},e.state.show_thumbnails&&o.a.createElement("img",{src:"https://jetpackme.files.wordpress.com/2019/03/".concat(t.url),alt:t.text}),o.a.createElement("h4",{className:"jp-related-posts-preview__post-title"},o.a.createElement("a",{href:"#/traffic"},t.text)),o.a.createElement("p",{className:"jp-related-posts-preview__post-context"},t.context))})))))),!this.props.isUnavailableInDevMode("related-posts")&&t&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",onClick:this.trackConfigureClick,href:this.props.configureUrl},Us("Configure related posts in the Customizer")))}}]),t}(o.a.Component));function ud(){var e=this;this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=function(t){t.source===e.windowInstance&&e.emit("message",t.data)}}Jp=ud.prototype,Object(Dt.assign)(Jp,ps.EventEmitter.prototype),Jp.emitChange=function(){this.emit("change")},Jp.off=Jp.removeListener,ud.prototype.open=function(e,t,n){return t=t||Date.now(),this.windowInstance=window.open(e,t,n),this.startMonitoring(t,this.windowInstance),window.addEventListener("message",this.onMessage,!1),this},ud.prototype.getScreenCenterSpecs=function(e,t){var n=void 0!==window.screenTop?window.screenTop:window.screenY,r=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(n+window.innerHeight/2-t/2),"left="+(r+window.innerWidth/2-e/2)].join()},ud.prototype.isOpen=function(e){var t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(n){}return!t},ud.prototype.checkStatus=function(){for(var e in this.intervals)this.intervals.hasOwnProperty(e)&&!this.isOpen(e)&&(this.emit("close",e),delete this.intervals[e]);0===Object.keys(this.intervals).length&&(clearInterval(this.monitorInterval),delete this.monitorInterval,window.removeEventListener("message",this.onMessage))},ud.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};var pd=ud,dd=function(e,t){var n,r=new pd;r.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+r.getScreenCenterSpecs(780,700)),r.once("close",(function(){var e=null;n&&n.keyring_id&&(e=Number(n.keyring_id)),t(e)})),r.on("message",(function(e){return n=e}))},hd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{inputVisible:!1}),ha()(Os()(n),"handleClickAutoVerify",(function(){n.props.fetchingSiteData||n.props.fetchingGoogleSiteVerify||(Uc.tracks.recordEvent("jetpack_site_verification_google_auto_verify_click"),dd(n.props.googleSiteVerificationConnectUrl,(function(e){e&&n.checkAndVerifySite(e)})))})),ha()(Os()(n),"handleClickSetManually",(function(e){Uc.tracks.recordEvent("jetpack_site_verification_google_manual_verify_click",{is_owner:n.props.isOwner}),n.toggleVerifyMethod(e)})),ha()(Os()(n),"handleClickEdit",(function(e){Uc.tracks.recordEvent("jetpack_site_verification_google_edit_click",{is_owner:n.props.isOwner}),n.toggleVerifyMethod(e)})),ha()(Os()(n),"handleClickCancel",(function(e){Uc.tracks.recordEvent("jetpack_site_verification_google_cancel_click",{is_owner:n.props.isOwner}),n.props.resetFormStateOption("google"),n.toggleVerifyMethod(e)})),ha()(Os()(n),"quickSave",(function(e){Uc.tracks.recordEvent("jetpack_site_verification_google_manual_verify_save",{is_owner:n.props.isOwner,is_empty:!n.props.value}),n.props.onSubmit(e)})),ha()(Os()(n),"toggleVerifyMethod",(function(){n.setState({inputVisible:!n.state.inputVisible})})),ha()(Os()(n),"handleOnTextInputKeyPress",(function(e){"Enter"===e.key&&n.quickSave()})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){var e=this;this.props.isCurrentUserLinked&&this.props.checkVerifyStatusGoogle().then((function(t){if(e.props.googleSiteVerificationError&&"unverify-site-error"===e.props.googleSiteVerificationError.code&&e.props.updateOptions({google:""}).then((function(){return e.props.checkVerifyStatusGoogle()})),t)return!e.props.getOptionValue("google")&&t.token?e.props.updateOptions({google:t.token}):void(!e.props.getOptionValue("google")||t.token||t.verified||e.setState({inputVisible:!0}))}))}},{key:"checkAndVerifySite",value:function(e){var t=this;this.props.createNotice("is-info",Us("Verifying…"),{id:"verifying-site-google"}),this.props.checkVerifyStatusGoogle(e).then((function(e){if(e)return e.token!==t.props.value?t.props.updateOptions({google:e.token}):void 0})).then((function(){t.props.removeNotice("verifying-site-google"),t.props.isSiteVerifiedWithGoogle||t.props.verifySiteGoogle(e).then((function(){if(t.props.googleSiteVerificationError){var e=t.props.googleSiteVerificationError.message;Uc.tracks.recordEvent("jetpack_site_verification_google_verify_error",{error_message:e}),t.props.createNotice("is-error",Us("Site failed to verify: %(error)s",{args:{error:e}}),{id:"verify-site-google-error",duration:5e3})}else t.props.isSiteVerifiedWithGoogle&&Uc.tracks.recordEvent("jetpack_site_verification_google_verify_success")}))}))}},{key:"render",value:function(){var e=this.props.googleSiteVerificationError&&"forbidden"===this.props.googleSiteVerificationError.code;if(this.state.inputVisible||e||!this.props.isCurrentUserLinked)return o.a.createElement("div",null,o.a.createElement(ql,{className:"jp-form-input-with-prefix",key:"verification_service_google"},o.a.createElement("span",null,Us("Google")),o.a.createElement(Bl,{name:"google",value:this.props.value,placeholder:this.props.placeholder,className:"code",disabled:this.props.disabled,onChange:this.props.onOptionChange,onKeyPress:this.handleOnTextInputKeyPress}),this.state.inputVisible&&o.a.createElement("div",{className:"jp-form-site-verification-buttons"},o.a.createElement(xc,{primary:!0,type:"button",className:"jp-form-site-verification-edit-button",disabled:this.props.disabled,onClick:this.quickSave},Us("Save")),o.a.createElement(xc,{type:"button",className:"jp-form-site-verification-edit-button",disabled:this.props.disabled,onClick:this.handleClickCancel},Us("Cancel")))));if(this.props.isSiteVerifiedWithGoogle)return o.a.createElement("div",null,o.a.createElement("div",{className:"jp-form-input-with-prefix",key:"verification_service_google"},o.a.createElement("span",null,Us("Google")),o.a.createElement("div",{className:"jp-form-site-verification-verified"},o.a.createElement(ml,{icon:"checkmark-circle",size:20})," ",o.a.createElement("span",null,Us("Your site is verified with Google"))),o.a.createElement(xc,{type:"button",className:"jp-form-site-verification-edit-button",onClick:this.handleClickEdit},Us("Edit"))),this.props.isOwner&&o.a.createElement("div",{className:"jp-form-input-with-prefix-bottom-message"},o.a.createElement("div",{className:"jp-form-setting-explanation"},o.a.createElement("p",null,Us("Monitor your site's traffic and performance from the {{a}}Google Search Console{{/a}}.",{components:{a:o.a.createElement(Xu,{icon:!0,iconSize:16,target:"_blank",rel:"noopener noreferrer",href:this.props.googleSearchConsoleUrl})}})," ",Us("Google will email about certain events that occur with your site, including indications that your website has been {{a1}}hacked{{/a1}}, or problems {{a2}}crawling or indexing{{/a2}} your site.",{components:{a1:o.a.createElement(Xu,{icon:!0,iconSize:16,target:"_blank",rel:"noopener noreferrer",href:"https://developers.google.com/web/fundamentals/security/hacked/"}),a2:o.a.createElement(Xu,{icon:!0,iconSize:16,target:"_blank",rel:"noopener noreferrer",href:"https://www.google.com/insidesearch/howsearchworks/crawling-indexing.html"})}})))));var t=this.props.fetchingSiteData||this.props.fetchingGoogleSiteVerify||this.props.isVerifyingGoogleSite||this.props.disabled;return o.a.createElement("div",{className:"jp-form-input-with-prefix jp-form-google-label-unverified",key:"verification_service_google"},o.a.createElement("span",null,Us("Google")),o.a.createElement("div",{className:"jp-form-google-label-unverified-actions"},o.a.createElement(xc,{primary:!0,type:"button",disabled:t,onClick:this.handleClickAutoVerify},Us("Verify with Google")),o.a.createElement("span",{className:"jp-form-google-separator"},Us("or")),o.a.createElement(xc,{type:"button",disabled:t,onClick:this.handleClickSetManually},Us("Manually Verify "))))}}]),t}(o.a.Component);ha()(hd,"propTypes",{disabled:u.a.bool}),ha()(hd,"defaultProps",{disabled:!1});var fd=le((function(e){return{fetchingSiteData:Bo(e),googleSiteVerificationConnectUrl:mo(e,"google_site_verification"),googleSearchConsoleUrl:uc(e),fetchingGoogleSiteVerify:ac(e),isConnectedToGoogle:oc(e),isSiteVerifiedWithGoogle:cc(e),isVerifyingGoogleSite:sc(e),userCanManageOptions:Ci(e),googleSiteVerificationError:lc(e),isOwner:pc(e)}}),{checkVerifyStatusGoogle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:Xr}),Da.fetchVerifySiteGoogleStatus(e).then((function(e){if(e.errors&&e.errors.length>0){var n=Object.keys(e.errors)[0],r=e.errors[n];return t({type:Qr,error:{code:n,message:r}}),e}return t({type:Zr,verified:e.verified,token:e.token,isOwner:e.is_owner,searchConsoleUrl:e.google_search_console_url,verificationConsoleUrl:e.google_verification_console_url}),e})).catch((function(e){t({type:Qr,error:e.response})}))}},createNotice:Qa,removeNotice:Xa,verifySiteGoogle:function(e){return function(t){return t({type:ri}),Da.verifySiteGoogle(e).then((function(e){if(e.errors&&e.errors.length>0){var n=Object.keys(e.errors)[0],r=e.errors[n];return t({type:ai,error:{code:n,message:r}}),e}return t({verified:e.verified,isOwner:e.is_owner,searchConsoleUrl:e.google_search_console_url,verificationConsoleUrl:e.google_verification_console_url,type:ii}),e.verified&&t(Qa("is-success",Us("Site is verified"),{id:"verify-site-google-verified",duration:2e3})),e})).catch((function(e){t({type:ai,error:e.response})}))}}})(hd),md=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"getMetaTag",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return n?/^[a-z0-9_-]+$/i.test(n)?Object(Dt.includes)(n,"<meta")?n:'<meta name="'.concat(Object(Dt.get)(t.serviceIds,e,""),'" content="').concat(n,'" />'):n:""}},{key:"getSiteVerificationValue",value:function(e){var t=this.props.getOptionValue(e);return t===this.props.getSettingCurrentValue(e)?this.getMetaTag(e,t):t}},{key:"render",value:function(){var e=this.props.getModule("verification-tools");if("inactive"===this.props.getModuleOverride("verification-tools"))return o.a.createElement(Ku,{title:e.name,icon:"cog",description:Us("%(moduleName)s has been disabled by a site administrator.",{args:{moduleName:e.name}})});var t=!!this.props.getOptionValue(e.module);return o.a.createElement(Yu,Bc()({},this.props,{module:e.module,saveDisabled:this.props.isSavingAnyOption(["google","bing","pinterest","yandex"])}),o.a.createElement(ep,{module:e,support:{text:Us("Provides the necessary hidden tags needed to verify your WordPress site with various services."),link:Vl("jetpack-support-site-verification-tools")}},o.a.createElement(ku,{slug:e.module,activated:t,toggling:this.props.isSavingAnyOption([e.module]),disabled:this.props.isSavingAnyOption([e.module]),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Verify site ownership with third party services"))),o.a.createElement("p",null,Us("Note that {{b}}verifying your site with these services is not necessary{{/b}} in order for your site to be indexed by search engines. To use these advanced search engine tools and verify your site with a service, paste the HTML Tag code below. Read the {{support}}full instructions{{/support}} if you are having trouble. Supported verification services: {{google}}Google Search Console{{/google}}, {{bing}}Bing Webmaster Center{{/bing}}, {{pinterest}}Pinterest Site Verification{{/pinterest}}, and {{yandex}}Yandex.Webmaster{{/yandex}}.",{components:{b:o.a.createElement("strong",null),support:o.a.createElement("a",{href:Vl("jetpack-support-site-verification-tools")}),google:o.a.createElement(Xu,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://www.google.com/webmasters/tools/"}),bing:o.a.createElement(Xu,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://www.bing.com/webmaster/"}),pinterest:o.a.createElement(Xu,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://pinterest.com/website/verify/"}),yandex:o.a.createElement(Xu,{icon:!0,target:"_blank",rel:"noopener noreferrer",href:"https://webmaster.yandex.com/sites/"})}})),o.a.createElement(Hl,null,o.a.createElement(fd,Bc()({value:this.getSiteVerificationValue("google"),placeholder:this.getMetaTag("google","1234")},this.props,{disabled:this.props.isUpdating("google")||!t})),o.a.createElement(ql,{className:"jp-form-input-with-prefix",key:"verification_service_bing"},o.a.createElement("span",null,Us("Bing")),o.a.createElement(Bl,{name:"bing",value:this.getSiteVerificationValue("bing"),placeholder:this.getMetaTag("bing","1234"),className:"code",disabled:this.props.isUpdating("bing")||!t,onChange:this.props.onOptionChange})),o.a.createElement(ql,{className:"jp-form-input-with-prefix",key:"verification_service_pinterest"},o.a.createElement("span",null,Us("Pinterest")),o.a.createElement(Bl,{name:"pinterest",value:this.getSiteVerificationValue("pinterest"),placeholder:this.getMetaTag("pinterest","1234"),className:"code",disabled:this.props.isUpdating("pinterest")||!t,onChange:this.props.onOptionChange})),o.a.createElement(ql,{className:"jp-form-input-with-prefix",key:"verification_service_yandex"},o.a.createElement("span",null,Us("Yandex")),o.a.createElement(Bl,{name:"yandex",value:this.getSiteVerificationValue("yandex"),placeholder:this.getMetaTag("yandex","1234"),className:"code",disabled:this.props.isUpdating("yandex")||!t,onChange:this.props.onOptionChange})))))}}]),t}(o.a.Component);ha()(md,"serviceIds",{google:"google-site-verification",bing:"msvalidate.01",pinterest:"p:domain_verify",yandex:"yandex-verification"});var gd=Cu(md),vd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackSitemapUrl",(function(){Uc.tracks.recordJetpackClick("sitemap-url-link")})),ha()(Os()(n),"trackSitemapNewsUrl",(function(){Uc.tracks.recordJetpackClick("sitemap-news-url-link")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.getModule("sitemaps"),t=Object(Dt.get)(e,["extra","sitemap_url"],""),n=Object(Dt.get)(e,["extra","news_sitemap_url"],""),r=Mc()({"jp-form-setting-explanation":!0,"is-warning":!this.props.isSiteVisibleToSearchEngines&&this.props.getOptionValue("sitemaps")});return o.a.createElement(Yu,Bc()({},this.props,{module:"sitemaps",hideButton:!0}),o.a.createElement(ep,{hasChild:!0,module:{module:"sitemaps"},support:{link:Vl("jetpack-support-sitemaps")}},o.a.createElement("p",null,Us("Sitemaps are files that search engines like Google or Bing use to index your website. They can help improve your ranking in search results. When you enable this feature, Jetpack will create sitemaps for you and update them automatically when the content on your site changes.")),o.a.createElement(ku,{slug:"sitemaps",compact:!0,activated:this.props.getOptionValue("sitemaps"),toggling:this.props.isSavingAnyOption("sitemaps"),toggleModule:this.props.toggleModuleNow},Us("Generate XML sitemaps")),this.props.isSiteVisibleToSearchEngines?this.props.getOptionValue("sitemaps")&&o.a.createElement(Hl,null,o.a.createElement("p",{className:"jp-form-setting-explanation"},Us("Good news: Jetpack is sending your sitemap automatically to all major search engines for indexing."),o.a.createElement("br",null),o.a.createElement(Xu,{onClick:this.trackSitemapUrl,icon:!0,target:"_blank",rel:"noopener noreferrer",href:t},t),o.a.createElement("br",null),o.a.createElement(Xu,{onClick:this.trackSitemapNewsUrl,icon:!0,target:"_blank",rel:"noopener noreferrer",href:n},n))):o.a.createElement(Hl,null,o.a.createElement("p",{className:r},Us("Search engines can't access your site at the moment. If you'd like to make your site accessible, check your {{a}}Reading settings{{/a}} and switch \"Search Engine Visibility\" on.",{components:{a:o.a.createElement("a",{href:this.props.siteAdminUrl+"options-reading.php"})}})))))}}]),t}(o.a.Component),bd=le((function(e){return{isSiteVisibleToSearchEngines:Di(e),siteAdminUrl:bi(e)}}))(Cu(vd)),yd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={settings:this.props.settings,siteRawUrl:this.props.siteRawUrl,getModule:this.props.module,isSiteConnected:this.props.isSiteConnected,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,getModuleOverride:this.props.getModuleOverride},t=this.props.isModuleFound("seo-tools"),n=this.props.isModuleFound("wordads"),r=this.props.isModuleFound("stats"),i=this.props.isModuleFound("shortlinks"),a=this.props.isModuleFound("related-posts"),s=this.props.isModuleFound("verification-tools"),c=this.props.isModuleFound("sitemaps"),l=this.props.isModuleFound("google-analytics");return(this.props.searchTerm||this.props.active)&&(t||n||r||i||a||s||c||l)?o.a.createElement("div",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:this.props.searchTerm?Us("Traffic"):Us("Maximize your site’s visibility in search engines and view traffic stats in real time."),className:"jp-settings-description"}),n&&o.a.createElement(nd,Bc()({},e,{configureUrl:Vl("calypso-stats-ads-day",{site:this.props.siteRawUrl})})),a&&o.a.createElement(ld,Bc()({},e,{configureUrl:this.props.siteAdminUrl+"customize.php?autofocus[section]=jetpack_relatedposts&return="+encodeURIComponent(this.props.siteAdminUrl+"admin.php?page=jetpack#/traffic")+"&url="+encodeURIComponent(this.props.lastPostUrl)})),t&&o.a.createElement(ed,Bc()({},e,{configureUrl:Vl("calypso-marketing-traffic",{site:this.props.siteRawUrl,anchor:"seo"})})),l&&o.a.createElement(td,Bc()({},e,{configureUrl:Vl("calypso-marketing-traffic",{site:this.props.siteRawUrl,anchor:"analytics"})})),r&&o.a.createElement(sd,e),i&&o.a.createElement(cd,e),c&&o.a.createElement(bd,e),s&&o.a.createElement(gd,e)):null}}]),t}(o.a.Component);ha()(yd,"displayName","TrafficSettings");var _d=le((function(e){return{module:function(t){return qa(e,t)},settings:So(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},isModuleFound:function(t){return ko(e,t)},isSiteConnected:qs(e),lastPostUrl:zi(e),getModuleOverride:function(t){return $a(e,t)}}}))(yd),wd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"updateFormStateByMarkdown",(function(e){return n.props.getSettingCurrentValue("wpcom_publish_comments_with_markdown",e)?n.props.updateFormStateModuleOption(e,"wpcom_publish_posts_with_markdown"):n.props.updateFormStateModuleOption(e,"wpcom_publish_posts_with_markdown",!0)})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.isModuleFound("copy-post"),t=this.props.isModuleFound("latex"),n=this.props.isModuleFound("markdown"),r=this.props.isModuleFound("shortcodes");if(!(e||t||n||r))return null;var i=this.props.module("markdown"),a=this.props.module("latex"),s=this.props.module("copy-post"),c=this.props.module("shortcodes"),l=o.a.createElement(ep,{module:s,support:{text:Us("Duplicate existing posts, pages, Testimonials, and Portfolios. All the content will be copied including text, featured images, sharing settings, and more."),link:Vl("jetpack-support-copy-post-2")}},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:"copy-post",activated:!!this.props.getOptionValue("copy-post"),toggling:this.props.isSavingAnyOption("copy-post"),disabled:this.props.isSavingAnyOption("copy-post"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},s.description)))),u=o.a.createElement(ep,{module:i,support:{text:Us("Use Markdown syntax to compose content with links, lists, and other styles. This setting enables Markdown in the Classic Editor as well as within a Classic Editor block."),link:Vl("jetpack-support-markdown")}},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:"markdown",activated:!!this.props.getOptionValue("wpcom_publish_posts_with_markdown","markdown"),toggling:this.props.isSavingAnyOption(["markdown","wpcom_publish_posts_with_markdown"]),disabled:this.props.isSavingAnyOption(["markdown","wpcom_publish_posts_with_markdown"]),toggleModule:this.updateFormStateByMarkdown},o.a.createElement("span",{className:"jp-form-toggle-explanation"},i.description)))),p=o.a.createElement(ep,{module:a,support:{text:Us("LaTeX is a powerful markup language for writing complex mathematical equations and formulas."),link:Vl("jetpack-support-beautiful-math-with-latex")}},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:"latex",activated:!!this.props.getOptionValue("latex"),toggling:this.props.isSavingAnyOption(["latex"]),disabled:this.props.isSavingAnyOption(["latex"]),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},a.description)))),d=o.a.createElement(ep,{module:c,support:{text:c.description,link:Vl("jetpack-support-shortcode-embeds")}},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:"shortcodes",activated:!!this.props.getOptionValue("shortcodes"),toggling:this.props.isSavingAnyOption(["shortcodes"]),disabled:this.props.isSavingAnyOption(["shortcodes"]),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Compose using shortcodes to embed media from popular sites")))));return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Composing",{context:"Settings header"}),module:"composing",saveDisabled:this.props.isSavingAnyOption("ignored_phrases")}),e&&l,n&&u,t&&p,r&&d)}}]),t}(o.a.Component),kd=le((function(e){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)}}}))(Cu(wd)),Ed=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{testimonial:n.props.getOptionValue("jetpack_testimonial","custom-content-types"),portfolio:n.props.getOptionValue("jetpack_portfolio","custom-content-types")}),ha()(Os()(n),"updateCPTs",(function(e){var t="testimonial"===e?!(!n.state.testimonial||n.state.portfolio):!(!n.state.portfolio||n.state.testimonial);n.props.updateFormStateModuleOption("custom-content-types","jetpack_"+e,t),n.setState(ha()({},e,!n.state[e]))})),ha()(Os()(n),"linkIfActiveCPT",(function(e){return n.props.getSettingCurrentValue("jetpack_".concat(e),"custom-content-types")?o.a.createElement("a",{href:"".concat(n.props.siteAdminUrl,"edit.php?post_type=jetpack-").concat(e)}):o.a.createElement("span",null)})),ha()(Os()(n),"handleTestimonialToggleChange",(function(){n.updateCPTs("testimonial")})),ha()(Os()(n),"handlePortfolioToggleChange",(function(){n.updateCPTs("portfolio")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){if(!this.props.isModuleFound("custom-content-types"))return null;var e=this.props.module("custom-content-types"),t="inactive"===this.props.getModuleOverride("custom-content-types"),n=t&&Us("This feature has been disabled by a site administrator.");return o.a.createElement(Yu,Bc()({},this.props,{module:"custom-content-types",hideButton:!0}),o.a.createElement(ep,{hasChild:!0,module:e,support:{link:Vl("jetpack-support-custom-content-types")}},o.a.createElement("p",null,Us("Add {{testimonialLink}}testimonials{{/testimonialLink}} to your website to attract new customers. If your theme doesn’t support Jetpack Testimonials, you can still use a simple shortcode to display them on your site.",{components:{testimonialLink:this.linkIfActiveCPT("testimonial")}})),o.a.createElement(_u,{checked:this.state.testimonial,disabled:this.props.isSavingAnyOption("jetpack_testimonial")||t,onChange:this.handleTestimonialToggleChange,disabledReason:n},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Testimonials"))),o.a.createElement(Hl,null,o.a.createElement("p",{className:"jp-form-setting-explanation"},Us("Testimonials shortcode: [testimonials]")))),this.props.testimonialActive&&o.a.createElement(Pp,{className:"jp-settings-card__configure-link",href:"".concat(this.props.siteAdminUrl,"post-new.php?post_type=jetpack-testimonial")},Us("Add a testimonial")),o.a.createElement(ep,{hasChild:!0,module:e,support:{link:Vl("jetpack-support-custom-content-types")}},o.a.createElement("p",null,Us("Use {{portfolioLink}}portfolios{{/portfolioLink}} on your site to showcase your best work. If your theme doesn’t support Jetpack Portfolios, you can still use a simple shortcode to display them on your site.",{components:{portfolioLink:this.linkIfActiveCPT("portfolio")}})),o.a.createElement(_u,{checked:this.state.portfolio,disabled:this.props.isSavingAnyOption("jetpack_portfolio")||t,onChange:this.handlePortfolioToggleChange,disabledReason:n},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Portfolios"))),o.a.createElement(Hl,null,o.a.createElement("p",{className:"jp-form-setting-explanation"},Us("Portfolios shortcode: [portfolio]")))),this.props.portfolioActive&&o.a.createElement(Pp,{className:"jp-settings-card__configure-link",href:"".concat(this.props.siteAdminUrl,"post-new.php?post_type=jetpack-portfolio")},Us("Add a portfolio item")))}}]),t}(o.a.Component),Cd=Cu(le((function(e,t){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)},getModuleOverride:function(t){return $a(e,t)},portfolioActive:t.getSettingCurrentValue("jetpack_portfolio","custom-content-types"),testimonialActive:t.getSettingCurrentValue("jetpack_testimonial","custom-content-types")}}))(Ed)),Sd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"getInfiniteMode",(function(){return n.props.getOptionValue("infinite-scroll")?n.props.getOptionValue("infinite_scroll","infinite-scroll")?"infinite_scroll":"infinite_button":"infinite_default"})),ha()(Os()(n),"updateInfiniteMode",(function(e){n.setState({infinite_mode:e},n.prepareOptionsToUpdate)})),ha()(Os()(n),"prepareOptionsToUpdate",(function(){"infinite_default"===n.state.infinite_mode?n.props.updateFormStateOptionValue("infinite-scroll",!1):"infinite_scroll"!==n.state.infinite_mode&&"infinite_button"!==n.state.infinite_mode||n.props.updateFormStateOptionValue({"infinite-scroll":!0,infinite_scroll:"infinite_scroll"===n.state.infinite_mode})})),ha()(Os()(n),"updateOptions",(function(e,t){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption(t,e))})),ha()(Os()(n),"trackLearnMoreIS",(function(){Uc.tracks.recordJetpackClick({target:"learn-more",feature:"infinite-scroll",extra:"not-supported-link"})})),ha()(Os()(n),"state",{infinite_mode:n.getInfiniteMode()}),ha()(Os()(n),"handleInfiniteScrollModeChange",(function(e){return function(){return n.updateInfiniteMode(e)}})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this,t=this.props.isModuleFound("infinite-scroll"),n=this.props.isModuleFound("custom-css");if(!t&&!n)return null;var r=this.props.getModule("infinite-scroll"),i=this.props.getModule("custom-css"),a="inactive"===this.props.getModuleOverride("infinite-scroll");return o.a.createElement(Yu,Bc()({},this.props,{header:Us("Theme enhancements"),hideButton:!t||!this.props.isInfiniteScrollSupported,module:"theme-enhancements"}),a&&o.a.createElement(Wu,{moduleName:r.name,compact:!0}),t&&!a&&o.a.createElement(ep,{hasChild:!0,module:{module:r.module},key:"theme_enhancement_".concat(r.module),support:{text:Us("Loads the next posts automatically when the reader approaches the bottom of the page."),link:Vl("jetpack-support-infinite-scroll")}},o.a.createElement(Kl,{className:"jp-form-label-wide"},r.name),o.a.createElement("p",null,Us("Create a smooth, uninterrupted reading experience by loading more content as visitors scroll to the bottom of your archive pages.")),this.props.isInfiniteScrollSupported?[{key:"infinite_default",label:Us("Load more posts using the default theme behavior")},{key:"infinite_button",label:Us("Load more posts in page with a button")},{key:"infinite_scroll",label:Us("Load more posts as the reader scrolls down")}].map((function(t){return o.a.createElement(ql,{key:"".concat(r.module,"_").concat(t.key)},o.a.createElement("input",{type:"radio",name:"infinite_mode",value:t.key,checked:t.key===e.state.infinite_mode,disabled:e.props.isSavingAnyOption([r.module,t.key]),onChange:e.handleInfiniteScrollModeChange(t.key)}),o.a.createElement("span",{className:"jp-form-toggle-explanation"},t.label))})):o.a.createElement("span",null,Us("Theme support required.")+" ",o.a.createElement("a",{onClick:this.trackLearnMoreIS,href:r.learn_more_button+"#theme",title:Us("Learn more about adding support for Infinite Scroll to your theme.")},Us("Learn more")))),n&&o.a.createElement(ep,{module:{module:i.module},support:{text:i.description,link:Vl("jetpack-support-custom-css")}},o.a.createElement(ku,{slug:"custom-css",activated:!!this.props.getOptionValue("custom-css"),toggling:this.props.isSavingAnyOption(["custom-css"]),disabled:this.props.isSavingAnyOption(["custom-css"]),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Enhance CSS customization panel")))))}}]),t}(o.a.Component),Md=le((function(e){return{module:function(t){return qa(e,t)},isInfiniteScrollSupported:Hi(e,"infinite-scroll"),isModuleFound:function(t){return ko(e,t)}}}))(Cu(Sd)),xd=n(182),Ad=n.n(xd),jd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"displayPrompt",(function(){window.prompt(n.props.prompt,n.props.text)})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){var e=this,t=a.a.findDOMNode(this.refs.button);this.clipboard=new Ad.a(t,{text:function(){return e.props.text}}),this.clipboard.on("success",this.props.onCopy),this.clipboard.on("error",this.displayPrompt)}},{key:"componentWillUnmount",value:function(){this.clipboard.destroy(),delete this.clipboard}},{key:"render",value:function(){var e=Mc()("dops-clipboard-button",this.props.className);return o.a.createElement(xc,Bc()({ref:"button"},Object(Dt.omit)(this.props,Object.keys(this.constructor.propTypes)),{className:e}))}}]),t}(o.a.Component);ha()(jd,"displayName","ClipboardButton"),ha()(jd,"propTypes",{className:u.a.string,text:u.a.string,prompt:u.a.string,onCopy:u.a.func}),ha()(jd,"defaultProps",{onCopy:Dt.noop});n(370);var Od=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{isCopied:!1,disabled:!1}),ha()(Os()(n),"showConfirmation",(function(){n.setState({isCopied:!0}),n.confirmationTimeout=setTimeout((function(){n.setState({isCopied:!1})}),4e3)})),n}return Ma()(t,e),As()(t,[{key:"componentWillUnmount",value:function(){clearTimeout(this.confirmationTimeout),delete this.confirmationTimeout}},{key:"render",value:function(){var e=Object(Dt.omit)(this.props,"className","copied","copy","isError","isValid","prompt","selectOnFocus");return o.a.createElement("span",{className:Mc()("dops-clipboard-button-input",this.props.className)},o.a.createElement(Bl,Bc()({},e,{type:"text",selectOnFocus:!0,readOnly:!0})),o.a.createElement(jd,{text:this.props.value,onCopy:this.showConfirmation,disabled:this.props.disabled,prompt:this.props.prompt,compact:!0},this.state.isCopied?this.props.copied:this.props.copy))}}]),t}(o.a.Component);ha()(Od,"displayName","ClipboardButtonInput"),ha()(Od,"propTypes",{value:u.a.string,disabled:u.a.bool,className:u.a.string,copied:u.a.string,copy:u.a.string,prompt:u.a.string}),ha()(Od,"defaultProps",{value:""});var Nd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"regeneratePostByEmailAddress",(function(e){Uc.tracks.recordJetpackClick("pbe-regenerage-email"),e.preventDefault(),n.props.regeneratePostByEmailAddress()})),ha()(Os()(n),"address",(function(){var e=n.props.getOptionValue("post_by_email_address");return!1===e||"1"===e||null===e?"":e})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){if(!this.props.isModuleFound("post-by-email"))return null;var e=this.props.getModule("post-by-email"),t=this.props.getOptionValue("post-by-email"),n=this.props.isUnavailableInDevMode("post-by-email")||!this.props.isLinked,r=this.address();return o.a.createElement(Yu,Bc()({},this.props,{module:"post-by-email",hideButton:!0}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:e,support:{text:Us("Allows you to publish new posts by sending an email to a special address."),link:Vl("jetpack-support-post-by-email")}},o.a.createElement("p",null,Us("Post by email is a quick way to publish new posts without visiting your site. We’ll generate a unique email address for you to send your content to, which will then appear on your site just like any other post.")),this.props.userCanManageModules?o.a.createElement(ku,{slug:"post-by-email",compact:!0,disabled:n,activated:t,toggling:this.props.isSavingAnyOption("post-by-email"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},this.props.module("post-by-email").description)):o.a.createElement("span",{className:"jp-form-toggle-explanation"},this.props.module("post-by-email").description),o.a.createElement(Hl,null,o.a.createElement(ql,null,o.a.createElement(Kl,null,Us("Send your new posts to this email address:")),o.a.createElement(Od,{value:r,disabled:!t||n,copy:Us("Copy",{context:"verb"}),copied:Us("Copied!"),prompt:Us("Highlight and copy the following text to your clipboard:")})),o.a.createElement(xc,{disabled:!t||n,onClick:this.regeneratePostByEmailAddress},Us(r?"Regenerate address":"Create address")))),!this.props.isUnavailableInDevMode("post-by-email")&&!this.props.isLinked&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",href:"".concat(this.props.connectUrl,"&from=unlinked-user-pbe")},Us("Create a Jetpack account to use this feature")))}}]),t}(o.a.Component),Td=le((function(e){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)}}}))(Cu(Nd)),Pd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.isModuleFound("widgets"),t=this.props.isModuleFound("widget-visibility");return e||t?o.a.createElement(Yu,Bc()({},this.props,{header:Us("Widgets",{context:"Settings header"}),module:"widgets",hideButton:!0}),e&&o.a.createElement(ep,{module:{module:"widgets"},support:{text:this.props.widgetsModule.description,link:Vl("jetpack-support-extra-sidebar-widgets")}},o.a.createElement(ku,{slug:"widgets",activated:this.props.widgetsActive,toggling:this.props.isSavingAnyOption("widgets"),toggleModule:this.props.toggleModuleNow},Us("Make extra widgets available for use on your site including subscription forms and Twitter streams"))),t&&o.a.createElement(ep,{module:{module:"widget-visibility"},support:{text:Us("Widget visibility lets you decide which widgets appear on which pages, so you can finely tailor widget content."),link:Vl("jetpack-support-widget-visibility")}},o.a.createElement(ku,{slug:"widget-visibility",activated:this.props.widgetVisibilityActive,toggling:this.props.isSavingAnyOption("widget-visibility"),toggleModule:this.props.toggleModuleNow},Us("Enable widget visibility controls to display widgets only on particular posts or pages")))):null}}]),t}(s.Component),Id=Cu(le((function(e,t){return{widgetVisibilityActive:t.getOptionValue("widget-visibility"),widgetsActive:t.getOptionValue("widgets"),widgetsModule:qa(e,"widgets"),isModuleFound:function(t){return ko(e,t)}}}))(Pd)),Dd=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.getOptionValue("masterbar"),t=this.props.isUnavailableInDevMode("masterbar"),n=this.props.isLinked;return o.a.createElement(Yu,Bc()({},this.props,{header:Us("WordPress.com toolbar",{context:"Settings header"}),module:"masterbar",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:"masterbar"},support:{text:Us("Adds a toolbar with links to all your sites, notifications, your WordPress.com profile, and the Reader."),link:Vl("jetpack-support-masterbar")}},o.a.createElement("p",null,Us("The WordPress.com toolbar replaces the default WordPress admin toolbar. It offers one-click access to notifications, your WordPress.com profile and your other Jetpack and WordPress.com websites. You can also catch up on the sites you follow in the Reader.")),o.a.createElement(ku,{slug:"masterbar",disabled:t||!n,activated:e,toggling:this.props.isSavingAnyOption("masterbar"),toggleModule:this.props.toggleModuleNow},Us("Enable the WordPress.com toolbar"))),!this.props.isUnavailableInDevMode("masterbar")&&!this.props.isLinked&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",href:"".concat(this.props.connectUrl,"&from=unlinked-user-masterbar")},Us("Create a Jetpack account to use this feature")))}}]),t}(s.Component)),Rd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{carousel_display_exif:n.props.getOptionValue("carousel_display_exif","carousel")}),ha()(Os()(n),"updateOptions",(function(e){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption("carousel",e))})),ha()(Os()(n),"handleCarouselDisplayExifChange",(function(){n.updateOptions("carousel_display_exif")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.isModuleFound("carousel");if(!e)return null;var t=this.props.getOptionValue("carousel");return o.a.createElement(Yu,Bc()({},this.props,{module:"media",header:Us("Media"),hideButton:!e,saveDisabled:this.props.isSavingAnyOption("carousel_background_color")}),o.a.createElement(ep,{hasChild:!0,module:{module:"carousel"},support:{link:Vl("jetpack-support-carousel")}},o.a.createElement("p",null,Us("Create full-screen carousel slideshows for the images in your posts and pages. Carousel galleries are mobile-friendly and encourage site visitors to interact with your photos.")),o.a.createElement(ku,{slug:"carousel",activated:t,toggling:this.props.isSavingAnyOption("carousel"),toggleModule:this.props.toggleModuleNow},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Display images in a full-screen carousel gallery"))),o.a.createElement(Hl,null,o.a.createElement(_u,{checked:this.state.carousel_display_exif,disabled:!t||this.props.isSavingAnyOption(["carousel","carousel_display_exif"]),onChange:this.handleCarouselDisplayExifChange},o.a.createElement("span",{className:"jp-form-toggle-explanation"},Us("Show photo Exif metadata in carousel (when available)"))),o.a.createElement(Hl,null,o.a.createElement("p",{className:"jp-form-setting-explanation"},Us("Exif data shows viewers additional technical details of a photo, like its focal length, aperture, and ISO."))),o.a.createElement(ql,null,o.a.createElement(Kl,{className:"jp-form-label-wide"},Us("Carousel color scheme")),o.a.createElement(Xl,Bc()({name:"carousel_background_color",value:this.props.getOptionValue("carousel_background_color"),disabled:!t||this.props.isSavingAnyOption(["carousel","carousel_background_color"])},this.props,{validValues:this.props.validValues("carousel_background_color","carousel")}))))))}}]),t}(s.Component),Ud=le((function(e){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)}}}))(Cu(Rd)),Ld=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isLinked:this.props.isLinked,getModuleOverride:this.props.getModuleOverride},t=["carousel","copy-post","custom-css","latex","masterbar","markdown","shortcodes","custom-content-types","post-by-email","infinite-scroll","widgets","widget-visibility"].some(this.props.isModuleFound);if(!this.props.searchTerm&&!this.props.active)return null;if(!t)return null;var n=this.props.userCanManageModules||this.props.userCanEditPosts,r=this.props.userCanManageModules||this.props.userCanEditPosts&&this.props.isModuleActivated("post-by-email");return o.a.createElement("div",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:this.props.searchTerm?Us("Writing"):Us("Compose content the way you want to and streamline your publishing experience."),className:"jp-settings-description"}),this.props.isModuleFound("carousel")&&o.a.createElement(Ud,e),n&&o.a.createElement(kd,Bc()({},e,{userCanManageModules:this.props.userCanManageModules})),this.props.isModuleFound("custom-content-types")&&o.a.createElement(Cd,e),o.a.createElement(Md,e),o.a.createElement(Id,e),this.props.isModuleFound("post-by-email")&&r&&o.a.createElement(Td,Bc()({},e,{connectUrl:this.props.connectUrl,isLinked:this.props.isLinked,userCanManageModules:this.props.userCanManageModules})),this.props.isModuleFound("masterbar")&&!this.props.masterbarIsAlwaysActive&&o.a.createElement(Dd,Bc()({connectUrl:this.props.connectUrl},e)),!n&&!r&&o.a.createElement(Dl,null,Us("Writing tools available to you will be shown here when an administrator enables them.")))}}]),t}(o.a.Component);ha()(Ld,"displayName","WritingSettings");var Fd=le((function(e){return{module:function(t){return qa(e,t)},settings:So(e),masterbarIsAlwaysActive:Vi(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},userCanEditPosts:Si(e),isModuleActivated:function(t){return Ga(e,t)},isLinked:Xs(e),userCanManageModules:Ei(e),isModuleFound:function(t){return ko(e,t)},connectUrl:Js(e),getModuleOverride:function(t){return $a(e,t)}}}))(Ld),zd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={route:this.props.route,searchTerm:this.props.searchTerm,rewindStatus:this.props.rewindStatus,userCanManageModules:this.props.userCanManageModules};return o.a.createElement("div",{className:"jp-settings-container"},o.a.createElement("div",{className:"jp-no-results"},e.searchTerm?Us("No search results found for %(term)s",{args:{term:e.searchTerm}}):Us("Enter a search term to find settings or close search.")),o.a.createElement(Wp,Bc()({siteAdminUrl:this.props.siteAdminUrl,siteRawUrl:this.props.siteRawUrl,active:"/security"===this.props.route.path||"/settings"===this.props.route.path&&e.userCanManageModules},e)),o.a.createElement(ip,Bc()({siteRawUrl:this.props.siteRawUrl,active:"/discussion"===this.props.route.path},e)),o.a.createElement(_p,Bc()({active:"/performance"===this.props.route.path},e)),o.a.createElement(_d,Bc()({siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,active:"/traffic"===this.props.route.path},e)),o.a.createElement(Fd,Bc()({siteAdminUrl:this.props.siteAdminUrl,active:"/writing"===this.props.route.path||"/settings"===this.props.route.path&&!e.userCanManageModules},e)),o.a.createElement(Qp,Bc()({siteAdminUrl:this.props.siteAdminUrl,active:"/sharing"===this.props.route.path},e)),o.a.createElement(Sp,Bc()({active:"/privacy"===this.props.route.path},e)),o.a.createElement(Ap,{searchTerm:this.props.searchTerm}))}}]),t}(o.a.Component);ha()(zd,"displayName","SearchableSettings");n(371);var Bd=function(e){return o.a.createElement("div",{className:"jp-setup-wizard-intro"},o.a.createElement("img",{width:"200px",height:"200px",src:rd+"/jetpack-powering-up.svg",alt:Us("A jetpack site powering up")}),o.a.createElement("h1",{className:"jp-setup-wizard-header"},Us("Set up Jetpack for better site security, performance, and more")),o.a.createElement("p",{className:"jp-setup-wizard-paragraph"},Us("Jetpack is a cloud-powered tool built by Automattic.")),o.a.createElement("p",{className:"jp-setup-wizard-paragraph"},Us("Answer a few questions and we’ll help you secure, speed up, customize, and grow your WordPress website.")),o.a.createElement("div",{className:"jp-setup-wizard-intro-question"},o.a.createElement("h2",null,Us("What will %(siteTitle)s be used for?",{args:{siteTitle:e.siteTitle}})),o.a.createElement("div",{className:"jp-setup-wizard-answer-buttons"},o.a.createElement(xc,{primary:!0,className:"jp-setup-wizard-button"},Us("Personal Use")),o.a.createElement(xc,{className:"jp-setup-wizard-button",primary:!0},Us("Business Use"))),o.a.createElement("a",{className:"jp-setup-wizard-skip-link",href:""},Us("Skip to recommended features"))))};Bd.propTypes={siteTitle:u.a.string.isRequired};var Vd=le((function(e){return{siteTitle:yi(e)}}))((function(e){return o.a.createElement(o.a.Fragment,null,o.a.createElement(zl,null),o.a.createElement(Bd,{siteTitle:e.siteTitle}))})),Hd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackCogClick",(function(){Uc.tracks.recordJetpackClick({target:"settings-cog",group:"security",page:"aag"})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e,t,n=Mc()(this.props.className,"jp-dash-section-header");return this.props.externalLink&&(e=o.a.createElement("a",{className:"jp-dash-section-header__external-link",href:this.props.externalLinkPath,onClick:this.props.externalLinkClick},this.props.externalLink)),this.props.children&&(t=o.a.createElement("div",{className:"jp-dash-section-header__children"},this.props.children)),o.a.createElement("div",{className:n},o.a.createElement("div",{className:"jp-dash-section-header__label"},o.a.createElement("h2",{className:"jp-dash-section-header__name"},this.props.label)),e,t)}}]),t}(o.a.Component);ha()(Hd,"displayName","DashSectionHeader"),ha()(Hd,"propTypes",{label:u.a.string.isRequired,settingsPath:u.a.string,externalLinkPath:u.a.string,externalLink:u.a.string,externalLinkClick:u.a.func}),ha()(Hd,"defaultProps",{label:"",settingsPath:"",externalLinkPath:"",externalLink:""});var qd=Hd,Kd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"toggleModule",(function(){var e=n.props,t=e.updateOptions,r=e.module,i=e.getOptionValue;t(ha()({},r,!i(r)))})),ha()(Os()(n),"trackPaidBtnClick",(function(){Uc.tracks.recordJetpackClick({target:"paid-button",feature:n.props.module,page:"aag"})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e,t,n="",r=Mc()(this.props.className,"jp-dash-item",this.props.disabled?"jp-dash-item__disabled":"");return""!==this.props.module&&(t=Object(Dt.includes)(["monitor","protect","photon","vaultpress","scan","backups","akismet","search"],this.props.module)&&this.props.isDevMode||"manage"===this.props.module?"":o.a.createElement(ku,{slug:this.props.module,activated:this.props.getOptionValue(this.props.module),toggling:this.props.isUpdating(this.props.module),toggleModule:this.toggleModule,compact:!0}),"manage"===this.props.module&&("is-warning"===this.props.status&&(t=o.a.createElement("a",{href:this.props.isDevMode?this.props.siteAdminUrl+"update-core.php":Vl("calypso-plugins-manage",{site:this.props.siteRawUrl})},o.a.createElement(Pu,{showDismiss:!1,status:this.props.status,isCompact:!0},Us("Updates needed",{context:"Short warning message"})))),"is-working"===this.props.status&&(t=o.a.createElement("span",{className:"jp-dash-item__active-label"},Us("Active")))),"rewind"===this.props.module&&(t=null)),this.props.pro&&!this.props.isDevMode&&(n=o.a.createElement(xc,{onClick:this.trackPaidBtnClick,compact:!0,href:"#/plans"},Us("Paid",{context:"Short label appearing near a paid feature configuration block."})),this.props.isModule&&(t=o.a.createElement(zu,{proFeature:this.props.module,siteAdminUrl:this.props.siteAdminUrl}))),this.props.module&&this.props.getModule&&(e=this.props.getModule(this.props.module)),o.a.createElement("div",{className:r},o.a.createElement(Nu,{label:this.props.label,cardBadge:n},this.props.userCanToggle?t:""),this.props.overrideContent?this.props.overrideContent:o.a.createElement(Dl,{className:"jp-dash-item__card",href:this.props.href},o.a.createElement("div",{className:"jp-dash-item__content"},this.props.support.link&&o.a.createElement(Qu,Bc()({module:e},this.props.support)),this.props.children)))}}]),t}(s.Component);ha()(Kd,"propTypes",{label:u.a.string,status:u.a.string,statusText:u.a.string,disabled:u.a.bool,module:u.a.string,pro:u.a.bool,isModule:u.a.bool,support:u.a.object,overrideContent:u.a.element}),ha()(Kd,"defaultProps",{label:"",module:"",pro:!1,isModule:!0,support:{text:"",link:""}});var Jd=le((function(e){return{getModule:function(t){return qa(e,t)},isDevMode:Qs(e),userCanToggle:Ei(e),siteRawUrl:vi(e),siteAdminUrl:bi(e)}}))(Cu(Kd)),Wd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.inDevMode,t=Us("Jetpack keeps a complete record of everything that happens on your site, taking the guesswork out of site management, debugging, and repair.");return o.a.createElement("div",{className:"jp-dash-item__interior"},o.a.createElement(Jd,{label:Us("Activity"),isModule:!1,className:Mc()({"jp-dash-item__is-inactive":e}),pro:!1},o.a.createElement("p",{className:"jp-dash-item__description"},e?Us("Unavailable in Dev Mode."):t)),o.a.createElement(Dl,{key:"view-activity",className:"jp-dash-item__manage-in-wpcom",compact:!0,href:Vl("calypso-activity-log",{site:this.props.siteRawUrl})},Us("View site activity")))}}]),t}(s.Component);ha()(Wd,"propTypes",{inDevMode:u.a.bool.isRequired,siteRawUrl:u.a.string.isRequired,sitePlan:u.a.object.isRequired}),ha()(Wd,"defaultProps",{inDevMode:!1,siteRawUrl:"",sitePlan:""});var Gd=le((function(e){return{sitePlan:qo(e),inDevMode:Qs(e)}}))(Wd),Yd=(n(372),function(){}),$d=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){if(!this.props.showOnMobile&&Xc())return null;var e=Mc()("dops-popover","dops-tooltip","is-".concat(this.props.position),this.props.className);return o.a.createElement(bu,{autoPosition:this.props.autoPosition,className:e,rootClassName:this.props.rootClassName,context:this.props.context,id:this.props.id,isVisible:this.props.isVisible,onClose:Yd,position:this.props.position,showDelay:this.props.showDelay},this.props.children)}}]),t}(s.Component);ha()($d,"propTypes",{autoPosition:u.a.bool,className:u.a.string,id:u.a.string,isVisible:u.a.bool,position:u.a.string,rootClassName:u.a.string,status:u.a.string,showDelay:u.a.number,showOnMobile:u.a.bool}),ha()($d,"defaultProps",{showDelay:100,position:"top",showOnMobile:!1});var Xd=$d,Qd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{showPopover:!1}),ha()(Os()(n),"buildSections",(function(){var e,t,r=n.props.data.value,i=n.props.max,a=100-(i?Math.ceil(r/i*1e4)/100:0),s=Math.max(1,Math.floor(a)),c=[],l=n.props.data.nestedValue,u={"dops-chart__bar-section":!0,"is-spacer":!0,"is-ghost":100===a&&!n.props.active},p={height:s+"%"};c.push(o.a.createElement("div",{key:"spacer",className:Mc()(u),style:p}));var d={top:s+"%"};return l&&(t={height:(r?Math.ceil(l/r*1e4)/100:0)+"%"},e=o.a.createElement("div",{key:"nestedValue",className:"dops-chart__bar-section-inner",style:t})),c.push(o.a.createElement("div",{ref:"valueBar",key:"value",className:"dops-chart__bar-section is-bar",style:d},e)),c.push(o.a.createElement("div",{key:"label",className:"dops-chart__bar-label"},n.props.label)),c})),ha()(Os()(n),"clickHandler",(function(){"function"==typeof n.props.clickHandler&&n.props.clickHandler(n.props.data)})),ha()(Os()(n),"mouseEnter",(function(){n.setState({showPopover:!0})})),ha()(Os()(n),"mouseLeave",(function(){n.setState({showPopover:!1})})),ha()(Os()(n),"renderTooltip",(function(){if(!n.props.data.tooltipData||!n.props.data.tooltipData.length||n.props.isTouch)return null;var e=n.props.data.tooltipData.map((function(e,t){var n,r=["module-content-list-item"];return e.icon&&(n=o.a.createElement(ml,{icon:e.icon,size:18})),r.push(e.className),o.a.createElement("li",{key:t,className:r.join(" ")},o.a.createElement("span",{className:"dops-wrapper"},o.a.createElement("span",{className:"value"},e.value),o.a.createElement("span",{className:"label"},n,e.label)))}));return o.a.createElement(Xd,{className:"dops-chart__tooltip",id:"popover__chart-bar",showDelay:200,context:n.refs&&n.refs.valueBar,isVisible:n.state.showPopover,position:n.props.tooltipPosition},o.a.createElement("ul",null,e))})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props.count||1,t={"dops-chart__bar":!0};this.props.className&&(t[this.props.className]=!0);var n={width:1/e*100+"%"};return o.a.createElement("div",{role:"button",tabIndex:0,onClick:this.clickHandler,onMouseEnter:this.mouseEnter,onMouseLeave:this.mouseLeave,className:Mc()(t),style:n},this.buildSections(),o.a.createElement("div",{className:"dops-chart__bar-marker is-hundred"}),o.a.createElement("div",{className:"dops-chart__bar-marker is-fifty"}),o.a.createElement("div",{className:"dops-chart__bar-marker is-zero"}),this.renderTooltip())}}]),t}(o.a.Component);ha()(Qd,"displayName","ModuleChartBar"),ha()(Qd,"propTypes",{isTouch:u.a.bool,tooltipPosition:u.a.string,className:u.a.string,clickHandler:u.a.func,data:u.a.object.isRequired,max:u.a.number,count:u.a.number});var Zd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={width:this.props.width+"px"};return e.left=this.props.x+"px",o.a.createElement("div",{className:"dops-chart__x-axis-label",style:e},this.props.label)}}]),t}(o.a.Component);ha()(Zd,"displayName","ModuleChartLabel"),ha()(Zd,"propTypes",{width:u.a.number.isRequired,x:u.a.number.isRequired,label:u.a.string.isRequired});var eh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{divisor:1,spacing:n.props.labelWidth}),ha()(Os()(n),"resize",(function(e){var t=n.props,r=n.refs.axis;!e||e instanceof Event||(t=e),r.style.overflow="hidden";var i=r.clientWidth;r.style.overflow="visible";var a=i/(t.data.length||1),s=t.labelWidth,o=Math.ceil(s/a);n.setState({divisor:o,spacing:a})})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){this.resizeThrottled=Object(Dt.throttle)(this.resize,400),window.addEventListener("resize",this.resizeThrottled),this.resize()}},{key:"componentWillUnmount",value:function(){this.resizeThrottled.cancel&&this.resizeThrottled.cancel(),window.removeEventListener("resize",this.resizeThrottled)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.resize(e)}},{key:"render",value:function(){var e=this.props.data,t=e.map((function(t,n){var r,i=n*this.state.spacing+(this.state.spacing-this.props.labelWidth)/2;return(e.length-n-1)%this.state.divisor==0&&(r=o.a.createElement(Zd,{key:n,label:t.label,width:this.props.labelWidth,x:i})),r}),this);return o.a.createElement("div",{ref:"axis",className:"dops-chart__x-axis"},t)}}]),t}(o.a.Component);ha()(eh,"displayName","ModuleChartXAxis"),ha()(eh,"propTypes",{labelWidth:u.a.number.isRequired,data:u.a.array.isRequired});var th=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"buildBars",(function(e){var t=n.props.data.length,r=n.props.chartWidth,i=r/t,a="bottom right";return n.props.data.map((function(n,s){var c=i*(s+1);return c+230>r&&c+i-230>0&&(a="bottom left"),o.a.createElement(Qd,{index:s,key:s,isTouch:this.props.isTouch,tooltipPosition:a,className:n.className,clickHandler:this.props.barClick,data:n,max:e,count:t})}),Os()(n))})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("div",null,o.a.createElement("div",{className:"dops-chart__bars"},this.buildBars(this.props.yAxisMax)),o.a.createElement(eh,{data:this.props.data,labelWidth:42}))}}]),t}(o.a.Component);
";i:70;s:194332:"function nh(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}ha()(th,"displayName","ModuleChartBarContainer"),ha()(th,"propTypes",{isTouch:u.a.bool,data:u.a.array,yAxisMax:u.a.number,width:u.a.number,barClick:u.a.func});n(373);var rh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{maxBars:100,width:650}),ha()(Os()(n),"resize",(function(){var e,t=n.refs.chart.clientWidth-82;nh()?(t=t<=0?350:t,e=Math.floor(t/n.props.minTouchBarWidth)):e=Math.floor(t/n.props.minBarWidth),n.setState({maxBars:e,width:t})})),ha()(Os()(n),"getYAxisMax",(function(e){var t=Math.max.apply(null,e),n=Math.pow(10,t.toString().length-1),r=Math.ceil((t+1)/n)*n;return r<10&&(r=10),r})),ha()(Os()(n),"getData",(function(){var e=n.props.data;return e=e.slice(0-n.state.maxBars)})),ha()(Os()(n),"getValues",(function(){var e=n.getData();return e=e.map((function(e){return e.value}),Os()(n))})),ha()(Os()(n),"isEmptyChart",(function(e){return 0===(e=e.filter((function(e){return e>0}),Os()(n))).length})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){this.resize=Object(Dt.throttle)(this.resize,400),window.addEventListener("resize",this.resize),this.resize()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resize)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.props.loading&&!e.loading&&this.resize()}},{key:"render",value:function(){var e,t=this.getValues(),n=this.getYAxisMax(t),r=this.getData();return t.length&&this.isEmptyChart(t)&&(e=o.a.createElement("div",{className:"dops-chart__empty"},o.a.createElement("span",{className:"dops-chart__empty_notice"},Us("No activity this period",{context:"Notice in the empty statistics chart"})))),o.a.createElement("div",{ref:"chart",className:"dops-chart"},o.a.createElement("div",{className:"dops-chart__y-axis-markers"},o.a.createElement("div",{className:"dops-chart__y-axis-marker is-hundred"}),o.a.createElement("div",{className:"dops-chart__y-axis-marker is-fifty"}),o.a.createElement("div",{className:"dops-chart__y-axis-marker is-zero"})),o.a.createElement("div",{className:"dops-chart__y-axis"},o.a.createElement("div",{className:"dops-chart__y-axis-width-fix"},new Number(1e5).toLocaleString()),o.a.createElement("div",{className:"dops-chart__y-axis-label is-hundred"},n.toLocaleString()),o.a.createElement("div",{className:"dops-chart__y-axis-label is-fifty"},(n/2).toLocaleString()),o.a.createElement("div",{className:"dops-chart__y-axis-label is-zero"},0)),o.a.createElement(th,{barClick:this.props.barClick,data:r,yAxisMax:n,chartWidth:this.state.width,isTouch:nh()}),e)}}]),t}(o.a.Component);ha()(rh,"displayName","ModuleChart"),ha()(rh,"propTypes",{loading:u.a.bool,data:u.a.array,minTouchBarWidth:u.a.number,minBarWidth:u.a.number,barClick:u.a.func}),ha()(rh,"defaultProps",{minTouchBarWidth:42,minBarWidth:15,barClick:Dt.noop});var ih=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.fetchingStatsData||this.props.fetchStatsData(this.props.range)}},{key:"render",value:function(){return null}}]),t}(s.Component);ih.defaultProps={fetchStatsData:function(){}};var ah=le((function(e){return{fetchStatsData:function(t){return Su(e)},fetchingStatsData:Qi(e)}}),(function(e){return{fetchStatsData:function(t){return e(Su(t))}}}))(ih),sh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackViewDetailedStats",(function(){return Uc.tracks.recordJetpackClick("view_detailed_stats")})),ha()(Os()(n),"trackViewWpcomStats",(function(){return Uc.tracks.recordJetpackClick("view_wpcom_stats")})),n}return Ma()(t,e),As()(t,[{key:"statsBottom",value:function(){var e;return[{viewsToday:(e="object"==typeof this.props.statsData.general?this.props.statsData.general.stats:{views:"-",comments:"-",views_today:"-",views_best_day:"-",views_best_day_total:"-"}).views_today,bestDay:{day:e.views_best_day,count:e.views_best_day_total},allTime:{views:e.views,comments:e.comments}}]}},{key:"render",value:function(){var e=this.statsBottom()[0];return o.a.createElement("div",null,o.a.createElement("div",{className:"jp-at-a-glance__stats-summary"},o.a.createElement("div",{className:"jp-at-a-glance__stats-summary-today"},o.a.createElement("p",{className:"jp-at-a-glance__stat-details"},Us("Views today",{comment:"Referring to a number of page views"})),o.a.createElement("h3",{className:"jp-at-a-glance__stat-number"},e.viewsToday)),o.a.createElement("div",{className:"jp-at-a-glance__stats-summary-bestday"},o.a.createElement("p",{className:"jp-at-a-glance__stat-details"},Us("Best overall day",{comment:"Referring to a number of page views"})),o.a.createElement("h3",{className:"jp-at-a-glance__stat-number"},"-"===e.bestDay.count?"-":Us("%(number)s View","%(number)s Views",{count:e.bestDay.count,args:{number:Rs(e.bestDay.count)}})),o.a.createElement("p",{className:"jp-at-a-glance__stat-details"},"-"===e.bestDay.day?"-":Ds(e.bestDay.day).format("MMMM Do, YYYY"))),o.a.createElement("div",{className:"jp-at-a-glance__stats-summary-alltime"},o.a.createElement("div",{className:"jp-at-a-glance__stats-alltime-views"},o.a.createElement("p",{className:"jp-at-a-glance__stat-details"},Us("All-time views",{comment:"Referring to a number of page views"})),o.a.createElement("h3",{className:"jp-at-a-glance__stat-number"},"-"===e.allTime.views?"-":Rs(e.allTime.views))),o.a.createElement("div",{className:"jp-at-a-glance__stats-alltime-comments"},o.a.createElement("p",{className:"jp-at-a-glance__stat-details"},Us("All-time comments",{comment:"Referring to a number of comments"})),o.a.createElement("h3",{className:"jp-at-a-glance__stat-number"},"-"===e.allTime.comments?"-":Rs(e.allTime.comments))))),o.a.createElement("div",{className:"jp-at-a-glance__stats-cta"},o.a.createElement("div",{className:"jp-at-a-glance__stats-cta-description"}),o.a.createElement("div",{className:"jp-at-a-glance__stats-cta-buttons"},Us("{{button}}View detailed stats{{/button}}",{components:{button:o.a.createElement(xc,{onClick:this.trackViewDetailedStats,href:this.props.siteAdminUrl+"admin.php?page=stats"})}}),this.props.isLinked&&Us("{{button}}View more stats on WordPress.com {{/button}}",{components:{button:o.a.createElement(xc,{onClick:this.trackViewWpcomStats,className:"is-primary",href:Vl("calypso-stats-insights",{site:this.props.siteRawUrl})})}}))),!this.props.isLinked&&o.a.createElement(Dl,{compact:!0,className:"jp-settings-card__configure-link",href:"".concat(this.props.connectUrl,"&from=unlinked-user-connect")},Us("Connect your account to WordPress.com to view more stats")))}}]),t}(s.Component);sh.propTypes={siteRawUrl:u.a.string.isRequired,siteAdminUrl:u.a.string.isRequired,statsData:u.a.object.isRequired,isLinked:u.a.bool.isRequired},sh.defaultProps={siteRawUrl:"",siteAdminUrl:"",statsData:{},isLinked:!1};var oh=sh,ch=function(e){function t(e){var n;return _a()(this,t),n=ka()(this,Ca()(t).call(this,e)),ha()(Os()(n),"dismissCard",(function(){n.setState({emptyStatsDismissed:!0}),n.props.updateOptions({dismiss_empty_stats_card:!0})})),ha()(Os()(n),"activateStats",(function(){return n.props.updateOptions({stats:!0})})),ha()(Os()(n),"switchToDay",(function(){return n.switchTo("day")})),ha()(Os()(n),"switchToWeek",(function(){return n.switchTo("week")})),ha()(Os()(n),"switchToMonth",(function(){return n.switchTo("month")})),n.state={emptyStatsDismissed:e.isEmptyStatsCardDismissed},n}return Ma()(t,e),As()(t,[{key:"barClick",value:function(e){e.data.link&&(Uc.tracks.recordJetpackClick("stats_bar"),window.open(e.data.link,"_blank"))}},{key:"statsChart",value:function(e){var t=this.props,n=[],r=0;return"object"!=typeof t.statsData[e]?{chartData:n,totalViews:!1}:(Object(Dt.forEach)(t.statsData[e].data,(function(i){var a=i[1],s=i[0],o="",c="";r+=a,"day"===e?(o=Ds(s).format("MMM D"),c=Ds(s).format("MMMM Do")):"week"===e?(s=s.replace(/W/g,"-"),o=Ds(s).format("MMM D"),c=Us("Week of %(date)s",{args:{date:Ds(s).format("MMMM Do")}})):"month"===e&&(o=Ds(s).format("MMM"),c=Ds(s).format("MMMM, YYYY")),n.push({label:o,value:a,nestedValue:null,className:"statsChartbar",data:{link:Vl("calypso-stats-".concat(e),{site:t.siteRawUrl,query:"startDate=".concat(s)})},tooltipData:[{label:c,value:Us("Views: %(numberOfViews)s",{args:{numberOfViews:Rs(a)}}),className:"tooltip class"},{label:Us("Click to view detailed stats.")}]})})),{chartData:n,totalViews:r})}},{key:"statsErrors",value:function(){return Object(Dt.get)(this.props.statsData,["general","errors"],!1)}},{key:"renderStatsChart",value:function(e){return o.a.createElement("div",null,o.a.createElement("div",{className:"jp-at-a-glance__stats-chart"},o.a.createElement(rh,{data:e,barClick:this.barClick}),0===e.length&&o.a.createElement(fl,null)),o.a.createElement("div",{id:"stats-bottom",className:"jp-at-a-glance__stats-bottom"},o.a.createElement(oh,{statsData:this.props.statsData,siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,isLinked:this.props.isLinked,connectUrl:this.props.connectUrl})))}},{key:"renderEmptyStatsCard",value:function(){return o.a.createElement(Dl,{className:"jp-at-a-glance__stats-empty"},o.a.createElement("img",{src:rd+"stats-people.svg",width:"272",height:"144",alt:Us("Jetpack Stats People"),className:"jp-at-a-glance__stats-icon"}),o.a.createElement("p",null,Us("Hello there! Your stats have been activated."),o.a.createElement("br",null),Us("Just give us a little time to collect data so we can display it for you here.")),o.a.createElement(xc,{onClick:this.dismissCard,primary:!0},Us("Okay, got it!")))}},{key:"renderStatsArea",value:function(){if(this.props.getOptionValue("stats")){if(this.statsErrors())return o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive"},o.a.createElement("span",null,Us("Something happened while loading stats. Please try again later or {{a}}view your stats now on WordPress.com{{/a}}",{components:{a:o.a.createElement("a",{href:Vl("calypso-stats-insights",{site:this.props.siteRawUrl})})}})));var e=this.statsChart(this.props.activeTab),t=e.chartData,n=e.totalViews,r=t.length&&n<=0&&!this.props.isEmptyStatsCardDismissed&&!this.state.emptyStatsDismissed;return o.a.createElement("div",{className:"jp-at-a-glance__stats-container"},r?this.renderEmptyStatsCard():this.renderStatsChart(t))}return o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive"},o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive-icon"},o.a.createElement("img",{src:rd+"stats.svg",width:"60",height:"60",alt:Us("Jetpack Stats Icon"),className:"jp-at-a-glance__stats-icon"})),o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive-text"},this.props.isDevMode?Us("Unavailable in Dev Mode"):Us("{{a}}Activate Site Stats{{/a}} to see detailed stats, likes, followers, subscribers, and more! {{a1}}Learn More{{/a1}}",{components:{a:o.a.createElement("a",{href:"javascript:void(0)",onClick:this.activateStats}),a1:o.a.createElement("a",{href:Vl("jetpack-support-wordpress-com-stats"),target:"_blank",rel:"noopener noreferrer"})}})),!this.props.isDevMode&&o.a.createElement("div",{className:"jp-at-a-glance__stats-inactive-button"},o.a.createElement(xc,{onClick:this.activateStats,primary:!0},Us("Activate Site Stats"))))}},{key:"switchTo",value:function(e){Uc.tracks.recordJetpackClick({target:"stats_switch_view",view:e}),this.props.switchView(e),this.props.fetchStatsData(e)}},{key:"maybeShowStatsTabs",value:function(){return!(!1===this.statsChart(this.props.activeTab).totalViews&&!this.props.isEmptyStatsCardDismissed&&!this.state.emptyStatsDismissed)&&(this.props.getOptionValue("stats")&&!this.statsErrors()?o.a.createElement("ul",{className:"jp-at-a-glance__stats-views"},o.a.createElement("li",{className:"jp-at-a-glance__stats-view"},o.a.createElement("a",{tabIndex:"0",href:"javascript:void(0)",onClick:this.switchToDay,className:this.getClass("day")},Us("Days"))),o.a.createElement("li",{className:"jp-at-a-glance__stats-view"},o.a.createElement("a",{tabIndex:"0",href:"javascript:void(0)",onClick:this.switchToWeek,className:this.getClass("week")},Us("Weeks"))),o.a.createElement("li",{className:"jp-at-a-glance__stats-view"},o.a.createElement("a",{tabIndex:"0",href:"javascript:void(0)",onClick:this.switchToMonth,className:this.getClass("month")},Us("Months")))):void 0)}},{key:"getClass",value:function(e){return this.props.activeTab===e?"jp-at-a-glance__stats-view-link is-current":"jp-at-a-glance__stats-view-link"}},{key:"render",value:function(){return"inactive"===this.props.getModuleOverride("stats")?o.a.createElement("div",null,o.a.createElement(Wu,{moduleName:Us("Site Stats")})):this.props.isModuleAvailable&&o.a.createElement("div",null,o.a.createElement(ah,{range:this.props.activeTab}),o.a.createElement(qd,{label:Us("Site Stats")},this.maybeShowStatsTabs()),o.a.createElement(Dl,{className:"jp-at-a-glance__stats-card "+(this.props.isDevMode?"is-inactive":"")},this.renderStatsArea()))}}]),t}(s.Component);ha()(ch,"propTypes",{isDevMode:u.a.bool.isRequired,siteRawUrl:u.a.string.isRequired,siteAdminUrl:u.a.string.isRequired,statsData:u.a.any.isRequired,isModuleAvailable:u.a.bool.isRequired});var lh=le((function(e){return{isModuleAvailable:Ya(e,"stats"),activeTab:Xi(e),isDevMode:Qs(e),isLinked:Xs(e),connectUrl:Js(e),statsData:Object(Dt.isEmpty)(Zi(e))?mi(e):Zi(e),isEmptyStatsCardDismissed:To(e),getModuleOverride:function(t){return $a(e,t)}}}),(function(e){return{switchView:function(t){return e(function(e){return function(t){t({type:Jn,activeStatsTab:e})}}(t))},fetchStatsData:function(t){return e(Su(t))}}}))(ch),uh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){!this.props.fetchingProtectData&&this.props.isModuleActivated("protect")&&this.props.fetchProtectCount()}},{key:"render",value:function(){return null}}]),t}(s.Component);uh.defaultProps={fetchProtectCount:function(){}};var ph=le((function(e){return{fetchProtectCount:Mu(),fetchingProtectData:ia(e),isModuleActivated:function(t){return Ga(e,t)}}}),(function(e){return P({fetchProtectCount:Mu},e)}))(uh),dh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"activateProtect",(function(){return n.props.updateOptions({protect:!0})})),n}return Ma()(t,e),As()(t,[{key:"getContent",value:function(){var e=Us("Protect"),t={text:Us("Protects your site from traditional and distributed brute force login attacks."),link:Vl("jetpack-support-protect")};if(this.props.getOptionValue("protect")){var n=this.props.protectCount;return!1===n||"0"===n||"N/A"===n?o.a.createElement(Jd,{label:e,module:"protect",support:t,status:"is-working",className:"jp-dash-item__recently-activated"},o.a.createElement("div",{className:"jp-dash-item__recently-activated-lower"},o.a.createElement(ph,null),o.a.createElement("p",{className:"jp-dash-item__description"},Us("Jetpack is actively blocking malicious login attempts. Data will display here soon!")))):o.a.createElement(Jd,{label:e,module:"protect",support:t,status:"is-working"},o.a.createElement("h2",{className:"jp-dash-item__count"},Rs(n)),o.a.createElement("p",{className:"jp-dash-item__description"},Us("Total malicious attacks blocked on your site.")))}return o.a.createElement(Jd,{label:e,module:"protect",support:t,className:"jp-dash-item__is-inactive"},o.a.createElement("p",{className:"jp-dash-item__description"},this.props.isDevMode?Us("Unavailable in Dev Mode"):Us("{{a}}Activate Protect{{/a}} to keep your site protected from malicious sign in attempts.",{components:{a:o.a.createElement("a",{href:"javascript:void(0)",onClick:this.activateProtect})}})))}},{key:"render",value:function(){return this.props.isModuleAvailable&&o.a.createElement("div",{className:"jp-dash-item__interior"},o.a.createElement(ph,null),this.getContent())}}]),t}(s.Component);ha()(dh,"propTypes",{isDevMode:u.a.bool.isRequired,protectCount:u.a.any.isRequired,isModuleAvailable:u.a.bool.isRequired});var hh=le((function(e){return{protectCount:aa(e),isDevMode:Qs(e),isModuleAvailable:Ya(e,"protect")}}))(dh),fh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"activateAndTrack",(function(){Uc.tracks.recordEvent("jetpack_wpa_module_toggle",{module:"monitor",toggled:"on"}),n.props.updateOptions({monitor:!0})})),n}return Ma()(t,e),As()(t,[{key:"getContent",value:function(){var e=Us("Downtime monitor"),t={text:Us("Jetpack’s downtime monitor will continuously monitor your site, and alert you the moment that downtime is detected."),link:Vl("jetpack-support-monitor")};return this.props.getOptionValue("monitor")?o.a.createElement(Jd,{label:e,module:"monitor",support:t,status:"is-working"},o.a.createElement("p",{className:"jp-dash-item__description"},Us("Jetpack is monitoring your site. If we think your site is down, you will receive an email."))):o.a.createElement(Jd,{label:e,module:"monitor",support:t,className:"jp-dash-item__is-inactive"},o.a.createElement("p",{className:"jp-dash-item__description"},this.props.isDevMode?Us("Unavailable in Dev Mode."):Us("{{a}}Activate Monitor{{/a}} to receive email notifications if your site goes down.",{components:{a:o.a.createElement("a",{href:"javascript:void(0)",onClick:this.activateAndTrack})}})))}},{key:"render",value:function(){return this.props.isModuleAvailable&&this.getContent()}}]),t}(s.Component);ha()(fh,"propTypes",{isDevMode:u.a.bool.isRequired,isModuleAvailable:u.a.bool.isRequired});var mh=le((function(e){return{isDevMode:Qs(e),isModuleAvailable:Ya(e,"monitor")}}))(fh),gh=function(e){return o.a.createElement(Jd,{label:Us("Scan"),module:e.feature||"scan",support:{text:Us("Your site’s files are regularly scanned for unauthorized or suspicious modifications that could compromise your security and data."),link:Vl("jetpack-support-security")},className:e.className||"",status:e.status||"",pro:!0,overrideContent:e.overrideContent},Object(Dt.isArray)(e.content)?e.content:o.a.createElement("p",{className:"jp-dash-item__description"},e.content))},vh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"getVPContent",value:function(){var e=this.props,t=e.sitePlan,n=e.planClass,r=e.fetchingSiteData,i=!1!==t,a=this.props.vaultPressData,s=Object(Dt.get)(a,["data","features","security"],!1);if(this.props.getOptionValue("vaultpress")){if("N/A"===a)return gh({status:"",content:Us("Loading…")});if(s){var c=this.props.scanThreats;if(0!==c)return gh({content:[o.a.createElement("h3",{className:"jp-dash-item__title jp-dash-item__title_fullwidth jp-dash-item__title_top"},Us("Uh oh, %(number)s threat found.","Uh oh, %(number)s threats found.",{count:c,args:{number:Rs(c)}})),o.a.createElement("p",{className:"jp-dash-item__description"},Us("{{a}}View details at VaultPress.com{{/a}}",{components:{a:o.a.createElement("a",{href:Vl("vaultpress-dashboard")})}}),o.a.createElement("br",null),Us("{{a}}Contact Support{{/a}}",{components:{a:o.a.createElement("a",{href:Vl("jetpack-support")})}}))]});if("success"===a.code)return gh({status:"is-working",content:Us("No threats found, you're good to go!")})}}if(r)return gh({status:"",content:Us("Loading…")});var l=this.props.isVaultPressInstalled?"pro-inactive":"pro-uninstalled",u="is-premium-plan"===n||"is-business-plan"===n||s?o.a.createElement("p",{className:"jp-dash-item__description",key:"inactive-scanning"},Us("For automated, comprehensive scanning of security threats, please {{a}}install and activate{{/a}} VaultPress.",{components:{a:o.a.createElement("a",{href:Vl("calypso-plugins-vaultpress"),target:"_blank",rel:"noopener noreferrer"})}})):null,p=null===u?this.getUpgradeBanner():null;return gh({className:"jp-dash-item__is-inactive",status:i?l:"no-pro-uninstalled-or-inactive",content:[u],overrideContent:p})}},{key:"getUpgradeBanner",value:function(){return o.a.createElement(Ku,{callToAction:Us("Upgrade"),title:Us("Find threats early so we can help fix them fast."),disableHref:"false",href:this.props.upgradeUrl,eventFeature:"scan",path:"dashboard",plan:"jetpack_premium",icon:"lock"})}},{key:"getRewindContent",value:function(){var e=this.props,t=e.rewindStatus,n=e.siteRawUrl,r=function(e,t){return o.a.createElement(Dl,{compact:!0,key:"manage-backups",className:"jp-dash-item__manage-in-wpcom",href:e},t)},i=function(e){return gh({className:"jp-dash-item__is-active",status:"is-working",feature:"rewind",content:e})};switch(t){case"provisioning":return o.a.createElement(o.a.Fragment,null,i(Us("We are configuring your site protection.")));case"awaiting_credentials":return o.a.createElement(o.a.Fragment,null,i(Us("You need to enter your server's credentials to finish the setup.")),r(Vl("calypso-settings-security",{site:n}),Us("Enter credentials")));case"active":return o.a.createElement(o.a.Fragment,null,i(Us("We are making sure your site stays free of security threats. You will be notified if we find one.")),r(Vl("calypso-activity-log",{site:n}),Us("View security scan details")))}return!1}},{key:"getUpgradeContent",value:function(){return gh({className:"jp-dash-item__is-inactive",overrideContent:this.getUpgradeBanner()})}},{key:"render",value:function(){return this.props.showBackups?this.props.isDevMode?gh({className:"jp-dash-item__is-inactive",content:Us("Unavailable in Dev Mode.")}):(e=["is-free-plan","is-personal-plan","is-daily-backup-plan","is-realtime-backup-plan"].includes(this.props.planClass)?this.getUpgradeContent():"unavailable"===this.props.rewindStatus?this.getVPContent(this.props.planClass):o.a.createElement("div",{className:"jp-dash-item"},this.getRewindContent()),o.a.createElement("div",null,o.a.createElement(Du,null),e)):null;var e}}]),t}(s.Component);ha()(vh,"propTypes",{siteRawUrl:u.a.string.isRequired,rewindStatus:u.a.string.isRequired,vaultPressData:u.a.any.isRequired,scanThreats:u.a.any.isRequired,sitePlan:u.a.object.isRequired,isDevMode:u.a.bool.isRequired,isPluginInstalled:u.a.bool.isRequired,fetchingSiteData:u.a.bool.isRequired,upgradeUrl:u.a.string.isRequired}),ha()(vh,"defaultProps",{siteRawUrl:"",vaultPressData:"",scanThreats:0,sitePlan:"",isDevMode:!1,isPluginInstalled:!1,fetchingSiteData:!1,rewindStatus:""});var bh=le((function(e){var t=qo(e);return{vaultPressData:oa(e),scanThreats:ca(e),sitePlan:t,planClass:Lo(Object(Dt.get)(t,"product_slug","")),isDevMode:Qs(e),isVaultPressInstalled:ba(e,"vaultpress/vaultpress.php"),fetchingSiteData:Bo(e),showBackups:qi(e),upgradeUrl:Yi(e,"aag-scan")}}))(vh),yh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.fetchingAkismetData||this.props.fetchAkismetData()}},{key:"render",value:function(){return null}}]),t}(s.Component);yh.defaultProps={fetchAkismetData:function(){}};var _h=le((function(e){return{fetchAkismetData:Au(),fetchingAkismetData:ea(e)}}),(function(e){return P({fetchAkismetData:Au},e)}))(yh),wh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"onActivateClick",(function(){return n.trackActivateClick(),Da.activateAkismet().then((function(){window.location.href=n.props.siteAdminUrl+"admin.php?page=akismet-key-config"})),!1})),n}return Ma()(t,e),As()(t,[{key:"trackActivateClick",value:function(){Uc.tracks.recordJetpackClick({type:"activate-link",target:"at-a-glance",feature:"anti-spam"})}},{key:"getContent",value:function(){var e=this,t=this.props.akismetData,n=Us("Anti-spam"),r="jetpack_free"===Object(Dt.get)(this.props.sitePlan,"product_slug","jetpack_free"),i={text:Us("Jetpack Anti-spam powered by Akismet. Comments and contact form submissions are checked against our global database of spam."),link:"https://akismet.com/",privacyLink:"https://automattic.com/privacy/"},a=function(){var t=Us("Already have a key? {{a}}Activate Akismet{{/a}}",{components:{a:o.a.createElement("a",{href:"javascript:void(0)",onClick:e.onActivateClick})}});return o.a.createElement(Ku,{callToAction:Us("Upgrade"),title:Us("Automatically clear spam from your comments and forms so you can get back to your business."),description:t,disableHref:"false",href:e.props.upgradeUrl,eventFeature:"akismet",path:"dashboard",plan:"jetpack_premium",icon:"flag"})};if("N/A"===t)return o.a.createElement(Jd,{label:n,module:"akismet",support:i,pro:!0},o.a.createElement("p",{className:"jp-dash-item__description"},Us("Loading…")));var s=!1!==this.props.sitePlan;if(r){if("not_installed"===t)return o.a.createElement(Jd,{label:n,module:"akismet",support:i,className:"jp-dash-item__is-inactive",status:s?"pro-uninstalled":"no-pro-uninstalled-or-inactive",pro:!0,overrideContent:a()});if("not_active"===t)return o.a.createElement(Jd,{label:n,module:"akismet",support:i,status:s?"pro-inactive":"no-pro-uninstalled-or-inactive",className:"jp-dash-item__is-inactive",pro:!0,overrideContent:a()});if("invalid_key"===t)return o.a.createElement(Jd,{label:n,module:"akismet",support:i,className:"jp-dash-item__is-inactive",pro:!0,overrideContent:a()})}return["not_installed","not_active","invalid_key"].includes(t)?o.a.createElement(Jd,{label:n,module:"akismet",support:i,className:"jp-dash-item__is-inactive",pro:!0},Us("Your Jetpack plan provides anti-spam protection through Akismet. Click 'set up' to enable it on your site.")):[o.a.createElement(Jd,{key:"comment-moderation",label:n,module:"akismet",support:i,status:"is-working",pro:!0},o.a.createElement("h2",{className:"jp-dash-item__count"},Rs(t.all.spam)),o.a.createElement("p",{className:"jp-dash-item__description"},Us("Spam comments blocked.",{context:'Example: "412 Spam comments blocked"'}))),!this.props.isDevMode&&o.a.createElement(Dl,{key:"moderate-comments",className:"jp-dash-item__manage-in-wpcom",compact:!0,href:Vl("calypso-comments-all",{site:this.props.siteRawUrl})},Us("Moderate comments"))]}},{key:"render",value:function(){return o.a.createElement("div",{className:"jp-dash-item__interior"},o.a.createElement(_h,null),this.getContent())}}]),t}(s.Component);ha()(wh,"propTypes",{siteRawUrl:u.a.string.isRequired,siteAdminUrl:u.a.string.isRequired,akismetData:u.a.oneOfType([u.a.string,u.a.object]).isRequired,isDevMode:u.a.bool.isRequired,upgradeUrl:u.a.string.isRequired}),ha()(wh,"defaultProps",{siteRawUrl:"",siteAdminUrl:"",akismetData:"N/A",isDevMode:""});var kh=le((function(e){return{akismetData:ta(e),sitePlan:qo(e),isDevMode:Qs(e),upgradeUrl:Yi(e,"aag-akismet"),nonce:Ri(e)}}))(wh),Eh=function(e){return o.a.createElement(Jd,{label:Us("Backup"),module:e.feature||"backups",support:{text:Us("Jetpack Backups allow you to easily restore or download a backup from a specific moment."),link:Vl("jetpack-support-backup")},className:e.className,status:e.status,pro:!0,overrideContent:e.overrideContent},o.a.createElement("p",{className:"jp-dash-item__description"},e.content))},Ch=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"getVPContent",value:function(){var e=this.props,t=e.sitePlan,n=e.isVaultPressInstalled,r=e.getOptionValue,i=e.siteRawUrl,a=e.vaultPressData;return r("vaultpress")&&"success"===Object(Dt.get)(a,"code","")?Eh({className:"jp-dash-item__is-active",status:"is-working",content:o.a.createElement("span",null,Object(Dt.get)(a,"message","")," ",Us("{{a}}View backup details{{/a}}.",{components:{a:o.a.createElement("a",{href:Vl("vaultpress-dashboard"),target:"_blank",rel:"noopener noreferrer"})}}))}):Object(Dt.isEmpty)(t)?Eh({className:"",status:"",content:Us("Loading…")}):"jetpack_free"!==Object(Dt.get)(t,"product_slug","jetpack_free")?Eh({className:"jp-dash-item__is-inactive",status:n?"pro-inactive":"pro-uninstalled",content:Us("To automatically back up your entire site, please {{a}}install and activate{{/a}} VaultPress.",{components:{a:o.a.createElement("a",{href:Vl("calypso-plugins-setup",{site:i,query:"only=backups"}),target:"_blank",rel:"noopener noreferrer"})}})}):Eh({className:"jp-dash-item__is-inactive",status:"no-pro-uninstalled-or-inactive",overrideContent:o.a.createElement(Ku,{callToAction:Us("Upgrade"),title:Us("Never worry about losing your site – automatic backups keep your content safe."),disableHref:"false",href:this.props.upgradeUrl,eventFeature:"backups",path:"dashboard",plan:"jetpack_premium",icon:"history"})})}},{key:"getRewindContent",value:function(){var e=this.props,t=e.planClass,n=e.rewindStatus,r=e.siteRawUrl,i=function(e,t){return o.a.createElement(Dl,{compact:!0,key:"manage-backups",className:"jp-dash-item__manage-in-wpcom",href:e},t)},a=function(e){return Eh({className:"jp-dash-item__is-active",status:"is-working",feature:"rewind",content:e})};switch(n){case"provisioning":return o.a.createElement(o.a.Fragment,null,a(Us("We are configuring your site's backups.")));case"awaiting_credentials":return o.a.createElement(o.a.Fragment,null,a(Us("You need to enter your server's credentials to finish the setup.")),i(Vl("calypso-settings-security",{site:r}),Us("Enter credentials")));case"active":var s=["is-business-plan","is-realtime-backup-plan"].includes(t)?Us("We are backing up your site in real-time."):Us("We are backing up your site daily.");return o.a.createElement(o.a.Fragment,null,a(s),i(Vl("calypso-activity-log",{site:r,query:"group=rewind"}),Us("View your site's backups")))}return!1}},{key:"render",value:function(){return this.props.showBackups?this.props.isDevMode?o.a.createElement("div",{className:"jp-dash-item__interior"},Eh({className:"jp-dash-item__is-inactive",status:"no-pro-uninstalled-or-inactive",content:Us("Unavailable in Dev Mode.")})):o.a.createElement("div",null,o.a.createElement(Du,null),"unavailable"===this.props.rewindStatus?this.getVPContent():o.a.createElement("div",{className:"jp-dash-item"},this.getRewindContent())):null}}]),t}(s.Component);ha()(Ch,"propTypes",{siteRawUrl:u.a.string.isRequired,getOptionValue:u.a.func.isRequired,rewindStatus:u.a.string.isRequired,vaultPressData:u.a.any.isRequired,sitePlan:u.a.object.isRequired,isDevMode:u.a.bool.isRequired,isVaultPressInstalled:u.a.bool.isRequired,upgradeUrl:u.a.string.isRequired}),ha()(Ch,"defaultProps",{siteRawUrl:"",getOptionValue:Dt.noop,vaultPressData:"",sitePlan:"",isDevMode:!1,isVaultPressInstalled:!1,rewindStatus:""});var Sh=le((function(e){var t=qo(e);return{vaultPressData:oa(e),sitePlan:t,planClass:Lo(t),isDevMode:Qs(e),isVaultPressInstalled:ba(e,"vaultpress/vaultpress.php"),showBackups:qi(e),upgradeUrl:Yi(e,"aag-backups")}}))(Ch),Mh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.fetchingPluginUpdates||this.props.fetchPluginUpdates()}},{key:"render",value:function(){return null}}]),t}(s.Component);Mh.defaultProps={fetchPluginUpdates:function(){}};var xh=le((function(e){return{fetchPluginUpdates:Ou(),fetchingPluginUpdates:la(e)}}),(function(e){return P({fetchPluginUpdates:Ou},e)}))(Mh),Ah=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"trackManagePlugins",value:function(){Uc.tracks.recordJetpackClick({type:"link",target:"at-a-glance",feature:"manage-plugins"})}},{key:"getContent",value:function(){var e=Us("Plugin Updates"),t=this.props.pluginUpdates,n={text:Us("Jetpack’s Plugin Updates allows you to choose which plugins update automatically."),link:Vl("jetpack-support-site-management")};if("N/A"===t)return o.a.createElement(Jd,{label:e,module:"manage",support:n,status:"is-working"},o.a.createElement(xh,null),o.a.createElement("p",{className:"jp-dash-item__description"},Us("Loading…")));var r="updates-available"===t.code,i=Vl("calypso-plugins-manage",{site:this.props.siteRawUrl}),a=this.props.getOptionValue("manage")?"is-working":"is-inactive";return[o.a.createElement(Jd,{key:"plugin-updates",label:e,module:"manage",support:n,status:r?"is-warning":a},r&&o.a.createElement("h2",{className:"jp-dash-item__count"},Us("%(number)s","%(number)s",{count:t.count,args:{number:t.count}})),o.a.createElement("p",{className:"jp-dash-item__description"},r?[Us("Plugin needs updating.","Plugins need updating.",{count:t.count})+" ",!this.props.isDevMode&&Us("{{a}}Turn on plugin autoupdates.{{/a}}",{components:{a:o.a.createElement("a",{href:i})}})]:Us("All plugins are up-to-date. Awesome work!"))),!this.props.isDevMode&&o.a.createElement(Dl,{key:"manage-plugins",className:"jp-dash-item__manage-in-wpcom",compact:!0,href:i,onClick:this.trackManagePlugins,target:"_blank"},Us("Manage your plugins"))]}},{key:"render",value:function(){return o.a.createElement("div",null,o.a.createElement(xh,null),this.getContent())}}]),t}(s.Component);ha()(Ah,"propTypes",{isDevMode:u.a.bool.isRequired,siteRawUrl:u.a.string.isRequired,siteAdminUrl:u.a.string.isRequired,pluginUpdates:u.a.any.isRequired});var jh=le((function(e){return{pluginUpdates:ua(e),isDevMode:Qs(e)}}))(Ah),Oh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"activatePhoton",(function(){return n.props.updateOptions({photon:!0})})),n}return Ma()(t,e),As()(t,[{key:"getContent",value:function(){var e=Us("Image Accelerator"),t={text:Us("Jetpack will optimize your images and serve them from the server location nearest to your visitors. Using our global content delivery network will boost the loading speed of your site."),link:Vl("jetpack-support-photon")};return this.props.getOptionValue("photon")?o.a.createElement(Jd,{label:e,module:"photon",support:t,status:"is-working"},o.a.createElement("p",{className:"jp-dash-item__description"},Us("Jetpack is optimizing your image sizes and download speed using our fast global network of servers. This improves your site's performance on desktop and mobile devices."))):o.a.createElement(Jd,{label:e,module:"photon",support:t,className:"jp-dash-item__is-inactive"},o.a.createElement("p",{className:"jp-dash-item__description"},this.props.isDevMode?Us("Unavailable in Dev Mode"):Us("{{a}}Activate{{/a}} to optimize image sizes and load images from Jetpack's fast global network of servers. This improves your site's performance on desktop and mobile devices.",{components:{a:o.a.createElement("a",{href:"javascript:void(0)",onClick:this.activatePhoton})}})))}},{key:"render",value:function(){return this.props.isModuleAvailable&&this.getContent()}}]),t}(s.Component);ha()(Oh,"propTypes",{isDevMode:u.a.bool.isRequired,isModuleAvailable:u.a.bool.isRequired});var Nh=le((function(e){return{isDevMode:Qs(e),isModuleAvailable:Ya(e,"photon")}}))(Oh),Th=function(e){return o.a.createElement(Jd,{label:Us("Search"),module:"search",support:{text:mp,link:Vl("jetpack-support-search")},className:e.className,status:e.status,isModule:e.pro_inactive,pro:!0,overrideContent:e.overrideContent},o.a.createElement("p",{className:"jp-dash-item__description"},e.content))},Ph=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"activateSearch",(function(){n.props.updateOptions(Ms()({search:!0},n.props.hasSearchProduct?{instant_search_enabled:!0}:{}))})),n}return Ma()(t,e),As()(t,[{key:"trackSearchLink",value:function(){Uc.tracks.recordJetpackClick({type:"upgrade-link",target:"at-a-glance",feature:"search"})}},{key:"render",value:function(){return this.props.isAtomicSite?null:this.props.isFetching?Th({status:"",content:Us("Loading…")}):this.props.isDevMode?Th({className:"jp-dash-item__is-inactive",status:"no-pro-uninstalled-or-inactive",pro_inactive:!0,content:Us("Unavailable in Dev Mode")}):this.props.isBusinessPlan||this.props.hasSearchProduct?this.props.getOptionValue("search")?o.a.createElement("div",{className:"jp-dash-item"},o.a.createElement(Jd,{label:Us("Search"),module:"search",support:{text:mp,link:Vl("jetpack-support-search")},className:"jp-dash-item__is-active",isModule:!1,pro:!0},o.a.createElement("p",{className:"jp-dash-item__description"},Us("Jetpack Search is powering search on your site."))),this.props.hasSearchProduct?o.a.createElement(Dl,{compact:!0,className:"jp-search-config-aag",href:"customize.php?autofocus[section]=jetpack_search"},fp):o.a.createElement(Dl,{compact:!0,className:"jp-search-config-aag",href:"customize.php?autofocus[panel]=widgets"},Us("Add Search (Jetpack) Widget"))):Th({className:"jp-dash-item__is-inactive",pro_inactive:!1,content:Us("{{a}}Activate{{/a}} to help visitors quickly find answers with highly relevant instant search results and powerful filtering.",{components:{a:o.a.createElement("a",{href:"javascript:void(0)",onClick:this.activateSearch})}})}):Th({className:"jp-dash-item__is-inactive",status:"no-pro-uninstalled-or-inactive",pro_inactive:!0,overrideContent:o.a.createElement(Ku,{callToAction:Us("Upgrade"),title:hp,disableHref:"false",href:this.props.upgradeUrl,eventFeature:"search",path:"dashboard",plan:"jetpack_search",icon:"search"})})}}]),t}(s.Component);ha()(Ph,"propTypes",{getOptionValue:u.a.func.isRequired,isDevMode:u.a.bool.isRequired}),ha()(Ph,"defaultProps",{getOptionValue:Dt.noop,isDevMode:!1});var Ih=le((function(e){return{isAtomicSite:Vi(e),isBusinessPlan:"is-business-plan"===Lo(qo(e).product_slug),isDevMode:Qs(e),isFetching:Ho(e),hasSearchProduct:Zo(e),upgradeUrl:Yi(e,"aag-search")}}))(Ph),Dh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.isFetchingUserData||this.props.isDevMode||this.props.fetchUserConnectionData()}},{key:"render",value:function(){return null}}]),t}(o.a.Component),Rh=le((function(e){return{isFetchingUserData:$s(e),isDevMode:Qs(e)}}),(function(e){return{fetchUserConnectionData:function(){return e((function(e){return e({type:tn}),Da.fetchUserConnectionData().then((function(t){e({type:rn,userConnectionData:t})})).catch((function(t){e({type:nn,error:t})}))}))}}}))(Dh),Uh=function(e){var t=e.amount,n=e.description,r=e.gridIcon,i=e.title;return o.a.createElement("div",{className:"jetpack-termination-dialog__feature"},o.a.createElement("div",{className:"jetpack-termination-dialog__feature-header"},o.a.createElement("h3",null,i),o.a.createElement(ml,{icon:r})),o.a.createElement("div",{className:"jetpack-termination-dialog__feature-body"},o.a.createElement("p",{className:"jetpack-termination-dialog__feature-body-amount"},Rs(t)),o.a.createElement("p",{className:"jetpack-termination-dialog__feature-body-description"},n)))},Lh=(n(374),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"renderCDNReason",value:function(){return o.a.createElement("li",{key:"reason-cdn"},Us("Speed up your site and provide mobile-ready images with {{a}}our CDN{{/a}}",{components:{a:o.a.createElement("a",{className:"jetpack-termination-dialog__link",href:Vl("jetpack-features-design-content-delivery-network"),rel:"noopener noreferrer",target:"_blank"})}}))}},{key:"renderProtectReason",value:function(){return o.a.createElement("li",{key:"reason-brute-force"},Us("Block {{a}}brute force attacks{{/a}} and get immediate notifications if your site is down",{components:{a:o.a.createElement("a",{className:"jetpack-termination-dialog__link",href:Vl("jetpack-features-security"),rel:"noopener noreferrer",target:"_blank"})}}))}},{key:"renderSocialReason",value:function(){return o.a.createElement("li",{key:"reason-social"},Us("Grow your traffic with automated social {{a}}publishing and sharing{{/a}}",{components:{a:o.a.createElement("a",{className:"jetpack-termination-dialog__link",href:Vl("jetpack-support-social"),rel:"noopener noreferrer",target:"_blank"})}}))}},{key:"render",value:function(){var e=this.props,t=e.isDevVersion,n=e.purpose,r=e.siteBenefits,i=r.length,a=t?ad:id;return o.a.createElement(Dl,{className:"jetpack-termination-dialog__features"},o.a.createElement("p",{className:"jetpack-termination-dialog__info"},Us("disconnect"===n?"Jetpack is currently powering features on your site. Once you disconnect Jetpack, these features will no longer be available and your site may no longer function the same way.":"Jetpack is currently powering features on your site. Once you disable Jetpack, these features will no longer be available and your site may no longer function the same way."),i>0&&Us(" We’ve highlighted some of the features you rely on below.")),o.a.createElement("div",{className:1===i?"jetpack-termination-dialog__features-list-single-column":"jetpack-termination-dialog__features-list"},r.map((function(e){var t=e.amount,n=e.description,r=e.name,i=e.gridIcon,a=e.title;return o.a.createElement(Uh,{key:r,amount:t,description:n,gridIcon:i,title:a})}))),i<=2&&o.a.createElement("div",{className:"jetpack-termination-dialog__generic-info"},o.a.createElement("h2",null,Us("Jetpack has many powerful tools that can help you achieve your goals")),o.a.createElement("ul",null,this.renderCDNReason(),this.renderProtectReason(),this.renderSocialReason())),o.a.createElement("div",{className:"jetpack-termination-dialog__get-help"},o.a.createElement("p",null,Us("Have a question? We’d love to help! {{a}}Send a question to the Jetpack support team.{{/a}}",{components:{a:o.a.createElement("a",{className:"jetpack-termination-dialog__link",href:a,rel:"noopener noreferrer",target:"_blank"})}}))))}}]),t}(s.Component));ha()(Lh,"propTypes",{isDevVersion:u.a.bool,purpose:u.a.oneOf(["disconnect","disable"]).isRequired,siteBenefits:u.a.array.isRequired});var Fh=Lh,zh=function(e){function t(e){var n;return _a()(this,t),n=ka()(this,Ca()(t).call(this,e)),ha()(Os()(n),"handleRadioChange",(function(){var e=n.props;(0,e.onAnswerChange)(e.answer.id,n.state.textResponse)})),ha()(Os()(n),"handleTextChange",(function(e){var t=n.props,r=t.onAnswerChange,i=t.answer.id,a=e.target.value;r(i,a),n.setState({textResponse:a})})),n.state={textResponse:e.selectedAnswerText},n}return Ma()(t,e),As()(t,[{key:"renderTextInput",value:function(){var e=this.props,t=e.disabled,n=e.answer.textInputPrompt,r=this.state.value;return o.a.createElement(Wl,{className:"multiple-choice-question__answer-item-text-input",value:r,onChange:this.handleTextChange,placeholder:n||"",disabled:t})}},{key:"render",value:function(){var e=this.props,t=e.disabled,n=e.answer,r=n.id,i=n.answerText,a=n.textInput,s=n.children,c=e.isSelected;return o.a.createElement(ql,null,o.a.createElement(Yl,{value:r,onChange:this.handleRadioChange,checked:c,disabled:t}),o.a.createElement("span",null,i),o.a.createElement("div",{className:"multiple-choice-question__answer-item-content"},a&&this.renderTextInput(),s))}}]),t}(s.Component);ha()(zh,"propTypes",{disabled:u.a.bool,isSelected:u.a.bool,onAnswerChange:u.a.func,answer:u.a.shape({id:u.a.string.isRequired,answerText:u.a.string.isRequired,textInput:u.a.bool,textInputPrompt:u.a.string,children:u.a.object}).isRequired,selectedAnswerText:u.a.string}),ha()(zh,"defaultProps",{disabled:!1,selectedAnswerText:""});var Bh=zh,Vh=(n(375),Object(Dt.memoize)((function(e){var t=Object(Dt.shuffle)(e.filter((function(e){return!e.doNotShuffle})));return e.map((function(e){return e.doNotShuffle?e:t.pop()}))}),(function(e){return e.map((function(e){return Object(Dt.values)(Object(Dt.pick)(e,"id","doNotShuffle")).join("_")})).join("-")}))),Hh=function(e){function t(e){var n;return _a()(this,t),n=ka()(this,Ca()(t).call(this,e)),ha()(Os()(n),"handleAnswerChange",(function(e,t){(0,n.props.onAnswerChange)(e,t),n.setState({selectedAnswerId:e})})),n.state={selectedAnswerId:e.selectedAnswerId},n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.disabled,r=t.answers,i=t.question,a=t.selectedAnswerText,s=t.subHeader,c=this.state.selectedAnswerId,l=Vh(r);return o.a.createElement(Hl,{className:"multiple-choice-question"},o.a.createElement("h2",{className:"multiple-choice-question__question"},i),s&&o.a.createElement("h3",{className:"multiple-choice-question__subheader"},s),l.map((function(t){return o.a.createElement(Bh,{key:t.id,answer:t,disabled:n,isSelected:c===t.id,onAnswerChange:e.handleAnswerChange,selectedAnswerText:c===t.id?a:""})})))}}]),t}(s.Component);ha()(Hh,"propTypes",{answers:u.a.arrayOf(u.a.shape({id:u.a.string.isRequired,answerText:u.a.string.isRequired,doNotShuffle:u.a.bool,textInput:u.a.bool,textInputPrompt:u.a.string,children:u.a.object})).isRequired,disabled:u.a.bool,onAnswerChange:u.a.func.isRequired,question:u.a.string.isRequired,selectedAnswerId:u.a.string,selectedAnswerText:u.a.string,subHeader:u.a.string}),ha()(Hh,"defaultProps",{disabled:!1,selectedAnswerId:null,selectedAnswerText:""});var qh=Hh,Kh=[{id:"cannot-work",answerText:Us("I can't get it to work.")},{id:"slow",answerText:Us("It slowed down my site.")},{id:"buggy",answerText:Us("It's buggy.")},{id:"no-clarity",answerText:Us("I don't know what it does.")},{id:"delete",answerText:Us("I'm deleting/migrating my site.")},{id:"troubleshooting",answerText:Us("Troubleshooting - I'll be reconnecting afterwards.")},{id:"other",answerText:Us("Other:"),textInput:!0,textInputPrompt:Us("share your experience"),doNotShuffle:!0}],Jh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"getQuestion",value:function(){var e=this.props.purpose;return Us("disconnect"===e?"Please let us know why you're disconnecting Jetpack":"Please let us know why you're disabling Jetpack")}},{key:"render",value:function(){var e=this.props,t=e.onSurveyAnswerChange,n=e.surveyAnswerId,r=e.surveyAnswerText;return o.a.createElement(Dl,{className:"jetpack-disconnect-dialog__survey"},o.a.createElement(qh,{answers:Kh,question:this.getQuestion(),subHeader:Us("Your feedback will help us improve the product."),onAnswerChange:t,selectedAnswerId:n,selectedAnswerText:r}))}}]),t}(s.Component);ha()(Jh,"propTypes",{onSurveyAnswerChange:u.a.func.isRequired,purpose:u.a.oneOf(["disconnect","disable"]).isRequired,surveyAnswerId:u.a.string,surveyAnswerText:u.a.string});var Wh=Jh,Gh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){this.props.isFetchingSiteBenefits||this.props.fetchSiteBenefits()}},{key:"render",value:function(){return null}}]),t}(s.Component);ha()(Gh,"defaultProps",{isFetchingSiteBenefitsData:!1});var Yh=le((function(e){return{isFetchingSiteBenefits:Vo(e)}}),(function(e){return{fetchSiteBenefits:function(){return e((function(e){return e({type:gr}),Da.fetchSiteBenefits().then((function(t){e({type:vr,siteBenefits:t})})).catch((function(t){e({type:br,error:t})}))}))}}}))(Gh);function $h(e){switch(e){case"contact-form":return"align-image-center";case"contact-form-feedback":return"mail";case"image-hosting":return"image";case"jetpack-backup":return"cloud-download";case"jetpack-stats":return"stats-alt";case"protect":return"lock";case"publicize":case"sharing":return"share";case"subscribers":return"user";case"video-hosting":return"video-camera";default:return"checkmark"}}function Xh(e){return{name:e.name,title:e.title,description:e.description,amount:e.value,gridIcon:$h(e.name)}}var Qh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{step:t.FEATURE_STEP,surveyAnswerId:null,surveyAnswerText:""}),ha()(Os()(n),"handleContinueClick",(function(){var e=n.props,r=e.location,i=e.purpose;Uc.tracks.recordEvent("jetpack_termination_dialog_continue_click",{location:r,purpose:i}),n.setState({step:t.SURVEY_STEP})})),ha()(Os()(n),"handleTerminationClick",(function(){var e=n.props,t=e.location,r=e.purpose,i=e.siteId,a=e.sitePlan,s=e.submitSurvey,o=e.terminateJetpack,c=n.state,l=c.surveyAnswerId,u=c.surveyAnswerText;Uc.tracks.recordEvent("jetpack_termination_dialog_termination_click",{location:t,purpose:r}),s(i,a,l,u,t),o()})),ha()(Os()(n),"handleDialogCloseClick",(function(){var e=n.props,t=e.closeDialog,r=e.location,i=e.purpose;Uc.tracks.recordEvent("jetpack_termination_dialog_close_click",{location:r,purpose:i}),t()})),ha()(Os()(n),"handleSurveyAnswerChange",(function(e,t){n.setState({surveyAnswerId:e,surveyAnswerText:t})})),n}return Ma()(t,e),As()(t,[{key:"renderFeatures",value:function(){var e=this.props,t=e.isDevSite,n=e.purpose,r=e.siteBenefits;return r?o.a.createElement(Fh,{isDevSite:t,purpose:n,siteBenefits:r.map(Xh)}):o.a.createElement(Dl,{className:"jetpack-termination-dialog__spinner"},o.a.createElement(fl,null))}},{key:"renderSurvey",value:function(){var e=this.props.purpose,t=this.state,n=t.surveyAnswerId,r=t.surveyAnswerText;return o.a.createElement(Wh,{onSurveyAnswerChange:this.handleSurveyAnswerChange,purpose:e,surveyAnswerId:n,surveyAnswerText:r})}},{key:"renderPrimaryButton",value:function(){var e=this.props,n=e.purpose,r=e.showSurvey,i=this.state.step;return r&&i===t.FEATURE_STEP?o.a.createElement(xc,{primary:!0,onClick:this.handleContinueClick},Us("Continue")):o.a.createElement(xc,{scary:!0,primary:!0,onClick:this.handleTerminationClick},Us("disconnect"===n?"Disconnect":"Disable"))}},{key:"render",value:function(){var e=this.props,n=e.location,r=e.purpose,i=e.showSurvey,a=this.state.step;return o.a.createElement("div",{className:"jetpack-termination-dialog"},o.a.createElement(zl,null),o.a.createElement(Yh,null),o.a.createElement(Dl,null,o.a.createElement("div",{className:"jetpack-termination-dialog__header"},o.a.createElement("h2",null,Us("disconnect"===r?"Disconnect Jetpack":"Disable Jetpack")),"dashboard"===n&&o.a.createElement(ml,{icon:"cross",className:"jetpack-termination-dialog__close-icon",onClick:this.handleDialogCloseClick}))),i&&a!==t.FEATURE_STEP?this.renderSurvey():this.renderFeatures(),o.a.createElement(Dl,null,o.a.createElement("div",{className:"jetpack-termination-dialog__button-row"},o.a.createElement("p",null,Us("disconnect"===r?"Are you sure you want to disconnect?":"Are you sure you want to disconnect and deactivate?")),o.a.createElement("div",{className:"jetpack-termination-dialog__button-row-buttons"},o.a.createElement(xc,{onClick:this.handleDialogCloseClick},Us("Cancel")),this.renderPrimaryButton()))))}}]),t}(s.Component);ha()(Qh,"FEATURE_STEP","FEATURE_STEP"),ha()(Qh,"SURVEY_STEP","SURVEY_STEP"),ha()(Qh,"propTypes",{closeDialog:u.a.func.isRequired,isDevVersion:u.a.bool,location:u.a.oneOf(["plugins","dashboard"]).isRequired,purpose:u.a.oneOf(["disconnect","disable"]).isRequired,showSurvey:u.a.bool.isRequired,siteBenefits:u.a.array,submitSurvey:u.a.func,terminateJetpack:u.a.func.isRequired});var Zh=le((function(e){return{isDevVersion:hi(e),siteBenefits:Ko(e),siteId:ec(e),sitePlan:qo(e)}}),{submitSurvey:function(e,t,n,r,i){var a={survey_id:"calypso-disconnect-jetpack-july2019",site_id:e,survey_responses:{purchase:t.product_slug,"why-cancel":{response:n},source:{from:"plugins"===i?"Jetpack-Plugins":"Jetpack-Dashboard"}}};return r&&""!==r&&(a.survey_responses["why-cancel"].text=r),function(e){return function(t){return t({type:zr}),Da.submitSurvey(e).then((function(e){return t({type:Br}),e})).catch((function(e){t({type:Vr,error:e.response})}))}}(a)}})(Qh),ef=n(110),tf=n.n(ef),nf=(n(378),!1);var rf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{overlayMouseDown:!1}),ha()(Os()(n),"handleEscapeKey",(function(e){27===e.keyCode&&n.maybeClose()})),ha()(Os()(n),"maybeClose",(function(){n.props.onRequestClose&&!nf&&n.props.onRequestClose()})),ha()(Os()(n),"handleMouseDownOverlay",(function(e){e.preventDefault(),e.stopPropagation(),n.setState({overlayMouseDown:!0})})),ha()(Os()(n),"handleClickOverlay",(function(e){e.preventDefault(),e.stopPropagation(),n.state.overlayMouseDown&&n.props.onRequestClose&&!nf&&(n.setState({overlayMouseDown:!1}),n.props.onRequestClose())})),ha()(Os()(n),"handleMouseEventModal",(function(e){e.stopPropagation()})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){jQuery("body").addClass("dops-modal-showing").on("touchmove.dopsmodal",!1),jQuery(document).keyup(this.handleEscapeKey);try{tf.a.activate(a.a.findDOMNode(this),{initialFocus:this.props.initialFocus})}catch(e){}}},{key:"componentWillUnmount",value:function(){jQuery("body").removeClass("dops-modal-showing").off("touchmove.dopsmodal",!1),jQuery(document).unbind("keyup",this.handleEscapeKey);try{tf.a.deactivate()}catch(e){}}},{key:"render",value:function(){var e,t=this.props,n=t.style,r=t.className,i=t.width,a=t.title,s=Cc()(t,["style","className","width","title"]),c=Object(Dt.omit)(s,"onRequestClose").forwardedProps;switch(i){case"wide":e={maxWidth:"inherit",width:"inherit"};break;case"medium":e={maxWidth:1050,width:"inherit"};break;default:e={}}var l=Object(Dt.assign)({},n,e);return o.a.createElement("div",{className:"dops-modal-wrapper",onClick:this.handleClickOverlay,onMouseDown:this.handleMouseDownOverlay},o.a.createElement("div",Bc()({className:Mc()("dops-modal",r),style:l,onClick:this.handleMouseEventModal,onMouseDown:this.handleMouseEventModal,onMouseUp:this.handleMouseEventModal,role:"dialog","aria-label":a},c),this.props.children))}}]),t}(o.a.Component);ha()(rf,"propTypes",{style:u.a.object,width:u.a.oneOf(["wide","medium","narrow"]),className:u.a.string,title:u.a.string,initialFocus:u.a.string,onRequestClose:u.a.func}),ha()(rf,"defaultProps",{style:{}}),rf.preventClose=function(){nf=!0},rf.allowClose=function(){nf=!1};var af=rf,sf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"disconnectJetpack",(function(){n.props.disconnectSite(!0)})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props,t=e.show,n=e.showSurvey,r=e.toggleModal;return t&&o.a.createElement(af,{className:"jp-connection-settings__modal",onRequestClose:r},o.a.createElement(Zh,{closeDialog:r,location:"dashboard",purpose:"disconnect",showSurvey:n,terminateJetpack:this.disconnectJetpack}))}}]),t}(s.Component);ha()(sf,"propTypes",{show:u.a.bool,showSurvey:u.a.bool,toggleModal:u.a.func}),ha()(sf,"defaultProps",{show:!1,showSurvey:!1,toggleModal:Dt.noop});var of=le(null,(function(e){return{disconnectSite:function(){return e(Fc(!0))}}}))(sf),cf=(n(379),function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{showModal:!1}),ha()(Os()(n),"handleOpenModal",(function(e){Uc.tracks.recordJetpackClick("manage_site_connection"),e.preventDefault(),n.toggleVisibility()})),ha()(Os()(n),"disconnectSite",(function(){n.toggleVisibility(),n.props.disconnectSite()})),ha()(Os()(n),"toggleVisibility",(function(){n.setState({showModal:!n.state.showModal})})),ha()(Os()(n),"renderUserButton",(function(){if(n.props.isLinked)return o.a.createElement("div",null,o.a.createElement("a",{role:"button",tabIndex:"0",className:"jp-jetpack-unlink__button",onKeyDown:Tu(n.props.unlinkUser),onClick:n.props.unlinkUser,disabled:n.props.isUnlinking},Us("Unlink me from WordPress.com")));var e=n.props.connectUrl;n.props.from&&(e+="&from=".concat(n.props.from),e+="&additional-user");var t={className:"is-primary jp-jetpack-connect__button",href:e,disabled:n.props.fetchingConnectUrl},r=Us("Link to WordPress.com");return n.props.asLink?o.a.createElement("a",t,r):o.a.createElement(xc,t,r)})),ha()(Os()(n),"renderContent",(function(){if(n.props.connectUser)return n.renderUserButton();if(n.props.isSiteConnected)return o.a.createElement("a",{role:"button",tabIndex:"0",onKeyDown:Tu(n.handleOpenModal),onClick:n.handleOpenModal,disabled:n.props.isDisconnecting},Us("Manage site connection"));var e=n.props.connectUrl;n.props.from&&(e+="&from=".concat(n.props.from));var t={className:"jp-jetpack-connect__button",href:e,disabled:n.props.fetchingConnectUrl},r=Us("Set up Jetpack");return n.props.asLink?o.a.createElement("a",t,r):o.a.createElement(xc,t,r)})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("div",null,!this.props.isSiteConnected&&o.a.createElement("p",{className:"jp-banner__tos-blurb"},Us("By clicking the button below, you agree to our {{tosLink}}Terms of Service{{/tosLink}} and to {{shareDetailsLink}}share details{{/shareDetailsLink}} with WordPress.com.",{components:{tosLink:o.a.createElement("a",{href:Vl("wpcom-tos"),rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:o.a.createElement("a",{href:Vl("jetpack-support-what-data-does-jetpack-sync"),rel:"noopener noreferrer",target:"_blank"})}})),this.renderContent(),this.props.children,o.a.createElement(of,{show:this.state.showModal,showSurvey:!1,toggleModal:this.toggleVisibility}))}}]),t}(o.a.Component));ha()(cf,"displayName","ConnectButton"),ha()(cf,"propTypes",{connectUser:u.a.bool,from:u.a.string,asLink:u.a.bool}),ha()(cf,"defaultProps",{connectUser:!1,from:"",asLink:!1});var lf=le((function(e){return{siteRawUrl:vi(e),isSiteConnected:Hs(e),isDisconnecting:Ws(e),fetchingConnectUrl:Gs(e),connectUrl:Js(e),isLinked:Xs(e),isUnlinking:Ys(e)}}),(function(e){return{disconnectSite:function(){return e(Fc())},unlinkUser:function(){return e((function(e){return e({type:Qt}),e(Qa("is-info",Us("Unlinking from WordPress.com"),{id:"unlink-user"})),Da.unlinkUser().then((function(t){e({type:en,userUnlinked:t}),e(Xa("unlink-user")),e(Qa("is-success",Us("Unlinked from WordPress.com."),{id:"unlink-user",duration:2e3}))})).catch((function(t){e({type:Zt,error:t}),e(Xa("unlink-user")),e(Qa("is-error",Us("Error unlinking from WordPress.com. %(error)s",{args:{error:t}}),{id:"unlink-user"}))}))}))}}}))(cf),uf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{showModal:!1}),ha()(Os()(n),"handleOpenModal",(function(e){e.preventDefault(),Uc.tracks.recordJetpackClick("login_to_mobile_app_modal"),n.toggleModalVisibility()})),ha()(Os()(n),"toggleModalVisibility",(function(){n.setState({showModal:!n.state.showModal})})),ha()(Os()(n),"clickSendLoginEmail",(function(e){e.preventDefault(),Uc.tracks.recordJetpackClick("login_to_mobile_send_link"),n.toggleModalVisibility(),n.props.sendMobileLoginEmail()})),n}return Ma()(t,e),As()(t,[{key:"renderModal",value:function(){return o.a.createElement(af,{className:"mobile-magic-link__modal",onRequestClose:this.toggleModalVisibility},o.a.createElement(Dl,{className:"mobile-magic-link__modal__body"},o.a.createElement("h2",null,Us("Email me a link to log in to the app")),o.a.createElement("h4",null,Us("Easily log in to the WordPress app by clicking the link we'll send to the email address on your account.")),o.a.createElement("div",{className:"mobile-magic-link__modal-actions"},o.a.createElement(xc,{className:"mobile-magic-link__modal-cancel",onClick:this.toggleModalVisibility},Us("Cancel",{context:"A caption for a button to cancel an action."})),o.a.createElement(xc,{onClick:this.clickSendLoginEmail,primary:!0},Us("Send link",{context:"A caption for a button to log in to the WordPress mobile app."})))))}},{key:"render",value:function(){var e=this.state.showModal;return o.a.createElement("div",{className:"mobile-magic-link"},o.a.createElement("a",{className:"mobile-magic-link__button",onClick:this.handleOpenModal,onKeyDown:Tu(this.handleOpenModal),role:"button",tabIndex:"0"},Us("Log in to the WordPress mobile app")),e&&this.renderModal())}}]),t}(o.a.Component);ha()(uf,"displayName","MobileMagicLink");var pf=le((function(e){return{isSiteConnected:Hs(e),isLinked:Xs(e)}}),{sendMobileLoginEmail:function(){return function(e){return e({type:ci}),e(Xa("mobile-login-email-send")),e(Xa("mobile-login-email-sent")),e(Xa("mobile-login-email-error")),e(Qa("is-info",Us("Sending login email…"),{id:"mobile-login-email-send"})),Da.sendMobileLoginEmail().then((function(t){return e(Xa("mobile-login-email-send")),e({type:li}),e(Qa("is-success",Us("Login email sent"),{id:"mobile-login-email-sent",duration:2e3})),t})).catch((function(t){e({type:ui,error:t.response}),e(Xa("mobile-login-email-send")),e(Qa("is-error",Us("Failed to send login email"),{id:"mobile-login-email-error"}))}))}}})(uf),df=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"siteConnection",value:function(){var e="";return this.props.isDevMode?e=o.a.createElement("div",{className:"jp-connection-settings__info"},this.props.siteIcon?o.a.createElement("img",{width:"64",height:"64",className:"jp-connection-settings__site-icon",src:this.props.siteIcon,alt:""}):o.a.createElement(ml,{icon:"globe",size:64}),o.a.createElement("div",{className:"jp-connection-settings__text"},Us("Your site is in Development Mode, so it can not be connected to WordPress.com."))):!0===this.props.siteConnectionStatus&&(e=o.a.createElement("div",null,o.a.createElement("div",{className:"jp-connection-settings__info"},this.props.siteIcon?o.a.createElement("img",{width:"64",height:"64",className:"jp-connection-settings__site-icon",src:this.props.siteIcon,alt:""}):o.a.createElement(ml,{icon:"globe",size:64}),o.a.createElement("div",{className:"jp-connection-settings__text"},Us("Your site is connected to WordPress.com."),this.props.userIsMaster&&o.a.createElement("span",{className:"jp-connection-settings__is-owner"},o.a.createElement("br",null),o.a.createElement("em",null,Us("You are the Jetpack owner."))))),this.props.userCanDisconnectSite&&o.a.createElement("div",{className:"jp-connection-settings__actions"},o.a.createElement(lf,{asLink:!0})))),e}},{key:"userConnection",value:function(){var e=this.props.userIsMaster?null:o.a.createElement(lf,{asLink:!0,connectUser:!0,from:"connection-settings"});return this.props.isDevMode?o.a.createElement("div",{className:"jp-connection-settings__info"},o.a.createElement("img",{alt:"gravatar",width:"64",height:"64",className:"jp-connection-settings__gravatar",src:this.props.userWpComAvatar}),o.a.createElement("div",{className:"jp-connection-settings__text"},Us("The site is in Development Mode, so you can not connect to WordPress.com."))):this.props.isLinked?o.a.createElement("div",null,o.a.createElement("div",{className:"jp-connection-settings__info"},o.a.createElement("img",{alt:"gravatar",width:"64",height:"64",className:"jp-connection-settings__gravatar",src:this.props.userWpComAvatar}),o.a.createElement("div",{className:"jp-connection-settings__text"},Us("Connected as {{span}}%(username)s{{/span}}",{args:{username:this.props.userWpComLogin},components:{span:o.a.createElement("span",{className:"jp-connection-settings__username"})},comment:"%(username) is the WordPress user login name."}),o.a.createElement("div",{className:"jp-connection-settings__email"},this.props.userWpComEmail))),o.a.createElement("div",{className:"jp-connection-settings__actions"},e),o.a.createElement(pf,null)):o.a.createElement("div",null,o.a.createElement("div",{className:"jp-connection-settings__info"},Us("Link your account to WordPress.com to get the most out of Jetpack.")),o.a.createElement("div",{className:"jp-connection-settings__actions"},e))}},{key:"render",value:function(){return o.a.createElement("div",null,o.a.createElement(Rh,null),o.a.createElement("div",{className:"jp-at-a-glance__item-grid"},o.a.createElement("div",{className:"jp-at-a-glance__left"},o.a.createElement("div",{className:"jp-dash-item__interior"},o.a.createElement(Jd,{className:"jp-connection-type",label:Us("Site connection",{context:"Dashboard widget header"})},this.siteConnection()))),o.a.createElement("div",{className:"jp-at-a-glance__right"},o.a.createElement("div",{className:"jp-dash-item__interior"},o.a.createElement(Jd,{className:"jp-connection-type",label:Us("Account connection",{context:"Dashboard widget header"})},this.userConnection())))))}}]),t}(s.Component);df.propTypes={siteConnectionStatus:u.a.any.isRequired,isDevMode:u.a.bool.isRequired,userCanDisconnectSite:u.a.bool.isRequired,userIsMaster:u.a.bool.isRequired,isLinked:u.a.bool.isRequired,userWpComLogin:u.a.any.isRequired,userWpComEmail:u.a.any.isRequired,userWpComAvatar:u.a.any.isRequired,username:u.a.any.isRequired};var hf=le((function(e){return{siteConnectionStatus:Hs(e),isDevMode:Qs(e),userCanDisconnectSite:Mi(e),userIsMaster:Ai(e),userWpComLogin:ji(e),userWpComEmail:Oi(e),userWpComAvatar:Ni(e),username:Ti(e),isLinked:Xs(e),siteIcon:Ii(e)}}))(df),ff=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackSecurityClick",(function(){return Uc.tracks.recordJetpackClick("aag_manage_security_wpcom")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={updateOptions:this.props.updateOptions,getOptionValue:this.props.getOptionValue,isUpdating:this.props.isUpdating,multisite:this.props.multisite},t={siteAdminUrl:this.props.siteAdminUrl,siteRawUrl:this.props.siteRawUrl},n=o.a.createElement(qd,{key:"securityHeader",label:Us("Security"),settingsPath:this.props.userCanManageModules?"#security":void 0,externalLink:this.props.isDevMode||!this.props.userCanManageModules?"":Us("Manage security settings"),externalLinkPath:this.props.isDevMode?"":"#/security",externalLinkClick:this.trackSecurityClick}),r=o.a.createElement("div",null,o.a.createElement(qd,{label:Us("Connections"),className:"jp-dash-section-header__connections"}),o.a.createElement(hf,null)),i=Object(Dt.get)(this.props.rewindStatus,["state"],""),a=[];if(a.push(o.a.createElement(bh,Bc()({},e,{siteRawUrl:this.props.siteRawUrl,rewindStatus:i}))),this.props.multisite||a.push(o.a.createElement(Sh,Bc()({},e,{siteRawUrl:this.props.siteRawUrl,rewindStatus:i}))),a.push(o.a.createElement(kh,t)),a.push(o.a.createElement(jh,Bc()({},e,t))),"inactive"!==this.props.getModuleOverride("protect")&&a.push(o.a.createElement(hh,e)),"inactive"!==this.props.getModuleOverride("monitor")&&a.push(o.a.createElement(mh,e)),"active"===i&&a.unshift(o.a.createElement(Gd,Bc()({},e,{siteRawUrl:this.props.siteRawUrl}))),this.props.userCanManageModules){var s=[{header:n,cards:a}],c=[];return"inactive"!==this.props.getModuleOverride("photon")&&c.push(o.a.createElement(Nh,e)),"inactive"!==this.props.getModuleOverride("search")&&c.push(o.a.createElement(Ih,e)),c.length&&s.push({header:o.a.createElement(qd,{key:"performanceHeader",label:Us("Performance")}),cards:c}),o.a.createElement("div",{className:"jp-at-a-glance"},o.a.createElement(jl,null),o.a.createElement(zl,null),o.a.createElement(lh,Bc()({},e,t)),s.map((function(e,t){return[e.header,Object(Dt.chunk)(e.cards,2).map((function(e,n){var r=Ts()(e,2),i=r[0],a=r[1];return o.a.createElement("div",{className:"jp-at-a-glance__item-grid",key:"card-".concat(t,"-").concat(n)},o.a.createElement("div",{className:"jp-at-a-glance__left"},i),o.a.createElement("div",{className:"jp-at-a-glance__right"},a))}))]})),r)}var l="";this.props.userCanViewStats&&(l=o.a.createElement(lh,Bc()({},e,t)));var u="";return this.props.getOptionValue("protect")&&(u=o.a.createElement(hh,e)),this.props.userIsSubscriber?o.a.createElement("div",null,l,r):o.a.createElement("div",null,l,this.props.getOptionValue("protect")&&n,u,r)}}]),t}(s.Component),mf=le((function(e){return{userCanManageModules:Ei(e),userCanViewStats:Pi(e),userIsSubscriber:wi(e),isDevMode:Qs(e),getModuleOverride:function(t){return $a(e,t)},multisite:Ji(e)}}))(Cu(ff)),gf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props,t=e.expiryDate,n=e.purchaseDate,r=e.isRefundable,i=e.dateFormat;if(!t&&!n)return null;if(!t||r){var a=Ds(n);return a.isValid()?Us("Purchased on %s.",{args:a.format(i)}):null}var s=Ds(t);return s.isValid()?s.diff(new Date)<0?Us("Expired on %s.",{args:s.format(i)}):Us("Renews on %s.",{args:s.format(i)}):null}}]),t}(o.a.PureComponent);ha()(gf,"propTypes",{expiryDate:u.a.string,purchaseDate:u.a.string,isRefundable:u.a.bool,dateFormat:u.a.string}),ha()(gf,"defaultProps",{expiryDate:"",purchaseDate:"",isRefundable:!1,dateFormat:"LL"});var vf=gf,bf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackClick",(function(){var e=n.props,t=e.target,r=e.feature;if(t){var i=r?{feature:r}:{};Uc.tracks.recordJetpackClick(Ms()({type:"upgrade-link",target:t},i))}})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("a",{href:this.props.upgradeUrl,target:"_blank",rel:"noopener noreferrer",onClick:this.trackClick},this.props.children)}}]),t}(s.PureComponent);ha()(bf,"propTypes",{source:u.a.string.isRequired,target:u.a.string.isRequired,feature:u.a.string,upgradeUrl:u.a.string.isRequired});var yf=le((function(e,t){var n=t.source;return{upgradeUrl:Yi(e,n)}}))(bf);function _f(e){var t=e.onClick,n=e.siteSlug;return o.a.createElement("div",{className:"jp-landing__plan-features-header-checklist-cta-container"},o.a.createElement(xc,{href:Vl("calypso-plans-my-plan",{site:n,query:"checklist"}),onClick:t,primary:!0},Us("View your setup checklist")))}function wf(e){var t=e.children;return o.a.createElement("span",{className:"screen-reader-text"},t)}var kf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=Mc()(this.props.className,"checklist-header-progress-bar"),t=Math.min(Math.ceil(this.props.value/this.props.total*100),100),n=this.props.title?o.a.createElement(wf,null,this.props.title):null;return o.a.createElement("div",{className:e},o.a.createElement("div",{className:"checklist-header-progress-bar__progress",style:{width:t+"%"}},n))}}]),t}(s.PureComponent);function Ef(e){return e.jetpack.checklist.isLoading}ha()(kf,"defaultProps",{total:100}),ha()(kf,"propTypes",{value:u.a.number.isRequired,total:u.a.number,title:u.a.string,className:u.a.string});var Cf=Object(Dt.memoize)((function(e){var t=Object.keys(e);return{completed:t.filter((function(t){return e[t].completed})).length,total:t.length}}));function Sf(e){var t=function(e){return Object(Dt.get)(e,["jetpack","checklist","checklist","tasks"])}(e);return t?Cf(t):null}var Mf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){this.props.isLoading||this.props.requestSiteChecklist()}},{key:"render",value:function(){return null}}]),t}(s.Component);ha()(Mf,"propTypes",{requestSiteChecklist:u.a.func,isLoading:u.a.bool});var xf=le((function(e){return{isLoading:Ef(e)}}),{requestSiteChecklist:function(){return function(e){e({type:oi})}}})(Mf),Af=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackCtaClick",(function(){Uc.tracks.recordEvent("jetpack_myplan_progresschecklistcta_click",n.props.plan?{plan:n.props.plan}:void 0)})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props,t=e.completed,n=e.total,r=e.siteSlug;return o.a.createElement(o.a.Fragment,null,o.a.createElement(xf,null),t&&n&&o.a.createElement(Dl,{compact:!0,className:"checklist__header"},o.a.createElement("div",{className:"checklist__header-main"},o.a.createElement("div",{className:"checklist__header-progress"},o.a.createElement("span",{className:"checklist__header-progress-text"},Us("Your Jetpack setup progress",{comment:"Onboarding task list progress"})),o.a.createElement("span",{className:"checklist__header-progress-number"},"".concat(t,"/").concat(n))),o.a.createElement(kf,{total:n,value:t})),o.a.createElement("div",{className:"checklist__header-secondary"},o.a.createElement(xc,{compact:!0,href:Vl("calypso-plans-my-plan",{site:r}),onClick:this.trackCtaClick,primary:!0},Us("Complete Jetpack Setup",{comment:"Text on link to list of onboarding tasks"})))))}}]),t}(s.Component),jf=le((function(e){return Ms()({siteSlug:vi(e)},Sf(e))}))(Af),Of=(n(380),function(e){var t=e.action,n=e.isError,r=e.isPlaceholder,i=e.details,a=e.icon,s=e.tagLine,c=e.title,l=Mc()("my-plan-card",{"is-placeholder":r,"has-action-only":t&&!i&&!r}),u=Mc()("my-plan-card__details",{"is-error":n});return o.a.createElement("div",{className:l},o.a.createElement("div",{className:"my-plan-card__primary"},o.a.createElement("div",{className:"my-plan-card__icon"},a&&o.a.createElement("img",{src:a,alt:c})),o.a.createElement("div",{className:"my-plan-card__header"},c&&o.a.createElement("h2",{className:"my-plan-card__title"},c),s&&o.a.createElement("p",{className:"my-plan-card__tag-line"},s))),(i||t||r)&&o.a.createElement("div",{className:"my-plan-card__secondary"},o.a.createElement("div",{className:u},r?null:i),o.a.createElement("div",{className:"my-plan-card__action"},r?null:t)))});Of.propTypes={action:u.a.oneOfType([u.a.node,u.a.element]),isError:u.a.bool,isPlaceholder:u.a.bool,details:u.a.oneOfType([u.a.string,u.a.node,u.a.element]),icon:u.a.string,tagLine:u.a.oneOfType([u.a.string,u.a.node,u.a.element]),title:u.a.oneOfType([u.a.string,u.a.node,u.a.element])};var Nf=Of,Tf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"getProductProps",value:function(e){var t=this.props,n=t.displayBackups,r=t.purchases;if(!e)return{isPlaceholder:!0};var i,a=Object(Dt.find)(r,(function(t){return t.product_slug===e}));switch(a&&(i=o.a.createElement(vf,{expiryDate:a.expiry_date,purchaseDate:a.subscribed_date,isRefundable:a.is_refundable})),Lo(e)){case"is-free-plan":return{icon:rd+"/plans/plan-free.svg",tagLine:Us("Worried about security? Get backups, automated security fixes and more: {{a}}Upgrade now{{/a}}",{components:{a:o.a.createElement(yf,{source:"my-plan-header-free-plan-text-link",target:"upgrade-now",feature:"my-plan-header-free-upgrade"})}}),title:Us("Jetpack Free")};case"is-personal-plan":return{details:i,icon:rd+"/plans/plan-personal.svg",tagLine:Us(n?"Daily backups, spam filtering, and priority support.":"Spam filtering and priority support."),title:Us("Jetpack Personal")};case"is-premium-plan":return{details:i,icon:rd+"/plans/plan-premium.svg",tagLine:Us("Full security suite, marketing and revenue automation tools, unlimited video hosting, and priority support."),title:Us("Jetpack Premium")};case"is-business-plan":return{details:i,icon:rd+"/plans/plan-business.svg",tagLine:Us("Full security suite, marketing and revenue automation tools, unlimited video hosting, unlimited themes, and priority support."),title:Us("Jetpack Professional")};case"is-daily-backup-plan":return{details:i,icon:rd+"/products/product-jetpack-backup.svg",tagLine:Us("Your data is being securely backed up every day with a 30-day archive."),title:Us("Jetpack Backup {{em}}Daily{{/em}}",{components:{em:o.a.createElement("em",null)}})};case"is-realtime-backup-plan":return{details:i,icon:rd+"/products/product-jetpack-backup.svg",tagLine:Us("Your data is being securely backed up as you edit."),title:Us("Jetpack Backup {{em}}Real-Time{{/em}}",{components:{em:o.a.createElement("em",null)}})};case"is-search-plan":return{details:i,icon:rd+"/products/product-jetpack-search.svg",tagLine:Us("Fast, highly relevant search results and powerful filtering."),title:Us("Jetpack Search",{components:{em:o.a.createElement("em",null)}})};case"is-scan-plan":return{details:i,icon:"".concat(rd,"/products/product-jetpack-scan.svg"),tagLine:Us("Automatic scanning and one-click fixes keep your site one step ahead of security threats."),title:Us("Jetpack Scan")};default:return{isPlaceholder:!0}}}},{key:"renderPlan",value:function(){return o.a.createElement(Dl,{compact:!0},this.renderHeader(Us("My Plan")),o.a.createElement(Nf,this.getProductProps(this.props.plan)))}},{key:"renderProducts",value:function(){var e=this;return Object(Dt.isEmpty)(this.props.activeProducts)?null:o.a.createElement(Dl,{compact:!0},this.renderHeader(Us("My Products")),this.props.activeProducts.map((function(t){var n=t.ID,r=t.product_slug;return o.a.createElement(Nf,Bc()({key:"product-card-"+n},e.getProductProps(r)))})))}},{key:"renderHeader",value:function(e){return o.a.createElement("h3",{className:"jp-landing__card-header"},e)}},{key:"render",value:function(){var e=this.props,t=e.plan,n=e.siteSlug;return o.a.createElement("div",{className:"jp-landing__plans"},this.renderPlan(),this.renderProducts(),o.a.createElement(Dl,{compact:!0},o.a.createElement(_f,{onClick:this.trackChecklistCtaClick,siteSlug:n})),o.a.createElement(jf,{plan:t}))}}]),t}(o.a.Component);Tf.propTypes={plan:u.a.string,siteRawUrl:u.a.string,siteSlug:u.a.string,displayBackups:u.a.bool,plansMainTopUpgradeUrl:u.a.string,purchases:u.a.array};var Pf=le((function(e){return{siteSlug:vi(e),displayBackups:qi(e),plansMainTopUpgradeUrl:Yi(e,"plans-main-top")}}))(Tf),If=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackPlansClick",(function(e){Uc.tracks.recordJetpackClick({page:"my-plan",target:e,plan:n.props.plan})})),ha()(Os()(n),"handleButtonClickForTracking",(function(e){return function(){return n.trackPlansClick(e)}})),ha()(Os()(n),"activateAds",(function(){n.props.activateModule("wordads"),n.trackPlansClick("activate_wordads")})),ha()(Os()(n),"activatePublicize",(function(){n.props.activateModule("publicize"),n.trackPlansClick("activate_publicize")})),ha()(Os()(n),"activateVideoPress",(function(){n.props.activateFeature("videopress"),n.trackPlansClick("activate_videopress")})),ha()(Os()(n),"activateSeo",(function(){n.props.activateModule("seo-tools"),n.trackPlansClick("activate_seo")})),ha()(Os()(n),"activateGoogleAnalytics",(function(){n.props.activateModule("google-analytics"),n.trackPlansClick("activate_ga")})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e,t=this,n="",r="dev"!==this.props.plan?Lo(this.props.plan):"dev",i=Object(Dt.includes)(this.props.activeFeatures,"premium-themes"),a="active"===Object(Dt.get)(this.props.rewindStatus,["state"],!1),s=!this.props.showBackups||!a&&"unavailable"!==Object(Dt.get)(this.props.rewindStatus,["state"],!1),c=function(e){var n=e.title,r=e.description;return o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-backup.svg",className:"jp-landing__plan-features-icon",alt:Us("A Jetpack Site securely backed up with Jetpack Backup")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},n),o.a.createElement("p",null,r),o.a.createElement(xc,{onClick:t.handleButtonClickForTracking("view_backup_dash"),href:Vl("calypso-activity-log",{site:t.props.siteRawUrl})},Us("View Your Backups"))))},l=function(){if(!s){if(a)return o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-security.svg",className:"jp-landing__plan-features-icon",alt:Us("A secure site, locked and protected by Jetpack")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Site Backups")),o.a.createElement("p",null,Us("Real-time backup of all your site data with unlimited space, one-click restores, and automated security scanning.")),o.a.createElement(xc,{onClick:t.handleButtonClickForTracking("view_security_dash_rewind"),href:Vl("calypso-activity-log",{site:t.props.siteRawUrl})},Us("View your security activity"))));var e="";switch(r){case"is-personal-plan":e=Us("Daily backup of all your site data with unlimited space and one-click restores");break;case"is-premium-plan":e=Us("Daily backup of all your site data with unlimited space, one-click restores, automated security scanning, and priority support");break;case"is-business-plan":e=Us("Real-time backup of all your site data with unlimited space, one-click restores, automated security scanning, and priority support");break;default:e=""}return o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-security.svg",className:"jp-landing__plan-features-icon",alt:Us("A secure site, locked and protected by Jetpack")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Site Security")),o.a.createElement("p",null,e+Us(" (powered by VaultPress).")),t.props.isPluginInstalled("vaultpress/vaultpress.php")&&t.props.isPluginActive("vaultpress/vaultpress.php")?o.a.createElement(xc,{onClick:t.handleButtonClickForTracking("view_security_dash"),href:Vl("vaultpress-dashboard")},Us("View your security dashboard")):o.a.createElement(xc,{onClick:t.handleButtonClickForTracking("configure_vault"),href:Vl("calypso-plugins-setup",{site:t.props.siteRawUrl,query:"only=vaultpress"})},Us("View settings"))))}};"is-daily-backup-plan"===r&&(e=c({title:Us("Automated Daily Backups"),description:Us("We back up your website every day, so you never have to worry about your data again.")})),"is-realtime-backup-plan"===r&&(e=c({title:Us("Automated Real-time Backups"),description:Us("We back up your website with every change you make, making it easy to fix your mistakes.")}));var u=function(){return o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-search-icon.svg",className:"jp-landing__plan-features-icon",alt:Us("A Jetpack Site with the power of Jetpack Search")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Instant Search and Filtering")),o.a.createElement("p",null,Us("Relevant search results and filtering tightly integrated with your theme.")),o.a.createElement(xc,{onClick:t.handleButtonClickForTracking("view_search_customizer"),href:t.props.siteAdminUrl+"customize.php?autofocus[section]=jetpack_search"},Us("Customize Search"))))};switch(r){case"is-personal-plan":case"is-premium-plan":case"is-business-plan":n=o.a.createElement("div",{className:"jp-landing__plan-features"},"is-personal-plan"===r&&l(),"is-premium-plan"===r&&l(),"is-business-plan"===r&&l(),this.props.hasActiveSearchPurchase&&u(),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-speed-icon.svg",className:"jp-landing__plan-features-icon",alt:Us("A fast and performant website")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Optimized performance")),o.a.createElement("p",null,Us("Load pages faster by serving your images from our global network of servers.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("paid_performance"),href:this.props.siteAdminUrl+"admin.php?page=jetpack#/performance"},Us("Make your site faster")))),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-spam.svg",className:"jp-landing__plan-features-icon",alt:Us("A folder holding real comments")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Anti-spam")),o.a.createElement("p",null,Us("Spam is automatically blocked from your comments.")),this.props.isPluginInstalled("akismet/akismet.php")&&this.props.isPluginActive("akismet/akismet.php")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("view_spam_stats"),href:this.props.siteAdminUrl+"admin.php?page=akismet-key-config"},Us("View your spam stats")):o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("configure_akismet"),href:Vl("calypso-plugins-setup",{site:this.props.siteRawUrl,query:"only=akismet"})},Us("View settings")))),("is-business-plan"===r||"is-premium-plan"===r)&&"inactive"!==this.props.getModuleOverride("videopress")&&o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-video-hosting.svg",className:"jp-landing__plan-features-icon",alt:Us("A cloud with multiple types of content floating around it")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Video Hosting")),o.a.createElement("p",null,Us("High-speed, high-definition video hosting with no third-party ads.")),this.props.getFeatureState("videopress")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("upload_videos"),href:this.props.siteAdminUrl+"upload.php"},Us("Upload videos")):o.a.createElement(xc,{onClick:this.activateVideoPress,disabled:this.props.isActivatingFeature("videopress")},Us("Activate video hosting")))),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-site-activity.svg",className:"jp-landing__plan-features-icon",alt:Us("Interface showing a chronological list of changes and updates in a site")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Activity")),o.a.createElement("p",null,Us("View a chronological list of all the changes and updates to your site in an organized, readable way.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("view_site_activity"),href:Vl("calypso-activity-log",{site:this.props.siteRawUrl})},Us("View your site activity")))),("is-business-plan"===r||"is-premium-plan"===r)&&"inactive"!==this.props.getModuleOverride("wordads")&&o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-wordads.svg",className:"jp-landing__plan-features-icon",alt:Us("A chart showing an healthy increase in earnings")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Monetize your site with ads")),o.a.createElement("p",null,Us("WordAds lets you earn money by displaying promotional content. Start earning today.")),this.props.isModuleActivated("wordads")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("view_earnings"),href:Vl("wpcom-ads-earnings",{site:this.props.siteRawUrl})},Us("View your earnings")):o.a.createElement(xc,{onClick:this.activateAds,disabled:this.props.isActivatingModule("wordads")},Us("Start earning")))),("is-business-plan"===r||"is-premium-plan"===r)&&"inactive"!==this.props.getModuleOverride("seo-tools")&&o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-performance-icon.svg",className:"jp-landing__plan-features-icon",alt:Us("Site stats showing an evolution in traffic and engagement")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("SEO Tools")),o.a.createElement("p",null,Us("Advanced SEO tools to help your site get found when people search for relevant content.")),this.props.isModuleActivated("seo-tools")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("configure_seo"),href:Vl("calypso-marketing-traffic",{site:this.props.siteRawUrl})},Us("Configure site SEO")):o.a.createElement(xc,{onClick:this.activateSeo,disabled:this.props.isActivatingModule("seo-tools")},Us("Activate SEO tools")))),("is-business-plan"===r||"is-premium-plan"===r)&&"inactive"!==this.props.getModuleOverride("google-analytics")&&o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-google-analytics.svg",className:"jp-landing__plan-features-icon",alt:Us("Site stats showing an evolution in traffic and engagement")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Google Analytics")),o.a.createElement("p",null,Us("Complement WordPress.com’s stats with Google’s in-depth look at your visitors and traffic patterns.")),this.props.isModuleActivated("google-analytics")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("configure_ga"),href:Vl("calypso-marketing-traffic",{site:this.props.siteRawUrl})},Us("Configure Google Analytics")):o.a.createElement(xc,{onClick:this.activateGoogleAnalytics,disabled:this.props.isActivatingModule("google-analytics")},Us("Activate Google Analytics")))),i&&o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-themes.svg",className:"jp-landing__plan-features-icon",alt:Us("A secure site, locked and protected by Jetpack")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Try a premium theme")),o.a.createElement("p",null,Us("Access beautifully designed premium themes at no extra cost.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("premium_themes"),href:Vl("calypso-themes-premium",{site:this.props.siteRawUrl})},Us("Browse premium themes")))),("is-business-plan"===r||"is-premium-plan"===r)&&"inactive"!==this.props.getModuleOverride("publicize")&&o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-marketing.svg",className:"jp-landing__plan-features-icon",alt:Us("A secure site, locked and protected by Jetpack")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Marketing Automation")),o.a.createElement("p",null,Us("Schedule unlimited tweets, Facebook posts, and other social posts in advance.")),this.props.isModuleActivated("publicize")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("schedule_posts"),href:Vl("calypso-edit-posts",{site:this.props.siteRawUrl})},Us("Schedule posts")):o.a.createElement(xc,{onClick:this.activatePublicize,disabled:this.props.isActivatingModule("publicize")},Us("Activate Publicize")))));break;case"is-free-plan":case"is-daily-backup-plan":case"is-realtime-backup-plan":case"is-search-plan":case"dev":n=o.a.createElement("div",{className:"jp-landing__plan-features"},e,this.props.hasActiveSearchPurchase&&u(),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-security.svg",className:"jp-landing__plan-features-icon",alt:Us("A secure site, locked and protected by Jetpack")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Always-on security")),o.a.createElement("p",null,Us("Prevent login attacks, and get instant notifications when there’s an issue with your site.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("free_security"),href:Vl("calypso-settings-security",{site:this.props.siteRawUrl})},Us("Set up your site security")))),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-speed-icon.svg",className:"jp-landing__plan-features-icon",alt:Us("A fast and performant website")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Optimized performance")),o.a.createElement("p",null,Us("Load pages faster by serving your images from our global network of servers.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("free_performance"),href:this.props.siteAdminUrl+"admin.php?page=jetpack#/performance"},Us("Make your site faster")))),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-themes.svg",className:"jp-landing__plan-features-icon",alt:Us("A wide variety of themes and tools to customize a site")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Design the perfect website")),o.a.createElement("p",null,Us("Get unlimited access to hundreds of professional themes, and customize your site exactly how you like it.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("free_themes"),href:Vl("calypso-themes",{site:this.props.siteRawUrl})},Us("Explore free themes")))),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-performance-icon.svg",className:"jp-landing__plan-features-icon",alt:Us("Site stats showing an evolution in traffic and engagement")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Increase traffic to your site")),o.a.createElement("p",null,Us("Reach a wider audience by automatically sharing your posts on social media.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("free_sharing"),href:Vl("calypso-marketing-connections",{site:this.props.siteRawUrl})},Us("Start sharing")))),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-site-activity.svg",className:"jp-landing__plan-features-icon",alt:Us("Interface showing a chronological list of changes and updates in a site")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Site activity")),o.a.createElement("p",null,Us("View a chronological list of all the changes and updates to your site in an organized, readable way.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("view_site_activity"),href:Vl("calypso-activity-log",{site:this.props.siteRawUrl})},Us("View your site activity")))),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-img"},o.a.createElement("img",{src:rd+"/jetpack-support.svg",className:"jp-landing__plan-features-icon",alt:Us("Chat bubbles representing getting in touch with support")})),o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Support documentation")),o.a.createElement("p",null,Us("Need help? Learn about getting started, customizing your site, using advanced code snippets, and more.")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking("free_support_documentation"),href:Vl("jetpack-support")},Us("Search support docs")))),"is-free-plan"===r&&o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("div",{className:"jp-landing__plan-features-text"},o.a.createElement("h3",{className:"jp-landing__plan-features-title"},Us("Take your site to the next level!")),o.a.createElement("ul",{className:"jp-landing__plan-features-list"},o.a.createElement("li",null,Us("Expand your audience with pro SEO tools.")),o.a.createElement("li",null,Us("Customize your social posting schedule.")),o.a.createElement("li",null,Us("Monetize your site by running high quality ads."))),o.a.createElement(xc,{className:"is-primary",onClick:this.handleButtonClickForTracking("free_explore_jetpack_plans"),href:"#/plans"},Us("Upgrade Jetpack now")))));break;default:n=o.a.createElement("div",{className:"jp-landing__plan-features is-loading"},o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("h3",{className:"jp-landing__plan-features-title is-placeholder"}," "),o.a.createElement("p",{className:"jp-landing__plan-features-text is-placeholder"}," ")),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("h3",{className:"jp-landing__plan-features-title is-placeholder"}," "),o.a.createElement("p",{className:"jp-landing__plan-features-text is-placeholder"}," ")),o.a.createElement("div",{className:"jp-landing__plan-features-card"},o.a.createElement("h3",{className:"jp-landing__plan-features-title is-placeholder"}," "),o.a.createElement("p",{className:"jp-landing__plan-features-text is-placeholder"}," ")))}return o.a.createElement("div",null,o.a.createElement(jl,null),n)}}]),t}(o.a.Component);ha()(If,"propTypes",{plan:u.a.string}),ha()(If,"defaultProps",{plan:""});var Df=le((function(e){return{isFetchingPluginsData:ga(e),isPluginActive:function(t){return va(e,t)},isPluginInstalled:function(t){return ba(e,t)},isModuleActivated:function(t){return Ga(e,t)},isActivatingModule:function(t){return function(e,t){return!!e.jetpack.modules.requests.activating[t]}(e,t)},getModuleOverride:function(t){return $a(e,t)},showBackups:qi(e),getFeatureState:function(t){return Mo(e,t)},isActivatingFeature:function(t){return xo(e,t)}}}),(function(e){return{fetchPluginsData:function(){return e(Fa())},activateModule:function(t){return e(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n,r){return n({type:vn,module:e}),n(Xa("module-toggle")),n(Qa("is-info",Us("Activating %(slug)s…",{args:{slug:qa(r(),e).name}}),{id:"module-toggle"})),Da.activateModule(e).then((function(){n({type:bn,module:e,success:!0}),n(Xa("module-toggle")),n(Qa("is-success",Us("%(slug)s has been activated.",{args:{slug:qa(r(),e).name}}),{id:"module-toggle",duration:2e3})),t&&window.location.reload()})).catch((function(t){n({type:yn,module:e,success:!1,error:t}),n(Xa("module-toggle")),n(Qa("is-error",Us("%(slug)s failed to activate. %(error)s",{args:{slug:qa(r(),e).name,error:t}}),{id:"module-toggle"}))}))}}(t))},activateFeature:function(t){return e(Ul(ha()({},t,!0)))}}}))(If);var Rf=le((function(e){return{activeFeatures:Wo(e),activeProducts:Xo(e),availableFeatures:Jo(e),getSiteConnectionStatus:function(){return Hs(e)},hasActiveSearchPurchase:Zo(e),purchases:Yo(e),sitePlan:qo(e)}}))((function(e){var t=e.sitePlan.product_slug||"",n=e.availableFeatures,r=e.activeFeatures;return"dev"===e.getSiteConnectionStatus(e)&&(t="dev",n={},r={}),o.a.createElement(o.a.Fragment,null,o.a.createElement(zl,null),o.a.createElement(Pf,{activeProducts:e.activeProducts,plan:t,purchases:e.purchases,siteRawUrl:e.siteRawUrl}),o.a.createElement(Df,{activeFeatures:r,availableFeatures:n,hasActiveSearchPurchase:e.hasActiveSearchPurchase,plan:t,rewindStatus:e.rewindStatus,siteAdminUrl:e.siteAdminUrl,siteRawUrl:e.siteRawUrl}))})),Uf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"clickHandler",(function(){var e=n.props,t=e.planType,r=e.productSlug;Uc.tracks.recordJetpackClick({target:"upgrade-".concat(t),type:"upgrade",plan:r,page:"Plans"})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this.props,t=e.buttonText,n=e.planType,r=e.isActivePlan,i=e.isPrimary,a=e.shouldRenderButton,s=e.siteRawUrl,c=e.plansUpgradeUrl,l=r?Vl("calypso-plans-my-plan",{site:s}):c,u=Mc()("plan-features__table-item","has-border-bottom","is-top-buttons");return a?o.a.createElement("td",{key:"button-"+n,className:u},o.a.createElement(xc,{href:l,primary:i,onClick:this.clickHandler},t)):o.a.createElement("td",{key:"button-"+n,className:u})}}]),t}(o.a.Component),Lf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"featureLinkClickHandler",(function(){var e=n.props,t=e.feature,r=e.productSlug;Uc.tracks.recordJetpackClick({target:t.id,type:"feature-discovery",plan:r,page:"Plans"})})),n}return Ma()(t,e),As()(t,[{key:"renderFeatureLink",value:function(e){var t=this.props,n=t.siteRawUrl,r=t.userId;return o.a.createElement("a",{onClick:this.featureLinkClickHandler,href:"https://jetpack.com/features/".concat(e.info,"?site=").concat(n,"&u=").concat(r)},e.name)}},{key:"render",value:function(){var e=this.props,t=e.itemKey,n=e.feature,r=e.hideBackupFeature;return void 0===n||r?o.a.createElement("td",{key:t,className:"plan-features__table-item"}):o.a.createElement("td",{key:t,className:"plan-features__table-item has-partial-border"},o.a.createElement("div",{className:"plan-features__item"},n.info?this.renderFeatureLink(n):n.name))}}]),t}(s.Component),Ff=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"handlePeriodChange",value:function(e){var t=this;return e===this.props.planDuration?null:function(){Uc.tracks.recordJetpackClick({target:"change-period-"+e,feature:"plans-grid",extra:t.props.type}),t.props.setPlanDuration(e)}}},{key:"render",value:function(){var e=this,t=this.props.planDuration,n={monthly:Us("Monthly"),yearly:Us("Yearly")};return o.a.createElement("div",{className:"plan-grid-period"},o.a.createElement(Ac,null,Object(Dt.map)(n,(function(n,r){return o.a.createElement(xc,{key:"plan-period-button-"+r,primary:r===t,onClick:e.handlePeriodChange(r),compact:!0},n)}))))}}]),t}(o.a.Component),zf=le((function(e){return{planDuration:di(e)}}),{setPlanDuration:function(e){return function(t){t({type:Fr,duration:e})}}})(Ff),Bf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"featuredPlans",!1),n}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillUpdate",value:function(){this.featuredPlans=!1}},{key:"handleSeeFeaturesClick",value:function(e){return function(){Uc.tracks.recordJetpackClick({target:"see-all-features-link",feature:"plans-grid",extra:e})}}},{key:"render",value:function(){if(!this.props.plans||this.props.isFetchingData)return o.a.createElement("div",{className:"plan-features"},this.renderMobileCard(),this.renderSkeletonGrid());var e=Object.values(this.getPlans()).length,t=Mc()("plan-features__table","has-".concat(e,"-cols"));return o.a.createElement("div",{className:"plan-features"},this.renderMobileCard(),o.a.createElement(zf,{type:"plans"}),o.a.createElement("div",{className:"plan-features__content"},o.a.createElement("table",{className:t},o.a.createElement("tbody",null,o.a.createElement("tr",null,this.renderPlanHeaders()),o.a.createElement("tr",null,this.renderPrices()),o.a.createElement("tr",null,this.renderTopButtons()),this.renderPlanFeatureRows(),o.a.createElement("tr",null,this.renderBottomButtons())))))}},{key:"renderMobileCard",value:function(){var e=Us("You’re currently on Jetpack %(plan)s.",{args:{plan:this.props.sitePlan.product_name_short}}),t=Vl("calypso-plans-my-plan",{site:this.props.siteRawUrl}),n=Vl("calypso-plans",{site:this.props.siteRawUrl});return o.a.createElement("div",{className:"plans-mobile-notice dops-card"},o.a.createElement("h2",null,Us("Your Plan")),o.a.createElement("p",null,e),o.a.createElement(xc,{href:t},Us("Manage your plan")),o.a.createElement(xc,{href:n,primary:!0},Us("View all Jetpack plans")))}},{key:"renderSkeletonGrid",value:function(){return o.a.createElement("div",{className:"plan-grid-skeletons"},o.a.createElement("div",{className:"plan-grid-skeletons__plan is-placeholder"}),o.a.createElement("div",{className:"plan-grid-skeletons__plan is-placeholder"}),o.a.createElement("div",{className:"plan-grid-skeletons__plan is-placeholder"}))}},{key:"getCurrentPlanType",value:function(){return Lo(this.props.sitePlan.product_slug).replace(/^is-/,"").replace(/-plan$/,"")}},{key:"isUpgraded",value:function(){return!Object(Dt.includes)(["","free"],this.getCurrentPlanType())}},{key:"isCurrentPlanType",value:function(e){return this.getCurrentPlanType()===e}},{key:"getPlans",value:function(){if(this.featuredPlans)return this.featuredPlans;var e=Object(Dt.reduce)(this.props.plans,(function(e,t,n){if("free"===n)return e;var r=t.highlight;return t.features=Object(Dt.reduce)(t.features,(function(e,t){return Object(Dt.includes)(r,t.id)&&e.push(t),e}),[]),e[n]=t,e}),{});return this.featuredPlans=e,e}},{key:"renderPlanHeaders",value:function(){return Object(Dt.map)(this.getPlans(),(function(e,t){var n=Mc()("plan-features__table-item","is-header","has-border-top","is-".concat(t,"-plan"));return o.a.createElement("td",{key:"plan-header-"+t,className:n},o.a.createElement("header",{className:"plan-features__header"},o.a.createElement("h3",{className:"plan-features__header-title"},e.short_name),o.a.createElement("div",{className:"plan-features__description"},e.tagline)))}))}},{key:"renderPrices",value:function(){var e=this,t=this.props.planDuration;return Object(Dt.map)(this.getPlans(),(function(n,r){var i=Mc()("plan-features__table-item","plan-price");return e.isCurrentPlanType(r)?o.a.createElement("td",{key:"price-"+r,className:i},n.strings.current):e.shouldRenderButton(r)?o.a.createElement("td",{key:"price-"+r,className:i},o.a.createElement("span",{className:"plan-price__yearly",dangerouslySetInnerHTML:{__html:n.price[t].per}})):o.a.createElement("td",{key:"price-"+r,className:i})}))}},{key:"shouldRenderButton",value:function(e){var t=Object.keys(this.props.plans),n=t.indexOf(this.getCurrentPlanType());return t.indexOf(e)>=n}},{key:"renderTopButtons",value:function(){var e=this,t=this.props.planDuration;return Object(Dt.map)(this.getPlans(),(function(n,r){var i=e.props,a=i.siteRawUrl,s=i.plansUpgradeUrl,c=i.sitePlan,l=e.isCurrentPlanType(r),u=l?n.strings.manage:n.strings.upgrade,p=r;return"monthly"===t&&(p+="-monthly"),o.a.createElement(Uf,{key:r,buttonText:u,planType:r,isActivePlan:l,isPrimary:e.isPrimary(r,n),shouldRenderButton:e.shouldRenderButton(r),siteRawUrl:a,plansUpgradeUrl:s(p),productSlug:c.product_slug})}))}},{key:"isPrimary",value:function(e,t){if(this.isUpgraded()){var n=this.getCurrentPlanType(),r=Object.keys(this.getPlans()),i=r.indexOf(n);return r.indexOf(e)===r.indexOf(r[i+1])}return t.is_featured}},{key:"renderBottomButtons",value:function(){var e=this;return Object(Dt.map)(this.getPlans(),(function(t,n){return o.a.createElement("td",{key:"bottom-"+n,className:"plan-features__table-item is-bottom-buttons has-border-bottom"},o.a.createElement("a",{href:e.props.plansLearnMoreUpgradeUrl,onClick:e.handleSeeFeaturesClick(n)},t.strings.see_all))}))}},{key:"getLongestFeaturesList",value:function(){return Object(Dt.reduce)(this.getPlans(),(function(e,t){var n=Object.keys(t.features);return n.length>e.length?n:e}),[])}},{key:"renderPlanFeatureRows",value:function(){var e=this;return Object(Dt.map)(this.getLongestFeaturesList(),(function(t,n){return o.a.createElement("tr",{key:"row-"+n,className:"plan-features-row"},e.renderPlanFeatureColumns(n))}))}},{key:"renderPlanFeatureColumns",value:function(e){var t=this;return Object(Dt.map)(this.getPlans(),(function(n,r){var i=r+"-row-"+e,a=n.features[e],s=!t.props.showBackups&&a&&Object(Dt.includes)(["backups","malware-scan","real-time-backups"],a.id);return o.a.createElement(Lf,{key:r,itemKey:i,feature:a,hideBackupFeature:s,siteRawUrl:t.props.siteRawUrl,userId:t.props.userId,productSlug:t.props.sitePlan.product_slug})}))}}]),t}(o.a.Component),Vf=le((function(e){var t=function(e){return Object(Dt.get)(e.jetpack.initialState.userData.currentUser,"id")}(e);return{plans:Go(e),siteRawUrl:vi(e),sitePlan:qo(e),userId:t,showBackups:qi(e),planDuration:di(e),plansUpgradeUrl:function(n){return Yi(e,"plans-".concat(n),t)},plansLearnMoreUpgradeUrl:Yi(e,"plans-learn-more",t),isFetchingData:Bo(e)}}),null)(Bf);var Hf=le((function(e){return{isFetchingSiteProducts:nc(e)}}),(function(e){return{fetchSiteProducts:function(){return e((function(e){return e({type:Zn}),Da.fetchSiteProducts().then((function(t){e({type:tr,siteProducts:t.data})})).catch((function(t){e({type:er,error:t})}))}))}}}))((function(e){return Object(s.useEffect)((function(){!e.isFetchingSiteProducts&&e.fetchSiteProducts()}),[]),null})),qf=function(e){var t=e.intro,n=e.label,r=e.onClick,i=e.primary,a=e.href;return o.a.createElement("div",{className:"product-card__action"},t&&o.a.createElement("h4",{className:"product-card__action-intro"},t),o.a.createElement(xc,{className:"product-card__action-button",href:a,onClick:r,primary:i,target:"_blank",rel:"noopener noreferrer"},n))};qf.propTypes={intro:u.a.oneOfType([u.a.string,u.a.node,u.a.element]),label:u.a.string.isRequired,onClick:u.a.func,href:u.a.string,primary:u.a.bool},qf.defaultProps={href:null,onClick:Dt.noop,primary:!0};var Kf=qf,Jf=n(111),Wf=n.n(Jf),Gf={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function Yf(e){return Gf[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}function $f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Yf(t);if(!r||isNaN(e))return null;var i=Wf()({},r,n),a=i.decimal,s=i.grouping,o=i.precision,c=i.symbol,l=e<0?"-":"",u=Math.abs(e),p=Math.floor(u),d=Rs(p,{decimals:0,thousandsSep:s,decPoint:a}),h=o>0?Rs(u-p,{decimals:o,thousandsSep:s,decPoint:a}).slice(1):"";return{sign:l,symbol:c,integer:d,fraction:h}}n(381);var Xf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"getPriceRange",value:function(){var e,t=this.props,n=t.currencyCode,r=t.rawPrice;if(Array.isArray(r)){var i=r.filter((function(e){return e>=0}));e=[Math.min.apply(Math,Ht()(i)),Math.max.apply(Math,Ht()(i))]}else e=[r];return e.map((function(e){return{price:$f(e,n),raw:e}}))}},{key:"renderPrice",value:function(e){return o.a.createElement(o.a.Fragment,null,o.a.createElement("span",{className:"plan-price__integer"},e.price.integer),o.a.createElement("sup",{className:"plan-price__fraction"},e.raw-e.price.integer>0&&e.price.fraction))}},{key:"renderContent",value:function(){var e=this.getPriceRange(),t=this.renderPrice(e[0]),n=e[1]&&this.renderPrice(e[1]);return o.a.createElement(o.a.Fragment,null,o.a.createElement("sup",{className:"plan-price__currency-symbol"},e[0].price.symbol),n?Us("{{smallerPrice/}}-{{higherPrice/}}",{components:{smallerPrice:t,higherPrice:n},comment:"The price range for a particular product"}):t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.discounted,r=e.inline,i=e.original;if(void 0===e.rawPrice)return null;var a=r?"span":"div",s=Mc()("plan-price",t,{"is-discounted":n,"is-inline":r,"is-original":i});return o.a.createElement(a,{className:s},this.renderContent())}}]),t}(s.Component),Qf=Xf;Xf.propTypes={className:u.a.string,currencyCode:u.a.string,discounted:u.a.bool,inline:u.a.bool,original:u.a.bool,rawPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)])},Xf.defaultProps={className:"",currencyCode:"USD",discounted:!1,original:!1};var Zf=function(e){var t=e.billingTimeFrame,n=e.currencyCode,r=e.discountedPrice,i=e.fullPrice,a=!!r,s=Mc()("product-card__price-group",{"is-discounted":a});return o.a.createElement("div",{className:s},o.a.createElement(Qf,{currencyCode:n,rawPrice:i,original:a}),a&&o.a.createElement(Qf,{currencyCode:n,rawPrice:r,discounted:!0}),o.a.createElement("div",{className:"product-card__billing-timeframe"},t))};Zf.propTypes={billingTimeFrame:u.a.string,currencyCode:u.a.string,discountedPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),fullPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)])};var em=Zf,tm=(n(382),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"getManagePurchaseLink",value:function(e,t){return Vl("calypso-me-purchases",{site:e,path:t})}},{key:"handleManagePurchase",value:function(e){return function(){Uc.tracks.recordJetpackClick({target:"product-card-manage-purchase",feature:e})}}},{key:"render",value:function(){var e=this.props,t=e.billingTimeFrame,n=e.children,r=e.currencyCode,i=e.description,a=e.discountedPrice,s=e.fullPrice,c=e.isCurrent,l=e.isPlaceholder,u=e.purchase,p=e.subtitle,d=e.title,h=e.translate,f=Mc()("single-product__accented-card",{"is-placeholder":l,"is-purchased":!!u});return o.a.createElement(Dl,{className:f},o.a.createElement("div",{className:"single-product__accented-card-header"},d&&o.a.createElement("div",{className:"single-product__accented-card-header-primary"},u&&o.a.createElement(ml,{icon:"checkmark",size:18}),o.a.createElement("h3",{className:"single-product-backup__header-title"},d))),o.a.createElement("div",{className:"single-product__accented-card-body"},i&&o.a.createElement("p",null,i),u&&c&&o.a.createElement(Kf,{onClick:this.handleManagePurchase(u.product_slug),href:this.getManagePurchaseLink(u.domain,u.ID),label:h("Manage Subscription"),primary:!1}),p&&o.a.createElement("div",{className:"product-card__subtitle"},p),!u&&o.a.createElement(em,{billingTimeFrame:t,currencyCode:r,discountedPrice:a,fullPrice:s})),n)}}]),t}(s.Component));ha()(tm,"propTypes",{billingTimeFrame:u.a.string,currencyCode:u.a.string,description:u.a.oneOfType([u.a.string,u.a.element,u.a.node]),discountedPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),fullPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),isCurrent:u.a.bool,isPlaceholder:u.a.bool,purchase:u.a.object,subtitle:u.a.oneOfType([u.a.string,u.a.element,u.a.node]),title:u.a.oneOfType([u.a.string,u.a.element,u.a.node])});var nm=Ls(tm);function rm(e){var t=e.purchase,n=e.siteRawlUrl;if(!t||!n)return null;var r=Lo(t.product_slug),i=o.a.createElement(vf,{expiryDate:t.expiry_date,purchaseDate:t.subscribed_date,isRefundable:t.is_refundable}),a=o.a.createElement("a",{href:Vl("calypso-plans-my-plan",{site:n}),target:"_blank",rel:"noopener noreferrer"}),s={purchase:t,isCurrent:!0};switch(r){case"is-search-plan":s=Ms()({title:dp,subtitle:i,description:hp},s);case"is-daily-backup-plan":s=Ms()({title:up,subtitle:i,description:cp},s);case"is-realtime-backup-plan":s=Ms()({title:pp,subtitle:i,description:lp},s);case"is-personal-plan":s=Ms()({title:up,subtitle:Us("Included in your {{planLink}}Personal Plan{{/planLink}}",{components:{planLink:a}}),description:cp},s);case"is-premium-plan":s=Ms()({title:up,subtitle:Us("Included in your {{planLink}}Premium Plan{{/planLink}}",{components:{planLink:a}}),description:cp},s);case"is-business-plan":s=Ms()({title:pp,subtitle:Us("Included in your {{planLink}}Professional Plan{{/planLink}}",{components:{planLink:a}}),description:lp},s)}return o.a.createElement(nm,s)}function im(e){var t=e.billingTimeFrame,n=e.currencyCode,r=e.discountedPrice,i=e.fullPrice;return o.a.createElement("div",{className:"single-product-backup__price-group"},r?o.a.createElement(o.a.Fragment,null,o.a.createElement(Qf,{currencyCode:n,rawPrice:i,original:!0}),o.a.createElement(Qf,{currencyCode:n,rawPrice:r,discounted:!0})):o.a.createElement(Qf,{currencyCode:n,rawPrice:i}),o.a.createElement("div",{className:"single-product-backup__price-group-billing-timeframe"},function(e){return"yearly"===e?Us("per year",{comment:"Duration of product subscription timeframe."}):"monthly"===e?Us("per month",{comment:"Duration of product subscription timeframe."}):""}(t)))}n(383);function am(e){return o.a.createElement("label",{className:"plan-radio-button"},o.a.createElement("input",{type:"radio",className:"plan-radio-button__input",value:e.radioValue,checked:e.checked,onChange:e.onChange?e.onChange:null}),o.a.createElement("div",{className:"plan-radio-button__label"},o.a.createElement("span",{className:"plan-radio-button__title"},e.planName),o.a.createElement(im,{billingTimeFrame:e.billingTimeFrame,currencyCode:e.currencyCode,discountedPrice:e.discountedPrice,fullPrice:e.fullPrice})))}n(384);function sm(e){var t=e.billingTimeframe,n=void 0===t?"yearly":t,r=e.potentialSavings,i=e.currencyCode;if(!r)return null;var a=o.a.createElement(Qf,{className:"single-product__annual-savings",rawPrice:r,currencyCode:i,inline:!0});return o.a.createElement("p",{className:"single-product__savings"},Us("monthly"===n?"You would save {{savings /}} by paying yearly":"You are saving {{savings /}} by paying yearly",{components:{savings:a}}))}function om(e){var t=e.selectedUpgrade,n=e.onClickHandler;if(!t)return null;var r=t.link,i=t.name,a=t.type;return o.a.createElement("div",{className:"single-product-backup__upgrade-button-container"},o.a.createElement(xc,{href:r,onClick:n(a),primary:!0},Us("Upgrade to %(name)s",{args:{name:i},comment:"Button to purchase product upgrade. %(name)s is the product name."})))}n(385);function cm(){return o.a.createElement("div",{className:"single-product-backup__promo"},o.a.createElement("div",{className:"single-product-backup__promo-star"},Us("Up to %(percent)d%% off!",{args:{percent:70}})),o.a.createElement("h4",{className:"single-product-backup__promo-header"},Us("Hurry, these are {{s}}Limited time introductory prices!{{/s}}",{components:{s:o.a.createElement("strong",null)}})))}var lm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"handleSelectedBackupTypeChange",(function(e){n.props.setSelectedBackupType(e.target.value)})),ha()(Os()(n),"handleUpgradeButtonClick",(function(e){return function(){Uc.tracks.recordJetpackClick({target:"upgrade-".concat(e),type:"upgrade",product:e,page:n.props.routes[0]&&n.props.routes[0].name})}})),ha()(Os()(n),"handleLandingPageLinkClick",(function(){var e=n.props,t=e.selectedBackupType;"monthly"===e.billingTimeFrame&&(t+="-monthly"),Uc.tracks.recordJetpackClick({target:"landing-page-link",feature:"single-product-backup",extra:t})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.backupInfoUrl,r=t.backupOptions,i=t.billingTimeFrame,a=t.currencyCode,s=t.selectedBackupType,c=r.find((function(e){return e.type===s}));return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"single-product__description"},cp),o.a.createElement("div",{className:"single-product__landing-page"},o.a.createElement(Xu,{className:"single-product__landing-page",target:"_blank",href:n,icon:!0,iconSize:12,onClick:this.handleLandingPageLinkClick},Us("Which backup option is best for me?"))),o.a.createElement(cm,null),o.a.createElement("h4",{className:"single-product-backup__options-header"},Us("Select a backup option:")),o.a.createElement("div",{className:"single-product-backup__radio-buttons-container"},r.map((function(t){return o.a.createElement(am,{key:t.type,billingTimeFrame:i,checked:t.type===s,currencyCode:a,fullPrice:t.fullPrice,discountedPrice:t.discountedPrice,onChange:e.handleSelectedBackupTypeChange,radioValue:t.type,planName:t.name})}))),o.a.createElement(sm,{billingTimeFrame:i,currencyCode:a,potentialSavings:c.potentialSavings}),o.a.createElement(om,{selectedUpgrade:c,onClickHandler:this.handleUpgradeButtonClick}))}}]),t}(o.a.Component);ha()(lm,"propTypes",{backupOptions:u.a.array,billingTimeFrame:u.a.string,currencyCode:u.a.string,setSelectedBackupType:u.a.func,selectedBackupType:u.a.string});var um=bt(lm);var pm=le((function(e){return{planDuration:di(e),backupInfoUrl:Yi(e,"aag-backups"),upgradeLinkDaily:Yi(e,"jetpack-backup-daily","",!0),upgradeLinkRealtime:Yi(e,"jetpack-backup-realtime","",!0)}}))((function(e){var t=e.products,n=e.backupInfoUrl,r=e.upgradeLinkDaily,i=e.upgradeLinkRealtime,a=e.selectedBackupType,c=e.setSelectedBackupType,l=e.planDuration,u=Object(Dt.get)(t,["jetpack_backup_daily","currency_code"],""),p=Object(s.useMemo)((function(){return function(e){var t=e.products,n=e.upgradeLinkDaily,r=e.upgradeLinkRealtime,i=e.planDuration,a=Object(Dt.get)(t,["jetpack_backup_daily_monthly","cost"],""),s=Object(Dt.get)(t,["jetpack_backup_realtime_monthly","cost"],""),o=Object(Dt.get)(t,["jetpack_backup_daily","cost"],""),c=""===a?"":12*a,l=Object(Dt.get)(t,["jetpack_backup_realtime","cost"],""),u=""===s?"":12*s;return"yearly"===i?[{type:"daily",name:Us("Daily Backups"),link:n,discountedPrice:o,fullPrice:c,potentialSavings:c&&o?c-o:null},{type:"real-time",name:Us("Real-Time Backups"),link:r,discountedPrice:l,fullPrice:u,potentialSavings:u&&l?u-l:null}]:[{type:"daily",name:Us("Daily Backups"),link:n,fullPrice:a},{type:"real-time",name:Us("Real-Time Backups"),link:r,fullPrice:s}]}({products:t,upgradeLinkDaily:r,upgradeLinkRealtime:i,planDuration:l})}),[t,r,i,l]);return e.isFetching?o.a.createElement("div",{className:"plans-section__single-product-skeleton is-placeholder"}):o.a.createElement("div",{className:"single-product__accented-card dops-card"},o.a.createElement("div",{className:"single-product__accented-card-header"},o.a.createElement("h3",{className:"single-product-backup__header-title"},op)),o.a.createElement("div",{className:"single-product__accented-card-body"},o.a.createElement(um,{billingTimeFrame:l,currencyCode:u,backupOptions:p,backupInfoUrl:n,selectedBackupType:a,setSelectedBackupType:c})))}));function dm(e,t){switch(e){case"up_to_100_records":return Us("Up to 100 records");case"up_to_1k_records":return Us("Up to 1,000 records");case"up_to_10k_records":return Us("Up to 10,000 records");case"up_to_100k_records":return Us("Up to 100,000 records");case"up_to_1m_records":return Us("Up to 1,000,000 records");case"more_than_1m_records":var n=1e6*Math.ceil(t/1e6);return Us("Up to %(tierMaximumRecords)s records",{args:{tierMaximumRecords:Rs(n)}});default:return null}}var hm=le((function(e){return{planDuration:di(e),searchInfoUrl:Yi(e,"aag-search"),searchUpgradeMonthlyUrl:Yi(e,"jetpack-search-monthly"),searchUpgradeUrl:Yi(e,"jetpack-search")}}))((function(e){var t=e.planDuration,n=e.siteProducts,r=Object(Dt.get)(n,"jetpack_search.currency_code",""),i=Object(Dt.get)(n,"jetpack_search_monthly.cost",""),a=Object(Dt.get)(n,"jetpack_search.cost",""),s=Object(Dt.get)(n,"jetpack_search.price_tier_usage_quantity","0"),c=function(e){return function(){Uc.tracks.recordJetpackClick({target:"landing-page-link",feature:"single-product-search",extra:e})}}(s);return e.isFetching?o.a.createElement("div",{className:"plans-section__single-product-skeleton is-placeholder"}):o.a.createElement("div",{className:"single-product__accented-card dops-card"},o.a.createElement("div",{className:"single-product__accented-card-header"},o.a.createElement("h3",{className:"single-product-backup__header-title"},dp)),o.a.createElement("div",{className:"single-product__accented-card-body"},o.a.createElement("div",{className:"single-product__description"},hp),o.a.createElement("div",{className:"single-product__landing-page"},o.a.createElement(Xu,{target:"_blank",href:e.searchInfoUrl,icon:!0,iconSize:12,onClick:c},Us("Learn more"))),o.a.createElement("h4",{className:"single-product-backup__options-header"},Us("Your current site record size: %s record","Your current site record size: %s records",{args:Rs(s),count:s}),o.a.createElement($u,{position:"right"},Us("Records are all posts, pages, custom post types, and other types of content indexed by Jetpack Search."))),o.a.createElement("div",{className:"single-product-search__radio-buttons-container"},o.a.createElement(am,{billingTimeFrame:t,checked:!0,currencyCode:r,fullPrice:"yearly"===t?a:i,planName:dm(Object(Dt.get)(e.siteProducts,"jetpack_search.price_tier_slug"),s),radioValue:t})),o.a.createElement(sm,{billingTimeframe:t,currencyCode:r,potentialSavings:12*i-a}),o.a.createElement("div",{className:"single-product-search__upgrade-button-container"},o.a.createElement(xc,{href:"yearly"===t?e.searchUpgradeUrl:e.searchUpgradeMonthlyUrl,primary:!0},Us("Upgrade to Jetpack Search")))))})),fm=(n(386),function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{selectedBackupType:"real-time"}),ha()(Os()(n),"setSelectedBackupType",(function(e){n.setState({selectedBackupType:e})})),n}return Ma()(t,e),As()(t,[{key:"findPrioritizedPurchaseForBackup",value:function(){for(var e=this,t=function(){var t=r[n],i=e.props.activeSitePurchases.find((function(e){return Lo(e.product_slug)===t}));if(void 0!==i)return{v:i}},n=0,r=["is-business-plan","is-realtime-backup-plan","is-premium-plan","is-personal-plan","is-daily-backup-plan"];n<r.length;n++){var i=t();if("object"==typeof i)return i.v}return!1}},{key:"renderTitleSection",value:function(){return o.a.createElement(s.Fragment,null,o.a.createElement("h1",{className:"plans-section__header"},Us("Solutions")),o.a.createElement("h2",{className:"plans-section__subheader"},Us("Looking for specific features? We've got you covered.")))}},{key:"renderBackupProduct",value:function(){if(this.props.multisite)return null;var e=this.findPrioritizedPurchaseForBackup();if(e)return o.a.createElement(rm,{purchase:e,siteRawlUrl:this.props.siteRawlUrl});var t=Object(Dt.get)(this.props.sitePlan,"product_slug");return this.props.isFetchingData||"jetpack_free"===t?o.a.createElement(pm,{isFetching:this.props.isFetchingData,products:this.props.siteProducts,selectedBackupType:this.state.selectedBackupType,setSelectedBackupType:this.setSelectedBackupType}):null}},{key:"renderSearchProduct",value:function(){return this.props.searchPurchase?o.a.createElement(rm,{purchase:this.props.searchPurchase,siteRawlUrl:this.props.siteRawlUrl}):o.a.createElement(hm,{isFetching:this.props.isFetchingData,searchPurchase:this.props.searchPurchase,siteProducts:this.props.siteProducts})}},{key:"render",value:function(){return o.a.createElement("div",{className:"product-selector"},o.a.createElement(Hf,null),this.renderTitleSection(),o.a.createElement(zf,{type:"solutions"}),o.a.createElement("div",{className:"plans-section__single-product plans-section__single-product--with-search"},this.renderBackupProduct(),this.renderSearchProduct()))}}]),t}(s.Component)),mm=le((function(e){return{activeSitePurchases:$o(e),isFetchingData:Bo(e)||!Go(e)||nc(e),planDuration:di(e),multisite:Ji(e),searchPurchase:Qo(e),sitePlan:qo(e),siteProducts:rc(e),siteRawlUrl:vi(e)}}))(fm);function gm(){return o.a.createElement(s.Fragment,null,o.a.createElement(zl,null),o.a.createElement(Vf,null),o.a.createElement(mm,null))}var vm=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"trackStartWithFreeClick",value:function(){Uc.tracks.recordJetpackClick({target:"free-plan",feature:"plans-prompt"})}},{key:"renderBanner",value:function(){return o.a.createElement("div",{className:"plans-prompt__banner"},o.a.createElement(Hc,{className:"plans-prompt__logo"}),o.a.createElement("h2",{className:"plans-prompt__heading"},Us("Explore our Jetpack plans")),o.a.createElement("p",{className:"plans-prompt__intro"},Us("Now that you're set up, pick a plan that fits your needs.")))}},{key:"renderFooter",value:function(){return this.props.plans?o.a.createElement("div",{className:"plans-prompt__footer"},o.a.createElement(xc,{href:this.props.siteAdminUrl+"admin.php?page=jetpack",onClick:this.trackStartWithFreeClick},Us("Start with free"),o.a.createElement(ml,{icon:"arrow-right",size:18}))):null}},{key:"render",value:function(){return o.a.createElement("div",{className:"plans-prompt"},this.renderBanner(),o.a.createElement(gm,null),this.renderFooter())}}]),t}(o.a.Component),bm=le((function(e){return{plans:Go(e)}}))(vm),ym={currentUser:{isMaster:!0,permissions:{admin_page:!0,connect:!0,disconnect:!0,edit_posts:!0,manage_modules:!0,manage_options:!0,manage_plugins:!0}}},_m={currentUser:{isMaster:!1,permissions:{admin_page:!0,connect:!0,disconnect:!0,edit_posts:!0,manage_modules:!0,manage_options:!0,manage_plugins:!0}}},wm={currentUser:{isMaster:!1,permissions:{admin_page:!0,connect:!1,disconnect:!1,edit_posts:!0,manage_modules:!1,manage_options:!1,manage_plugins:!1}}},km={currentUser:{isMaster:!1,permissions:{admin_page:!0,connect:!1,disconnect:!1,edit_posts:!1,manage_modules:!1,manage_options:!1,manage_plugins:!1}}},Em={currentUser:{permissions:{view_stats:!0}}},Cm={currentUser:{permissions:{view_stats:!1}}},Sm={currentUser:{isConnected:!0}},Mm={currentUser:{isConnected:!1}},xm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"onPlanChange",(function(e){n.props.switchPlanPreview(e.target.value)})),ha()(Os()(n),"onPermissionsChange",(function(e){n.props.switchUserPermissions(e.target.value)})),ha()(Os()(n),"onThreatsChange",(function(e){n.props.switchThreats(e.target.value)})),ha()(Os()(n),"onRewindStatusChange",(function(e){n.props.switchRewindState(e.target.value)})),ha()(Os()(n),"maybeShowStatsToggle",(function(){if(!n.props.isAdmin)return o.a.createElement("div",null,o.a.createElement("hr",null),o.a.createElement("ul",null,o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"view_stats"},o.a.createElement("input",{type:"radio",id:"view_stats",value:"view_stats",name:"view_stats",checked:n.props.canViewStats,onChange:n.onPermissionsChange}),"Can view stats")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"hide_stats"},o.a.createElement("input",{type:"radio",id:"hide_stats",value:"hide_stats",name:"hide_stats",checked:!n.props.canViewStats,onChange:n.onPermissionsChange}),"Can not view stats"))))})),ha()(Os()(n),"maybeShowIsLinkedToggle",(function(){if(!n.props.isMaster)return o.a.createElement("div",null,o.a.createElement("hr",null),o.a.createElement("ul",null,o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"is_linked"},o.a.createElement("input",{type:"radio",id:"is_linked",value:"is_linked",name:"is_linked",checked:n.props.isUserLinked,onChange:n.onPermissionsChange}),"Linked")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"is_unlinked"},o.a.createElement("input",{type:"radio",id:"is_unlinked",value:"is_unlinked",name:"is_unlinked",checked:!n.props.isUserLinked,onChange:n.onPermissionsChange}),"Unlinked"))))})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){if(!this.props.canDisplayDevCard)return null;var e=Mc()(this.props.className,"jp-dev-card"),t=Lo(this.props.sitePlan.product_slug),n=Object(Dt.get)(this.props.rewindStatus,["state"],!1);return o.a.createElement(Dl,{compact:!0,className:e},o.a.createElement("a",{className:"jp-dev-card__close",role:"button",tabIndex:"0",onKeyDown:Tu(this.props.disableDevCard),onClick:this.props.disableDevCard},"x"),o.a.createElement("div",{className:"jp-dev-card__heading"},"Dev Tools"),o.a.createElement("ul",null,o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"jetpack_free"},o.a.createElement("input",{type:"radio",id:"jetpack_free",value:"jetpack_free",name:"jetpack_free",checked:"is-free-plan"===t,onChange:this.onPlanChange}),"Free")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"jetpack_personal"},o.a.createElement("input",{type:"radio",id:"jetpack_personal",value:"jetpack_personal",name:"jetpack_personal",checked:"is-personal-plan"===t,onChange:this.onPlanChange}),"Personal")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"jetpack_premium"},o.a.createElement("input",{type:"radio",id:"jetpack_premium",value:"jetpack_premium",name:"jetpack_premium",checked:"is-premium-plan"===t,onChange:this.onPlanChange}),"Premium")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"jetpack_business"},o.a.createElement("input",{type:"radio",id:"jetpack_business",value:"jetpack_business",name:"jetpack_business",checked:"is-business-plan"===t,onChange:this.onPlanChange}),"Pro")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"jetpack_backup_daily"},o.a.createElement("input",{type:"radio",id:"jetpack_backup_daily",value:"jetpack_backup_daily",name:"jetpack_backup_daily",checked:"is-daily-backup-plan"===t,onChange:this.onPlanChange}),"Jetpack Backup Daily")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"jetpack_backup_realtime"},o.a.createElement("input",{type:"radio",id:"jetpack_backup_realtime",value:"jetpack_backup_realtime",name:"jetpack_backup_realtime",checked:"is-realtime-backup-plan"===t,onChange:this.onPlanChange}),"Jetpack Backup Reatime"))),o.a.createElement("hr",null),o.a.createElement("ul",null,o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"admin_master"},o.a.createElement("input",{type:"radio",id:"admin_master",value:"admin_master",name:"admin_master",checked:this.props.isMaster,onChange:this.onPermissionsChange}),"Admin (master)")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"admin_secondary"},o.a.createElement("input",{type:"radio",id:"admin_secondary",value:"admin_secondary",name:"admin_secondary",checked:this.props.isAdmin&&!this.props.isMaster,onChange:this.onPermissionsChange}),"Admin (secondary)")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"editor"},o.a.createElement("input",{type:"radio",id:"editor",value:"editor",name:"editor",checked:this.props.canEditPosts&&!this.props.isAdmin,onChange:this.onPermissionsChange}),"Editor")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"subscriber"},o.a.createElement("input",{type:"radio",id:"subscriber",value:"subscriber",name:"subscriber",checked:!this.props.canEditPosts&&!this.props.isAdmin,onChange:this.onPermissionsChange}),"Subscriber"))),o.a.createElement("hr",null),o.a.createElement("ul",null,o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"nothreats"},o.a.createElement("input",{type:"radio",id:"nothreats",value:0,name:"nothreats",checked:0===this.props.getVaultPressScanThreatCount(),onChange:this.onThreatsChange}),"No threats")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"threats"},o.a.createElement("input",{type:"radio",id:"threats",value:17,name:"threats",checked:0!==this.props.getVaultPressScanThreatCount(),onChange:this.onThreatsChange}),"Threats"))),o.a.createElement("hr",null),o.a.createElement("ul",null,o.a.createElement("strong",null,"Backup & Scan"),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"rewindUnavailable"},o.a.createElement("input",{type:"radio",id:"rewindUnavailable",value:"unavailable",name:"unavailable",checked:"unavailable"===n,onChange:this.onRewindStatusChange}),"Unavailable")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"rewindProvisioning"},o.a.createElement("input",{type:"radio",id:"rewindProvisioning",value:"provisioning",name:"provisioning",checked:"provisioning"===n,onChange:this.onRewindStatusChange}),"Provisioning")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"rewindAwatingCreds"},o.a.createElement("input",{type:"radio",id:"rewindAwatingCreds",value:"awaiting_credentials",name:"awaiting_credentials",checked:"awaiting_credentials"===n,onChange:this.onRewindStatusChange}),"Awaiting credentials")),o.a.createElement("li",null,o.a.createElement("label",{htmlFor:"rewindActive"},o.a.createElement("input",{type:"radio",id:"rewindActive",value:"active",name:"active",checked:"active"===n,onChange:this.onRewindStatusChange}),"Active"))),this.maybeShowStatsToggle(),this.maybeShowIsLinkedToggle())}}]),t}(o.a.Component);ha()(xm,"displayName","DevCard");var Am=le((function(e){return{isDevVersion:hi(e),sitePlan:qo(e),canDisplayDevCard:ao(e),isUserLinked:Xs(e),canViewStats:Pi(e),isMaster:Ai(e),isAdmin:Mi(e),canEditPosts:Si(e),getVaultPressScanThreatCount:function(){return ca(e)},rewindStatus:yo(e)}}),(function(e){return{switchPlanPreview:function(t){return e(function(e){return function(t){t({type:fr,siteData:{plan:{product_slug:e}}})}}(t))},switchUserPermissions:function(t){return e(function(e){var t={};return function(n){switch(e){case"admin_master":t=ym;break;case"admin_secondary":t=_m;break;case"editor":case"contributor":case"author":t=wm;break;case"subscriber":t=km;break;case"view_stats":t=Em;break;case"hide_stats":t=Cm;break;case"is_linked":t=Sm;break;case"is_unlinked":t=Mm}n({type:Kr,initialState:t})}}(t))},switchThreats:function(t){return e(function(e){return function(t){t({type:Jr,mockCount:e})}}(parseInt(t)))},disableDevCard:function(){return e((function(e){e({type:qr})}))},switchRewindState:function(t){return e((n=t,function(e){e({type:$r,rewindState:{state:n}})}));var n}}}))(xm),jm=function e(){var t=document.getElementById("jp-navigation").offsetTop;window.scrollTo(0,window.scrollY-t/1.5),window.scrollY>t&&window.requestAnimationFrame(e)},Om=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"resetOnClick",(function(){window.confirm(Us("This will reset all Jetpack options, are you sure?"))&&n.props.resetOptions()})),ha()(Os()(n),"trackVersionClick",(function(){Uc.tracks.recordJetpackClick({target:"footer_link",link:"version"})})),ha()(Os()(n),"trackTermsClick",(function(){Uc.tracks.recordJetpackClick({target:"footer_link",link:"terms"})})),ha()(Os()(n),"trackAboutClick",(function(){Uc.tracks.recordJetpackClick({target:"footer_link",link:"about"})})),ha()(Os()(n),"trackPrivacyClick",(function(){window.requestAnimationFrame(jm),Uc.tracks.recordJetpackClick({target:"footer_link",link:"privacy"})})),ha()(Os()(n),"trackModulesClick",(function(){Uc.tracks.recordJetpackClick({target:"footer_link",link:"modules"})})),ha()(Os()(n),"trackDebugClick",(function(){Uc.tracks.recordJetpackClick({target:"footer_link",link:"debug"})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e=this,t=Mc()(this.props.className,"jp-footer"),n=this.props.currentVersion,r=this.props.siteConnectionStatus?this.props.siteAdminUrl+"admin.php?page=jetpack_about":Vl("jetpack"),i=this.props.siteConnectionStatus?this.props.siteAdminUrl+"admin.php?page=jetpack#/privacy":Vl("a8c-privacy");return o.a.createElement("div",{className:t},o.a.createElement("div",{className:"jp-footer__a8c-attr-container"},o.a.createElement("a",{href:r},o.a.createElement("svg",{role:"img",className:"jp-footer__a8c-attr",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"a8c-svg-title"},o.a.createElement("title",{id:"a8c-svg-title"},Us("An Automattic Airline")),o.a.createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),o.a.createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),o.a.createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"})))),o.a.createElement("ul",{className:"jp-footer__links"},o.a.createElement("li",{className:"jp-footer__link-item"},o.a.createElement("a",{onClick:this.trackVersionClick,href:Vl("jetpack"),target:"_blank",rel:"noopener noreferrer",className:"jp-footer__link",title:Us("Jetpack version")},n?Us("Jetpack version %(version)s",{args:{version:n}}):"Jetpack")),o.a.createElement("li",{className:"jp-footer__link-item"},o.a.createElement("a",{onClick:this.trackAboutClick,href:r,className:"jp-footer__link",title:Us("About Jetpack")},Us("About",{context:"Link to learn more about Jetpack."}))),o.a.createElement("li",{className:"jp-footer__link-item"},o.a.createElement("a",{onClick:this.trackTermsClick,href:Vl("wpcom-tos"),target:"_blank",rel:"noopener noreferrer",title:Us("WordPress.com Terms of Service"),className:"jp-footer__link"},Us("Terms",{context:"Shorthand for Terms of Service."}))),o.a.createElement("li",{className:"jp-footer__link-item"},o.a.createElement("a",{onClick:this.trackPrivacyClick,href:i,rel:"noopener noreferrer",title:Us("Automattic's Privacy Policy"),className:"jp-footer__link"},Us("Privacy",{context:"Shorthand for Privacy Policy."}))),function(){if(e.props.siteConnectionStatus&&e.props.userCanManageOptions)return o.a.createElement("li",{className:"jp-footer__link-item"},o.a.createElement("a",{onClick:e.trackModulesClick,href:e.props.siteAdminUrl+"admin.php?page=jetpack_modules",title:Us("Access the full list of Jetpack modules available on your site."),className:"jp-footer__link"},Us("Modules",{context:"Navigation item. Noun. Links to a list of modules for Jetpack."})))}(),function(){if(e.props.userCanManageOptions)return o.a.createElement("li",{className:"jp-footer__link-item"},o.a.createElement("a",{onClick:e.trackDebugClick,href:e.props.siteAdminUrl+"admin.php?page=jetpack-debugger",title:Us("Test your site’s compatibility with Jetpack."),className:"jp-footer__link"},Us("Debug",{context:"Navigation item. Noun. Links to a debugger tool for Jetpack."})))}(),e.props.isDevVersion&&e.props.userCanManageOptions?o.a.createElement("li",{className:"jp-footer__link-item"},o.a.createElement("a",{role:"button",tabIndex:"0",onKeyDown:Tu(e.resetOnClick),onClick:e.resetOnClick,className:"jp-footer__link"},Us("Reset Options (dev only)",{context:"Navigation item."}))):"",e.props.isDevVersion?o.a.createElement("li",{className:"jp-footer__link-item"},o.a.createElement("a",{role:"button",tabIndex:"0",onKeyDown:Tu(e.props.enableDevCard),onClick:e.props.enableDevCard,className:"jp-footer__link"},Us("Dev Tools",{context:"Navigation item."}))):"",function(){if(e.props.isDevVersion&&e.props.displayDevCard)return o.a.createElement(Am,null)}()))}}]),t}(o.a.Component);ha()(Om,"displayName","Footer");var Nm=le((function(e){return{currentVersion:fi(e),displayDevCard:ao(e),isDevVersion:hi(e),isInIdentityCrisis:eo(e),siteAdminUrl:bi(e),siteConnectionStatus:Hs(e),userCanManageOptions:Ci(e)}}),(function(e){return{resetOptions:function(){return e((t="options",function(e){return e({type:Nn}),e(Qa("is-info",Us("Resetting Jetpack options…"),{id:"reset-options"})),Da.resetOptions(t).then((function(){e({type:Pn}),e(Xa("reset-options")),e(Qa("is-success",Us("Options reset."),{id:"reset-options",duration:2e3}))})).catch((function(t){e({type:Tn,error:t}),e(Xa("reset-options")),e(Qa("is-error",Us("Options failed to reset."),{id:"reset-options"}))}))}));var t},enableDevCard:function(){return e((function(e){e({type:Hr})}))}}}))(Om),Tm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackBannerClick",(function(){Uc.tracks.recordJetpackClick({target:"banner-click",feature:"support",page:n.props.path})})),ha()(Os()(n),"trackAskQuestionClick",(function(){Uc.tracks.recordJetpackClick({target:"support-card",button:"support-ask",page:n.props.path})})),ha()(Os()(n),"trackSearchClick",(function(){Uc.tracks.recordJetpackClick({target:"support-card",button:"support-search",page:n.props.path})})),n}return Ma()(t,e),As()(t,[{key:"shouldComponentUpdate",value:function(e){return e.sitePlan.product_slug!==this.props.sitePlan.product_slug}},{key:"render",value:function(){if(void 0===this.props.sitePlan.product_slug&&this.props.isFetchingSiteData)return o.a.createElement("div",null);var e=Mc()(this.props.className,"jp-support-card"),t=void 0===this.props.sitePlan.product_slug||"jetpack_free"===this.props.sitePlan.product_slug,n=this.props.isDevVersion?ad:id;return o.a.createElement("div",{className:e},o.a.createElement(Dl,{className:"jp-support-card__happiness"},o.a.createElement("div",{className:"jp-support-card__happiness-contact"},o.a.createElement("h3",{className:"jp-support-card__header"},Us("We're here to help")),o.a.createElement("p",{className:"jp-support-card__description"},Us(t?"Jetpack comes with free, basic support for all users.":"Your paid plan gives you access to prioritized Jetpack support.")),o.a.createElement("p",{className:"jp-support-card__description"},o.a.createElement(xc,{onClick:this.trackAskQuestionClick,href:this.props.isAtomicSite?Vl("calypso-help-contact"):n},Us("Ask a question")),o.a.createElement(xc,{onClick:this.trackSearchClick,href:this.props.isAtomicSite?Vl("calypso-help"):Vl("jetpack-support")},Us("Search our support site"))))),this.props.siteConnectionStatus&&t&&o.a.createElement(Ku,{title:Us("Get a faster resolution to your support questions."),plan:"jetpack_personal",callToAction:Us("Upgrade"),onClick:this.trackBannerClick,href:this.props.supportUpgradeUrl}))}}]),t}(o.a.Component);ha()(Tm,"displayName","SupportCard"),ha()(Tm,"defaultProps",{className:"",siteConnectionStatus:!1}),Tm.propTypes={siteConnectionStatus:u.a.any.isRequired,className:u.a.string};var Pm=le((function(e){return{sitePlan:qo(e),siteConnectionStatus:Hs(e),isFetchingSiteData:Bo(e),isAtomicSite:Vi(e),isDevVersion:hi(e),supportUpgradeUrl:Yi(e,"support")}}))(Tm),Im=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackDownloadClick",(function(){Uc.tracks.recordJetpackClick({target:"apps-card",button:"apps-download",page:n.props.path})})),ha()(Os()(n),"dismissCard",(function(){n.props.dismissAppCard(),Uc.tracks.recordJetpackClick({target:"apps-card",button:"dismiss",page:n.props.path})})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){if(!this.props.arePromotionsActive||this.props.isAppsCardDismissed)return null;var e=Mc()(this.props.className,"jp-apps-card");return o.a.createElement("div",{className:e},o.a.createElement(Dl,{className:"jp-apps-card__content"},this.props.userCanManageOptions&&o.a.createElement(xc,{borderless:!0,compact:!0,className:"jp-apps-card__dismiss",href:"javascript:void(0)",onClick:this.dismissCard},o.a.createElement("span",{className:"dashicons dashicons-no"})),o.a.createElement("div",{className:"jp-apps-card__top"},o.a.createElement("img",{src:rd+"get-apps.svg",alt:""})),o.a.createElement("div",{className:"jp-apps-card__description"},o.a.createElement("h3",{className:"jp-apps-card__header"},Us("Get WordPress Apps for every device")),o.a.createElement("p",{className:"jp-apps-card__paragraph"},Us("Manage all your sites from a single dashboard: publish content, track stats, moderate comments, and so much more from anywhere in the world.")),o.a.createElement(xc,{className:"is-primary",onClick:this.trackDownloadClick,href:"https://apps.wordpress.com/get?utm_source=jpdash&utm_medium=cta&utm_campaign=getappscard"},Us("Download the free apps")))))}}]),t}(o.a.Component);ha()(Im,"displayName","AppsCard"),Im.propTypes={className:u.a.string};var Dm=le((function(e){return{isAppsCardDismissed:No(e),arePromotionsActive:Bi(e),userCanManageOptions:Ci(e)}}),(function(e){return{dismissAppCard:function(){return e(Ul({dismiss_dash_app_card:!0}))}}}))(Im),Rm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"renderMainContent",(function(e){var t,r=o.a.createElement(wl,n.props);switch(e){case"/dashboard":default:t=o.a.createElement(mf,n.props);break;case"/settings":case"/writing":case"/sharing":case"/performance":n.props.isSubscriber||(r=o.a.createElement(Nl,n.props),t=o.a.createElement(zd,{route:n.props.route,siteAdminUrl:n.props.siteAdminUrl,siteRawUrl:n.props.siteRawUrl,searchTerm:n.props.searchTerm,userCanManageModules:n.props.userCanManageModules}))}return window.wpNavMenuClassChange(),o.a.createElement("div",null,r,t)})),n}return Ma()(t,e),As()(t,[{key:"shouldComponentUpdate",value:function(e){return e.siteConnectionStatus!==this.props.siteConnectionStatus||e.route.path!==this.props.route.path}},{key:"render",value:function(){return this.renderMainContent(this.props.route.path)}}]),t}(o.a.Component);Rm.propTypes={userCanViewStats:u.a.bool.isRequired,isSubscriber:u.a.bool.isRequired,siteConnectionStatus:u.a.any.isRequired};var Um=le((function(e){return{userCanViewStats:Pi(e),siteConnectionStatus:Hs(e),isSubscriber:wi(e),isModuleActivated:function(t){return Ga(e,t)},userCanManageModules:Ei(e)}}))(Rm),Lm=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){var e={className:"dops-notice__action",href:this.props.href,onClick:this.props.onClick};return this.props.external&&(e.target="_blank"),o.a.createElement("a",e,o.a.createElement("span",null,this.props.children),this.props.icon&&o.a.createElement(ml,{icon:this.props.icon,size:24}),this.props.external&&o.a.createElement(ml,{icon:"external",size:24}))}}]),t}(o.a.Component);ha()(Lm,"displayName","NoticeAction"),ha()(Lm,"propTypes",{href:u.a.string,onClick:u.a.func,external:u.a.bool,icon:u.a.string}),ha()(Lm,"defaultProps",{external:!1});n(387);var Fm=Oc()("calypso:notices");Fm("initializing notices");var zm={containerNames:{}};!function(e){Object(Dt.assign)(e,ps.EventEmitter.prototype),e.emitChange=function(){this.emit("change")},e.off=e.removeListener}(zm);var Bm=[],Vm={new:function(e,t,n){var r=t.overlay?"overlay-notices":"notices";zm.containerNames[r]=r,Fm("creating notice",e,t,n),zm[r]=[];var i={type:t.type||"message",status:n,text:e,duration:t.duration,container:r,button:t.button,href:t.href,onClick:function(e){if("function"==typeof t.onClick){var n=Vm.removeNotice.bind(Vm,i);return t.onClick(e,n)}},onRemoveCallback:t.onRemoveCallback||function(){},arrow:t.arrow,isCompact:t.isCompact,showDismiss:t.showDismiss,persistent:t.persistent};return t.displayOnNextPage?Bm.push(i):zm[r].push(i),zm.emit("change"),i},success:function(e,t){return t=t||{},this.new(e,t,"is-success")},error:function(e,t){return t=t||{},this.new(e,t,"is-error")},info:function(e,t){return t=t||{},this.new(e,t,"is-info")},warning:function(e,t){return t=t||{},this.new(e,t,"is-warning")},list:zm,removeNotice:function(e){if(e.container){var t=zm[e.container],n=t.indexOf(e);-1!==n&&(t.splice(n,1),zm.emit("change"))}},clearNoticesOnNavigation:function(e,t){Fm("clearNoticesOnNavigation");var n,r,i=!1,a=function(e){return e.persistent};for(r in zm.containerNames)n=zm[r].length,zm[r]=zm[r].filter(a),n!==zm[r].length&&(i=!0);Bm.length&&(Bm.forEach((function(e){zm[e.container]=[],zm[e.container].push(e)})),Bm=[]),i&&zm.emit("change"),t()},clearNotices:function(e){zm[e]=[],zm.emit("change")},getStatusHelper:function(e){return e.error?"is-error":e.warning?"is-warning":e.info?"is-info":e.success?"is-success":void 0}},Hm=Vm,qm=(n(388),Oc()("calypso:notices")),Km=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"removeNotice",(function(e){e&&Hm.removeNotice(e)})),ha()(Os()(n),"handleLocalNoticeDismissClick",(function(e){return function(){return n.removeNotice(e)}})),ha()(Os()(n),"handleReduxNoticeDismissClick",(function(e){return function(){return n.props.removeNotice(e)}})),n}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){qm("Mounting Global Notices React component.")}},{key:"render",value:function(){var e=(this.props.notices[this.props.id]||[]).map((function(e,t){return o.a.createElement(Pu,{key:"notice-old-"+t,status:e.status,duration:e.duration||null,text:e.text,isCompact:e.isCompact,onDismissClick:this.handleLocalNoticeDismissClick(e),showDismiss:e.showDismiss},e.button&&o.a.createElement(Lm,{href:e.href,onClick:e.onClick},e.button))}),this);return(e=e.concat(this.props.storeNotices.map((function(e,t){return o.a.createElement(Pu,{key:"notice-"+t,status:e.status,duration:e.duration||null,showDismiss:e.showDismiss,onDismissClick:this.handleReduxNoticeDismissClick(e.noticeId),text:e.text})}),this))).length?o.a.createElement("div",{id:this.props.id,className:"global-notices"},e):null}}]),t}(o.a.Component);ha()(Km,"displayName","NoticesList"),ha()(Km,"propTypes",{id:u.a.string,notices:u.a.oneOfType([u.a.object,u.a.array])}),ha()(Km,"defaultProps",{id:"overlay-notices",notices:Object.freeze([])});var Jm=le((function(e){return{storeNotices:e.globalNotices}}),(function(e){return P({removeNotice:Xa},e)}))(Km),Wm=function(e){return function(t){t({type:Ar,notice:e})}},Gm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"maybeDismiss",(function(e){!n.props.showDismiss||e.keyCode&&27!==e.keyCode||n.props.dismiss(e)})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.maybeDismiss.bind(this),!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.maybeDismiss.bind(this),!1)}},{key:"clickForeground",value:function(e){e.stopPropagation()}},{key:"render",value:function(){var e=Mc()(this.props.className,"jp-dialogue-modern",{"has-featured-image":!!this.props.svg});return o.a.createElement("div",{className:"jp-dialogue-modern-full__container",role:"presentation",onClick:this.maybeDismiss,onKeyDown:Tu(this.maybeDismiss)},o.a.createElement("div",{className:e,role:"presentation",onClick:this.clickForeground,onKeyDown:Tu(this.clickForeground)},this.props.showDismiss&&o.a.createElement(ml,{icon:"cross-small",className:"jp-dialogue-modern-full__dismiss",tabIndex:"0",onKeyDown:Tu(this.props.dismiss),onClick:this.props.dismiss}),this.props.svg,o.a.createElement("div",{className:"jp-dialogue-modern__content"},o.a.createElement("h1",{className:"jp-dialogue-modern__title"},this.props.title),this.props.content),o.a.createElement("div",null,this.props.belowContent)))}}]),t}(s.Component);Gm.propTypes={content:u.a.oneOfType([u.a.string,u.a.object]).isRequired,belowContent:u.a.oneOfType([u.a.string,u.a.object]).isRequired,svg:u.a.oneOfType([u.a.bool,u.a.object]),dismissOnClick:u.a.func,showDismiss:u.a.bool,title:u.a.string,adminUrl:u.a.string,dismiss:u.a.func},Gm.defaultProps={svg:!1,showDismiss:!0,dismiss:Dt.noop,content:"",belowContent:"",title:""};var Ym=Gm,$m=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"trackLearnMoreClick",(function(){Uc.tracks.recordJetpackClick({target:"warm_welcome_view_editor",version:n.props.version})})),ha()(Os()(n),"dismissNotice",(function(){Uc.tracks.recordJetpackClick({target:"warm_welcome_dismiss",version:n.props.version}),n.props.dismiss()})),n}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){jQuery("body").addClass("jp-dialogue-modern-showing"),Uc.tracks.recordEvent("jetpack_warm_welcome_view",{version:this.props.version})}},{key:"componentWillUnmount",value:function(){jQuery("body").removeClass("jp-dialogue-modern-showing")}},{key:"renderInnerContent",value:function(){for(var e=(new DOMParser).parseFromString(this.props.releasePostContent,"text/html"),t=e.getElementsByTagName("a"),n=0;n<t.length;n++)t[n].setAttribute("target","_blank"),t[n].setAttribute("rel","noopener noreferrer");var r=e.body.innerHTML;return o.a.createElement("div",{className:"jp-upgrade-notice__content"},o.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))}},{key:"render",value:function(){var e=this.props.featuredImage,t=null,n=this.props.title;return e&&e.length>0&&(t=o.a.createElement("img",{src:e,alt:""})),n&&0!==n.length||(n=Us("New in Jetpack %(version)s",{args:{version:this.props.version},comment:"%(version) is a version number."})),o.a.createElement(Ym,{svg:t,title:n,content:this.renderInnerContent(),dismiss:this.dismissNotice})}}]),t}(s.Component)),Xm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"state",{showNotice:!0}),ha()(Os()(n),"dismissJetpackStateNotice",(function(){n.setState({showNotice:!1})})),ha()(Os()(n),"getErrorFromKey",(function(e){var t=n.props.jetpackStateNoticesErrorDescription||!1,r="";switch(e){case"cheatin":r=Us("Cheatin' uh?");break;case"access_denied":r=Us("{{p}}Would you mind telling us why you did not complete the Jetpack connection in this {{a}}2 question survey{{/a}}?{{/p}}{{p}}A Jetpack connection is required for our free security and traffic features to work.{{/p}}",{components:{a:o.a.createElement("a",{href:Vl("jetpack-cancelled-connection"),target:"_blank",rel:"noopener noreferrer"}),p:o.a.createElement("p",null)}});break;case"wrong_state":r=Us("You need to stay logged in to your WordPress blog while you authorize Jetpack.");break;case"invalid_client":r=Us("We had an issue connecting Jetpack; deactivate then reactivate the Jetpack plugin, then connect again.");break;case"invalid_grant":r=Us('There was an issue connecting your Jetpack. Please click "Connect to WordPress.com" again.');break;case"site_inaccessible":case"site_requires_authorization":r=Us("Your website needs to be publicly accessible to use Jetpack: %(error_key)s",{args:{error_key:e}});break;case"site_blacklisted":r=Us("This site can't be connected to WordPress.com because it violates our {{a}}Terms of Service{{/a}}.",{components:{a:o.a.createElement("a",{href:Vl("wpcom-tos"),rel:"noopener noreferrer",target:"_blank"})}});break;case"not_public":r=Us("{{s}}Your Jetpack has a glitch.{{/s}} Connecting this site with WordPress.com is not possible. This usually means your site is not publicly accessible (localhost).",{components:{s:o.a.createElement("strong",null)}});break;case"wpcom_408":case"wpcom_5??":case"wpcom_bad_response":case"wpcom_outage":r=Us("WordPress.com is currently having problems and is unable to fuel up your Jetpack.  Please try again later.");break;case"register_http_request_failed":case"token_http_request_failed":r=Us("Jetpack could not contact WordPress.com: %(error_key)s.  This usually means something is incorrectly configured on your web host.",{args:{error_key:e}});break;case"no_role":case"no_cap":case"no_code":case"no_state":case"invalid_state":case"invalid_request":case"invalid_scope":case"unsupported_response_type":case"invalid_token":case"no_token":case"missing_secrets":case"home_missing":case"siteurl_missing":case"gmt_offset_missing":case"site_name_missing":case"secret_1_missing":case"secret_2_missing":case"site_lang_missing":case"home_malformed":case"siteurl_malformed":case"gmt_offset_malformed":case"timezone_string_malformed":case"site_name_malformed":case"secret_1_malformed":case"secret_2_malformed":case"site_lang_malformed":case"secrets_mismatch":case"verify_secret_1_missing":case"verify_secret_1_malformed":case"verify_secrets_missing":case"verify_secrets_mismatch":r=Us("{{s}}Your Jetpack has a glitch.{{/s}}  We're sorry for the inconvenience. Please try again later, if the issue continues please contact support with this message: %(error_key)s",{components:{s:o.a.createElement("strong",null)},args:{error_key:e}});break;default:r=e}return t?o.a.createElement("div",null,r,o.a.createElement("br",null),t):o.a.createElement("div",null,r)})),ha()(Os()(n),"getMessageFromKey",(function(e){var t,r="",i="is-info";switch(e){case"modules_activated":r=Us("Welcome to {{s}}Jetpack %(jetpack_version)s{{/s}}!",{args:{jetpack_version:n.props.currentVersion},components:{s:o.a.createElement("strong",null)}});break;case"already_authorized":r=Us("Your Jetpack is already connected."),i="is-success";break;case"authorized":r=Us("You're fueled up and ready to go, Jetpack is now active."),i="is-success";break;case"linked":r=Us("You're fueled up and ready to go."),i="is-success";break;case"protect_misconfigured_ip":r=Us("Your server is misconfigured, which means that Jetpack Protect is unable to effectively protect your site."),i="is-info",t=o.a.createElement(Lm,{href:Vl("jetpack-support-security-troubleshooting-protect")},Us("Learn More"));break;default:r=e}return[r,i,t]})),ha()(Os()(n),"renderContent",(function(){var e,t="is-info",r="",i=n.props.jetpackStateNoticesErrorCode,a=n.props.jetpackStateNoticesMessageCode,s=n.props.jetpackStateNoticesMessageContent;if(i||a||s){if(i&&(r=n.getErrorFromKey(i),"access_denied"!==i&&(t="is-error")),s&&s.release_post_content)return o.a.createElement($m,{dismiss:n.dismissJetpackStateNotice,version:n.props.currentVersion,releasePostContent:s.release_post_content,featuredImage:s.release_post_featured_image,title:s.release_post_title});if(a){var c=n.getMessageFromKey(a);r=c[0],t=c[1],e=c[2]}return o.a.createElement(Pu,{status:t,onDismissClick:n.dismissJetpackStateNotice,text:r},e)}})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("div",null,this.state.showNotice?this.renderContent():null)}}]),t}(o.a.Component);ha()(Xm,"displayName","JetpackStateNotices");var Qm=le((function(e){return{currentVersion:fi(e),jetpackStateNoticesErrorCode:co(e),jetpackStateNoticesMessageCode:lo(e),jetpackStateNoticesErrorDescription:po(e),jetpackStateNoticesMessageContent:uo(e)}}))(Xm),Zm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"dismissJetpackActionNotice",(function(){n.props.dismissJetpackActionNotice(n.props.jetpackNotices)})),ha()(Os()(n),"renderNotices",(function(){n.props.jetpackNotices;return!1})),n}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("div",null,this.renderNotices())}}]),t}(o.a.Component);ha()(Zm,"displayName","DismissableNotices");var eg=le((function(e){return{jetpackNotices:oo(e),isDismissed:function(t){return function(e,t){return Object(Dt.get)(e.jetpack.jetpackNotices.dismissed,[t],!1)}(e,t)}}}),(function(e){return P({dismissJetpackActionNotice:Wm},e)}))(Zm);var tg=bt((function(e){var t=e.activeSitePurchases;if("/plans"!==e.router.location.pathname)return null;if(t.length<=1)return null;var n=t.map((function(e){var t=e.product_slug,n=Cc()(e,["product_slug"]);return Ms()({},n,{product_slug:t.replace("_monthly","")})})),r=n.find((function(e){return e.product_slug.includes("backup")}));if(!r)return null;var i=n.find((function(e){var t=e.product_slug;return"jetpack_personal"===t||"jetpack_premium"===t||"jetpack_business"===t}));if(!i)return null;if("jetpack_backup_realtime"===r.product_slug&&"jetpack_business"!==i.product_slug)return null;var a=Us("daily backups");return"jetpack_business"===i.product_slug&&(a=Us("real-time backups")),o.a.createElement(Pu,{status:"is-warning",showDismiss:!1,text:Us("Your %(planName)s Plan includes %(featureName)s. Looks like you also purchased the %(productName)s product. Consider removing %(productName)s.",{args:{featureName:a,planName:i.product_name,productName:r.product_name}})})})),ng=le((function(e){return{activeSitePurchases:$o(e)}}))(tg),rg=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return!(!this.props.isDevVersion||this.props.userIsSubscriber)&&o.a.createElement(Pu,{showDismiss:!1,text:Us("You are currently running a development version of Jetpack.")},o.a.createElement(Lm,{href:ad},Us("Submit Beta feedback")))}}]),t}(o.a.Component);ha()(rg,"displayName","DevVersionNotice"),rg.propTypes={isDevVersion:u.a.bool.isRequired,userIsSubscriber:u.a.bool.isRequired};var ig=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){if(this.props.isStaging&&!this.props.isInIdentityCrisis){var e=Vl("jetpack-support-staging-sites"),t={text:Us("You are running Jetpack on a staging server."),status:"is-basic",showDismiss:!1};return o.a.createElement(Pu,t,o.a.createElement(Lm,{href:e},Us("More Info")))}return!1}}]),t}(o.a.Component);ha()(ig,"displayName","StagingSiteNotice"),ig.propTypes={isStaging:u.a.bool.isRequired,isInIdentityCrisis:u.a.bool.isRequired};var ag=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){if("dev"===this.props.siteConnectionStatus){var e=this.props.siteDevMode,t=[];e.filter&&t.push(Us("{{li}}The jetpack_development_mode filter is active{{/li}}",{components:{li:o.a.createElement("li",null)}})),e.constant&&t.push(Us("{{li}}The JETPACK_DEV_DEBUG constant is defined{{/li}}",{components:{li:o.a.createElement("li",null)}})),e.url&&t.push(Us("{{li}}Your site URL lacks a dot (e.g. http://localhost){{/li}}",{components:{li:o.a.createElement("li",null)}}));var n=Us("Currently in {{a}}Development Mode{{/a}} (some features are disabled) because: {{reasons/}}",{components:{a:o.a.createElement("a",{href:Vl("jetpack-support-development-mode"),target:"_blank",rel:"noopener noreferrer"}),reasons:o.a.createElement("ul",null,t)}});return o.a.createElement(Pu,{showDismiss:!1,status:"is-info",text:n},o.a.createElement(Lm,{href:Vl("jetpack-support-development-mode")},Us("Learn More")))}return!1}}]),t}(o.a.Component);ha()(ag,"displayName","DevModeNotice"),ag.propTypes={siteConnectionStatus:u.a.oneOfType([u.a.string,u.a.bool]).isRequired,siteDevMode:u.a.oneOfType([u.a.bool,u.a.object]).isRequired};var sg=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return!(this.props.isLinked||!this.props.connectUrl||!this.props.siteConnected)&&o.a.createElement("div",{className:"jp-unlinked-notice"},o.a.createElement(Ku,{title:Us("Jetpack is powering your site, but to access all of its features you’ll need to create an account."),callToAction:Us("Create account"),href:"".concat(this.props.connectUrl,"&from=unlinked-user-connect"),icon:"my-sites",className:"is-jetpack-info"}))}}]),t}(o.a.Component);ha()(sg,"displayName","UserUnlinked"),sg.propTypes={connectUrl:u.a.string.isRequired,siteConnected:u.a.bool.isRequired};var og=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"render",value:function(){return o.a.createElement("div",{"aria-live":"polite"},o.a.createElement(Jm,null),o.a.createElement(Qm,null),o.a.createElement(rg,{isDevVersion:this.props.isDevVersion,userIsSubscriber:this.props.userIsSubscriber}),o.a.createElement(ag,{siteConnectionStatus:this.props.siteConnectionStatus,siteDevMode:this.props.siteDevMode}),o.a.createElement(ig,{isStaging:this.props.isStaging,isInIdentityCrisis:this.props.isInIdentityCrisis}),o.a.createElement(ng,null),o.a.createElement(eg,null),o.a.createElement(sg,{connectUrl:this.props.connectUrl,siteConnected:!0===this.props.siteConnectionStatus,isLinked:this.props.isLinked}),!this.props.siteConnectionStatus&&!this.props.userCanConnectSite&&o.a.createElement(Pu,{showDismiss:!1,status:"is-warning",text:Us("This site is not connected to WordPress.com. Please ask the site administrator to connect.")}))}}]),t}(o.a.Component);ha()(og,"displayName","JetpackNotices");var cg=le((function(e){return{connectUrl:Js(e),siteConnectionStatus:Hs(e),userCanConnectSite:xi(e),userIsSubscriber:wi(e),isLinked:Xs(e),isDevVersion:hi(e),siteDevMode:Ks(e),isStaging:Zs(e),isInIdentityCrisis:eo(e)}}))(og),lg=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"componentDidMount",value:function(){var e=jQuery(this.refs.adminNotices),t=jQuery(".vp-deactivated");t.length>0&&t.each((function(){var t=jQuery(this).addClass("dops-notice is-success is-dismissable").removeClass("wrap vp-notice notice notice-success");t.wrapInner('<span class="dops-notice__content">'),t.find(".dops-notice__content").before('<span class="dops-notice__icon-wrapper"><svg class="gridicon gridicons-notice dops-notice__icon" height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"/></svg></span>').css("display","block"),t.find(".dops-notice__content").after('<span role="button" tabindex="0" class="dops-notice__dismiss"><svg class="gridicon gridicons-cross" height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg><span class="screen-reader-text"/></span>'),t.find("h2").replaceWith((function(){return jQuery("<strong />",{html:this.innerHTML})})),t.find("p").replaceWith((function(){return jQuery("<div/>",{html:this.innerHTML})})),t.prependTo(e).css("display","flex")}));var n=jQuery(".vp-notice");n.length>0&&n.each((function(){var t=jQuery(this);if(0===t.find(".dops-notice__icon").length){var n=t.hasClass("vp-registered"),r=n?"is-success":"is-error";t.addClass("dops-notice vp-notice-jp "+r),t.wrapInner('<span class="dops-notice__content">');var i=n?'<span class="dops-notice__icon-wrapper"><svg class="gridicon gridicons-notice dops-notice__icon" height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"/></svg></span>':'<span class="dops-notice__icon-wrapper"><svg class="gridicon gridicons-notice dops-notice__icon" height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"/></svg></span>';t.find(".dops-notice__content").before(i),t.find(".vp-message").removeClass("vp-message").addClass("dops-notice__text"),t.find("h3").replaceWith((function(){return jQuery("<strong />",{html:this.innerHTML})})),t.find("p").replaceWith((function(){return jQuery("<div/>",{html:this.innerHTML})})),t.css("display","flex")}t.find('a[href*="admin.php?page=vaultpress"]').remove(),t.prependTo(e).removeClass("wrap vp-notice")}));var r=jQuery(".woocommerce-message");r.length>0&&r.each((function(){var t=jQuery(this).addClass("dops-notice").removeClass("updated wc-connect");t.find(".button-primary").addClass("dops-notice__action").removeClass("button-primary").detach().appendTo(t),t.find("p").not(".submit").wrapAll('<span class="dops-notice__text"/>');var n=t.find(".dops-notice__text");n.find("p").replaceWith((function(){return jQuery("<div/>",{html:this.innerHTML,class:"dops-notice__moved_text"})})),n.find("br").remove(),t.find(".button-secondary").removeClass("button-secondary").detach().appendTo(n),t.find(".submit").remove(),t.find(".woocommerce-message-close").removeClass("woocommerce-message-close notice-dismiss").addClass("dops-notice__action"),t.wrapInner('<span class="dops-notice__content">').prependTo(e).css("display","flex"),t.find(".dops-notice__action").not(":first").removeClass("dops-notice__action").detach().appendTo(t.find(".dops-notice__text")),t.find(".dops-notice__action:first").detach().appendTo(t)}));var i=jQuery(".notice");i.length>0&&i.each((function(){jQuery(this).hide()})),e.length>0&&jQuery(".dops-notice__dismiss").click((function(){jQuery(this).parent().closest("div").hide()}))}},{key:"render",value:function(){return o.a.createElement("div",{id:"jp-admin-notices",ref:"adminNotices","aria-live":"polite"})}}]),t}(o.a.Component),ug=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props.analytics.tracks.recordEvent;e.searchTerm!==this.props.searchTerm&&e.searchTerm.length>=3&&t("jetpack_wpa_search_term",{term:e.searchTerm})}},{key:"render",value:function(){return null}}]),t}(s.Component);ug.propTypes={analytics:u.a.object,searchTerm:u.a.string};var pg=le((function(e){return{searchTerm:wo(e)}}))(ug),dg=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.isFetchingRewindStatus||this.props.isDevMode||this.props.fetchRewind()}},{key:"render",value:function(){return null}}]),t}(s.Component);ha()(dg,"propTypes",{isFetchingRewindStatus:u.a.bool,isDevMode:u.a.bool,sitePlan:u.a.object}),ha()(dg,"defaultProps",{isFetchingRewindStatus:!1,isDevMode:!1,sitePlan:{}});var hg=le((function(e){return{isFetchingRewindStatus:bo(e),isDevMode:Qs(e),sitePlan:qo(e)}}),(function(e){return{fetchRewind:function(){return e((function(e){return e({type:Wr}),Da.fetchRewindStatus().then((function(t){return e({type:Gr,status:t}),t})).catch((function(t){e({type:Yr,error:t})}))}))}}}))(dg),fg="/setup",mg=["/","/dashboard","/my-plan","/plans"],gg=["/settings","/security","/performance","/writing","/sharing","/discussion","/traffic","/privacy"],vg=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),"onBeforeUnload",(function(){if(n.props.areThereUnsavedSettings){if(!confirm(Us("There are unsaved settings in this tab that will be lost if you leave it. Proceed?")))return!1;n.props.clearUnsavedSettingsFlag()}})),ha()(Os()(n),"routerWillLeave",(function(){if(n.props.areThereUnsavedSettings){if(!confirm(Us("There are unsaved settings in this tab that will be lost if you leave it. Proceed?")))return!1;window.setTimeout(n.props.clearUnsavedSettingsFlag,10)}})),ha()(Os()(n),"initializeAnalytics",(function(){var e=n.props.tracksUserData;e&&Uc.initialize(e.userid,e.username,{blog_id:e.blogid})})),ha()(Os()(n),"renderMainContent",(function(e){if(!n.props.userCanManageModules)return!!n.props.siteConnectionStatus&&o.a.createElement("div",{"aria-live":"assertive"},o.a.createElement(Um,n.props));if(!1===n.props.siteConnectionStatus&&n.props.userCanConnectSite)return o.a.createElement("div",{className:"jp-jetpack-connect__container","aria-live":"assertive"});var t,r=o.a.createElement(Nl,{route:n.props.route,siteRawUrl:n.props.siteRawUrl,siteAdminUrl:n.props.siteAdminUrl}),i=o.a.createElement(wl,{route:n.props.route});switch(e){case"/dashboard":t=o.a.createElement(mf,{siteRawUrl:n.props.siteRawUrl,siteAdminUrl:n.props.siteAdminUrl,rewindStatus:n.props.rewindStatus});break;case"/my-plan":t=o.a.createElement(Rf,{siteRawUrl:n.props.siteRawUrl,siteAdminUrl:n.props.siteAdminUrl,rewindStatus:n.props.rewindStatus});break;case"/plans":t=o.a.createElement(gm,{siteRawUrl:n.props.siteRawUrl,siteAdminUrl:n.props.siteAdminUrl,rewindStatus:n.props.rewindStatus});break;case"/plans-prompt":i=null,t=o.a.createElement(bm,{siteAdminUrl:n.props.siteAdminUrl});break;case"/settings":case"/security":case"/performance":case"/writing":case"/sharing":case"/discussion":case"/traffic":case"/privacy":i=r,t=o.a.createElement(zd,{route:n.props.route,siteAdminUrl:n.props.siteAdminUrl,siteRawUrl:n.props.siteRawUrl,searchTerm:n.props.searchTerm,rewindStatus:n.props.rewindStatus,userCanManageModules:n.props.userCanManageModules});break;case"/setup":n.props.showSetupWizard?(i=null,t=o.a.createElement(Vd,null)):(n.setHistory("?page=jetpack#/dashboard"),t=n.getAtAGlance());break;default:n.props.showSetupWizard?(n.setHistory("?page=jetpack#/setup"),i=null,t=o.a.createElement(Vd,null)):(n.setHistory("?page=jetpack#/dashboard"),t=n.getAtAGlance())}var a=n.props.showSetupWizard?{setup:1,dashboard:2,settings:3}:{setup:-1,dashboard:1,settings:2};return window.wpNavMenuClassChange(a),o.a.createElement("div",{"aria-live":"assertive"},i,t)})),n}return Ma()(t,e),As()(t,[{key:"UNSAFE_componentWillMount",value:function(){this.props.setInitialState(),Da.setApiRoot(this.props.apiRoot),Da.setApiNonce(this.props.apiNonce),this.initializeAnalytics(),window.addEventListener("beforeunload",this.onBeforeUnload),this.props.router.listenBefore(this.routerWillLeave),this.props.isSiteConnected&&Uc.tracks.recordEvent("jetpack_wpa_page_view",{path:this.props.route.path,current_version:this.props.currentVersion})}},{key:"componentDidMount",value:function(){var e=jQuery(".jp-jetpack-connect__container"),t=jQuery(".jp-connect-full__container");e&&t.length>0&&t.prependTo(e)}},{key:"shouldComponentUpdate",value:function(e){return!["/wpbody-content","/wp-toolbar"].includes(e.route.path)&&(e.siteConnectionStatus!==this.props.siteConnectionStatus||e.isLinked!==this.props.isLinked||e.route.path!==this.props.route.path||e.searchTerm!==this.props.searchTerm||e.rewindStatus!==this.props.rewindStatus)}},{key:"componentDidUpdate",value:function(e){if(e.route.path!==this.props.route.path&&this.props.isSiteConnected&&Uc.tracks.recordEvent("jetpack_wpa_page_view",{path:this.props.route.path,current_version:this.props.currentVersion}),e.siteConnectionStatus!==this.props.siteConnectionStatus){var t=jQuery("#toplevel_page_jetpack").find("ul.wp-submenu li");t.find('a[href$="#/settings"]').hide(),t.find('a[href$="admin.php?page=stats"]').hide()}}},{key:"getAtAGlance",value:function(){return o.a.createElement(mf,{siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,rewindStatus:this.props.rewindStatus})}},{key:"setHistory",value:function(e){Object(It.createHistory)().replace(window.location.pathname+e)}},{key:"shouldShowAppsCard",value:function(){return this.props.isSiteConnected&&mg.includes(this.props.route.path)}},{key:"shouldShowSupportCard",value:function(){return this.props.isSiteConnected&&mg.includes(this.props.route.path)}},{key:"shouldShowRewindStatus",value:function(){return this.props.isSiteConnected&&mg.includes(this.props.route.path)}},{key:"shouldShowMasthead",value:function(){return[fg].concat(mg,gg).includes(this.props.route.path)}},{key:"shouldShowFooter",value:function(){return[].concat(mg,gg).includes(this.props.route.path)}},{key:"render",value:function(){return o.a.createElement("div",null,this.shouldShowMasthead()&&o.a.createElement(Kc,{route:this.props.route}),o.a.createElement("div",{className:"jp-lower"},this.shouldShowRewindStatus()&&o.a.createElement(hg,null),o.a.createElement(lg,null),o.a.createElement(cg,null),this.renderMainContent(this.props.route.path),this.shouldShowSupportCard()&&o.a.createElement(Pm,{path:this.props.route.path}),this.shouldShowAppsCard()&&o.a.createElement(Dm,null)),this.shouldShowFooter()&&o.a.createElement(Nm,{siteAdminUrl:this.props.siteAdminUrl}),o.a.createElement(pg,{analytics:Uc}))}}]),t}(o.a.Component),bg=le((function(e){return{siteConnectionStatus:Hs(e),isLinked:Xs(e),siteRawUrl:vi(e),siteAdminUrl:bi(e),searchTerm:wo(e),apiRoot:Ui(e),apiNonce:Ri(e),tracksUserData:Li(e),areThereUnsavedSettings:Oo(e),userCanManageModules:Ei(e),userCanConnectSite:xi(e),isSiteConnected:qs(e),rewindStatus:yo(e),currentVersion:fi(e),showSetupWizard:Ki(e)}}),(function(e){return{setInitialState:function(){return e((function(e){e({type:Kt,initialState:window.Initial_State})}))},clearUnsavedSettingsFlag:function(){return e(Rl())}}}))(bt(vg));window.wpNavMenuClassChange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{setup:-1,dashboard:1,settings:2},t=window.location.hash;jQuery(".current").each((function(e,t){jQuery(t).removeClass("current")}));var n=function(e){return jQuery("#toplevel_page_jetpack").find("li").filter((function(t){return t===e}))[0]};(t=t.split("?")[0].replace(/#/,""))===fg?n(e.setup).classList.add("current"):mg.includes(t)?n(e.dashboard).classList.add("current"):gg.includes(t)&&n(e.settings).classList.add("current");var r=jQuery("body");r.on("click",'a[href$="#/dashboard"], a[href$="#/settings"], .jp-dash-section-header__settings[href="#/security"], .dops-button[href="#/my-plan"], .dops-button[href="#/plans"], .jp-dash-section-header__external-link[href="#/security"]',(function(){window.scrollTo(0,0)})),r.on("click",".jetpack-js-stop-propagation",(function(e){e.stopPropagation()}))},Lt();var yg=window.Initial_State;yg.locale=JSON.parse(yg.locale),yg.locale=Object(Dt.get)(yg.locale,["locale_data","jetpack"],{}),void 0!==yg.locale[""]?(yg.locale[""].localeSlug=yg.localeSlug,Number.prototype.realToLocaleString=Number.prototype.toLocaleString,Number.prototype.toLocaleString=function(e,t){return e=e||yg.localeSlug,t=t||{},this.realToLocaleString(e,t)}):yg.locale={"":{localeSlug:yg.localeSlug}},Is.setLocale(yg.locale);var _g=Mt(It.createHashHistory)(),wg=Object(Pt.syncHistoryWithStore)(_g,kc);(function(){var e=document.getElementById("jp-plugin-container");if(null===e)return;a.a.render(o.a.createElement("div",null,o.a.createElement(h,{store:kc},o.a.createElement(lt,{history:wg},o.a.createElement(wt,{path:"/",name:Is.translate("At A Glance",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/setup",name:Is.translate("Set up"),component:bg}),o.a.createElement(wt,{path:"/dashboard",name:Is.translate("At A Glance"),component:bg}),o.a.createElement(wt,{path:"/my-plan",name:Is.translate("My Plan",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/plans",name:Is.translate("Plans",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/plans-prompt",name:Is.translate("Plans",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/settings",name:Is.translate("Settings",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/discussion",name:Is.translate("Discussion",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/security",name:Is.translate("Security",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/performance",name:Is.translate("Performance",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/traffic",name:Is.translate("Traffic",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/writing",name:Is.translate("Writing",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/sharing",name:Is.translate("Sharing",{context:"Navigation item."}),component:bg}),o.a.createElement(wt,{path:"/wpbody-content",component:bg}),o.a.createElement(wt,{path:"/wp-toolbar",component:bg}),o.a.createElement(wt,{path:"/privacy",component:bg}),o.a.createElement(wt,{path:"*",component:bg})))),e)})()}]));";}s:7:"details";a:17:{i:10;s:17:" * @license  MIT
