(function () { 'use strict'; var _config = window.disqus_config; window.disqus_config = function () { if (_config) _config.call(this); this.server_side = { bin: 'embed:promoted_discovery:dynamic:network_default:fallthrough', service: 'dynamic', experiment: 'network_default', variant: 'fallthrough', top_placement_url: '', bottom_placement_url: '' }; }; })(); !function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I={},J={},K={},L={},M={},N={},O={},P={};c=H=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},d=function(){return function(a,b){var c=a.length,d=Array.prototype.forEach;if(isNaN(c))for(var e in a)H(a,e)&&b(a[e],e,a);else if(d)d.call(a,b);else for(var f=0;c>f;f++)b(a[f],f,a)}}(),e=function(){var a=0;return function(b){var c=String(++a);return b?b+c:c}}(),f=function(){var a=d,b=c,f=e,g=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},h=Object.keys||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)b(a,d)&&(c[c.length]=d);return c},i=[].slice,j={on:function(a,b,c){if(!l(this,"on",a,[b,c])||!b)return this;this._events=this._events||{};var d=this._events[a]||(this._events[a]=[]);return d.push({callback:b,context:c,ctx:c||this}),this},once:function(a,b,c){if(!l(this,"once",a,[b,c])||!b)return this;var d=this,e=g(function(){d.off(a,e),b.apply(this,arguments)});return e._callback=b,this.on(a,e,c)},off:function(a,b,c){var d,e,f,g,i,j,k,m;if(!this._events||!l(this,"off",a,[b,c]))return this;if(!a&&!b&&!c)return this._events={},this;for(g=a?[a]:h(this._events),i=0,j=g.length;j>i;i++)if(a=g[i],f=this._events[a]){if(this._events[a]=d=[],b||c)for(k=0,m=f.length;m>k;k++)e=f[k],(c&&c!==e.context||b&&b!==e.callback&&b!==e.callback._callback)&&d.push(e);d.length||delete this._events[a]}return this},trigger:function(a){if(!this._events)return this;var b=i.call(arguments,1);if(!l(this,"trigger",a,b))return this;var c=this._events[a],d=this._events.all;return c&&m(c,b),d&&m(d,arguments),this},stopListening:function(a,b,c){var d=this._listeners;if(!d)return this;var e=!b&&!c;"object"==typeof b&&(c=this),a&&((d={})[a._listenerId]=a);for(var f in d)d[f].off(b,c,this),e&&delete this._listeners[f];return this}},k=/\s+/,l=function(a,b,c,d){if(!c)return!0;if("object"==typeof c){for(var e in c)a[b].apply(a,[e,c[e]].concat(d));return!1}if(k.test(c)){for(var f=c.split(k),g=0,h=f.length;h>g;g++)a[b].apply(a,[f[g]].concat(d));return!1}return!0},m=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++d=l?(a.clearTimeout(g),g=null,i=k,h=b.apply(e,f)):g||(g=a.setTimeout(j,l+d)),h}},I=function(b){function m(a){return t.getElementById(a)||t.body||t.documentElement}var n=f,o=d,p=g,q=c,r=h,s=e,t=a.document,u={},v=t.createElement("a");b.getOffset=function(a,b){b=b||t.documentElement;for(var c=a,d=0,e=0;c&&c!==b;)d+=c.offsetLeft,e+=c.offsetTop,c=c.offsetParent;return{top:e,left:d,height:a.offsetHeight,width:a.offsetWidth}},b.getHost=function(a){return v.href=a,v.hostname},b.addEvent=i,b.removeEvent=j,b.throttle=k,b.addEvent(a,"message",function(a){var c,d=l;try{c=d.parse(a.data)}catch(e){return}var f=c.sender,g=q(u,f)&&u[f];g&&b.getHost(a.origin)===g.host&&(a.origin!==g.origin&&(g.origin=a.origin),"host"===c.scope&&g.trigger(c.name,c.data))},!1),b.addEvent(a,"hashchange",function(){b.trigger("window.hashchange",{hash:a.location.hash})},!1),b.addEvent(a,"resize",b.throttle(function(){b.trigger("window.resize")},250,50),!1),b.addEvent(t,"mousemove",b.throttle(function(){b.trigger("window.mousemove")},250,50),!1);var w=function(){b.trigger("window.scroll")};b.addEvent(a,"scroll",b.throttle(w,250,50)),b.addEvent(t,"click",function(){b.trigger("window.click")});var x=b.WindowBase=function(a){a=a||{},this.state=x.INIT,this.uid=a.uid||s("dsq-frame"),this.origin=a.origin,this.host=b.getHost(this.origin),this.target=a.target,this.window=null,u[this.uid]=this,this.on("ready",function(){this.state=x.READY},this),this.on("die",function(){this.state=x.KILLED},this)};r(x,{INIT:0,READY:1,KILLED:2,postMessage:function(a,b,c){return a.postMessage(b,c)}}),r(x.prototype,n),x.prototype.requiresWindow=function(b){var c=this;return function(){var d=Array.prototype.slice.call(arguments),e=function(){var f=c.window;f?b.apply(c,d):a.setTimeout(e,500)};c.isReady()?e():c.on("ready",e)}},x.prototype.sendMessage=function(a,b){var c=l,d=c.stringify({scope:"client",name:a,data:b});this.requiresWindow(function(a){x.postMessage(this.window,a,this.origin)})(d)},x.prototype.hide=function(){},x.prototype.show=function(){},x.prototype.url=function(){return this.target},x.prototype.destroy=function(){this.state=x.KILLED,this.off()},x.prototype.isReady=function(){return this.state===x.READY},x.prototype.isKilled=function(){return this.state===x.KILLED};var y=b.Popup=function(a){a.uid=a.windowName,x.call(this,a)};r(y.prototype,x.prototype),y.prototype.load=function(){var b=this.window=a.open("",this.uid||"_blank");b.location=this.url()},y.prototype.isKilled=function(){return x.prototype.isKilled()||this.window.closed};var z=b.Iframe=function(a){x.call(this,a),this.styles=a.styles||{},this.tabIndex=a.tabIndex||0,this.title=a.title||"Disqus",this.container=a.container,this.elem=null};r(z.prototype,x.prototype),z.prototype.load=function(){var a=this.elem=t.createElement("iframe");a.setAttribute("id",this.uid),a.setAttribute("name",this.uid),a.setAttribute("allowTransparency","true"),a.setAttribute("frameBorder","0"),a.setAttribute("scrolling","no"),this.role&&a.setAttribute("role",this.role),a.setAttribute("tabindex",this.tabIndex),a.setAttribute("title",this.title),this.setInlineStyle(this.styles)},z.prototype.getOffset=function(a){return b.getOffset(this.elem,a)},z.prototype.setInlineStyle=function(a,b){var c={};p(a)?c[a]=b:c=a;var d=this.elem.style;return"setProperty"in d?void o(c,function(a,b){d.setProperty(b,String(a),"important")}):this._setInlineStyleCompat(c)},z.prototype._setInlineStyleCompat=function(a){this._stylesCache=this._stylesCache||{},r(this._stylesCache,a);var b=[];o(this._stylesCache,function(a,c){b.push(c+":"+a+" !important")}),this.elem.style.cssText=b.join(";")},z.prototype.removeInlineStyle=function(a){var b=this.elem.style;return"removeProperty"in b?void b.removeProperty(a):this._removeInlineStyleCompat(a)},z.prototype._removeInlineStyleCompat=function(a){this._stylesCache&&(delete this._stylesCache[a],this._setInlineStyleCompat({}))},z.prototype.hide=function(){this.setInlineStyle("display","none")},z.prototype.show=function(){this.removeInlineStyle("display")},z.prototype.destroy=function(){return this.elem&&this.elem.parentNode&&(this.elem.parentNode.removeChild(this.elem),this.elem=null),x.prototype.destroy.call(this)};var A=b.Channel=function(a){var b=this;b.window=null,z.call(b,a),this.insertBeforeEl=a.insertBeforeEl,this.insertAfterEl=a.insertAfterEl,b.styles=r({width:"100%",border:"none",overflow:"hidden",height:"0"},a.styles||{})};r(A.prototype,z.prototype),A.prototype.load=function(a){var c=this;z.prototype.load.call(c);var d=c.elem;d.setAttribute("width","100%"),d.setAttribute("src",this.url()),b.addEvent(d,"load",function(){c.window=d.contentWindow,a&&a()});var e=p(c.container)?m(c.container):c.container,f=(c.insertAfterEl?c.insertAfterEl.nextSibling:c.insertBeforeEl)||null;e.insertBefore(d,f)},A.prototype.destroy=function(){return this.window=null,z.prototype.destroy.call(this)};var B=b.Sandbox=function(a){z.call(this,a),this.contents=a.contents||"",this.styles=r({width:"100%",border:"none",overflow:"hidden"},a.styles||{})};return r(B.prototype,z.prototype),B.prototype.load=function(){z.prototype.load.call(this);var a=this.elem,b=p(this.container)?m(this.container):this.container;b.appendChild(a),this.window=a.contentWindow;try{this.window.document.open()}catch(c){a.src='javascript:var d=document.open();d.domain="'+t.domain+'";void(0);'}return this.document=this.window.document,this.document.write(this.contents),this.document.close(),this.updateHeight(),this},B.prototype.updateHeight=function(){var a,b=this.document.body;b&&(a=b.offsetHeight+"px",this.setInlineStyle({height:a,"min-height":a,"max-height":a}))},B.prototype.show=function(){this.setInlineStyle("display","block")},B.prototype.click=function(a){var c=this,d=c.document.body;b.addEvent(d,"click",function(b){a.call(c,b)})},B.prototype.setBodyClass=function(a){this.document.body.className=a},b.on=n.on,b.off=n.off,b.trigger=n.trigger,b}(I),l=function(){var b,c=I;if("[object JSON]"===a.Object.prototype.toString.call(a.JSON))b=a.JSON;else{var d=new c.Sandbox({container:"disqus_thread",styles:{display:"none"}});try{b=d.load().window.JSON}catch(e){}b||(b=a.JSON)}return b?{stringify:b.stringify,parse:b.parse}:{}}(),J=function(a){var c=d;return a=function(a){var d=[];return c(a,function(a,c){a!==b&&d.push(c+(null===a?"":"="+encodeURIComponent(a)))}),d.join("&")}}(J),K=function(a){var b=J;return a=function c(a,d,e){if(d&&(-1===a.indexOf("?")?a+="?":"&"!==a.charAt(a.length-1)&&(a+="&"),a+=b(d)),e){var f={};return f[(new Date).getTime()]=null,c(a,f)}var g=a.length;return"&"===a.charAt(g-1)?a.slice(0,g-1):a}}(K),L=function(a){var b=K,c=document.head||document.getElementsByTagName("head")[0]||document.body;return a=function(a,d,e){var f=document.createElement("script");f.src=b(a,d,e),f.async=!0,f.charset="UTF-8",c.appendChild(f)}}(L),m=function(){function c(a){a=a.toLowerCase(),a=a.replace(/\s/,"");var b={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};return b[a]||""}function d(a){if(!a||"embed.js"!==a.substring(a.length-8))return null;for(var b,c=[/(https?:)?\/\/(www\.)?disqus\.com\/forums\/([\w_\-]+)/i,/(https?:)?\/\/(www\.)?([\w_\-]+)\.disqus\.com/i,/(https?:)?\/\/(www\.)?dev\.disqus\.org\/forums\/([\w_\-]+)/i,/(https?:)?\/\/(www\.)?([\w_\-]+)\.dev\.disqus\.org/i],d=c.length,e=0;d>e;e++)if(b=a.match(c[e]),b&&b.length&&4===b.length)return b[3];return null}function e(a,b){var c,e,f,g=a.getElementsByTagName("script"),h=g.length;b=b||d;for(var i=h-1;i>=0;i--)if(c=g[i],e=c.getAttribute?c.getAttribute("src"):c.src,f=b(e),null!==f)return f.toLowerCase();return null}function f(a,b){var c,d,e=0,f=new Array(a.length);for(c=0;c<=a.length;c++)for(f[c]=new Array(b.length),d=0;d<=b.length;d++)f[c][d]=0;for(c=0;ce&&(e=f[c+1][d+1]));return e}function h(){for(var a=y.getElementsByTagName("h1"),c=y.title,d=c.length,e=c,g=.6,h=function(a){var h,i=a.textContent||a.innerText;null!==i&&i!==b&&(h=f(c,i)/d,h>g&&(g=h,e=i))},i=0;i2?b[b.length-2]:"";return c.match(/^[0-9a-f]{32}$/i)&&c},C={isIE:function(){return Boolean(y.documentMode)},isSafari:function(){var b=a.navigator.userAgent.toLowerCase();return b.indexOf("safari")>-1&&-1===b.indexOf("chrome")}},D={getItem:function(b){try{return a.localStorage.getItem(b)}catch(c){}},setItem:function(b,c){try{return a.localStorage.setItem(b,c)}catch(d){}}},E=function(){var a=!0;return a||"https:"===y.location.protocol},F=1,G=function(a){if(a.nodeType===F){var b=t(a,"max-height","maxHeight"),c=t(a,"overflow-y","overflowY");return b&&"none"!==b&&c&&"visible"!==c}},H=4,J=function(a){return a.nodeType===F?a.scrollHeight-a.clientHeight>H:void 0},L=function(){if(y.querySelector){var a=y.querySelector("link[rel=canonical]");if(a)return a.href}};return{MAX_Z_INDEX:2147483647,getShortnameFromUrl:d,getForum:e,guessThreadTitle:h,getContrastYIQ:j,ensureHexColor:k,getElementStyle:m,getAnchorColor:n,normalizeFontValue:o,isSerif:p,getBrowserSupport:q,logStat:r,reportJester:s,getComputedStyle:t,pageVisibility:z,getScrollbarWidth:A,getLoaderVersionFromUrl:B,browser:C,storage:D,defaultProtocol:E()?"https:":"http:",appearsToHideContent:G,hasOverflow:J,getCanonicalUrl:L}}(),n=function(){var a=d,c=m,e=function(a,c){this.win=a,this.configurator=c,this.config={page:{url:b,title:b,slug:b,category_id:b,identifier:b,language:b,api_key:b,remote_auth_s3:b,author_s3:b},experiment:{enable_scroll_container:!0,force_auto_styles:b,sort_order:b},server_side:{service:"static",experiment:"default",variant:"control",top_placement_url:b,bottom_placement_url:b},discovery:{disable_all:b,disable_promoted:b,sponsored_comment_id:b,preview:!1,adsFixture:b,pdFixture:b},strings:b,sso:{},callbacks:{preData:[],preInit:[],onInit:[],afterRender:[],onReady:[],onNewComment:[],preReset:[],onPaginate:[],onIdentify:[],beforeComment:[]}}};e.DISQUS_GLOBALS=["shortname","identifier","url","title","category_id","slug"];var f=e.prototype;return f.getContainer=function(){var a=this.win;return a.document.getElementById(a.disqus_container_id||"disqus_thread")},f.runConfigurator=function(){var a=this.configurator||this.win.disqus_config;if("function"==typeof a)try{a.call(this.config)}catch(b){}},f.getValuesFromGlobals=function(){var b,d=this.win,f=this.config,g=f.page;a(e.DISQUS_GLOBALS,function(a){var b=d["disqus_"+a];"undefined"!=typeof b&&(g[a]=b)}),this.runConfigurator(),f.forum||(b=g.shortname,f.forum=b?b.toLowerCase():c.getForum(d.document))},f.toJSON=function(){var a=this.win,b=this.config,d=b.page,e=this.getContainer();return this.getValuesFromGlobals(),{container:e,forum:b.forum,sortOrder:b.experiment.sort_order||c.storage.getItem("disqus.sort")||"default",language:b.language,typeface:c.isSerif(e)?"serif":"sans-serif",anchorColor:c.getAnchorColor(e),colorScheme:c.getContrastYIQ(c.getElementStyle(e,"span","background-color","backgroundColor"))<128?"dark":"light",canonicalUrl:c.getCanonicalUrl(),url:d.url||a.location.href.replace(/#.*$/,""),title:d.title,documentTitle:c.guessThreadTitle(),slug:d.slug,category:d.category_id,identifier:d.identifier,discovery:b.discovery,experimentName:b.server_side.experiment,experimentVariant:b.server_side.variant,experimentService:b.server_side.service,topPlacementUrl:b.server_side.top_placement_url,bottomPlacementUrl:b.server_side.bottom_placement_url,apiKey:d.api_key,remoteAuthS3:d.remote_auth_s3,sso:b.sso,unsupported:c.getBrowserSupport(a),callbacks:b.callbacks,enableScrollContainer:b.experiment.enable_scroll_container,forceAutoStyles:b.experiment.force_auto_styles}},{HostConfig:e}}(),o=function(){var b;return b=a.console?"function"==typeof a.console.log?function(){return a.console.log(Array.prototype.slice.call(arguments,0).join(" "))}:function(){return a.console.log.apply(a.console,arguments)}:function(){},{log:b}}(),p=function(a){return Boolean(a&&(a.offsetWidth||a.offsetHeight||a.getClientRects().length))},q=function(a){try{return a.self!==a.top}catch(b){return!0}},r=function(b,c,d){var e=function(){var f=b();return f?void c(f):void a.setTimeout(e,d)};e()},s=function(b,c,d){var e,f,g,h,i,j=function(){var k=(new Date).getTime()-h;c>k&&k>=0?e=a.setTimeout(j,c-k):(e=null,d||(i=b.apply(g,f),e||(g=f=null)))};return function(){g=this,f=arguments,h=(new Date).getTime();var k=d&&!e;return e||(e=a.setTimeout(j,c)),k&&(i=b.apply(g,f),g=f=null),i}},t=function(){var a=h,b=K,c="default",d={lounge:"http://disqus.com/embed/comments/",home:"https://disqus.com/home/".replace("home/","")},e=function(a,b){return/^http/.test(b)||(b="http:"),b+"//"+a.replace(/^\s*(\w+:)?\/\//,"")},f=function(f,g,h){var i=d[f];if(!i)throw new Error("Unknown app: "+f);var j=e(i,document.location.protocol),k=a({base:c},g||{}),l=h?"#"+encodeURIComponent(JSON.stringify(h)):"";return b(j,k)+l};return{BASE:c,apps:d,get:f,ensureHttpBasedProtocol:e}}(),u=function(){var b=f,d=s,g=p,i=h,j=c,k=e,l=t,n=I,o=m,q=document,r=q.documentElement,u="https:",v=function(a){this.uid=k("dsq-app"),this.settings=a||{};var b=[],c=this.constructor.prototype;do b.unshift(c),c=c.constructor.__super__;while(c);for(var d=0,e=b.length;e>d;d++)c=b[d],j(c,"events")&&this.on(c.events,this),j(c,"onceEvents")&&this.once(c.onceEvents,this)};i(v.prototype,b),v.prototype.destroy=function(){this.off(),this.stopListening()},v.extend=function(a,b){var c,d=this;c=a&&j(a,"constructor")?a.constructor:function(){return d.apply(this,arguments)},i(c,d,b);var e=function(){this.constructor=c};return e.prototype=d.prototype,c.prototype=new e,a&&i(c.prototype,a),c.__super__=d.prototype,c};var w=v.extend({name:null,loaderVersion:null,frame:null,origin:l.ensureHttpBasedProtocol("http://disqus.com",u),state:null,getUrl:function(a,b){return a=this.loaderVersion?i({version:this.loaderVersion},a):i({disqus_version:"0dfa17b1"},a),l.ensureHttpBasedProtocol(l.get(this.name,a,b),u)},getFrameSettings:function(){var a={target:this.getUrl(),origin:this.origin,uid:this.uid},b=this.settings;return b.windowName?a.windowName=b.windowName:a.container=b.container||q.body,a},getFrame:function(){var a=this.getFrameSettings(),b=a.windowName?n.Popup:n.Channel;return new b(a)},setState:function(a){var b=this.constructor;return a in b.states?(this.state=b.states[a],void this.trigger("state:"+a)):!1},init:function(){var a,b=this;b.frame=a=this.getFrame(),b.listenTo(a,"all",function(c,d){b.trigger("frame:"+c,d,a)}),b.trigger("change:frame",a),b.frame.load(function(){b.setState("LOADED")}),b.setState("INIT")},destroy:function(){var a=this.frame;a&&(this.stopListening(a),a.destroy()),this.setState("KILLED"),this.frame=null,v.prototype.destroy.call(this)},events:{"frame:ready":function(){this.setState("READY")}},isHeightRestricted:function(a){function b(){return o.appearsToHideContent(d)||f&&o.appearsToHideContent(e)}function c(){return o.appearsToHideContent(d)&&o.hasOverflow(d)||f&&o.appearsToHideContent(e)&&o.hasOverflow(e)}a=a||{};var d=this.settings.container,e=d.parentNode,f=e!==r&&e!==q.body;return a.checkScrollHeight?c():b()}},{states:{INIT:0,LOADED:1,READY:2,RUNNING:3,KILLED:4}}),x=w.extend({getUrl:function(){var b=this.settings,c={f:b.forum,t_i:b.identifier,t_u:b.url||a.location.href,t_s:b.slug,t_e:b.title,t_d:b.documentTitle,t_t:b.title||b.documentTitle,t_c:b.category,s_o:b.sortOrder,l:b.language};return b.unsupported&&(c.n_s=b.unsupported),w.prototype.getUrl.call(this,c)},getFrameInitParams:function(b,c){var d=this.settings,e={permalink:d.permalink,anchorColor:d.anchorColor,referrer:a.location.href,hostReferrer:q.referrer,canonicalUrl:d.canonicalUrl,colorScheme:d.colorScheme,typeface:d.typeface,remoteAuthS3:d.remoteAuthS3,apiKey:d.apiKey,sso:d.sso,parentWindowHash:a.location.hash,forceAutoStyles:d.forceAutoStyles,layout:d.layout,timestamp:this.timestamp,embedLoadTime:this.getBootloaderTimingInfo(),isHeightRestricted:this.isHeightRestricted()};return c&&c.elem&&a.navigator.userAgent.match(/(iPad|iPhone|iPod)/)&&(e.width=c.elem.offsetWidth),e.initialPosition=this.getViewportAndScrollStatus(),e},listenToScrollEvent:function(a){var b=this,c=b.getScrollContainer();if(c===r)return b.listenTo(n,"window.scroll",a),function(){b.stopListening(n,"window.scroll",a)};var d=n.throttle(function(){a.call(b)},250,50);return n.addEvent(c,"scroll",d),function(){n.removeEvent(c,"scroll",d)}},getScrollContainer:function(){if(this.scrollContainer)return this.scrollContainer;if(!this.settings.enableScrollContainer)return r;var a=this.settings.container;do{var b=o.getComputedStyle(a,"overflow-y","overflowY");if(("scroll"===b||"auto"===b)&&a.clientHeight=c&&(h=d>=e,i=h&&g>=c);var j=this.frame;j.sendMessage("window.scroll.always",a),h&&j.sendMessage("window.scroll",a),i!==this.wasInViewport&&(j.sendMessage(i?"window.inViewport":"window.scrollOffViewport"),this.wasInViewport=i)}},getBestNextFrameHeight:function(a){var b=this.getViewportAndScrollStatus();if(!b||this.settings.enableScrollContainer||!this.getScrollContainer())return a;var c=b.frameOffset;if(a>=c.height)return a;var d=this.getDocumentHeight(),e=d-(c.height+c.top),f=b.pageOffset+b.height-(c.top+e);return f>a?f+1:a},events:{"state:INIT":function(){this.settings.unsupported||(this.settings.windowName||(this.listenToScrollEvent(this.communicateViewportAndScrollStatus),this.listenTo(n,"window.resize",this.communicateViewportAndScrollStatus)),this.timestamp=Number(new Date))},"state:LOADED":function(){var a=this.frame,b=a.elem;this.settings.unsupported?(a.setInlineStyle("height","500px"),b.setAttribute("scrolling","yes"),b.setAttribute("horizontalscrolling","no"),b.setAttribute("verticalscrolling","yes"),a.show()):this.settings.windowName||(this.rendered=!1,a.setInlineStyle("height","0"),b.setAttribute("scrolling","no"),b.setAttribute("horizontalscrolling","no"),b.setAttribute("verticalscrolling","no"))},"frame:ready":function(a,b){var c=this.getFrameInitParams(a,b);if(b.sendMessage("init",c),c.isHeightRestricted){var e=this,f=400,g=d(function(){e.isHeightRestricted({checkScrollHeight:!0})||(b.sendMessage("heightRestrictionRemoved"),e.stopListening(n,"window.click",g))},f);this.listenTo(n,"window.click",g)}},"frame:resize":function(a,b){var c=a.height;b.elem&&this.rendered&&(c=this.getBestNextFrameHeight(c),b.setInlineStyle("height",c+"px"),b.sendMessage("embed.resized")),this.communicateViewportAndScrollStatus()},"frame:rendered":function(a,b){this.rendered=!0,this.wasInViewport=!1,b.trigger("resize",a),b.sendMessage("embed.rendered")},"frame:fail":function(a,b){b.elem&&b.setInlineStyle("height",a&&a.height||"75px")},"frame:scrollTo":function(b,c){if(c.elem&&c.getOffset){var d=this.getScrollContainer(),e=c.getOffset(d),f="window"===b.relative?b.top:e.top+b.top,g=this.getViewportCoords();!b.force&&f>g.top&&fe;return!f&&!g||f&&g?c=1:f?c=(b.height-(d-b.visibleTop))/b.height:g&&(c=(e-b.visibleTop)/b.height),Math.round(100*c)},a}(M,z,e),N=function(c,d,e,f,g,h){return h.events=[],h.lastPos=null,h.clearCache=function(a){if(a===b)h.getElementOffset.cache={};else{var c=g.getId(a);c&&(h.getElementOffset.cache[c]=null)}},h.calculateOffset=function(b){if(!b)return null;if(!e(b))return null;var c=b.ownerDocument.documentElement;return{height:b.offsetHeight,top:b.getBoundingClientRect().top+(a.pageYOffset||c.scrollTop)-(c.clientTop||0)}},h._getElementOffset=function(a){var b=g.getElement(a);if(!b)return null;var c=h.calculateOffset(b);return c?{visibleTop:c.top+(f(a,"topEdgeOffset")||0),visibleBottom:c.top+c.height-(f(a,"bottomEdgeOffset")||0),offsetTop:c.top,height:c.height}:null},h.getElementOffset=function(){var a=function(b){var c=a.cache,d=g.getId(b);if(d&&c[d])return c[d];var e=h._getElementOffset(b);return d&&e&&(c[d]=e),e};return a.cache={},a}(),h.EVENT_NAMES=["enter","exit","visible","invisible","all"],h.updateTracking=function(a){var e,f=function(a){return a?function(b){return a[b]}:function(){return b}};d(h.EVENT_NAMES,f(a._events))?(e=c(h.events,a),-1===e&&h.events.push(a)):(e=c(h.events,a),-1!==e&&h.events.splice(e,1))},h.processEvents=function(a){h.lastPos=a;var b=h.events;if(b.length)for(var c=b.length-1;c>=0;--c){var d=b[c],e=d.isVisible(a);null!==e&&(e!==d.lastVisible&&d.trigger(e?"enter":"exit",d,a),d.trigger(e?"visible":"invisible",d,a),d.lastVisible=e)}},h}(v,w,p,y,M,N),A=function(b,c,d,e,f,g,h){function i(a){return this instanceof i?(this.obj=a,void(this.lastVisible=!1)):new i(a)}var j=c(function(){h.processEvents(h.lastPos)},250);return g(i.prototype,b,{on:function(a){var c=!(this._events&&this._events[a]),d=b.on.apply(this,arguments);return c&&h.updateTracking(this),j(),d},off:function(a){var c=b.off.apply(this,arguments);return this._events&&this._events[a]||h.updateTracking(this),c}, offset:function(){return h.getElementOffset(this.obj)},isVisible:function(a){if(a=a||h.lastPos,!a)return null;var b=a.top,c=b+a.height,d=this.offset();return d?d.offsetTop>=b&&d.visibleTopb:null},invalidate:function(){return h.clearCache(this.obj),this}}),g(i,{invalidate:h.clearCache,scroll:h.processEvents,_windowScrollHandlerBound:!1,_ignoreCache:!1,_windowScrollHandler:d(function(){i._ignoreCache&&i.invalidate(),h.processEvents({top:a.pageYOffset,height:a.document.documentElement.clientHeight})},250),bindWindowEvents:function(b){this._windowScrollHandlerBound||("undefined"!=typeof b&&(i._ignoreCache=b),e(a,"scroll",this._windowScrollHandler),e(a,"resize",this._windowScrollHandler),this._windowScrollHandlerBound=!0)},unbindWindowEvents:function(){i._ignoreCache=!1,f(a,"scroll",this._windowScrollHandler),f(a,"resize",this._windowScrollHandler),this._windowScrollHandlerBound=!1}}),i}(f,s,k,i,j,h,N),B=function(a){return a}(A),O=function(b){return b=function(b,c){var d=null,e=!1;this.start=function(){e||(d=a.setTimeout(function(){e=!0,b()},c))},this.clear=function(){a.clearTimeout(d)}}}(O),C=function(){var a={},b=document.createElement("a");return a.getOrigin=function(a){b.href=a;var c=b.href.split("/");return c[0]+"//"+c[2]},a.getHostName=function(a){return b.href=a,b.hostname},a.getDomainPart=function(b,c){"undefined"==typeof c&&(c=0);var d=a.getHostName(b),e=d.split(".").reverse();return e[c]},a}(),D=function(){var c=m,d=u.WindowedApp,e=I,f=A,g=M,i=q,j=O,k=K,n=C.getOrigin,o=d.extend({name:"ads",loaderVersion:c.getLoaderVersionFromUrl("//a.disquscdn.com/next/embed/ads.load.99af663eed1b878b0ec03205561f7335.js"),origin:b,events:{"frame:ready":function(b){var d=this.settings;c.reportJester({experiment:d.experimentName,variant:d.experimentVariant,service:d.experimentService,bin:"embed:promoted_discovery:"+d.experimentService+":"+d.experimentName+":"+d.experimentVariant,area:d.placement,forum_id:b.forumId,product:"embed",forum:d.forum,zone:"thread",version:c.getLoaderVersionFromUrl("//a.disquscdn.com/next/embed/lounge.load.6072bfd0d33fbfe2e174d9b46d337cd7.js"),page_url:a.document.location.href,page_referrer:a.document.referrer,verb:"load",object_type:"advertisement",advertisement_id:b.advertisement_id,ad_product_name:"iab_display",ad_product_layout:"iab_display",event:"activity",section:"default",object_id:"["+b.advertisement_id+"]"}),this.bindViewEvents()},"frame:resize":function(a){this.frame.setInlineStyle("height",a.height+"px")}},constructor:function(){d.apply(this,arguments),this.origin=n(this.settings.adUrl)},init:function(){i(a)||d.prototype.init.call(this)},getUrl:function(){var b=this.settings;return k(b.adUrl,{anchorColor:b.anchorColor,colorScheme:b.colorScheme,sourceUrl:a.document.location.href,typeface:b.typeface,canonicalUrl:b.canonicalUrl,base:"default",version:this.loaderVersion})},bindViewEvents:function(){if(!this._viewEventsBound){this._viewEventsBound=!0,f.bindWindowEvents(!0);var a=this,b=function(b,c){a.postMessageDirect({event:b,percentViewable:c})},c=1e3,d=new j(function(){b("view:iab")},c),e=!1;this.listenTo(f({el:this.frame.elem}),{enter:function(){b("view:enter")},exit:function(){b("view:exit"),e&&(e=!1,b("view:50out"),d.clear())},visible:function(a,c){var f=g.visiblePercent(c,a.offset());f>=50&&!e?(e=!0,b("view:50in"),d.start()):50>f&&e&&(e=!1,b("view:50out"),d.clear()),b("view",f)}})}},postMessageDirect:function(a){var b=l,c=h,d=b.stringify(c({},a,{space:"disqus"}));this.frame.requiresWindow(function(a){e.WindowBase.postMessage(this.window,a,this.origin)})(d)},getFrameSettings:function(){var a=d.prototype.getFrameSettings.call(this);return a.insertBeforeEl=this.settings.insertBeforeEl,a.insertAfterEl=this.settings.insertAfterEl,a}}),p=function(a){return new o(a)};return{Ads:p}}(),E=function(){var b=K,c=m,d=t,e=u.WindowedApp,f=/^calc\((.+)\)$/,g=e.extend({name:"home",events:{"frame:close":function(b,c){c.hide(),a.focus()},"frame:openReady":function(){this.frame.show(),this.frame.sendMessage("open"),(c.browser.isIE()||c.browser.isSafari())&&this.preventScrolling()},"state:LOADED":function(){this.frame.removeInlineStyle("visibility")},"frame:after:render":function(){c.browser.isSafari()&&this.triggerHostReflow()}},preventScrolling:function(){var a=this.getBodyOverflow(),b=document.body.style.marginRight,d=document.documentElement.style,e=d.overflow;this.listenToOnce(this,"frame:close",function(){this.setBodyStyles({overflow:a,marginRight:b}),d.overflow=e}),this.setBodyStyles({overflow:"hidden",marginRight:this.calcMargin(c.getComputedStyle(document.body,"margin-right","marginRight")||b)}),d.overflow="hidden"},triggerHostReflow:function(){var a=document.createElement("style");document.body.appendChild(a),document.body.removeChild(a)},calcMargin:function(a){var b=a.match(f);return b&&(a=b[1]),a?"calc("+a+" + "+c.getScrollbarWidth()+"px)":c.getScrollbarWidth()+"px"},setBodyStyles:function(a){for(var b in a)document.body.style[b]=a[b]},getBodyOverflow:function(){return document.body.style.overflow},getSecureOrigin:function(){var a=d.ensureHttpBasedProtocol("https://disqus.com/home/","https:"),b=a.split("/"),c=b[0],e=b[2];return c+"//"+e},getFrameSettings:function(){var a=e.prototype.getFrameSettings.call(this);return a.role="dialog",a.origin=this.getSecureOrigin(),a.styles={height:"100%",position:"fixed",top:0,right:0,left:"auto",bottom:"auto","z-index":c.MAX_Z_INDEX,visibility:"hidden"},a},getUrl:function(){var a=this.settings.path||"",c=this.settings.language,e={utm_source:"disqus_embed"};return c&&"en"!==c&&(e.l=c),b(d.apps[this.name]+a,e)},show:function(a){if(!this.frame.isReady())return void this.once("frame:ready",function(){this.show(a)},this);var b={path:a};this.settings.sso&&(b.sso=this.settings.sso),this.frame.sendMessage("showPath",b)}},{READY_TIMEOUT:1e4,getInstanceOrLoad:function(a){var b=g.instance;return b?b:(b=g.instance=new g(a),a.preload&&b.listenToOnce(b,"state:INIT",function(){b.frame.hide()}),g.setHomeTimeout(b),b.init(),b)},setHomeTimeout:function(b){g.homeTimeoutId&&a.clearTimeout(g.homeTimeoutId);var c=g.homeTimeoutId=a.setTimeout(function(){b.frame.destroy(),b.trigger("timeout")},g.READY_TIMEOUT);b.listenToOnce(b,"state:READY",function(){a.clearTimeout(c)})},preload:function(a){return a.preload=!0,g.getInstanceOrLoad(a)},destroy:function(){var a=g.instance;a&&(a.destroy(),g.instance=null)},show:function(a){var b=g.getInstanceOrLoad(a);return b.show(a.path),b}});return{show:g.show,preload:g.preload,destroy:g.destroy,_HomeApp:g}}(),F=function(){var b=a.document,c=d,e=p,f=q,g=L,i=h,j=r,k=u.ThreadBoundApp,l=I,n=o,s=m,t=D,v=E,w=500,x=k.extend({name:"lounge",loaderVersion:s.getLoaderVersionFromUrl("//a.disquscdn.com/next/embed/lounge.load.6072bfd0d33fbfe2e174d9b46d337cd7.js"),indicators:null,wasInViewport:!1,triggeredSlowEvent:!1,events:{"state:INIT":function(){var a=this.settings,b=a.server_side;b&&"fallback"===b.service&&s.logStat("embed.fallback"),a.unsupported||(this.indicators={},this.isContainerVisible()?this.addLoadingAnim():this.addLoadingAnimOnContainerVisible(),this.bindPublisherCallbacks(),this.forwardGlobalEvents())},"state:LOADED":function(){this.isContainerVisible()&&this.addLoadingAnim()},"frame:reload":function(){a.location.reload()},"frame:navigate":function(b){a.location.href=b},"frame:session.identify":function(a){this.trigger("session.identify",a)},"frame:posts.paginate":function(){this.trigger("posts.paginate")},"frame:posts.count":function(a){this.trigger("posts.count",a)},"frame:posts.create":function(a){this.trigger("posts.create",{id:a.id,text:a.raw_message})},"frame:posts.beforeCreate":function(a){this.onBeforePostCreate(a)},"frame:home.destroy":function(){this.destroyHome()},"frame:home.preload":function(a){this.preloadHome(a)},"frame:home.show":function(a){this.showHome(a)},"frame:home.open":function(b){a.location=b},"frame:indicator:init":function(a,b){if(b.getOffset){for(var c,d,e=["north","south"],f=this.indicators,g=b.getOffset().width+"px",h={width:g,"min-width":g,"max-width":g,position:"fixed","z-index":s.MAX_Z_INDEX-1},j={north:{top:"0"},south:{bottom:"0"}},k=function(){b.sendMessage("indicator:click",this.uid.split("-")[1])},m=0;m0&&c<=a.height},showSlowLoadingMessage:function(){var a,b=this;if(b.loadingElem){if(s.pageVisibility.isHidden())return a=function(){s.pageVisibility.stopListening(a),b.setSlowLoadingMessageTimer(2e3)},void s.pageVisibility.listen(a);b.triggeredSlowEvent=!0,b.state===b.constructor.states.READY?s.logStat("slow_embed.got_ready"):b.state===b.constructor.states.LOADED?s.logStat("slow_embed.loaded"):s.logStat("slow_embed.no_ready"),b.loadingElem.firstChild.insertAdjacentHTML("afterend",'

Disqus seems to be taking longer than usual. Reload?

')}},clearSlowLoadingMessageTimer:function(){this.timeout&&(a.clearTimeout(this.timeout),this.timeout=null)},setSlowLoadingMessageTimer:function(b){var c=this;c.clearSlowLoadingMessageTimer(),c.timeout=a.setTimeout(function(){c.showSlowLoadingMessage()},b)},addLoadingAnimOnContainerVisible:function(){var a,b=this;a=b.listenToScrollEvent(function(){var c=b.isContainerVisible();(c||b.state>=b.constructor.states.RUNNING)&&a(),c&&b.addLoadingAnim()})},addLoadingAnim:function(){var a,c,d,e=this,f=e.settings.container;if(e.loadingElem)return e.loadingElem;if(!(e.state>=e.constructor.states.RUNNING)){var g=b.createElement("link");g.rel="stylesheet",g.href="//a.disquscdn.com/next/embed/styles/loading.8023a7350e47171f7bb79707886cd7c5.css",(b.head||b.getElementsByTagName("head")[0]).appendChild(g),a=b.createElement("div"),c=b.createElement("div"),d=b.createElement("div"),c.appendChild(d),a.appendChild(c),a.dir="ltr",a.style.overflow="hidden";var h="dark"===e.settings.colorScheme;c.className="disqus-loader-bubble";var i=c.style;i.height="52px",i.width="54px",i.margin="0 auto",i.overflow="hidden",i.position="relative",h&&(i.backgroundPosition="0 -52px");var j=13,k=h?"rgba(223, 228, 237, .4)":"rgba(51, 54, 58, .4)",l=h?"#6D6F72":"#A3A7AD",m=d.style;return i.boxSizing=m.boxSizing="border-box",m.height=m.width=2*j+"px",m.position="absolute",m.top="13px",m.left="15px","borderRadius"in m?(m.borderWidth="3px",m.borderStyle="solid",m.borderColor=k+" transparent",m.borderRadius=j+"px",m.transformOrigin="50% 50% 0px",d.className="disqus-loader-spinner"):m.borderLeft="3px solid "+l,f.appendChild(a),e.loadingElem=a,s.logStat("lounge.loading.view"),e.setSlowLoadingMessageTimer(15e3),e.loadingElem}},removeLoadingAnim:function(){var a=this.loadingElem,b=this.settings.container;this.clearSlowLoadingMessageTimer(),a&&a.parentNode===b&&(b.removeChild(a),this.loadingElem=null)},destroy:function(){var a=this.indicators;this.removeLoadingAnim(),a&&a.north&&(a.north.destroy(),a.north=null),a&&a.south&&(a.south.destroy(),a.south=null),k.prototype.destroy.call(this)}},{LEGACY_EVENTS_MAPPING:{onReady:"frame:rendered",onNewComment:"posts.create",onPaginate:"posts.paginate",onCommentCountChange:"posts.count",onIdentify:"session.identify"}}),y=x.extend({init:function(){var a=this.settings.discovery;if(a&&(a.disable_all||a.disable_promoted))return x.prototype.init.call(this);x.prototype.init.call(this),this.topAds=this.bottomAds=null;var b=this,c={};j(function(){return b.frame&&b.frame.elem?e(b.frame.elem):c},function(a){if(a!==c){var d=b.settings.topPlacementUrl,e=b.settings.bottomPlacementUrl;d&&(b.topAds=t.Ads(i({adUrl:d,placement:"top"},b.settings,{insertBeforeEl:b.frame.elem})),b.topAds.init()),e&&(b.bottomAds=t.Ads(i({adUrl:e,placement:"bottom"},b.settings,{insertAfterEl:b.frame.elem})),b.bottomAds.init())}},w)},destroy:function(){this.topAds&&this.topAds.destroy(),this.bottomAds&&this.bottomAds.destroy(),x.prototype.destroy.call(this)},getFrameInitParams:function(a,b){var c=x.prototype.getFrameInitParams.call(this,a,b);return c.discoveryDisabled=!0,c}}),z=function(a){return a.topPlacementUrl||a.bottomPlacementUrl?new y(a):new x(a)};return{Lounge:z}}(),P=function(b){var c=n.HostConfig,d=I,e=o,f=m,g=F,h=new c(a);b.configAdapter=h;var i,j=!1,k=b.removeDisqusLink=function(){var b=a.document;if(b.getElementsByClassName){if("complete"!==b.readyState)return d.addEvent(a,"load",k);var c=b.getElementsByClassName("dsq-brlink"),e=c&&c.length&&c[0];e&&e.parentNode.removeChild(e)}};b.loadEmbed=function(a){if(i)return l({reload:!0}),e.log("Use DISQUS.reset instead of reloading embed.js please."),void e.log("See https://help.disqus.com/customer/portal/articles/472107-using-disqus-on-ajax-sites");h.configurator=a;var c=h.toJSON();return j||(c.container.innerHTML="",j=!0),i=g.Lounge(c),i.init(),b.removeDisqusLink(),i};var l=b.reset=function(a){a=a||{},i&&(i.triggeredSlowEvent&&i.state!==i.constructor.states.RUNNING&&f.logStat("reset_embed.slow"),i.destroy(),i=null),a.reload&&b.loadEmbed(a.config)};return b}(P),G=function(){var b=a.DISQUS||{},c=L;b.reset||(b.reset=P.reset),b.request||(b.request={}),b.request.get||(b.request.get=function(a,b,d){c(a,b,d)}),b.host||(b.host={}),b.host._loadEmbed||(b.host._loadEmbed=P.loadEmbed),a.DISQUS=b}()}(this),this.DISQUS.host._loadEmbed();