(function(){var f=void 0,h=null,i=!1,j,l=this,m=function(a){for(var a=a.split("."),c=l,b;b=a.shift();)if(c[b]!=h)c=c[b];else return h;return c},p=function(a){return"string"==typeof a},r="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),aa=0,ba=function(a,c,b){return a.call.apply(a.bind,arguments)},ca=function(a,c,b){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var b=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(b,
d);return a.apply(c,b)}}return function(){return a.apply(c,arguments)}},s=function(a,c,b){s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ba:ca;return s.apply(h,arguments)},t=function(a,c){var b=a.split("."),d=l;!(b[0]in d)&&d.execScript&&d.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)!b.length&&c!==f?d[e]=c:d=d[e]?d[e]:d[e]={}},u=function(a,c){function b(){}b.prototype=c.prototype;a.t=c.prototype;a.prototype=new b};
Function.prototype.bind=Function.prototype.bind||function(a,c){if(1<arguments.length){var b=Array.prototype.slice.call(arguments,1);b.unshift(this,a);return s.apply(h,b)}return s(this,a)};var v=function(a){this.stack=Error().stack||"";a&&(this.message=""+a)};u(v,Error);v.prototype.name="CustomError";var da=function(a,c){for(var b=1;b<arguments.length;b++)var d=(""+arguments[b]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a};var w=function(a,c){c.unshift(a);v.call(this,da.apply(h,c));c.shift()};u(w,v);w.prototype.name="AssertionError";var x=function(a,c,b){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(c)var e=e+(": "+c),g=d;throw new w(""+e,g||[]);}};var y=Array.prototype,ea=y.indexOf?function(a,c,b){x(a.length!=h);return y.indexOf.call(a,c,b)}:function(a,c,b){b=b==h?0:0>b?Math.max(0,a.length+b):b;if(p(a))return!p(c)||1!=c.length?-1:a.indexOf(c,b);for(;b<a.length;b++)if(b in a&&a[b]===c)return b;return-1},fa=y.forEach?function(a,c,b){x(a.length!=h);y.forEach.call(a,c,b)}:function(a,c,b){for(var d=a.length,e=p(a)?a.split(""):a,g=0;g<d;g++)g in e&&c.call(b,e[g],g,a)},ga=function(a,c,b){x(a.length!=h);return 2>=arguments.length?y.slice.call(a,c):
y.slice.call(a,c,b)};var ha=function(a){var c=z,b;for(b in c)if(a.call(f,c[b],b,c))return b};var A,B,C,D,ia=function(){return l.navigator?l.navigator.userAgent:h};D=C=B=A=i;var E;if(E=ia()){var ja=l.navigator;A=0==E.indexOf("Opera");B=!A&&-1!=E.indexOf("MSIE");C=!A&&-1!=E.indexOf("WebKit");D=!A&&!C&&"Gecko"==ja.product}var F=B,G=D,H=C,I;
a:{var J="",K;if(A&&l.opera)var L=l.opera.version,J="function"==typeof L?L():L;else if(G?K=/rv\:([^\);]+)(\)|;)/:F?K=/MSIE\s+([^\);]+)(\)|;)/:H&&(K=/WebKit\/(\S+)/),K)var ka=K.exec(ia()),J=ka?ka[1]:"";if(F){var M,la=l.document;M=la?la.documentMode:f;if(M>parseFloat(J)){I=""+M;break a}}I=J}
var ma=I,na={},N=function(a){var c;if(!(c=na[a])){c=0;for(var b=(""+ma).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(b.length,d.length),g=0;0==c&&g<e;g++){var k=b[g]||"",q=d[g]||"",xa=RegExp("(\\d*)(\\D*)","g"),ya=RegExp("(\\d*)(\\D*)","g");do{var n=xa.exec(k)||["","",""],o=ya.exec(q)||["","",""];if(0==n[0].length&&0==o[0].length)break;c=((0==n[1].length?0:parseInt(n[1],10))<(0==o[1].length?0:parseInt(o[1],10))?-1:(0==n[1].length?
0:parseInt(n[1],10))>(0==o[1].length?0:parseInt(o[1],10))?1:0)||((0==n[2].length)<(0==o[2].length)?-1:(0==n[2].length)>(0==o[2].length)?1:0)||(n[2]<o[2]?-1:n[2]>o[2]?1:0)}while(0==c)}c=na[a]=0<=c}return c},oa={},pa=function(){return oa[9]||(oa[9]=F&&!!document.documentMode&&9<=document.documentMode)};!F||pa();!G&&!F||F&&pa()||G&&N("1.9.1");F&&N("9");var qa=function(){};var O=function(){this.d=[];this.e={}};u(O,qa);O.prototype.l=1;O.prototype.h=0;var ra=function(a,c,b){var d=a.e[c];d||(d=a.e[c]=[]);var e=a.l;a.d[e]=c;a.d[e+1]=b;a.d[e+2]=f;a.l=e+3;d.push(e)};
O.prototype.s=function(a,c){var b=this.e[a];if(b){this.h++;for(var d=ga(arguments,1),e=0,g=b.length;e<g;e++){var k=b[e];this.d[k+1].apply(this.d[k+2],d)}this.h--;if(this.g&&0==this.h)for(;b=this.g.pop();)if(0!=this.h)this.g||(this.g=[]),this.g.push(b);else if(d=this.d[b]){if(d=this.e[d])e=d,d=ea(e,b),0<=d&&(x(e.length!=h),y.splice.call(e,d,1));delete this.d[b];delete this.d[b+1];delete this.d[b+2]}}};var sa=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),ta=function(a){if(P){P=i;var c=l.location;if(c){var b=c.href;if(b&&(b=(b=ta(b)[3]||h)&&decodeURIComponent(b))&&b!=c.hostname)throw P=!0,Error();}}return a.match(sa)},P=H;var Q=m("yt.dom.getNextId_");if(!Q){Q=function(){return++ua};t("yt.dom.getNextId_",Q);var ua=0};var va=function(a){if(a=a||m("window.event")){this.type=a.type;var c=a.target||a.srcElement;c&&3==c.nodeType&&(c=c.parentNode);this.target=c;if(c=a.relatedTarget)try{c=c.nodeName&&c}catch(b){c=h}else"mouseover"==this.type?c=a.fromElement:"mouseout"==this.type&&(c=a.toElement);this.relatedTarget=c;this.data=a.data;this.source=a.source;this.origin=a.origin;this.state=a.state;this.clientX=a.clientX!==f?a.clientX:a.pageX;this.clientY=a.clientY!==f?a.clientY:a.pageY;if(a.pageX||a.pageY)this.pageX=a.pageX,
this.pageY=a.pageY;else if((a.clientX||a.clientY)&&document.body&&document.documentElement)this.pageX=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.pageY=a.clientY+document.body.scrollTop+document.documentElement.scrollTop;this.keyCode=a.keyCode?a.keyCode:a.which;this.charCode=a.charCode||("keypress"==this.type?this.keyCode:0);0==this.type.indexOf("touch")&&(this.touches=a.touches,this.changedTouches=a.changedTouches);0==this.type.indexOf("gesture")&&(this.scale=a.scale,
this.rotation=a.rotation)}};j=va.prototype;j.type="";j.target=h;j.relatedTarget=h;j.currentTarget=h;j.data=h;j.source=h;j.origin=h;j.state=h;j.keyCode=0;j.charCode=0;j.clientX=0;j.clientY=0;j.pageX=0;j.pageY=0;j.touches=h;j.changedTouches=h;var z=m("yt.events.listeners_")||{};t("yt.events.listeners_",z);var wa=m("yt.events.counter_")||{count:0};t("yt.events.counter_",wa);var za=function(a,c){return ha(function(b){return b[0]==a&&"message"==b[1]&&b[2]==c&&b[4]==i})},Aa=function(a,c){if(a&&(a.addEventListener||a.attachEvent)){var b=za(a,c);if(!b){var b=++wa.count+"",d=function(b){b=new va(b);b.currentTarget=a;return c.call(a,b)};z[b]=[a,"message",c,d,i];a.addEventListener?a.addEventListener("message",d,i):a.attachEvent("onmessage",d)}}};t("yt.config_",window.yt&&window.yt.config_||{});t("yt.globals_",window.yt&&window.yt.globals_||{});t("yt.msgs_",window.yt&&window.yt.msgs_||{});t("yt.timeouts_",window.yt&&window.yt.timeouts_||[]);var Ba=window.yt&&window.yt.intervals_||[];t("yt.intervals_",Ba);eval("/*@cc_on!@*/false");var Ca=window.YTConfig||{},R=function(a){this.o=a||{};this.c={};this.c.width=640;this.c.height=390;this.c.title="";this.c.host=("https:"==document.location.protocol?"https:":"http:")+"//www.youtube.com"},S=h,T=function(a,c){return a.o[c]||Ca[c]||a.c[c]};
R.prototype.n=function(a){if(a.origin==T(this,"host")){var a=JSON.parse(a.data),c=S[a.id];switch(a.event){case "onReady":window.clearInterval(c.i);U(c,"onReady");break;case "onStateChange":var b=a.info.playerState;V(c,a);U(c,"onStateChange",b);-1!=b&&U(c,Da[b]);break;case "onPlaybackQualityChange":c.p=a.playbackQuality;U(c,"onPlaybackQualityChange",c.p);break;case "onError":U(c,"onError",a.error);break;case "infoDelivery":V(c,a);break;case "initialDelivery":Ea(c,a.apiInterface),V(c,a)}}};
var W=function(a,c){this.b=c;this.j=this.a=h;this.i=this.id=0;this.pubsub=h;var b=p(a)?document.getElementById(a):a;if(b){if("iframe"!=b.tagName.toLowerCase()){var d=document.createElement("div");d.innerHTML+=m("YT.embed_template");d=d||document;d=d.querySelectorAll&&d.querySelector&&(!H||"CSS1Compat"==document.compatMode||N("528"))?d.querySelectorAll("IFRAME"):d.getElementsByTagName("IFRAME");for(var d=d.length?d[0]:h,e=0,g=b.attributes.length;e<g;e++)d.setAttribute(b.attributes[e].name,b.attributes[e].value);
d.removeAttribute("width");d.removeAttribute("height");d.removeAttribute("src");d.setAttribute("title","YouTube "+T(this.b,"title"));d.height=T(this.b,"height");d.width=T(this.b,"width");d.src=this.k();this.j=b;(e=b.parentNode)&&e.replaceChild(d,b);b=d}this.a=b;this.id=this[r]||(this[r]=++aa);if(window.JSON&&window.postMessage){this.pubsub=new O;b=this.b;d=this.id;S||(S={},Aa(window,s(b.n,b)));S[d]=this;b=s(this.m,this);b=window.setInterval(b,250);Ba.push(b);this.i=b;var b=T(this.b,"events"),k;for(k in b)b.hasOwnProperty(k)&&
this.addEventListener(k,b[k])}}};W.prototype.q=function(){if(this.j){var a=this.a,c=a.parentNode;c&&c.replaceChild(this.j,a)}else(a=this.a)&&a.parentNode&&a.parentNode.removeChild(a)};W.prototype.m=function(){this.a&&this.a.contentWindow?Fa(this,{event:"listening"}):window.clearInterval(this.i)};W.prototype.addEventListener=function(a,c){var b=c;"string"==typeof c&&(b=function(){window[c].apply(window,arguments)});ra(this.pubsub,a,b);return this};
var U=function(a,c,b){a.pubsub.s(c,{target:a,data:b})},Ga=function(a,c,b){b=b||[];b=Array.prototype.slice.call(b);Fa(a,{event:"command",func:c,args:b})},Fa=function(a,c){c.id=a.id;var b=JSON.stringify(c),d=ta(a.a.src),e=d[1],g=d[2],k=d[3],d=d[4],q=[];e&&q.push(e,":");k&&(q.push("//"),g&&q.push(g,"@"),q.push(k),d&&q.push(":",d));a.a.contentWindow.postMessage(b,q.join(""))};W.prototype.setSize=function(a,c){this.a.width=a;this.a.height=c;return this};W.prototype.r=function(){return this.a};var Da={"0":"onEnded",1:"onPlaying",2:"onPaused",3:"onBuffering",5:"onVideoCued"},X=function(a){R.call(this,a);this.c.title="video player";this.c.apiReady="onYouTubePlayerAPIReady";this.c.videoId=""};u(X,R);var Y=function(a,c){W.call(this,a,new X(c));this.f={}};u(Y,W);
Y.prototype.k=function(){var a=T(this.b,"playerVars")||[];a.enablejsapi=1;window.location.host&&(a.origin=window.location.protocol+"//"+window.location.host);var c=[],b;for(b in a)a.hasOwnProperty(b)&&c.push(b+"="+a[b]);return T(this.b,"host")+"/embed/"+T(this.b,"videoId")+"?"+c.join("&")};
var V=function(a,c){var b=c.info||{},d;for(d in b)a.f[d]=b[d]},Ea=function(a,c){fa(c,function(a){this[a]||(this[a]=0==a.search("cue")||0==a.search("load")?function(){this.f={};Ga(this,a,arguments);return this}:0==a.search("get")||0==a.search("is")?function(){var c=this.f,e=0;0==a.search("get")?e=3:0==a.search("is")&&(e=2);return c[a.charAt(e).toLowerCase()+a.substr(e+1)]}:function(){Ga(this,a,arguments);return this})},a)};
Y.prototype.getVideoEmbedCode=function(){var a=this.a.cloneNode(i),c=this.f.videoData,b=T(this.b,"host");a.src=c&&c.video_id?b+"/embed/"+c.video_id:a.src;c=document.createElement("div");c.appendChild(a);return c.innerHTML};var Z=function(a){R.call(this,a);this.c.title="upload widget";this.c.apiReady="onYouTubeUploadWidgetReady"};u(Z,R);var $=function(a,c){W.call(this,a,new Z(c))};u($,W);$.prototype.k=function(){return T(this.b,"host")+"/upload_embed?action_widget=1"};t("YT.PlayerState.ENDED",0);t("YT.PlayerState.PLAYING",1);t("YT.PlayerState.PAUSED",2);t("YT.PlayerState.BUFFERING",3);t("YT.PlayerState.CUED",5);t("YT.Player",Y);t("YT.UploadWidget",$);Y.prototype.destroy=Y.prototype.q;Y.prototype.setSize=Y.prototype.setSize;Y.prototype.getVideoEmbedCode=Y.prototype.getVideoEmbedCode;Y.prototype.getIframe=Y.prototype.r;Y.prototype.addEventListener=Y.prototype.addEventListener;var Ha=function(a){(a=m(T(a,"apiReady")))&&a()};Ha(new X);Ha(new Z);})();
