webpackJsonp([4],{10:function(e,t){e.exports={$palette_white:"#fff",$palette_grey_ultra_light:"#f7f7f7",$palette_grey_light:"#f1f1f1",$palette_grey:"#ddd",$palette_grey_medium:"#ccc",$palette_grey_disabled:"#a0a5aa",$palette_grey_medium_dark:"#888",$palette_grey_text:"#646464",$palette_grey_dark:"#555",$palette_black:"#000",$palette_purple:"#5d237a",$palette_purple_dark:"#6c2548",$palette_pink:"#d73763",$palette_pink_light:"#e1bee7",$palette_pink_dark:"#a4286a",$palette_blue:"#0066cd",$palette_blue_light:"#a9a9ce",$palette_blue_dark:"#084a67",$palette_green:"#77b227",$palette_green_light:"#7ad03a",$palette_green_medium_light:"#64a60a",$palette_green_medium:"#008a00",$palette_green_blue:"#009288",$palette_orange:"#dc5c04",$palette_orange_light:"#ee7c1b",$palette_red:"#dc3232",$palette_red_light:"#f9bdbd",$palette_yellow:"#ffeb3b",$color_bad:"#dc3232",$color_ok:"#ee7c1b",$color_good:"#7ad03a",$color_score_icon:"#888",$color_white:"#fff",$color_black:"#000",$color_green:"#77b227",$color_green_medium:"#008a00",$color_green_blue:"#009288",$color_grey:"#ddd",$color_grey_dark:"#555",$color_purple:"#5d237a",$color_purple_dark:"#6c2548",$color_pink:"#d73763",$color_pink_light:"#e1bee7",$color_pink_dark:"#a4286a",$color_blue:"#0066cd",$color_blue_light:"#a9a9ce",$color_blue_dark:"#084a67",$color_red:"#dc3232",$color_border_light:"#f7f7f7",$color_border:"#ccc",$color_input_border:"#ddd",$color_background_light:"#f7f7f7",$color_button:"#f7f7f7",$color_button_text:"#555",$color_button_border:"#ccc",$color_button_hover:"#fff",$color_button_border_hover:"#888",$color_button_text_hover:"#000",$color_button_border_active:"#000",$color_headings:"#555",$color_marker_inactive:"#555",$color_marker_active:"#fff",$color_marker_disabled:"#a0a5aa",$color_error:"#dc3232",$color_orange:"#dc5c04",$color_orange_hover:"#c35204",$color_grey_hover:"#cecece",$color_pink_hover:"#cc2956",$color_grey_cta:"#ddd",$color_grey_line:"#ddd",$color_grey_quote:"#646464",$color_grey_text:"#646464",$color_grey_medium_dark:"#888",$color_green_medium_light:"#64a60a",$color_grey_disabled:"#a0a5aa",$color_grey_medium:"#ccc",$color_grey_light:"#f1f1f1",$color_yellow:"#ffeb3b",$color_error_message:"#f9bdbd"}},1019:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0});var l=a(["\n\tdisplay: table-row;\n\tfont-size: 14px;\n"],["\n\tdisplay: table-row;\n\tfont-size: 14px;\n"]),o=a(["\n\tdisplay: table-cell;\n\tpadding: 2px;\n"],["\n\tdisplay: table-cell;\n\tpadding: 2px;\n"]),s=a(["\n\tposition: relative;\n\ttop: 1px;\n\tdisplay: inline-block;\n\theight: 8px;\n\twidth: 8px;\n\tborder-radius: 50%;\n\tbackground-color: ",";\n"],["\n\tposition: relative;\n\ttop: 1px;\n\tdisplay: inline-block;\n\theight: 8px;\n\twidth: 8px;\n\tborder-radius: 50%;\n\tbackground-color: ",";\n"]),i=a(["\n\tpadding-left: 8px;\n\twidth: 100%;\n"],["\n\tpadding-left: 8px;\n\twidth: 100%;\n"]),d=a(["\n\tfont-weight: 600;\n\ttext-align: right;\n\tpadding-left: 16px;\n"],["\n\tfont-weight: 600;\n\ttext-align: right;\n\tpadding-left: 16px;\n"]),c=a(["\n\tdisplay: table;\n\tbox-sizing: border-box;\n\tlist-style: none;\n\tmax-width: 100%;\n\tmin-width: 200px;\n\tmargin: 8px 0;\n\tpadding: 0 8px;\n"],["\n\tdisplay: table;\n\tbox-sizing: border-box;\n\tlist-style: none;\n\tmax-width: 100%;\n\tmin-width: 200px;\n\tmargin: 8px 0;\n\tpadding: 0 8px;\n"]),u=n(0),f=r(u),p=n(1),m=r(p),_=n(4),g=r(_),h=g.default.li(l),b=g.default.span(o),y=(0,g.default)(b)(s,function(e){return e.scoreColor});y.propTypes={scoreColor:m.default.string.isRequired};var v=(0,g.default)(b)(i),$=(0,g.default)(b)(d),x=function(e){return f.default.createElement(h,{className:""+e.className},f.default.createElement(y,{className:e.className+"-bullet",scoreColor:e.scoreColor}),f.default.createElement(v,{className:e.className+"-text",dangerouslySetInnerHTML:{__html:e.html}}),e.value&&f.default.createElement($,{className:e.className+"-score"},e.value))};x.propTypes={className:m.default.string.isRequired,scoreColor:m.default.string.isRequired,html:m.default.string.isRequired,value:m.default.number};var k=g.default.ul(c),w=function(e){return f.default.createElement(k,{className:e.className,role:"list"},e.items.map(function(t,n){return f.default.createElement(x,{className:e.className+"__item",key:n,scoreColor:t.color,html:t.html,value:t.value})}))};w.propTypes={className:m.default.string,items:m.default.arrayOf(m.default.shape({color:m.default.string.isRequired,html:m.default.string.isRequired,value:m.default.number}))},w.defaultProps={className:"score-assessments"},t.default=w},1233:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var n=0;n'+e.label+""}}),r.header=jQuery("
"+n.header+"
").text(),e.setState({statistics:r})})}},{key:"getRyte",value:function(){var e=this;wpseoApi.get("ryte",function(n){if(n.ryte){var r={scores:[{color:t.getColorFromScore(n.ryte.score),html:n.ryte.label}],canFetch:n.ryte.can_fetch};e.setState({ryte:r})}})}},{key:"getFeed",value:function(){var e=this;(0,h.default)("https://yoast.com/feed/widget/",2).then(function(t){t.items=t.items.map(function(e){return e.description=jQuery("
"+e.description+"
").text(),e.description=e.description.replace("The post "+e.title+" appeared first on Yoast.","").trim(),e.content=jQuery("
"+e.content+"
").text(),e}),e.setState({feed:t})}).catch(function(e){return console.log(e)})}},{key:"getSeoAssessment",value:function(){return null===this.state.statistics?null:d.default.createElement(p.default,{key:"yoast-seo-posts-assessment",seoAssessmentText:this.state.statistics.header,seoAssessmentItems:this.state.statistics.seoScores})}},{key:"getRyteAssessment",value:function(){return null===this.state.ryte?null:d.default.createElement("div",{id:"yoast-seo-ryte-assessment",key:"yoast-seo-ryte-assessment"},d.default.createElement("h3",null,wpseoDashboardWidgetL10n.ryte_header),d.default.createElement(_.default,{items:this.state.ryte.scores}),d.default.createElement("div",null,this.state.ryte.canFetch&&d.default.createElement("a",{className:"fetch-status button",href:wpseoDashboardWidgetL10n.ryte_fetch_url},wpseoDashboardWidgetL10n.ryte_fetch),d.default.createElement("a",{className:"landing-page button",href:wpseoDashboardWidgetL10n.ryte_landing_url,target:"_blank"},wpseoDashboardWidgetL10n.ryte_analyze)))}},{key:"getYoastFeed",value:function(){return null===this.state.feed?null:d.default.createElement(y.default,{key:"yoast-seo-blog-feed",title:wpseoDashboardWidgetL10n.feed_header,feed:this.state.feed,footerHtml:wpseoDashboardWidgetL10n.feed_footer})}},{key:"render",value:function(){var e=[this.getSeoAssessment(),this.getRyteAssessment(),this.getYoastFeed()].filter(function(e){return null!==e});return 0===e.length?null:d.default.createElement("div",null,e)}}],[{key:"getColorFromScore",value:function(e){return $.default["$color_"+e]||$.default.$color_grey}}]),t}(d.default.Component),k=document.getElementById("yoast-seo-dashboard-widget");k&&u.default.render(d.default.createElement(x,null),k)},1234:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0});var l=a(["\n"],["\n"]),o=a(["\n\tfont-size: 14px;\n"],["\n\tfont-size: 14px;\n"]),s=n(0),i=r(s),d=n(1),c=r(d),u=n(4),f=r(u),p=n(1235),m=r(p),_=n(1019),g=r(_),h=f.default.div(l),b=f.default.p(o),y=function(e){return i.default.createElement(h,{className:e.className},i.default.createElement(b,{className:e.className+"__text"},e.seoAssessmentText),i.default.createElement(m.default,{className:"progress",items:e.seoAssessmentItems,barHeight:e.barHeight}),i.default.createElement(g.default,{className:"assessments",items:e.seoAssessmentItems}))};y.propTypes={className:c.default.string,seoAssessmentText:c.default.string,seoAssessmentItems:c.default.arrayOf(c.default.shape({value:c.default.number.isRequired,color:c.default.string.isRequired})),barHeight:c.default.string},y.defaultProps={className:"seo-assessment"},t.default=y},1235:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0});var l=a(["\n\tmargin: 8px 0;\n\theight: ",";\n\toverflow: hidden;\n"],["\n\tmargin: 8px 0;\n\theight: ",";\n\toverflow: hidden;\n"]),o=a(["\n\tdisplay: inline-block;\n\tvertical-align: top;\n\twidth: ",";\n\tbackground-color: ",";\n\theight: 100%;\n"],["\n\tdisplay: inline-block;\n\tvertical-align: top;\n\twidth: ",";\n\tbackground-color: ",";\n\theight: 100%;\n"]),s=n(0),i=r(s),d=n(1),c=r(d),u=n(4),f=r(u),p=f.default.div(l,function(e){return e.barHeight}),m=f.default.span(o,function(e){return e.progressWidth+"%"},function(e){return e.progressColor});m.propTypes={progressWidth:c.default.number.isRequired,progressColor:c.default.string.isRequired};var _=function(e){for(var t=0,n=0;n1&&void 0!==arguments[1]?arguments[1]:0;return new Promise(function(n,r){try{var o=new DOMParser,s=o.parseFromString(e,"application/xml"),i=s.createNSResolver(s.documentElement),d=a(s);d.items=l(s,i,t),n(d)}catch(e){r(e)}})}function a(e){var t={};return t.title=s("/rss/channel/title",e),t.description=s("/rss/channel/description",e),t.link=s("/rss/channel/link",e),t}function l(e,t,n){var r=i("/rss/channel/item",e),a=r.snapshotLength,l=[];0!==n&&(a=Math.min(a,n));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.evaluate(e,n||t,r,XPathResult.STRING_TYPE,null);if(a.stringValue)return a.stringValue}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return t.evaluate(e,n||t,r,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null)}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return fetch(e).then(function(e){return e.text()}).then(function(e){return r(e,t)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=r,t.default=d},1237:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0});var l=a(["\n\tbox-sizing: border-box;\n\n\tp, a {\n\t\tfont-size: 14px;\n\t\tmargin: 0;\n\t}\n"],["\n\tbox-sizing: border-box;\n\n\tp, a {\n\t\tfont-size: 14px;\n\t\tmargin: 0;\n\t}\n"]),o=a(["\n\tmargin: 8px 0;\n\tfont-size: 1em;\n"],["\n\tmargin: 8px 0;\n\tfont-size: 1em;\n"]),s=a(["\n\tmargin: 0;\n\tlist-style: none;\n\tpadding: 0;\n"],["\n\tmargin: 0;\n\tlist-style: none;\n\tpadding: 0;\n"]),i=a(["\n\tdisplay: inline-block;\n\tpadding-bottom: 4px;\n"],["\n\tdisplay: inline-block;\n\tpadding-bottom: 4px;\n"]),d=a(["\n\tborder: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n\theight: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute !important;\n\twidth: 1px;\n\tword-wrap: normal !important;\n"],["\n\tborder: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n\theight: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute !important;\n\twidth: 1px;\n\tword-wrap: normal !important;\n"]),c=a(["\n\tmargin: 8px 0;\n\toverflow: hidden;\n"],["\n\tmargin: 8px 0;\n\toverflow: hidden;\n"]),u=a(["\n\ta {\n\t\tmargin: 8px 0 0;\n\t}\n"],["\n\ta {\n\t\tmargin: 8px 0 0;\n\t}\n"]),f=n(0),p=r(f),m=n(1),_=r(m),g=n(4),h=r(g),b=h.default.div(l),y=h.default.h3(o),v=h.default.ul(s),$=h.default.a(i),x=h.default.span(d),k=h.default.li(c),w=h.default.div(u),N=function(e){return p.default.createElement(k,{className:e.className},p.default.createElement($,{className:e.className+"-link",href:e.link,target:"_blank",rel:"noopener noreferrer"},e.title,p.default.createElement(x,null,"( Opens in a new browser tab )")),p.default.createElement("p",{className:e.className+"-description"},e.description))};N.propTypes={className:_.default.string.isRequired,title:_.default.string.isRequired,link:_.default.string.isRequired,description:_.default.string.isRequired};var E=function(e){return p.default.createElement(b,{className:e.className},p.default.createElement(y,{className:e.className+"__header"},e.title?e.title:e.feed.title),p.default.createElement(v,{className:e.className+"__posts",role:"list"},e.feed.items.map(function(t){return p.default.createElement(N,{className:e.className+"__post",key:t.link,title:t.title,link:t.link,description:t.description})})),e.footerHtml&&p.default.createElement(w,{className:e.className+"__footer"},p.default.createElement($,{className:e.className+"__footer-link",href:e.feedLink?e.feedLink:e.feed.link,target:"_blank",rel:"noopener noreferrer",dangerouslySetInnerHTML:{__html:e.footerHtml}})))};E.propTypes={className:_.default.string,feed:_.default.object.isRequired,title:_.default.string,footerHtml:_.default.string,feedLink:_.default.string},E.defaultProps={className:"wordpress-feed"},t.default=E}},[1233]);