text: webpackJsonp([0],{33:function(e,t){e.exports=jQuery},55:function(e,t){e.exports=django},57:function(e,t,a){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 i(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.CommentForm=void 0;var o=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),u=a(33),c=r(u),d=a(55),m=r(d),p=a(56),f=r(p),h=a(14),_=r(h),v=a(13),y=(r(v),a(34)),g=r(y),b=a(58);(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);t.default=e})(b),t.CommentForm=function(e){function t(e){l(this,t);var a=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.state={name:"",email:"",url:"",followup:!1,comment:"",reply_to:a.props.reply_to||0,visited:{name:!1,email:!1,comment:!1},errors:{name:!1,email:!1,comment:!1},previewing:!1,alert:{message:"",cssc:""}},a.handle_input_change=a.handle_input_change.bind(a),a.handle_blur=a.handle_blur.bind(a),a.handle_submit=a.handle_submit.bind(a),a.handle_preview=a.handle_preview.bind(a),a.reset_form=a.reset_form.bind(a),a.fhelp=_.default.createElement("span",{className:"help-block"},"This field is required."),a}return i(t,e),o(t,[{key:"handle_input_change",value:function(e){var t=e.target,a="checkbox"===t.type?t.checked:t.value,r=t.name;this.setState(n({},r,a))}},{key:"handle_blur",value:function(e){function t(t){var a=this.state.visited;a[e]=!0,this.setState({visited:a})}return t.bind(this)}},{key:"validate",value:function(){var e=this.state.errors;return this.state.comment.length?e.comment=!1:e.comment=!0,this.props.is_authenticated?(e.name=!1,e.email=!1):(this.state.name.length?e.name=!1:e.name=!0,/\S+@\S+\.\S+/.test(this.state.email)?e.email=!1:e.email=!0),this.setState({errors:e}),!(this.state.errors.comment||this.state.errors.name||this.state.errors.email)}},{key:"render_field_comment",value:function(){var e="form-group ",t="";this.state.errors.comment&&(e+=this.state.errors.comment?"has-error":"",t=this.fhelp);var a=m.default.gettext("Your comment");return _.default.createElement("div",{className:e},_.default.createElement("div",{className:"col-lg-offset-1 col-md-offset-1 col-lg-10 col-md-10"},_.default.createElement("textarea",{required:!0,name:"comment",id:"id_comment",placeholder:a,maxLength:"3000",className:"form-control",value:this.state.comment,onChange:this.handle_input_change,onBlur:this.handle_blur("comment")}),t))}},{key:"render_field_name",value:function(){if(this.props.is_authenticated)return"";var e="form-group",t="form-control",a="";this.state.reply_to>0&&(e+=" form-group-sm",t+=" input-sm"),this.state.errors.name&&(e+=" has-error",a=this.fhelp);var r=m.default.gettext("name");return _.default.createElement("div",{className:e},_.default.createElement("label",{htmlFor:"id_name",className:"control-label col-lg-3 col-md-3"},m.default.gettext("Name")),_.default.createElement("div",{className:"col-lg-7 col-md-7"},_.default.createElement("input",{type:"text",name:"name",required:!0,id:"id_name",value:this.state.name,placeholder:r,onChange:this.handle_input_change,onBlur:this.handle_blur("name"),className:t}),a))}},{key:"render_field_email",value:function(){if(this.props.is_authenticated)return"";var e="form-group",t="form-control";this.state.reply_to>0&&(e+=" form-group-sm",t+=" input-sm"),this.state.errors.email&&(e+=" has-error");var a=m.default.gettext("mail address"),r=m.default.gettext("Required for comment verification.");return _.default.createElement("div",{className:e},_.default.createElement("label",{htmlFor:"id_email",className:"control-label col-lg-3 col-md-3"},m.default.gettext("Mail")),_.default.createElement("div",{className:"col-lg-7 col-md-7"},_.default.createElement("input",{type:"text",name:"email",required:!0,id:"id_email",value:this.state.email,placeholder:a,onChange:this.handle_input_change,onBlur:this.handle_blur("email"),className:t}),_.default.createElement("span",{className:"help-block"},r)))}},{key:"render_field_url",value:function(){if(this.props.is_authenticated)return"";var e="form-group",t="form-control";this.state.reply_to>0&&(e+=" form-group-sm",t+=" input-sm"),this.state.errors.url&&(e+=" form-group");var a=m.default.gettext("url your name links to (optional)");return _.default.createElement("div",{className:e},_.default.createElement("label",{htmlFor:"id_url",className:"control-label col-lg-3 col-md-3"},m.default.gettext("Link")),_.default.createElement("div",{className:"col-lg-7 col-md-7"},_.default.createElement("input",{type:"text",name:"url",id:"id_url",value:this.state.url,placeholder:a,onChange:this.handle_input_change,className:t})))}},{key:"render_field_followup",value:function(){var e="checkbox";this.state.reply_to>0&&(e+=" small");var t=m.default.gettext("Notify me about follow-up comments");return _.default.createElement("div",{className:"form-group"},_.default.createElement("div",{className:"col-lg-offset-3 col-md-offset-3 col-lg-7 col-md-7"},_.default.createElement("div",{className:e},_.default.createElement("label",{htmlFor:"id_followup"},_.default.createElement("input",{type:"checkbox",checked:this.state.followup,onChange:this.handle_input_change,name:"followup",id:"id_followup"})," ",t))))}},{key:"reset_form",value:function(){this.setState({name:"",email:"",url:"",followup:!1,comment:"",visited:{name:!1,email:!1,comment:!1},errors:{name:!1,email:!1,comment:!1}})}},{key:"handle_submit",value:function(e){if(e.preventDefault(),this.validate()){var t={content_type:this.props.form.content_type,object_pk:this.props.form.object_pk,timestamp:this.props.form.timestamp,security_hash:this.props.form.security_hash,honeypot:"",comment:this.state.comment,name:this.state.name,email:this.state.email,url:this.state.url,followup:this.state.followup,reply_to:this.state.reply_to},a=m.default.gettext("Your comment will be reviewed. Thank your for your patience."),r=m.default.gettext("Thank you, a comment confirmation request has been sent by mail."),n=m.default.gettext("Sorry, your comment has been rejected."),l={202:a,204:r,403:n};c.default.ajax({method:"POST",url:this.props.send_url,data:t,dataType:"json",cache:!1,success:function(e,t,a){if([201,202,204,403].indexOf(a.status)>-1){var r="";r=403==a.status?"alert alert-danger":"alert alert-info",this.setState({alert:{message:l[a.status],cssc:r},previewing:!1}),this.reset_form(),this.props.on_comment_created()}}.bind(this),error:function(e,t,a){console.error(this.props.send_url,t,a.toString())}.bind(this)})}}},{key:"handle_preview",value:function(e){e.preventDefault(),this.validate()&&this.setState({previewing:!0})}},{key:"rawMarkup",value:function(){return{__html:(new g.default).render(this.state.comment)}}},{key:"render_preview",value:function(){if(!this.state.previewing)return"";var e="",t="",a=(0,f.default)(this.state.email.toLowerCase()),r="http://www.gravatar.com/avatar/"+a+"?s=48&d=mm",n=_.default.createElement("img",{src:r,height:"48",width:"48"});this.state.url?(e=_.default.createElement("a",{href:this.state.url},n),t=_.default.createElement("a",{href:this.state.url,target:"_new"},this.state.name)):(e=n,t=this.props.is_authenticated?this.props.current_user.split(":")[1]:this.state.name);var l="",s={},i=_.default.createElement("hr",null),o="",u=m.default.gettext("Your comment in preview"),c=_.default.createElement("h5",{className:"text-center"},u);this.state.reply_to>0&&(l="well well-sm",s={marginTop:"1em"},c="",o=_.default.createElement("div",{className:"label label-info"},"preview"),i="");var d=m.default.gettext("Now");return _.default.createElement("div",{className:l,style:s},c,_.default.createElement("div",{className:"media"},_.default.createElement("div",{className:"media-left"},e),_.default.createElement("div",{className:"media-body"},_.default.createElement("h6",{className:"media-heading"},d," - ",t,"  ",o),_.default.createElement("div",{className:"preview",dangerouslySetInnerHTML:this.rawMarkup()}))),i)}},{key:"render_form",value:function(){var e=this.render_field_comment(),t=this.render_field_name(),a=this.render_field_email(),r=this.render_field_url(),n=this.render_field_followup(),l="btn btn-primary",s="btn btn-default",i={};0!=this.state.reply_to&&(l+=" btn-sm",s+=" btn-sm",i={marginBottom:"0px"});var o=m.default.gettext("preview"),u=m.default.gettext("send");return _.default.createElement("form",{method:"POST",onSubmit:this.handle_submit,className:"form-horizontal"},_.default.createElement("input",{type:"hidden",name:"content_type",value:this.props.form.content_type}),_.default.createElement("input",{type:"hidden",name:"object_pk",value:this.props.form.object_pk}),_.default.createElement("input",{type:"hidden",name:"timestamp",value:this.props.form.timestamp}),_.default.createElement("input",{type:"hidden",name:"security_hash",value:this.props.form.security_hash}),_.default.createElement("input",{type:"hidden",name:"reply_to",value:this.state.reply_to}),_.default.createElement("fieldset",null,_.default.createElement("div",{style:{display:"none"}},_.default.createElement("input",{type:"text",name:"honeypot",value:""})),e," ",t," ",a," ",r," ",n),_.default.createElement("div",{className:"form-group",style:i},_.default.createElement("div",{className:"col-lg-offset-3 col-md-offset-3 col-lg-7 col-md-7"},_.default.createElement("input",{type:"submit",name:"post",value:u,className:l})," ",_.default.createElement("input",{type:"button",name:"preview",value:o,className:s,onClick:this.handle_preview}))))}},{key:"render",value:function(){var e=this.render_preview(),t="",a="well well-sm",r=m.default.gettext("Post your comment");0==this.state.reply_to&&(t=_.default.createElement("h4",{className:"text-center"},r),a="well well-lg");var n="";this.state.alert.message&&(n=_.default.createElement("div",{className:this.state.alert.cssc},this.state.alert.message));var l=this.render_form();return _.default.createElement("div",{className:"comment"},e,t,n,_.default.createElement("div",{className:a},l))}}]),t}(_.default.Component)},58:function(e,t,a){"use strict";function r(e){var t=null;if(document.cookie&&""!==document.cookie)for(var a=document.cookie.split(";"),r=0;r<a.length;r++){var n=jQuery.trim(a[r]);if(n.substring(0,e.length+1)===e+"="){t=decodeURIComponent(n.substring(e.length+1));break}}return t}function n(e){return/^(GET|HEAD|OPTIONS|TRACE)$/.test(e)}function l(e){i.default.ajaxSetup({beforeSend:function(t,a){n(a.type)||this.crossDomain||t.setRequestHeader("X-CSRFToken",r(e))}})}Object.defineProperty(t,"__esModule",{value:!0}),t.getCookie=r,t.csrfSafeMethod=n,t.jquery_ajax_setup=l;var s=a(33),i=function(e){return e&&e.__esModule?e:{default:e}}(s)},93:function(e,t,a){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(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 s(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.CommentBox=void 0;var i=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),o=a(33),u=r(o),c=a(14),d=r(c),m=a(13),p=(r(m),a(58)),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(p),h=a(55),_=r(h),v=a(95),y=a(57);t.CommentBox=function(e){function t(e){n(this,t);var a=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return f.jquery_ajax_setup("csrftoken"),a.state={previewing:!1,preview:{name:"",email:"",url:"",comment:""},tree:[],cids:[],newcids:[],counter:a.props.comment_count},a.handle_comment_created=a.handle_comment_created.bind(a),a.handle_preview=a.handle_preview.bind(a),a.handle_update=a.handle_update.bind(a),a}return s(t,e),i(t,[{key:"handle_comment_created",value:function(){this.load_comments()}},{key:"handle_preview",value:function(e,t,a,r){this.setState({preview:{name:e,email:t,url:a,comment:r},previewing:!0})}},{key:"handle_update",value:function(e){e.preventDefault(),this.load_comments()}},{key:"reset_preview",value:function(){this.setState({preview:{name:"",email:"",url:"",comment:""},previewing:!1})}},{key:"render_comment_counter",value:function(){if(this.state.counter>0){var e=_.default.ngettext("One comment.","%s comments.",this.state.cids.length),t=_.default.interpolate(e,[this.state.cids.length]);return d.default.createElement("div",null,d.default.createElement("h5",{className:"text-center"},t),d.default.createElement("hr",null))}return""}},{key:"render_comment_form",value:function(){return this.props.allow_comments?d.default.createElement(y.CommentForm,{form:this.props.form,send_url:this.props.send_url,current_user:this.props.current_user,is_authenticated:this.props.is_authenticated,on_comment_created:this.handle_comment_created}):d.default.createElement("h5",null,"Comments are disabled for this article.")}},{key:"render_update_alert",value:function(){var e=this.state.counter-this.state.cids.length;if(e>0){var t=_.default.ngettext("There is a new comment.","There are %s new comments.",e),a=_.default.interpolate(t,[e]);return d.default.createElement("div",{className:"alert alert-info"},a,d.default.createElement("div",{className:"pull-right"},d.default.createElement("button",{type:"button",className:"btn btn-default btn-xs",onClick:this.handle_update},"update")))}return""}},{key:"create_tree",value:function(e){function t(e){return l[e].map(function(e){return void 0==n[e].children&&(n[e].children=t(e)),n[e]})}var a=new Array,r=new Array,n={},l={},s=[],i=[],o=[],u=!0,c=!1,d=void 0;try{for(var m,p=e[Symbol.iterator]();!(u=(m=p.next()).done);u=!0){var f=m.value;s.push(f.id),n[f.id]=f,0==f.level&&r.push(f.id),l[f.id]=[],f.parent_id!==f.id&&l[f.parent_id].push(f.id)}}catch(e){c=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw d}}var h=!0,_=!1,v=void 0;try{for(var y,g=r[Symbol.iterator]();!(h=(y=g.next()).done);h=!0){var b=y.value;n[b].children=t(b),a.push(n[b])}}catch(e){_=!0,v=e}finally{try{!h&&g.return&&g.return()}finally{if(_)throw v}}if(s.length)if(this.state.cids.length){var k=!0,w=!1,E=void 0;try{for(var N,x=s[Symbol.iterator]();!(k=(N=x.next()).done);k=!0){var j=N.value;-1==this.state.cids.indexOf(j)&&o.push(j),i.push(j)}}catch(e){w=!0,E=e}finally{try{!k&&x.return&&x.return()}finally{if(w)throw E}}}else i=s,o=[];this.setState({tree:a,cids:i,newcids:o,counter:i.length})}},{key:"load_comments",value:function(){u.default.ajax({url:this.props.list_url,dataType:"json",cache:!1,success:function(e){this.create_tree(e)}.bind(this),error:function(e,t,a){console.error(this.props.list_url,t,a.toString())}.bind(this)})}},{key:"load_count",value:function(){u.default.ajax({url:this.props.count_url,dataType:"json",cache:!1,success:function(e){this.setState({counter:e.count})}.bind(this),error:function(e,t,a){console.error(this.props.count_url,t,a.toString())}.bind(this)})}},{key:"componentDidMount",value:function(){this.load_comments(),this.props.polling_interval&&setInterval(this.load_count.bind(this),this.props.polling_interval)}},{key:"render",value:function(){var e=this.props,t=this.render_comment_counter(),a=this.render_update_alert(),r=this.render_comment_form(),n=this.state.tree.map(function(t){return d.default.createElement(v.Comment,{key:t.id,data:t,settings:e,newcids:this.state.newcids,on_comment_created:this.handle_comment_created})}.bind(this));return d.default.createElement("div",null,t,r,d.default.createElement("hr",null),a,d.default.createElement("div",{className:"comment-tree"},d.default.createElement("div",{className:"media-list"},n)))}}]),t}(d.default.Component)},95:function(e,t,a){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(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 s(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.Comment=void 0;var i=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),o=a(33),u=r(o),c=a(55),d=r(c),m=a(14),p=r(m),f=a(13),h=(r(f),a(34)),_=r(h),v=a(57);t.Comment=function(e){function t(e){n(this,t);var a=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.state={current_user:e.settings.current_user,removal:e.data.flags.removal.active,removal_count:e.data.flags.removal.count,like:e.data.flags.like.active,like_users:e.data.flags.like.users||[],dislike:e.data.flags.dislike.active,dislike_users:e.data.flags.dislike.users||[],reply_form:{component:null,show:!1}},a.action_like=a.action_like.bind(a),a.action_dislike=a.action_dislike.bind(a),a.handle_reply_click=a.handle_reply_click.bind(a),a}return s(t,e),i(t,[{key:"_get_username_chunk",value:function(){var e=this.props.data.user_name,t="";if(this.props.data.user_url&&!this.props.data.is_removed&&(e=p.default.createElement("a",{href:this.props.data.user_url},e)),this.props.data.user_moderator){var a=d.default.gettext("moderator");t=p.default.createElement("span",null," ",p.default.createElement("span",{className:"label label-default"},a))}return p.default.createElement("span",null,e,t)}},{key:"_get_right_div_chunk",value:function(){var e="",t="",a="";if(this.props.data.is_removed)return"";if(this.props.settings.allow_flagging){var r="";this.state.removal?(r=d.default.gettext("I flagged it as inappropriate"),e=p.default.createElement("span",{className:"glyphicon glyphicon-flag text-danger",title:r})):(a=this.props.settings.is_authenticated?this.props.settings.flag_url.replace("0",this.props.data.id):this.props.settings.login_url+"?next="+this.props.settings.flag_url.replace("0",this.props.data.id),r=d.default.gettext("flag comment as inappropriate"),e=p.default.createElement("a",{className:"mutedlink",href:a},p.default.createElement("span",{className:"glyphicon glyphicon-flag",title:r})))}if(this.props.settings.is_authenticated&&this.props.settings.can_moderate){var n=d.default.gettext("remove comment");if(a=this.props.settings.delete_url.replace("0",this.props.data.id),t=p.default.createElement("a",{className:"mutedlink",href:a},p.default.createElement("span",{className:"glyphicon glyphicon-trash",title:n})),this.state.removal_count>0){var l=d.default.ngettext("A user has flagged this comment as inappropriate.","%s users have flagged this comment as inappropriate.",this.state.removal_count),s=d.default.interpolate(l,[this.state.removal_count]);t=p.default.createElement("span",null,t," ",p.default.createElement("span",{className:"label label-warning",title:s},this.state.removal_count))}}return p.default.createElement("p",{className:"pull-right"},e," ",t)}},{key:"_get_feedback_chunk",value:function(e){if(!this.props.settings.allow_feedback)return"";var t=e+"_users",a="";if(this.props.settings.show_feedback){var r=this.state.current_user.split(":")[0],n=this.state[t].map(function(e){return e.split(":")[0]});if(this.state[e]&&-1==n.indexOf(r))this.state[t].push(this.state.current_user);else if(!this.state[e]&&n.indexOf(r)>-1){var l=n.indexOf(r);this.state[t].splice(l,1)}if(this.state[t].length){var s=this.state[t].map(function(e){return e.split(":")[1]});s=s.join("<br/>"),a=p.default.createElement("a",{className:"cfb-counter","data-toggle":"tooltip",title:s},p.default.createElement("span",{className:"small"},this.state[t].length))}}var i=this.state[e]?"":"mutedlink",o="like"==e?"thumbs-up":"thumbs-down",u="small glyphicon glyphicon-"+o,c="like"==e?this.action_like:this.action_dislike,m="";return m="like"==e?d.default.gettext("I like it"):d.default.gettext("I dislike it"),p.default.createElement("span",null,a,"  ",p.default.createElement("a",{href:"#",onClick:c,className:i},p.default.createElement("span",{className:u,title:m})))}},{key:"render_feedback_btns",value:function(){if(this.props.settings.allow_feedback){var e="feedback-"+this.props.data.id;this.props.settings.show_feedback&&this.destroyTooltips(e);var t=this._get_feedback_chunk("like"),a=this._get_feedback_chunk("dislike");return p.default.createElement("span",{id:e,className:"small"},t,p.default.createElement("span",{className:"text-muted"}," | "),a)}return""}},{key:"handle_reply_click",value:function(e){e.preventDefault();var t=this.state.reply_form.component,a=!this.state.reply_form.show;null==t&&(t=p.default.createElement(v.CommentForm,{form:this.props.settings.form,reply_to:this.props.data.id,send_url:this.props.settings.send_url,current_user:this.props.settings.current_user,is_authenticated:this.props.settings.is_authenticated,on_comment_created:this.props.on_comment_created})),this.setState({reply_form:{component:t,show:a}})}},{key:"_get_reply_link_chunk",value:function(){if(!this.props.data.allow_reply)return"";var e="";this.props.settings.allow_feedback&&(e=p.default.createElement("span",{className:"text-muted"},"•"));var t=this.props.settings.reply_url.replace("0",this.props.data.id),a=d.default.gettext("Reply");return p.default.createElement("span",null,"  ",e,"  ",p.default.createElement("a",{className:"small mutedlink",href:t,onClick:this.handle_reply_click},a))}},{key:"rawMarkup",value:function(){return{__html:(new _.default).render(this.props.data.comment)}}},{key:"render_comment_body",value:function(){return this.props.data.is_removed?p.default.createElement("p",{className:"text-muted"},p.default.createElement("em",null,this.props.data.comment)):p.default.createElement("div",{className:"content",dangerouslySetInnerHTML:this.rawMarkup()})}},{key:"render_reply_form",value:function(){return this.state.reply_form.show?p.default.createElement("div",null,this.state.reply_form.component):""}},{key:"_post_feedback",value:function(e){u.default.ajax({method:"POST",url:this.props.settings.feedback_url,data:{comment:this.props.data.id,flag:e},dataType:"json",cache:!1,statusCode:{201:function(){"like"==e?this.setState({like:!0,dislike:!1}):"dislike"==e&&this.setState({dislike:!0,like:!1})}.bind(this),204:function(){"like"==e?this.setState({like:!1}):"dislike"==e&&this.setState({dislike:!1})}.bind(this)},error:function(e,t,a){400==e.status&&e.responseJSON.non_field_errors.length?alert(e.responseJSON.non_field_errors[0]):console.error(this.props.settings.feedback_url,t,a.toString())}.bind(this)})}},{key:"action_like",value:function(e){return e.preventDefault(),this.props.settings.is_authenticated?this._post_feedback("like"):window.location.href=this.props.settings.login_url+"?next="+this.props.settings.like_url.replace("0",this.props.data.id)}},{key:"action_dislike",value:function(e){return e.preventDefault(),this.props.settings.is_authenticated?this._post_feedback("dislike"):window.location.href=this.props.settings.login_url+"?next="+this.props.settings.dislike_url.replace("0",this.props.id)}},{key:"is_hover",value:function(e){return e.parentElement.querySelector(":hover")===e}},{key:"destroyTooltips",value:function(e){var t=document.getElementById(e),a=t&&this.is_hover(t);t&&!a&&(0,u.default)("#"+e+' A[data-toggle="tooltip"]').tooltip("destroy")}},{key:"componentDidMount",value:function(){var e="feedback-"+this.props.data.id,t={html:!0,selector:".cfb-counter"};(0,u.default)("#"+e).tooltip(t)}},{key:"componentDidUpdate",value:function(){var e="feedback-"+this.props.data.id,t={html:!0,selector:".cfb-counter"};(0,u.default)("#"+e).tooltip(t)}},{key:"componentWillUnmount",value:function(){var e="feedback-"+this.props.data.id,t=document.getElementById(e),a=t&&this.is_hover(t);t&&!a&&(0,u.default)("#"+e+' A[data-toggle="tooltip"]').tooltip("destroy")}},{key:"render",value:function(){var e=this._get_username_chunk(),a=this._get_right_div_chunk(),r=this.render_comment_body(),n=this.render_feedback_btns(),l=this._get_reply_link_chunk(),s="c"+this.props.data.id,i=this.render_reply_form(),o="";this.props.newcids.indexOf(this.props.data.id)>-1&&(o=p.default.createElement("span",null,p.default.createElement("span",{className:"label label-success"},"new")," - "));var u="",c=this.props.settings;return null!=this.props.data.children&&(u=this.props.data.children.map(function(e){return p.default.createElement(t,{key:e.id,data:e,settings:c,newcids:this.props.newcids,on_comment_created:this.props.on_comment_created})}.bind(this))),p.default.createElement("div",{className:"media",id:s},p.default.createElement("div",{className:"media-left"},p.default.createElement("img",{src:this.props.data.user_avatar,height:"48",width:"48"})),p.default.createElement("div",{className:"media-body"},p.default.createElement("div",{className:"comment"},p.default.createElement("h6",{className:"media-heading"},o,this.props.data.submit_date," - ",e,"  ",p.default.createElement("a",{className:"permalink",href:this.props.data.permalink},"¶"),a),p.default.createElement("a",{name:s}),r,n,l,i),u))}}]),t}(p.default.Component)},96:function(e,t,a){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var n=a(14),l=r(n),s=a(13),i=r(s),o=a(93);i.default.render(l.default.createElement(o.CommentBox,Object.assign(window.comments_props,window.comments_props_override)),document.getElementById("comments"))}},[96]);