(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' }; }; })(); !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={};c=E=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)E(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}},G=function(b){function c(a){return g.getElementById(a)||g.body||g.documentElement}var d=f,e=F,g=a.document,l={},m=g.createElement("a");b.getOffset=function(a,b){b=b||g.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 m.href=a,m.hostname},b.addEvent=h,b.removeEvent=i,b.throttle=j,b.addEvent(a,"message",function(a){var c,d=k;try{c=d.parse(a.data)}catch(f){return}var g=c.sender,h=e.isOwn(l,g)&&l[g];h&&b.getHost(a.origin)===h.host&&(a.origin!==h.origin&&(h.origin=a.origin),"host"===c.scope&&h.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(g,"mousemove",b.throttle(function(){b.trigger("window.mousemove")},250,50),!1);var n=function(){b.trigger("window.scroll")};b.addEvent(a,"scroll",b.throttle(n,250,50)),b.addEvent(g,"click",function(){b.trigger("window.click")});var o=b.WindowBase=function(a){a=a||{},this.state=o.INIT,this.uid=a.uid||e.getUid("dsq-frame"),this.origin=a.origin,this.host=b.getHost(this.origin),this.target=a.target,this.window=null,l[this.uid]=this,this.on("ready",function(){this.state=o.READY},this),this.on("die",function(){this.state=o.KILLED},this)};e.extend(o,{INIT:0,READY:1,KILLED:2,postMessage:function(a,b,c){return a.postMessage(b,c)}}),e.extend(o.prototype,d),o.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)}},o.prototype.sendMessage=function(a,b){var c=k,d=c.stringify({scope:"client",name:a,data:b});this.requiresWindow(function(a){o.postMessage(this.window,a,this.origin)})(d)},o.prototype.hide=function(){},o.prototype.show=function(){},o.prototype.url=function(){return this.target},o.prototype.destroy=function(){this.state=o.KILLED,this.off()},o.prototype.isReady=function(){return this.state===o.READY},o.prototype.isKilled=function(){return this.state===o.KILLED};var p=b.Popup=function(a){a.uid=a.windowName,o.call(this,a)};e.extend(p.prototype,o.prototype),p.prototype.load=function(){var b=this.window=a.open("",this.uid||"_blank");b.location=this.url()},p.prototype.isKilled=function(){return o.prototype.isKilled()||this.window.closed};var q=b.Iframe=function(a){o.call(this,a),this.styles=a.styles||{},this.tabIndex=a.tabIndex||0,this.title=a.title||"Disqus",this.container=a.container,this.elem=null};e.extend(q.prototype,o.prototype),q.prototype.load=function(){var a=this.elem=g.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)},q.prototype.getOffset=function(a){return b.getOffset(this.elem,a)},q.prototype.setInlineStyle=function(a,b){var c={};e.isString(a)?c[a]=b:c=a;var d=this.elem.style;return"setProperty"in d?void e.each(c,function(a,b){d.setProperty(b,String(a),"important")}):this._setInlineStyleCompat(c)},q.prototype._setInlineStyleCompat=function(a){this._stylesCache=this._stylesCache||{},e.extend(this._stylesCache,a);var b=[];e.each(this._stylesCache,function(a,c){b.push(c+":"+a+" !important")}),this.elem.style.cssText=b.join(";")},q.prototype.removeInlineStyle=function(a){var b=this.elem.style;return"removeProperty"in b?void b.removeProperty(a):this._removeInlineStyleCompat(a)},q.prototype._removeInlineStyleCompat=function(a){this._stylesCache&&(delete this._stylesCache[a],this._setInlineStyleCompat({}))},q.prototype.hide=function(){this.setInlineStyle("display","none")},q.prototype.show=function(){this.removeInlineStyle("display")},q.prototype.destroy=function(){return this.elem&&this.elem.parentNode&&(this.elem.parentNode.removeChild(this.elem),this.elem=null),o.prototype.destroy.call(this)};var r=b.Channel=function(a){var b=this;b.window=null,q.call(b,a),b.styles=e.extend({width:"100%",border:"none",overflow:"hidden",height:"0"},a.styles||{})};e.extend(r.prototype,q.prototype),r.prototype.load=function(a){var d=this;q.prototype.load.call(d);var f=d.elem;f.setAttribute("width","100%"),f.setAttribute("src",this.url()),b.addEvent(f,"load",function(){d.window=f.contentWindow,a&&a()});var g=e.isString(this.container)?c(d.container):d.container;g.appendChild(f)},r.prototype.destroy=function(){return this.window=null,q.prototype.destroy.call(this)};var s=b.Sandbox=function(a){q.call(this,a),this.contents=a.contents||"",this.styles=e.extend({width:"100%",border:"none",overflow:"hidden"},a.styles||{})};return e.extend(s.prototype,q.prototype),s.prototype.load=function(){q.prototype.load.call(this);var a=this.elem,b=e.isString(this.container)?c(this.container):this.container;b.appendChild(a),this.window=a.contentWindow;try{this.window.document.open()}catch(d){a.src='javascript:var d=document.open();d.domain="'+g.domain+'";void(0);'}return this.document=this.window.document,this.document.write(this.contents),this.document.close(),this.updateHeight(),this},s.prototype.updateHeight=function(){var a,b=this.document.body;b&&(a=b.offsetHeight+"px",this.setInlineStyle({height:a,"min-height":a,"max-height":a}))},s.prototype.show=function(){this.setInlineStyle("display","block")},s.prototype.click=function(a){var c=this,d=c.document.body;b.addEvent(d,"click",function(b){a.call(c,b)})},s.prototype.setBodyClass=function(a){this.document.body.className=a},b.on=d.on,b.off=d.off,b.trigger=d.trigger,b}(G),k=function(){var b,c=G;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}:{}}(),l=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 g(){for(var a=w.getElementsByTagName("h1"),c=w.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},A={isIE:function(){return Boolean(w.documentMode)},isSafari:function(){var b=a.navigator.userAgent.toLowerCase();return b.indexOf("safari")>-1&&-1===b.indexOf("chrome")}},B={getItem:function(b){try{return a.localStorage.getItem(b)}catch(c){}},setItem:function(b,c){try{return a.localStorage.setItem(b,c)}catch(d){}}},C=function(){var a=!1;return a||"https:"===w.location.protocol};return{MAX_Z_INDEX:2147483647,getShortnameFromUrl:d,getForum:e,guessThreadTitle:g,getContrastYIQ:i,ensureHexColor:j,getElementStyle:l,getAnchorColor:m,normalizeFontValue:n,isSerif:o,getBrowserSupport:p,logStat:q,reportJester:r,getComputedStyle:s,pageVisibility:x,getScrollbarWidth:y,getLoaderVersionFromUrl:z,browser:A,storage:B,defaultProtocol:C()?"https:":"http:"}}(),m=function(){var a=F,c=l,d=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"},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:[]}}};d.DISQUS_GLOBALS=["shortname","identifier","url","title","category_id","slug"];var e=d.prototype;return e.getContainer=function(){var a=this.win;return a.document.getElementById(a.disqus_container_id||"disqus_thread")},e.runConfigurator=function(){var a=this.configurator||this.win.disqus_config;if("function"==typeof a)try{a.call(this.config)}catch(b){}},e.getValuesFromGlobals=function(){var b,e=this.win,f=this.config,g=f.page;a.each(d.DISQUS_GLOBALS,function(a){var b=e["disqus_"+a];"undefined"!=typeof b&&(g[a]=b)}),this.runConfigurator(),f.forum||(b=g.shortname,f.forum=b?b.toLowerCase():c.getForum(e.document))},e.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",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,experiment:b.server_side,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:d}}(),n=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}}(),o=function(a){try{return a.self!==a.top}catch(b){return!0}},p=function(){var a=F,b="default",c={lounge:"http://disqus.com/embed/comments/",home:"https://disqus.com/home/".replace("home/",""),ads:"//tempest.services.disqus.com/ads-iframe/"},d=function(a,b){return/^http/.test(b)||(b="http:"),b+"//"+a.replace(/^\s*(\w+:)?\/\//,"")},e=function(e,f,g){var h=c[e];if(!h)throw new Error("Unknown app: "+e);var i=d(h,document.location.protocol),j=a.extend({base:b},f||{}),k=g?"#"+encodeURIComponent(JSON.stringify(g)):"";return a.serialize(i,j)+k};return{BASE:b,apps:c,get:e,ensureHttpBasedProtocol:d}}(),q=function(a){return Boolean(a&&(a.offsetWidth||a.offsetHeight||a.getClientRects().length))},r=function(){var b=F,c=f,d=G,e=p,g=l,h=q,i=document,j=i.documentElement,k=i.location.protocol,m=function(a){this.uid=b.getUid("dsq-app"),this.settings=a||{};var c=[],d=this;do c.unshift(d),d=d.constructor.__super__;while(d);for(var e=0,f=c.length;f>e;e++)d=c[e],d.events&&this.on(d.events,this),d.onceEvents&&this.once(d.onceEvents,this)};b.extend(m.prototype,c),m.prototype.destroy=function(){this.off(),this.stopListening()},m.extend=function(a,c){var d,e=this;d=a&&b.isOwn(a,"constructor")?a.constructor:function(){return e.apply(this,arguments)},b.extend(d,e,c);var f=function(){this.constructor=d};return f.prototype=e.prototype,d.prototype=new f,a&&b.extend(d.prototype,a),d.__super__=e.prototype,d};var n=m.extend({name:null,loaderVersion:null,frame:null,origin:e.ensureHttpBasedProtocol("http://disqus.com",k),state:null,getUrl:function(a,c){return a=this.loaderVersion?b.extend({version:this.loaderVersion},a):b.extend({disqus_version:"1bc4e68b"},a),e.ensureHttpBasedProtocol(e.get(this.name,a,c),k)},getFrame:function(){var a,b=this.settings,c={target:this.getUrl(),origin:this.origin,uid:this.uid};return b.windowName?c.windowName=b.windowName:c.container=this.settings.container||i.body,this.getFrameSettings&&(c=this.getFrameSettings(c)),new(a=c.windowName?d.Popup:d.Channel)(c)},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,m.prototype.destroy.call(this)},events:{"frame:ready":function(){this.setState("READY")}}},{states:{INIT:0,LOADED:1,READY:2,RUNNING:3,KILLED:4}}),o=n.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),n.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:i.referrer,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()};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===j)return b.listenTo(d,"window.scroll",a),function(){b.stopListening(d,"window.scroll",a)};var e=d.throttle(function(){a.call(b)},250,50);return d.addEvent(c,"scroll",e),function(){d.removeEvent(c,"scroll",e)}},getScrollContainer:function(){if(this.scrollContainer)return this.scrollContainer;if(!this.settings.enableScrollContainer)return j;var a=this.settings.container;do{var b=g.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(d,"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);b.sendMessage("init",c)},"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&&fk&&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(a,b){for(var c=0;ce;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}(H,x,e),I=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}(t,u,q,w,H,I),y=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,j,h,i,g,I),z=function(a){return a}(y),J=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)}}}(J),A=function(){var b=l,c=r.WindowedApp,d=G,e=y,f=H,h=J,i=o,j=c.extend({name:"ads",loaderVersion:b.getLoaderVersionFromUrl("//a.disquscdn.com/next/embed/ads.load.d8c6506be10f8f7132db5719ecb0ebe7.js"),origin:b.defaultProtocol+"//"+d.getHost("//tempest.services.disqus.com/ads-iframe/"),events:{"frame:ready":function(c){var d=this.settings.experiment||{},e=d.variant,f=d.experiment,g=d.service;b.reportJester({experiment:f,variant:e,service:g,bin:"embed:promoted_discovery:"+g+":"+f+":"+e,area:this.settings.placement,forum_id:c.forumId,product:"embed",forum:this.settings.forum,zone:"thread",version:b.getLoaderVersionFromUrl("//a.disquscdn.com/next/embed/lounge.load.21d59db257337b00089d882b9984d1c3.js"),page_url:a.document.location.href,page_referrer:a.document.referrer,verb:"load",object_type:"advertisement",advertisement_id:"184723",ad_product_name:"iab_display",ad_product_layout:"iab_display",event:"activity",section:"default",object_id:"[184723]"}),this.bindViewEvents()},"frame:resize":function(a){this.frame.setInlineStyle("height",a.height+"px")}},init:function(){i(a)||c.prototype.init.call(this)},getUrl:function(){return c.prototype.getUrl.call(this,{shortname:this.settings.forum,typeface:this.settings.typeface,colorScheme:this.settings.colorScheme,sourceUrl:a.document.location.href,placement:this.settings.placement,experiment:this.settings.experiment.experiment,variant:this.settings.experiment.variant,service:this.settings.experiment.service})},bindViewEvents:function(){if(!this._viewEventsBound){this._viewEventsBound=!0,e.bindWindowEvents(!0);var a=this,b=function(b,c){a.postMessageDirect({event:b,percentViewable:c})},c=1e3,d=new h(function(){b("view:iab")},c),g=!1;this.listenTo(e({el:this.frame.elem}),{enter:function(){b("view:enter")},exit:function(){b("view:exit"),g&&(g=!1,b("view:50out"),d.clear())},visible:function(a,c){var e=f.visiblePercent(c,a.offset());e>=50&&!g?(g=!0,b("view:50in"),d.start()):50>e&&g&&(g=!1,b("view:50out"),d.clear()),b("view",e)}})}},postMessageDirect:function(a){var b=k,c=g,e=b.stringify(c({},a,{space:"disqus"}));this.frame.requiresWindow(function(a){d.WindowBase.postMessage(this.window,a,this.origin)})(e)}}),m=function(a){return new j(a)};return{Ads:m}}(),B=function(){var b=F,c=l,d=p,e=r.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(a){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.serialize(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}}(),C=function(){var b=a.document,c=o,d=F,e=G,f=n,g=l,h=r.ThreadBoundApp,i=A,j=B,k=h.extend({name:"lounge",loaderVersion:g.getLoaderVersionFromUrl("//a.disquscdn.com/next/embed/lounge.load.21d59db257337b00089d882b9984d1c3.js"),indicators:null,wasInViewport:!1,triggeredSlowEvent:!1,events:{"state:INIT":function(){var a=this.settings,b=a.server_side;b&&"fallback"===b.service&&g.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,f,h=["north","south"],i=this.indicators,j=b.getOffset().width+"px",k={width:j,"min-width":j,"max-width":j,position:"fixed","z-index":g.MAX_Z_INDEX-1},l={north:{top:"0"},south:{bottom:"0"}},m=function(){b.sendMessage("indicator:click",this.uid.split("-")[1])},n=0;n0&&c<=a.height},showSlowLoadingMessage:function(){var a,b=this;if(b.loadingElem){if(g.pageVisibility.isHidden())return a=function(){g.pageVisibility.stopListening(a),b.setSlowLoadingMessageTimer(2e3)},void g.pageVisibility.listen(a);b.triggeredSlowEvent=!0,b.state===b.constructor.states.READY?g.logStat("slow_embed.got_ready"):b.state===b.constructor.states.LOADED?g.logStat("slow_embed.loaded"):g.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 h=b.createElement("link");h.rel="stylesheet",h.href="//a.disquscdn.com/next/embed/styles/loading.8023a7350e47171f7bb79707886cd7c5.css",(b.head||b.getElementsByTagName("head")[0]).appendChild(h),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 i="dark"===e.settings.colorScheme;c.className="disqus-loader-bubble";var j=c.style;j.height="52px",j.width="54px",j.margin="0 auto",j.overflow="hidden",j.position="relative",i&&(j.backgroundPosition="0 -52px");var k=13,l=i?"rgba(223, 228, 237, .4)":"rgba(51, 54, 58, .4)",m=i?"#6D6F72":"#A3A7AD",n=d.style;return j.boxSizing=n.boxSizing="border-box",n.height=n.width=2*k+"px",n.position="absolute",n.top="13px",n.left="15px","borderRadius"in n?(n.borderWidth="3px",n.borderStyle="solid",n.borderColor=l+" transparent",n.borderRadius=k+"px",n.transformOrigin="50% 50% 0px",d.className="disqus-loader-spinner"):n.borderLeft="3px solid "+m,f.appendChild(a),e.loadingElem=a,g.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),h.prototype.destroy.call(this)}},{LEGACY_EVENTS_MAPPING:{onReady:"frame:rendered",onNewComment:"posts.create",onPaginate:"posts.paginate",onCommentCountChange:"posts.count",onIdentify:"session.identify"}}),m=k.extend({_createAdPlacement:function(a,b){var c=i.Ads(d.extend({placement:a},b));return c.init(),c},init:function(){var a=this.settings.discovery;return a&&(a.disable_all||a.disable_promoted)?k.prototype.init.call(this):(this.topAds=this._createAdPlacement("top",this.settings),k.prototype.init.call(this),void(this.bottomAds=this._createAdPlacement("bottom",this.settings)))},destroy:function(){this.topAds&&this.topAds.destroy(),this.bottomAds&&this.bottomAds.destroy(),k.prototype.destroy.call(this)},getFrameInitParams:function(a,b){var c=k.prototype.getFrameInitParams.call(this,a,b);return c.discoveryDisabled=!0,c}}),p=function(a){return a.experiment&&"adsapart"===a.experiment.experiment&&"active"===a.experiment.variant?new m(a):new k(a)};return{Lounge:p}}(),K=function(b){var c=m.HostConfig,d=G,e=n,f=l,g=C,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 o({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 o=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}(K),D=function(){var b=a.DISQUS||{},c=F;b.reset||(b.reset=K.reset),b.request||(b.request={}),b.request.get||(b.request.get=function(a,b,d){c.require(a,b,d)}),b.host||(b.host={}),b.host._loadEmbed||(b.host._loadEmbed=K.loadEmbed),a.DISQUS=b}()}(this),this.DISQUS.host._loadEmbed();