!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.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 a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));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=212)}({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){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},12: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}},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,a,o,s){try{var i=e[o](s),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,o){var s=e.apply(t,r);function i(e){n(s,a,o,i,c,"next",e)}function c(e){n(s,a,o,i,c,"throw",e)}i(void 0)}))}}},18:function(e,t,n){var r=n(43);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(34),a=n(12);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t}},2:function(e,t){e.exports=window.wp.i18n},212:function(e,t,n){"use strict";n.r(t);var r,a,o,s,i=n(16),c=n.n(i),u=n(9),l=n.n(u),p=n(10),d=n.n(p),f=n(12),h=n.n(f),b=n(18),m=n.n(b),y=n(19),w=n.n(y),g=n(11),v=n.n(g),O=n(0),j=n(7),k=n.n(j),E=n(4),x=n(25),_=n(127),T=n(8),S=n(15),P=n.n(S),D=n(1),R=n.n(D),L=n(13),C=n.n(L),I=n(2),A=n(3),W=n(31),N=n.n(W),H=Object(T.makeOutboundLink)(),q=Object(T.makeOutboundLink)(),F=function(){var e=Object(I.sprintf)(Object(I.__)(
/* 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,N()({mixedString:e,components:{wincherLink:Object(O.createElement)(H,{href:wpseoAdminGlobalL10n["links.wincher.website"]},"Wincher"),wincherReadMoreLink:Object(O.createElement)(q,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"]},Object(I.__)("Read more about keyphrase tracking with Wincher","wordpress-seo"))}}))},M=function(){return Object(O.createElement)(E.Alert,{type:"warning"},Object(I.sprintf)(
/* translators: %s: Expands to "Wincher". */
Object(I.__)('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"))},K=n(83),V=n(86),$=Object(T.makeOutboundLink)(),z=Object(T.makeOutboundLink)(),Y=Object(T.makeOutboundLink)(),B=C.a.div(r||(r=P()(["\n"]))),G=C.a.div(a||(a=P()(["\n\tfont-size: 14px;\n"]))),U=C.a.h3(o||(o=P()(["\n\tmargin: 8px 0;\n\tfont-size: 1em;\n"]))),Q=C.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(I.sprintf)("https://app.wincher.com/websites/%s/keywords?serp=%s&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast",t,n)},J=function(e){var t=e.className,n=e.onConnectAction;return Object(O.createElement)(G,{className:"".concat(t,"__text")},Object(O.createElement)(F,null),Object(O.createElement)("div",{className:"yoast"},Object(O.createElement)(E.NewButton,{variant:"secondary",id:"yoast-connect-wincher-dashboard-widget",onClick:n},Object(I.sprintf)(
/* translators: %s expands to Wincher */
Object(I.__)("Connect with %s","wordpress-seo"),"Wincher"))))};J.propTypes={className:R.a.string,onConnectAction:R.a.func.isRequired},J.defaultProps={className:""};var Z=function(e){var t=e.keyphrase,n=e.websiteId,r=t.id,a=t.keyword;return Object(O.createElement)("tr",null,Object(O.createElement)("td",null,a),Object(O.createElement)("td",null,Object(K.c)(t)),Object(O.createElement)("td",{className:"yoast-table--nopadding"},Object(O.createElement)(K.a,{chartData:t})),Object(O.createElement)("td",{className:"yoast-table--nobreak"},Object(O.createElement)($,{href:X({websiteId:n,id:r})},Object(I.__)("View","wordpress-seo"))))};Z.propTypes={keyphrase:R.a.object.isRequired,websiteId:R.a.string.isRequired};var ee=function(e){var t=e.isLoggedIn,n=e.data,r=e.onConnectAction;return t?Object(A.isEmpty)(n)||404!==n.status?!n||Object(A.isEmpty)(n.results)?Object(O.createElement)(M,null):null:Object(O.createElement)(V.a,{onReconnect:r}):Object(O.createElement)(J,e)};ee.propTypes={isLoggedIn:R.a.bool.isRequired,data:R.a.object.isRequired,onConnectAction:R.a.func.isRequired};var te=function(){var e=Object(I.sprintf)(
/* translators: %s expands to a link to Wincher login */
Object(I.__)("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,N()({mixedString:e,components:{wincherAccountLink:Object(O.createElement)(Y,{href:wpseoAdminGlobalL10n["links.wincher.login"]},Object(I.sprintf)(
/* translators: %s : Expands to "Wincher". */
Object(I.__)("%s account","wordpress-seo"),"Wincher"))}}))},ne=function(e){var t=e.className,n=e.websiteId,r=e.isLoggedIn,a=e.data;return Object(O.createElement)(B,{className:t},Object(O.createElement)(U,{className:"".concat(t,"__header")},Object(I.__)("Top performing keyphrases on your site","wordpress-seo")),Object(O.createElement)(ee,e),r&&a&&!Object(A.isEmpty)(a)&&!Object(A.isEmpty)(a.results)&&Object(O.createElement)(O.Fragment,null,Object(O.createElement)(te,null),Object(O.createElement)(Q,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(I.__)("Keyphrase","wordpress-seo")},Object(I.__)("Keyphrase","wordpress-seo")),Object(O.createElement)("th",{scope:"col",abbr:Object(I.__)("Position","wordpress-seo")},Object(I.__)("Position","wordpress-seo")),Object(O.createElement)("th",{scope:"col",abbr:Object(I.__)("Position over time","wordpress-seo")},Object(I.__)("Position over time","wordpress-seo")),Object(O.createElement)("td",{className:"yoast-table--nobreak"}))),Object(O.createElement)("tbody",null,Object(A.map)(a.results,(function(e,t){return Object(O.createElement)(Z,{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(I.sprintf)(
/* translators: %s expands to Wincher */
Object(I.__)("Get more insights over at %s","wordpress-seo"),"Wincher")))))};ne.propTypes={className:R.a.string,data:R.a.object.isRequired,websiteId:R.a.string.isRequired,isLoggedIn:R.a.bool.isRequired},ne.defaultProps={className:"wincher-seo-performance"};var re=ne,ae=n(32),oe=n(85);var se=function(e){m()(i,e);var t,n,r,a,o,s=(a=i,o=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()(a);if(o){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(A.filter)(t.results,(function(e){return!Object(A.isEmpty)(e.position)})),r=Object(A.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 oe.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)(re,{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),ie=document.getElementById("yoast-seo-dashboard-widget");ie&&Object(O.render)(Object(O.createElement)(se,null),ie)},24:function(e,t,n){var r=n(66),a=n(67),o=n(68);e.exports=function(e){return r(e)||a(e)||o()}},25: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},a=i(n(5)),o=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,a=t[e],o=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===a.value){if("componentOpen"===n.type){o++;continue}if("componentClose"===n.type){if(0===o)return r;o--}}throw new Error("Missing closing component token `"+a.value+"`")}(u,t),f=e(t.slice(u+1,l),n),i=a.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,o.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),a=n.n(r),o=n(7),s=n.n(o),i=n(36),c=n.n(i),u=n(3);function l(_x){return p.apply(this,arguments)}function p(){return(p=a()(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=a()(s.a.mark((function e(t,n,r){var a,o,i=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.length>3&&void 0!==i[3]?i[3]:200,e.prev=1,e.next=4,t();case 4:if(!(o=e.sent)){e.next=9;break}if(o.status!==a){e.next=8;break}return e.abrupt("return",n(o));case 8:return e.abrupt("return",r(o));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=a()(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=a()(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=a()(s.a.mark((function e(){var t,n,r,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:null,n=a.length>1&&void 0!==a[1]?a[1]:null,r=a.length>2?a[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=a()(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=a()(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)}},34: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){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},57:function(e,t,n){"use strict";var r=n(24),a=n.n(r),o=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,a=e.dataTableHeaderLabels,s=e.isDataTableVisuallyHidden;return t.length!==a.length?Object(o.createElement)("p",null,Object(c.__)("The number of headers and header labels don't match.","wordpress-seo")):Object(o.createElement)("div",{className:s?"screen-reader-text":null},Object(o.createElement)("table",null,Object(o.createElement)("caption",null,r),Object(o.createElement)("thead",null,Object(o.createElement)("tr",null,a.map((function(e,t){return Object(o.createElement)("th",{key:t},e)})))),Object(o.createElement)("tbody",null,Object(o.createElement)("tr",null,t.map((function(e,t){return Object(o.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,a()(t.map((function(e){return e.x}))))),m=Math.max(1,Math.max.apply(Math,a()(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(o.createElement)(o.Fragment,null,Object(o.createElement)("svg",{width:n,height:r,viewBox:"0 0 ".concat(n," ").concat(r),className:u,role:"img","aria-hidden":"true",focusable:"false"},Object(o.createElement)("polygon",{fill:s,points:g}),Object(o.createElement)("polyline",{fill:"none",stroke:i,strokeWidth:c,strokeLinejoin:"round",strokeLinecap:"round",points:w})),p&&Object(o.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},64:function(e,t,n){"use strict";function r(e){return function(){return e}}var a=function(){};a.thatReturns=r,a.thatReturnsFalse=r(!1),a.thatReturnsTrue=r(!0),a.thatReturnsNull=r(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},66: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}}},67:function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},68:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},7:function(e,t){e.exports=window.regeneratorRuntime},70:function(e,t){e.exports=window.moment},8:function(e,t){e.exports=window.yoast.helpers},83: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),a=n(1),o=n.n(a),s=n(2),i=n(3),c=n(70),u=n.n(c),l=n(4),p=n(8),d=n(57),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),a=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:a,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,a=e.onTrackKeyphrase,o=e.onUntrackKeyphrase,c=e.isFocusKeyphrase,p=e.isDisabled,d=e.isLoading,b=!Object(i.isEmpty)(n),w=Object(r.useCallback)((function(){p||(b?o(t,n.id):a(t))}),[t,a,o,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,a=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:a,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,a=!Object(i.isEmpty)(t),o=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 a?o?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:o.a.object},m.defaultProps={chartData:{}},w.propTypes={rowData:o.a.object,keyphrase:o.a.string.isRequired,onTrackKeyphrase:o.a.func,onUntrackKeyphrase:o.a.func,isFocusKeyphrase:o.a.bool,isDisabled:o.a.bool,isLoading:o.a.bool,websiteId:o.a.string},w.defaultProps={rowData:{},onTrackKeyphrase:function(){},onUntrackKeyphrase:function(){},isFocusKeyphrase:!1,isDisabled:!1,isLoading:!1,websiteId:""}},85:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(16),a=n.n(r),o=n(9),s=n.n(o),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,a=["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,a.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}},{key:"messageHandler",value:(t=a()(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}()},86:function(e,t,n){"use strict";var r=n(0),a=n(1),o=n.n(a),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:o.a.func.isRequired},t.a=l},89:function(e,t,n){"use strict";var r=n(5),a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=n(64),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 a,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,o.thatReturnsArgument):null!=d&&(r.isValidElement(d)&&(a=d,s=c+(!d.key||t&&t.key===d.key?"":p(d.key)+"/")+n,d=r.cloneElement(a,{key:s},void 0!==a.props?a.props.children:void 0)),i.push(d))}function w(e,t,n,r,o){var i="";null!=n&&(i=p(n)+"/");var l=m.getPooled(t,i,r,o);!function(e,t,n){null==e||function e(t,n,r,o){var i,l=typeof t;if("undefined"!==l&&"boolean"!==l||(t=null),null===t||"string"===l||"number"===l||"object"===l&&t.$$typeof===a)return r(o,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,o);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,o);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 a=this.instancePool.pop();return this.call(a,e,t,n,r),a}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,o.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,a,o,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,a,o,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(64);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)}}});