!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=210)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.yoast.propTypes},10:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},11:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},12:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},127:function(e,t){e.exports=window.yoast.analysisReport},13:function(e,t){e.exports=window.yoast.styledComponents},15:function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},16:function(e,t){function n(e,t,n,r,o,a,s){try{var i=e[a](s),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var s=e.apply(t,r);function i(e){n(s,o,a,i,c,"next",e)}function c(e){n(s,o,a,i,c,"throw",e)}i(void 0)}))}}},18:function(e,t,n){var r=n(48);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},19:function(e,t,n){var r=n(35),o=n(11);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},2:function(e,t){e.exports=window.wp.i18n},210:function(e,t,n){"use strict";n.r(t);var r,o,a,s,i=n(16),c=n.n(i),u=n(9),l=n.n(u),p=n(10),d=n.n(p),f=n(11),h=n.n(f),b=n(18),m=n.n(b),y=n(19),w=n.n(y),g=n(12),v=n.n(g),O=n(0),j=n(7),k=n.n(j),E=n(4),x=n(24),_=n(127),T=n(8),S=n(43),D=n(15),P=n.n(D),L=n(1),R=n.n(L),C=n(13),I=n.n(C),A=n(2),W=n(3),N=n(31),H=n.n(N),q=Object(T.makeOutboundLink)(),F=Object(T.makeOutboundLink)(),M=function(){var e=Object(A.sprintf)(Object(A.__)(
/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */
"Connect %1$s with %2$s to track the ranking position of your site in the search results based on your keyphrase(s). %3$s","wordpress-seo"),"Yoast SEO","{{wincherLink/}}","{{wincherReadMoreLink/}}");return Object(O.createElement)("p",null,H()({mixedString:e,components:{wincherLink:Object(O.createElement)(q,{href:wpseoAdminGlobalL10n["links.wincher.website"]},"Wincher"),wincherReadMoreLink:Object(O.createElement)(F,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"]},Object(A.__)("Read more about keyphrase tracking with Wincher","wordpress-seo"))}}))},K=function(){return Object(O.createElement)(E.Alert,{type:"warning"},Object(A.sprintf)(
/* translators: %s: Expands to "Wincher". */
Object(A.__)('Your %s account does not contain any keyphrases for this website yet. You can track keyphrases by using the "Track SEO Performance" button in the post editor.',"wordpress-seo"),"Wincher"))},V=n(84),Y=n(87),$=Object(T.makeOutboundLink)(),z=Object(T.makeOutboundLink)(),B=Object(T.makeOutboundLink)(),G=I.a.div(r||(r=P()(["\n"]))),U=I.a.div(o||(o=P()(["\n\tfont-size: 14px;\n"]))),Q=I.a.h3(a||(a=P()(["\n\tmargin: 8px 0;\n\tfont-size: 1em;\n"]))),J=I.a.div(s||(s=P()(["\n\twidth: 100%;\n\toverflow-y: auto;\n"]))),X=function(e){var t=e.websiteId,n=e.id;return Object(A.sprintf)("https://app.wincher.com/websites/%s/keywords?serp=%s&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast",t,n)},Z=function(e){var t=e.className,n=e.onConnectAction;return Object(O.createElement)(U,{className:"".concat(t,"__text")},Object(O.createElement)(M,null),Object(O.createElement)("div",{className:"yoast"},Object(O.createElement)(E.NewButton,{variant:"secondary",id:"yoast-connect-wincher-dashboard-widget",onClick:n},Object(A.sprintf)(
/* translators: %s expands to Wincher */
Object(A.__)("Connect with %s","wordpress-seo"),"Wincher"))))};Z.propTypes={className:R.a.string,onConnectAction:R.a.func.isRequired},Z.defaultProps={className:""};var ee=function(e){var t=e.keyphrase,n=e.websiteId,r=t.id,o=t.keyword;return Object(O.createElement)("tr",null,Object(O.createElement)("td",null,o),Object(O.createElement)("td",null,Object(V.c)(t)),Object(O.createElement)("td",{className:"yoast-table--nopadding"},Object(O.createElement)(V.a,{chartData:t})),Object(O.createElement)("td",{className:"yoast-table--nobreak"},Object(O.createElement)($,{href:X({websiteId:n,id:r})},Object(A.__)("View","wordpress-seo"))))};ee.propTypes={keyphrase:R.a.object.isRequired,websiteId:R.a.string.isRequired};var te=function(e){var t=e.isLoggedIn,n=e.data,r=e.onConnectAction;return t?Object(W.isEmpty)(n)||404!==n.status?!n||Object(W.isEmpty)(n.results)?Object(O.createElement)(K,null):null:Object(O.createElement)(Y.a,{onReconnect:r}):Object(O.createElement)(Z,e)};te.propTypes={isLoggedIn:R.a.bool.isRequired,data:R.a.object.isRequired,onConnectAction:R.a.func.isRequired};var ne=function(){var e=Object(A.sprintf)(
/* translators: %s expands to a link to Wincher login */
Object(A.__)("This overview only shows you keyphrases added to Yoast SEO. There may be other keyphrases added to your %s.","wordpress-seo"),"{{wincherAccountLink/}}");return Object(O.createElement)("p",null,H()({mixedString:e,components:{wincherAccountLink:Object(O.createElement)(B,{href:wpseoAdminGlobalL10n["links.wincher.login"]},Object(A.sprintf)(
/* translators: %s : Expands to "Wincher". */
Object(A.__)("%s account","wordpress-seo"),"Wincher"))}}))},re=function(e){var t=e.className,n=e.websiteId,r=e.isLoggedIn,o=e.data;return Object(O.createElement)(G,{className:t},Object(O.createElement)(Q,{className:"".concat(t,"__header")},Object(A.__)("Top performing keyphrases on your site","wordpress-seo")),Object(O.createElement)(te,e),r&&o&&!Object(W.isEmpty)(o)&&!Object(W.isEmpty)(o.results)&&Object(O.createElement)(O.Fragment,null,Object(O.createElement)(ne,null),Object(O.createElement)(J,null,Object(O.createElement)("table",{className:"yoast yoast-table"},Object(O.createElement)("thead",null,Object(O.createElement)("tr",null,Object(O.createElement)("th",{scope:"col",abbr:Object(A.__)("Keyphrase","wordpress-seo")},Object(A.__)("Keyphrase","wordpress-seo")),Object(O.createElement)("th",{scope:"col",abbr:Object(A.__)("Position","wordpress-seo")},Object(A.__)("Position","wordpress-seo")),Object(O.createElement)("th",{scope:"col",abbr:Object(A.__)("Position over time","wordpress-seo")},Object(A.__)("Position over time","wordpress-seo")),Object(O.createElement)("td",{className:"yoast-table--nobreak"}))),Object(O.createElement)("tbody",null,Object(W.map)(o.results,(function(e,t){return Object(O.createElement)(ee,{key:"keyphrase-".concat(t),keyphrase:e,websiteId:n})}))))),Object(O.createElement)("p",{style:{marginBottom:0,position:"relative"}},Object(O.createElement)(z,{href:wpseoAdminGlobalL10n["links.wincher.login"]},Object(A.sprintf)(
/* translators: %s expands to Wincher */
Object(A.__)("Get more insights over at %s","wordpress-seo"),"Wincher")))))};re.propTypes={className:R.a.string,data:R.a.object.isRequired,websiteId:R.a.string.isRequired,isLoggedIn:R.a.bool.isRequired},re.defaultProps={className:"wincher-seo-performance"};var oe=re,ae=n(32),se=n(86);var ie=function(e){m()(i,e);var t,n,r,o,a,s=(o=i,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v()(o);if(a){var n=v()(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w()(this,e)});function i(){var e;return l()(this,i),(e=s.call(this)).state={statistics:null,feed:null,wincherData:{},wincherWebsiteId:wpseoDashboardWidgetL10n.wincher_website_id,wincherIsLoggedIn:"1"===wpseoDashboardWidgetL10n.wincher_is_logged_in,isDataFetched:!1},e.onConnect=e.onConnect.bind(h()(e)),e.getWincherData=e.getWincherData.bind(h()(e)),e.performAuthenticationRequest=e.performAuthenticationRequest.bind(h()(e)),e}return d()(i,[{key:"componentDidMount",value:function(){var e=this,t=jQuery("#wpseo-dashboard-overview-hide");t.is(":checked")&&this.fetchData(),t.on("click",(function(){e.fetchData()}))}},{key:"fetchData",value:function(){this.state.isDataFetched||(this.getStatistics(),this.getFeed(),this.state.wincherIsLoggedIn&&this.getWincherData(),this.setState({isDataFetched:!0}))}},{key:"getStatistics",value:function(){var e=this;wpseoApi.get("statistics",(function(t){var n={};t&&t.seo_scores&&(n.seoScores=t.seo_scores.map((function(e){return{value:parseInt(e.count,10),color:i.getColorFromScore(e.seo_rank),html:'<a href="'.concat(e.link,'">').concat(e.label,"</a>")}})),n.header=jQuery("<div>".concat(t.header,"</div>")).text(),e.setState({statistics:n}))}))}},{key:"getFeed",value:function(){var e=this;Object(T.getPostFeed)("https://yoast.com/feed/widget/?wp_version="+wpseoDashboardWidgetL10n.wp_version+"&php_version="+wpseoDashboardWidgetL10n.php_version,2).then((function(t){t.items=t.items.map((function(e){return e.description=jQuery("<div>".concat(e.description,"</div>")).text(),e.description=e.description.replace("The post ".concat(e.title," appeared first on Yoast."),"").trim(),e})),e.setState({feed:t})})).catch((function(e){return console.log(e)}))}},{key:"getWincherData",value:(r=c()(k.a.mark((function e(){var t,n,r;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ae.c)();case 2:200===(t=e.sent).status&&(n=Object(W.filter)(t.results,(function(e){return!Object(W.isEmpty)(e.position)})),r=Object(W.sortBy)(n,(function(e){return e.position.value})).splice(0,5),this.setState({wincherData:{results:r,status:t.status}}));case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getSeoAssessment",value:function(){return null===this.state.statistics?null:Object(O.createElement)(_.SiteSEOReport,{key:"yoast-seo-posts-assessment",seoAssessmentText:this.state.statistics.header,seoAssessmentItems:this.state.statistics.seoScores})}},{key:"getYoastFeed",value:function(){return null===this.state.feed?null:Object(O.createElement)(E.ArticleList,{className:"wordpress-feed",key:"yoast-seo-blog-feed",title:wpseoDashboardWidgetL10n.feed_header,feed:this.state.feed,footerLinkText:wpseoDashboardWidgetL10n.feed_footer})}},{key:"performAuthenticationRequest",value:(n=c()(k.a.mark((function e(t){var n;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ae.a)(t);case 2:if(200===e.sent.status){e.next=5;break}return e.abrupt("return");case 5:return this.setState({wincherIsLoggedIn:!0,wincherWebsiteId:t.websiteId.toString()}),e.next=8,this.getWincherData();case 8:(n=this.loginPopup.getPopup())&&n.close();case 10:case"end":return e.stop()}}),e,this)}))),function(_x){return n.apply(this,arguments)})},{key:"onConnect",value:(t=c()(k.a.mark((function e(){var t,n,r=this;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.loginPopup||this.loginPopup.isClosed()){e.next=3;break}return this.loginPopup.focus(),e.abrupt("return");case 3:return e.next=5,Object(ae.b)();case 5:t=e.sent,n=t.url,this.loginPopup=new se.a(n,{success:{type:"wincher:oauth:success",callback:function(e){return r.performAuthenticationRequest(e)}},error:{type:"wincher:oauth:error",callback:function(){}}},{title:"Wincher_login",width:500,height:700}),this.loginPopup.createPopup();case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getWincherSEOPerformance",value:function(){if("0"!==wpseoDashboardWidgetL10n.is_wincher_active&&this.state.wincherIsLoggedIn)return Object(O.createElement)(oe,{key:"wincher-performance-report",data:this.state.wincherData,websiteId:this.state.wincherWebsiteId,isLoggedIn:this.state.wincherIsLoggedIn,onConnectAction:this.onConnect})}},{key:"render",value:function(){var e=[this.getSeoAssessment(),this.getWincherSEOPerformance(),this.getYoastFeed()].filter((function(e){return null!==e}));return 0===e.length?null:Object(O.createElement)("div",null,e)}}],[{key:"getColorFromScore",value:function(e){return x.colors["$color_".concat(e)]||x.colors.$color_grey}}]),i}(O.Component),ce=document.getElementById("yoast-seo-dashboard-widget");ce&&(Object(S.setYoastComponentsL10n)(),Object(O.render)(Object(O.createElement)(ie,null),ce))},23:function(e,t,n){var r=n(67),o=n(68),a=n(69);e.exports=function(e){return r(e)||o(e)||a()}},24:function(e,t){e.exports=window.yoast.styleGuide},3:function(e,t){e.exports=window.lodash},31:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=i(n(5)),a=i(n(89)),s=i(n(92));function i(e){return e&&e.__esModule?e:{default:e}}var c=void 0;t.default=function(e){var t=e.mixedString,n=e.components,i=e.throwErrors;if(c=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var u=(0,s.default)(t);try{return function e(t,n){var s,i,u,l,p,d,f,h,b=[],m={};for(d=0;d<t.length;d++)if("string"!==(p=t[d]).type){if(!n.hasOwnProperty(p.value)||void 0===n[p.value])throw new Error("Invalid interpolation, missing component node: `"+p.value+"`");if("object"!==r(n[p.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+p.value+"`","\n> "+c);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){s=n[p.value],u=d;break}b.push(n[p.value])}else b.push(p.value);return s&&(l=function(e,t){var n,r,o=t[e],a=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){a++;continue}if("componentClose"===n.type){if(0===a)return r;a--}}throw new Error("Missing closing component token `"+o.value+"`")}(u,t),f=e(t.slice(u+1,l),n),i=o.default.cloneElement(s,{},f),b.push(i),l<t.length-1&&(h=e(t.slice(l+1),n),b=b.concat(h))),1===b.length?b[0]:(b.forEach((function(e,t){e&&(m["interpolation-child-"+t]=e)})),(0,a.default)(m))}(u,n)}catch(e){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},32:function(e,t,n){"use strict";n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return w})),n.d(t,"e",(function(){return v})),n.d(t,"f",(function(){return j}));var r=n(16),o=n.n(r),a=n(7),s=n.n(a),i=n(36),c=n.n(i),u=n(3);function l(_x){return p.apply(this,arguments)}function p(){return(p=o()(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c()(t);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),!e.t0.error||!e.t0.status){e.next=10;break}return e.abrupt("return",e.t0);case 10:if(!(e.t0 instanceof Response)){e.next=14;break}return e.next=13,e.t0.json();case 13:return e.abrupt("return",e.sent);case 14:return e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function d(e,t,n){return f.apply(this,arguments)}function f(){return(f=o()(s.a.mark((function e(t,n,r){var o,a,i=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.length>3&&void 0!==i[3]?i[3]:200,e.prev=1,e.next=4,t();case 4:if(!(a=e.sent)){e.next=9;break}if(a.status!==o){e.next=8;break}return e.abrupt("return",n(a));case 8:return e.abrupt("return",r(a));case 9:return e.abrupt("return",!1);case 12:e.prev=12,e.t0=e.catch(1),console.error(e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function h(){return b.apply(this,arguments)}function b(){return(b=o()(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l({path:"yoast/v1/wincher/authorization-url",method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return y.apply(this,arguments)}function y(){return(y=o()(s.a.mark((function e(t){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.code,r=t.websiteId,e.next=3,l({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:n,websiteId:r}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(){return g.apply(this,arguments)}function g(){return(g=o()(s.a.mark((function e(){var t,n,r,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:null,n=o.length>1&&void 0!==o[1]?o[1]:null,r=o.length>2?o[2]:void 0,e.next=5,l({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:t,permalink:n},signal:r});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return O.apply(this,arguments)}function O(){return(O=o()(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(u.isArray)(t)||(t=[t]),e.next=3,l({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:t}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e){return k.apply(this,arguments)}function k(){return(k=o()(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:t}});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},35:function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},36:function(e,t){e.exports=window.wp.apiFetch},4:function(e,t){e.exports=window.yoast.componentsNew},43:function(e,t,n){"use strict";n.r(t),n.d(t,"setTextdomainL10n",(function(){return a})),n.d(t,"setYoastComponentsL10n",(function(){return s})),n.d(t,"setWordPressSeoL10n",(function(){return i}));var r=n(2),o=n(3);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wpseoYoastJSL10n",n=Object(o.get)(window,[t,e,"locale_data",e],!1);"yoast-components"===e&&(e="wordpress-seo"),!1===n?Object(r.setLocaleData)({"":{}},e):Object(r.setLocaleData)(n,e)}function s(){a("yoast-components")}function i(){a("wordpress-seo")}},48:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},5:function(e,t){e.exports=window.React},58:function(e,t,n){"use strict";var r=n(23),o=n.n(r),a=n(0),s=n(1),i=n.n(s),c=n(2),u=function(e){var t=e.data,n=e.mapChartDataToTableData,r=e.dataTableCaption,o=e.dataTableHeaderLabels,s=e.isDataTableVisuallyHidden;return t.length!==o.length?Object(a.createElement)("p",null,Object(c.__)("The number of headers and header labels don't match.","wordpress-seo")):Object(a.createElement)("div",{className:s?"screen-reader-text":null},Object(a.createElement)("table",null,Object(a.createElement)("caption",null,r),Object(a.createElement)("thead",null,Object(a.createElement)("tr",null,o.map((function(e,t){return Object(a.createElement)("th",{key:t},e)})))),Object(a.createElement)("tbody",null,Object(a.createElement)("tr",null,t.map((function(e,t){return Object(a.createElement)("td",{key:t},n(e.y))}))))))};u.propTypes={data:i.a.arrayOf(i.a.shape({x:i.a.number,y:i.a.number})).isRequired,mapChartDataToTableData:i.a.func,dataTableCaption:i.a.string.isRequired,dataTableHeaderLabels:i.a.array.isRequired,isDataTableVisuallyHidden:i.a.bool},u.defaultProps={mapChartDataToTableData:null,isDataTableVisuallyHidden:!0};var l=u,p=function(e){var t=e.data,n=e.width,r=e.height,s=e.fillColor,i=e.strokeColor,c=e.strokeWidth,u=e.className,p=e.mapChartDataToTableData,d=e.dataTableCaption,f=e.dataTableHeaderLabels,h=e.isDataTableVisuallyHidden,b=Math.max(1,Math.max.apply(Math,o()(t.map((function(e){return e.x}))))),m=Math.max(1,Math.max.apply(Math,o()(t.map((function(e){return e.y}))))),y=r-c,w=t.map((function(e){var t=e.x/b*n,r=y-e.y/m*y+c;return"".concat(t,",").concat(r)})).join(" "),g="0,".concat(y+c," ")+w+" ".concat(n,",").concat(y+c);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("svg",{width:n,height:r,viewBox:"0 0 ".concat(n," ").concat(r),className:u,role:"img","aria-hidden":"true",focusable:"false"},Object(a.createElement)("polygon",{fill:s,points:g}),Object(a.createElement)("polyline",{fill:"none",stroke:i,strokeWidth:c,strokeLinejoin:"round",strokeLinecap:"round",points:w})),p&&Object(a.createElement)(l,{data:t,mapChartDataToTableData:p,dataTableCaption:d,dataTableHeaderLabels:f,isDataTableVisuallyHidden:h}))};p.propTypes={data:i.a.arrayOf(i.a.shape({x:i.a.number,y:i.a.number})).isRequired,width:i.a.number.isRequired,height:i.a.number.isRequired,fillColor:i.a.string,strokeColor:i.a.string,strokeWidth:i.a.number,className:i.a.string,mapChartDataToTableData:i.a.func,dataTableCaption:i.a.string.isRequired,dataTableHeaderLabels:i.a.array.isRequired,isDataTableVisuallyHidden:i.a.bool},p.defaultProps={fillColor:null,strokeColor:"#000000",strokeWidth:1,className:"",mapChartDataToTableData:null,isDataTableVisuallyHidden:!0},t.a=p},62:function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},67:function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},68:function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},69:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},7:function(e,t){e.exports=window.regeneratorRuntime},71:function(e,t){e.exports=window.moment},8:function(e,t){e.exports=window.yoast.helpers},84:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return y})),n.d(t,"b",(function(){return w}));var r=n(0),o=n(1),a=n.n(o),s=n(2),i=n(3),c=n(71),u=n.n(c),l=n(4),p=n(8),d=n(58),f=function(){return Object(r.createElement)("p",{className:"yoast-wincher-seo-performance-modal__loading-message"},Object(s.__)("Tracking the ranking position...","wordpress-seo")," ",Object(r.createElement)(l.SvgIcon,{icon:"loading-spinner"}))},h=Object(p.makeOutboundLink)();function b(e){return Math.round(100*e)}function m(e){var t=e.chartData;if(Object(i.isEmpty)(t)||Object(i.isEmpty)(t.position))return"?";var n=function(e){return Array.from({length:e.position.history.length},(function(e,t){return t+1})).map((function(e){
/* translators: %d expands to the amount of days */
return Object(s.sprintf)(Object(s._n)("%d day","%d days",e,"wordpress-seo"),e)}))}(t),o=t.position.history.map((function(e,t){return{x:t,y:101-e.value}}));return Object(r.createElement)(d.a,{width:66,height:24,data:o,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",className:"yoast-related-keyphrases-modal__chart",mapChartDataToTableData:b,dataTableCaption:Object(s.__)("Keyphrase position in the last 90 days on a scale from 0 to 100.","wordpress-seo"),dataTableHeaderLabels:n})}function y(e){return!e||!e.position||e.position.value>100?"> 100":e.position.value}function w(e){var t=e.keyphrase,n=e.rowData,o=e.onTrackKeyphrase,a=e.onUntrackKeyphrase,c=e.isFocusKeyphrase,p=e.isDisabled,d=e.isLoading,b=!Object(i.isEmpty)(n),w=Object(r.useCallback)((function(){p||(b?a(t,n.id):o(t))}),[t,o,a,b,n,p]);return Object(r.createElement)("tr",null,Object(r.createElement)("td",{className:"yoast-table--nopadding"},function(e){var t=e.keyphrase,n=e.isEnabled,o=e.toggleAction;return e.isLoading?Object(r.createElement)(l.SvgIcon,{icon:"loading-spinner"}):Object(r.createElement)(l.Toggle,{id:"toggle-keyphrase-tracking-".concat(t),className:"wincher-toggle",isEnabled:n,onSetToggleState:o,showToggleStateLabel:!1})}({keyphrase:t,isEnabled:b,toggleAction:w,isLoading:d})),Object(r.createElement)("td",null,t,c&&Object(r.createElement)("span",null,"*")),function(e){var t=e.rowData,n=e.websiteId,o=!Object(i.isEmpty)(t),a=t&&t.updated_at&&u()(t.updated_at)>=u()().subtract(7,"days"),c=t?Object(s.sprintf)("https://app.wincher.com/websites/%s/keywords?serp=%s&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast",n,t.id):null;return o?a?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("td",null,y(t)),Object(r.createElement)("td",{className:"yoast-table--nopadding"},Object(r.createElement)(m,{chartData:t})),Object(r.createElement)("td",{className:"yoast-table--nobreak"},Object(r.createElement)(h,{href:c},Object(s.__)("View","wordpress-seo")))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("td",{className:"yoast-table--nopadding",colSpan:"3"},Object(r.createElement)(f,null))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("td",null,"?"),Object(r.createElement)("td",{className:"yoast-table--nopadding"},"?"),Object(r.createElement)("td",{className:"yoast-table--nobreak"}))}(e))}m.propTypes={chartData:a.a.object},m.defaultProps={chartData:{}},w.propTypes={rowData:a.a.object,keyphrase:a.a.string.isRequired,onTrackKeyphrase:a.a.func,onUntrackKeyphrase:a.a.func,isFocusKeyphrase:a.a.bool,isDisabled:a.a.bool,isLoading:a.a.bool,websiteId:a.a.string},w.defaultProps={rowData:{},onTrackKeyphrase:function(){},onUntrackKeyphrase:function(){},isFocusKeyphrase:!1,isDisabled:!1,isLoading:!1,websiteId:""}},86:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(16),o=n.n(r),a=n(9),s=n.n(a),i=n(10),c=n.n(i),u=n(7),l=n.n(u),p=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s()(this,e),this.url=t,this.origin=new URL(t).origin,this.eventHandlers=Object.assign({success:{type:"",callback:function(){}},error:{type:"",callback:function(){}}},n),this.options=Object.assign({height:570,width:340,title:""},r),this.popup=null,this.createPopup=this.createPopup.bind(this),this.messageHandler=this.messageHandler.bind(this),this.getPopup=this.getPopup.bind(this)}var t;return c()(e,[{key:"createPopup",value:function(){var e=this.options,t=e.height,n=e.width,r=e.title,o=["top="+(window.top.outerHeight/2+window.top.screenY-t/2),"left="+(window.top.outerWidth/2+window.top.screenX-n/2),"width="+n,"height="+t,"resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(this.url,r,o.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}},{key:"messageHandler",value:(t=o()(l.a.mark((function e(t){var n,r;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.data,r=t.source,t.origin===this.origin&&this.popup===r){e.next=3;break}return e.abrupt("return");case 3:if(n.type!==this.eventHandlers.success.type){e.next=8;break}return this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),e.next=8,this.eventHandlers.success.callback(n);case 8:if(n.type!==this.eventHandlers.error.type){e.next=13;break}return this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),e.next=13,this.eventHandlers.error.callback(n);case 13:case"end":return e.stop()}}),e,this)}))),function(_x){return t.apply(this,arguments)})},{key:"getPopup",value:function(){return this.popup}},{key:"isClosed",value:function(){return!this.popup||this.popup.closed}},{key:"focus",value:function(){this.isClosed()||this.popup.focus()}}]),e}()},87:function(e,t,n){"use strict";var r=n(0),o=n(1),a=n.n(o),s=n(2),i=n(31),c=n.n(i),u=n(4),l=function(e){var t=Object(s.sprintf)(
/* translators: %s expands to a link to open the Wincher login popup. */
Object(s.__)("It seems like something went wrong when retrieving your website's data. Please %s and try again.","wordpress-seo"),"{{reconnectToWincher/}}","Wincher");return Object(r.createElement)(u.Alert,{type:"error"},c()({mixedString:t,components:{reconnectToWincher:Object(r.createElement)("a",{href:"#",onClick:e.onReconnect},Object(s.sprintf)(
/* translators: %s : Expands to "Wincher". */
Object(s.__)("reconnect to %s","wordpress-seo"),"Wincher"))}}))};l.propTypes={onReconnect:a.a.func.isRequired},t.a=l},89:function(e,t,n){"use strict";var r=n(5),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,a=n(62),s=n(90),i=n(91),c="function"==typeof Symbol&&Symbol.iterator;function u(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}var l=/\/+/g;function p(e){return(""+e).replace(l,"$&/")}var d,f,h=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)};function m(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function y(e,t,n){var o,s,i=e.result,c=e.keyPrefix,u=e.func,l=e.context,d=u.call(l,t,e.count++);Array.isArray(d)?w(d,i,n,a.thatReturnsArgument):null!=d&&(r.isValidElement(d)&&(o=d,s=c+(!d.key||t&&t.key===d.key?"":p(d.key)+"/")+n,d=r.cloneElement(o,{key:s},void 0!==o.props?o.props.children:void 0)),i.push(d))}function w(e,t,n,r,a){var i="";null!=n&&(i=p(n)+"/");var l=m.getPooled(t,i,r,a);!function(e,t,n){null==e||function e(t,n,r,a){var i,l=typeof t;if("undefined"!==l&&"boolean"!==l||(t=null),null===t||"string"===l||"number"===l||"object"===l&&t.$$typeof===o)return r(a,t,""===n?"."+u(t,0):n),1;var p=0,d=""===n?".":n+":";if(Array.isArray(t))for(var f=0;f<t.length;f++)p+=e(i=t[f],d+u(i,f),r,a);else{var h=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(h)for(var b,m=h.call(t),y=0;!(b=m.next()).done;)p+=e(i=b.value,d+u(i,y++),r,a);else if("object"===l){var w=""+t;s(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===w?"object with keys {"+Object.keys(t).join(", ")+"}":w,"")}}return p}(e,"",t,n)}(e,y,l),m.release(l)}m.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},d=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(f=m).instancePool=[],f.getPooled=d||h,f.poolSize||(f.poolSize=10),f.release=function(e){s(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return i(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return i(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;s(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)w(e[n],t,n,a.thatReturnsArgument);return t}},9:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},90:function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,s,i){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,s,i],l=0;(c=new Error(t.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},91:function(e,t,n){"use strict";var r=n(62);e.exports=r},92:function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}}});