!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};e[o].call(r.exports,r,r.exports,n);r.l=!0;return r.exports}n.m=e;n.c=t;n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})};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){1&t&&(e=n(e));if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);n.r(o);Object.defineProperty(o,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o};n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="//static.hsappstatic.net/AsyncSupport/static-1.122/";n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o=n(1),r=n(2),i=n(3);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var s=function(){return Array.prototype.slice.call(document.querySelectorAll(".comment-reply-to"))},a=function(){function e(){Object(o.a)(this,e);this.oneQuarterOfASecondMS=250;this.successRegexp=/[?|&]success=true/;this.replyingTo="";this.disableContactPromotion=!1;this.onFormReady=this.onFormReady.bind(this);this.onFormSubmitted=this.onFormSubmitted.bind(this);this.handleSuccess=this.handleSuccess.bind(this);this.handlePostResponse=this.handlePostResponse.bind(this);this.scrollToComment=this.scrollToComment.bind(this);this.renderComment=this.renderComment.bind(this);this.hsPopulateCommentsFeed=this.hsPopulateCommentsFeed.bind(this);this.getExtraMetaDataBeforeSubmit=this.getExtraMetaDataBeforeSubmit.bind(this);this.setUpThreading=this.setUpThreading.bind(this)}Object(r.a)(e,[{key:"scrollToTarget",value:function(e){var t=this;setTimeout((function(){var n=document.documentElement||document.body,o=document.querySelector(e);if(o){n.style.transition="all "+t.oneQuarterOfASecondMS;n.scrollTop=o.offsetTop}}),0)}},{key:"getExtraMetaDataBeforeSubmit",value:function(){return{disableContactPromotion:this.disableContactPromotion,replyingTo:this.replyingTo}}},{key:"onFormSubmitted",value:function(){var e="success=true";window.location.search?this.successRegexp.exec(window.location.search)?window.location.reload():window.location.search+="&"+e:window.location.search=e}},{key:"handleSuccess",value:function(e,t){var n=this,o=document.querySelector(e);if(!(o&&o.querySelector("form").length>0))return setTimeout((function(){return n.handleSuccess(e,t)}),this.oneQuarterOfASecondMS);o.insertAdjacentHTML("afterbegin",'<div class="hs-comment-message hs-common-confirm-message">'+t+"</div>");return this.scrollToTarget(e)}},{key:"handlePostResponse",value:function(e){var t=e.successMessage,n=e.target;this.successRegexp.exec(window.location.search)&&this.handleSuccess(n,t)}},{key:"onFormReady",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.successMessage,n=e.target;return this.handlePostResponse({successMessage:t,target:n})}},{key:"isThreadId",value:function(e){for(var t=e.split("."),n=0;n<t.length;n++){var o=t[n];if(4!==o.length||parseInt(o,10)<0||parseInt(o,10)>9999)return!1}return!0}},{key:"scrollToComment",value:function(e){var t=location.hash.replace("#","");if(t&&this.isThreadId(t)){var n=e+" [id='c"+t+"']";document.querySelector(n).length>0&&this.scrollToTarget(n)}}},{key:"getDepth",value:function(e){for(var t=e.split("."),n=-1,o=0;o<t.length;o++){if("0000"===t[o])return n;n++}return n}},{key:"setUpThreading",value:function(e){var t=this,n=function(e){t.replyingTo=e};s().forEach((function(t){t.addEventListener("click",(function(){var t=this.closest(".comment");if(t){n(t.dataset.threadid);var o=document.querySelector(e);if(o){s().forEach((function(e){e.style.display="block"}));var r=o.querySelector("input[name=replyingTo]");r&&(r.style.display="none");o.style.display="none";o.classList.add("replying");var i="Replying to "+this.querySelector("em").innerHTML,a=o.querySelector(".replying-to");a?a.innerText=i:o.insertAdjacentHTML("afterbegin",'<span class="replying-to">'+i+"</span>");t.parentNode&&t.parentNode.insertBefore(o,t.nextSibling);o.style.display="block";this.style.display="none";this.scrollToTarget(e);o.querySelector(".hs_comment .hs-input").focus()}}}))}))}},{key:"highlightCode",value:function(e){var t=window.hljs;if(t&&t.highlightBlock){t.configure&&t.configure({useBR:!0});var n=document.querySelector(e);Array.prototype.slice.call(n.querySelectorAll("pre code")).forEach((function(e){return t.highlightBlock(e)}))}}},{key:"renderComment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.commentText,o=e.created,r=e.threadInfo,i=e.user,s=e.userUri,a=t.maxThreadDepth,c=t.showForm,l=this.getDepth(r),u=l<a&&c,d=n.replace(/\n/g,"<br/>"),m=new Date(o).toLocaleString(),h='\n      <div id="c'+r+'" class="comment depth-'+l+'" data-threadid="'+r+'">\n      <div class="comment-from">\n      <h4>\n      ';if(s){h+='<a href="'+(0!==s.indexOf("http")?"http://"+s:s)+'" rel="nofollow noopener" target="_blank">'+i+"</a>"}else h+=i;h+='\n      </h4>\n      </div>\n      <div class="comment-date">'+m+'</div>\n      <div class="comment-body"><p>'+d+"</p></div>\n      ";u&&(h+='<button class="comment-reply-to hs-button secondary">Reply to <em>'+i+"</em></button>");return h+="</div>"}},{key:"hsPopulateCommentsFeed",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.a.jsonp(t.commentsUrl,(function(n){e.disableContactPromotion=t.disableContactPromotion;var o=t.commentsSelector||"#comments-listing",r=document.querySelector(o);if(r){for(;r.firstChild;)r.removeChild(r.firstChild);n.objects.length>0&&r.setAttribute("data-has-comments",!0);var i=n.objects.map((function(n){return e.renderComment(n,t)})).join("");r.insertAdjacentHTML("beforeend",i);e.setUpThreading("#"+t.target);e.highlightCode(o);e.scrollToComment(o);"function"==typeof hsPostCommentsComplete&&window.hsPostCommentsComplete(r)}}))}}]);return e}();window.hsCommentListing=new a;window.hsPopulateCommentsFeed=window.hsCommentListing.hsPopulateCommentsFeed;window.hsPopulateCommentFormOnFormReady=window.hsCommentListing.onFormReady;window.hsPopulateCommentFormOnFormSubmitted=window.hsCommentListing.onFormSubmitted;window.hsPopulateCommentFormGetExtraMetaDataBeforeSubmit=window.hsCommentListing.getExtraMetaDataBeforeSubmit},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(e,o.key,o)}}function r(e,t,n){t&&o(e.prototype,t);n&&o(e,n);return e}},function(e,t,n){"use strict";var o=n(1),r=n(2),i=function(){function e(){Object(o.a)(this,e)}Object(r.a)(e,[{key:"generateCallbackFunction",value:function(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}},{key:"httpRequest",value:function(){return new XMLHttpRequest}},{key:"jsonp",value:function(e,t){var n=this.generateCallbackFunction();window[n]=function(e){t(e)};var o=e+(-1!==e.indexOf("?")?"&":"?")+"callback="+n,r=document.createElement("script");r.type="text/javascript";r.async=!0;r.src=o;document.getElementsByTagName("head")[0].appendChild(r)}},{key:"send",value:function(e,t,n){var o=this.httpRequest();o.open(n,e);o.onreadystatechange=function(){if(4===o.readyState&&200===o.status)try{var e=JSON.parse(o.responseText);t(e)}catch(e){console.log(e.message+" in "+o.responseText);return}};o.send()}},{key:"get",value:function(e,t){this.send(e,t,"GET")}}]);return e}();t.a=new i}]);