// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 (()=>{"use strict";var t,e,n={createElementNS:document.createElementNS};var s=!0;function o(t){s=t}function i(t){try{o(!1),t()}finally{o(!0)}}function a(t){!function(t,e,n){if(n){var s=new Date;s.setTime(s.getTime()+24*n*60*60*1e3);var o="; expires="+s.toGMTString()}else o="";document.cookie=t+"="+e+o+"; path=/"}(t,"",-1)}if(void 0!==window.XMLHttpRequest){var r=class extends XMLHttpRequest{};Object.defineProperty(r.prototype,"responseURL",Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype,"responseURL"))}function l(t,e,n,s,o){var i;if((i=window.XMLHttpRequest?new r:new ActiveXObject("Microsoft.XMLHTTP")).onreadystatechange=function(){4==this.readyState&&n(i)},i.open(t,e,!0),s)for(var a in s)s.hasOwnProperty(a)&&i.setRequestHeader(a,s[a]);i.withCredentials=!0,i.send(o)}function c(t){return void 0!==t&&t&&t.constructor===Array}function h(t,e){const n=window[`HTML${t}Element`];if(void 0!==n){const t=Object.getOwnPropertyDescriptor(n.prototype,e);void 0!==t&&Object.defineProperty(n.prototype,`_wm_${e}`,t)}}function d(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"src";const n=`_wm_${e}`;return n in t.__proto__?t[n]:t[e]}h("Image","src"),h("Media","src"),h("Embed","src"),h("IFrame","src"),h("Script","src"),h("Link","href"),h("Anchor","href");const u=Element.prototype.setAttribute;function p(t,e,n){u.call(t,e,n)}var m=["January","February","March","April","May","June","July","August","September","October","November","December"],f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],g={Y:function(t){return t.getUTCFullYear()},m:function(t){return t.getUTCMonth()+1},b:function(t){return f[t.getUTCMonth()]},B:function(t){return m[t.getUTCMonth()]},d:function(t){return t.getUTCDate()},H:function(t){return("0"+t.getUTCHours()).slice(-2)},M:function(t){return("0"+t.getUTCMinutes()).slice(-2)},S:function(t){return("0"+t.getUTCSeconds()).slice(-2)},"%":function(){return"%"}};function w(t){var e=function(t){return"number"==typeof t&&(t=t.toString()),[t.slice(-14,-10),t.slice(-10,-8),t.slice(-8,-6),t.slice(-6,-4),t.slice(-4,-2),t.slice(-2)]}(t);return new Date(Date.UTC(e[0],e[1]-1,e[2],e[3],e[4],e[5]))}function v(t){return f[t]}function y(t,e){return e.replace(/%./g,function(e){var n=g[e[1]];return n?n(w(t)):e})}const b=window.Date;function C(t,e){return(t=t.toString()).length>=e?t:"00000000".substring(0,e-t.length)+t}function x(t){for(var e=0,n=0;n3}(t)){var s=[];for(n=0;n0?this.sc.scrollTop=o+this.sc.suggestionHeight+s-this.sc.maxHeight:o<0&&(this.sc.scrollTop=o+s)}}blurHandler(){try{var t=this.root.querySelector(".wb-autocomplete-suggestions:hover")}catch(e){t=null}t?this.input!==document.activeElement&&setTimeout(()=>this.focus(),20):(this.last_val=this.input.value,this.sc.style.display="none",setTimeout(()=>this.sc.style.display="none",350))}suggest(t){var e=this.input.value;if(this.cache[e]=t,t.length&&e.length>=this.minChars){for(var n="",s=0;s{this.sc.style.display="none"},20))}}keyupHandler(t){var e=window.event?t.keyCode:t.which;if(!e||(e<35||e>40)&&13!=e&&27!=e){var n=this.input.value;if(n.length>=this.minChars){if(n!=this.last_val){if(this.last_val=n,clearTimeout(this.timer),this.cache){if(n in this.cache)return void this.suggest(this.cache[n]);for(var s=1;s{this.source(n,this.suggest.bind(this))},this.delay)}}else this.last_val=n,this.sc.style.display="none"}}focusHandler(t){this.last_val="\n",this.keyupHandler(t)}renderItem(t,e){e=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var n=new RegExp("("+e.split(" ").join("|")+")","gi");return'
'+t.replace(n,"$1")+"
"}onSelect(t,e,n){}}class S{constructor(t,e){let n=t.getRootNode();if(!n.querySelector)return;let s="object"==typeof t?[t]:n.querySelectorAll(t);this.elems=s.map(t=>new L(t,e))}destroy(){for(;this.elems.length>0;)this.elems.pop().unload()}}const k=JSON;class H{constructor(t,e,n){this.el=t,this.url=e,this.timestamp=n,t.onclick=this.save.bind(this),document.addEventListener("DOMContentLoaded",()=>{var t;this.enableSaveSnapshot((t="logged-in-user",document.cookie.search(t)>=0))})}save(t){var e,n,s,o;this.start(),e=this.url,n=this.timestamp,s=[],o=(o={failure:this.failure.bind(this),success:this.success.bind(this)})||{},l("POST","/__wb/web-archive/",function(t){401===t.status?o.userNotLoggedIn&&o.userNotLoggedIn(t):t.status>=400?o.failure&&o.failure(t):o.success&&o.success(t)},{"Content-Type":"application/json"},k.stringify({url:e,snapshot:n,tags:s||[]}))}start(){this.hide(["wm-save-snapshot-fail","wm-save-snapshot-open","wm-save-snapshot-success"]),this.show(["wm-save-snapshot-in-progress"])}failure(t){401==t.status?this.userNotLoggedIn(t):(this.hide(["wm-save-snapshot-in-progress","wm-save-snapshot-success"]),this.show(["wm-save-snapshot-fail","wm-save-snapshot-open"]),console.log("You have got an error."),console.log("If you think something wrong here please send it to support."),console.log('Response: "'+t.responseText+'"'),console.log('status: "'+t.status+'"'))}success(t){this.hide(["wm-save-snapshot-fail","wm-save-snapshot-in-progress"]),this.show(["wm-save-snapshot-open","wm-save-snapshot-success"])}enableSaveSnapshot(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?(this.show("wm-save-snapshot-open"),this.hide("wm-sign-in")):(this.hide(["wm-save-snapshot-open","wm-save-snapshot-in-progress"]),this.show("wm-sign-in"))}show(t){this.setDisplayStyle(t,"inline-block")}hide(t){this.setDisplayStyle(t,"none")}setDisplayStyle(t,e){(c(t)?t:[t]).forEach(t=>{let n=this.el.getRootNode().getElementById(t);n&&(n.style.display=e)})}}function A(t,e,n){n.innerHTML="";const s=n.getRootNode().querySelector("#wm-capresources-loading");s.style.display="block";var o=w(t).getTime(),i=0;e=window.location.origin+e;var a=[];function r(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"src";const o=window.location.origin,i=O(window,t);for(let t of i){if(n&&!n(t))continue;const i=d(t,s);i&&(!i.startsWith(e)&&i.startsWith(o)&&(i.startsWith("data:")||a.push(i)))}}r("img"),r("frame"),r("iframe",t=>"playback"!==t.id),r("script"),r("link",t=>"stylesheet"===t.rel,"href");var c=a.filter(function(t,e,n){return n.indexOf(t)===e});c.length>0?(i=0,c.map(function(t){t.match("^https?://")&&(i++,l("HEAD",t,function(t){if(200==t.status){var e=t.getResponseHeader("Memento-Datetime");if(null==e)console.log("%s: no Memento-Datetime",h);else{var a=document.createElement("span"),r=function(t,e){var n=new Date(t).getTime()-e,s="";n<0?(s+="-",n=Math.abs(n)):s+="+";var o=!1;if(n<1e3)return{delta:n,text:"",highlight:o};var i=n,a=Math.floor(n/1e3/60/60/24/30/12);n-=1e3*a*60*60*24*30*12;var r=Math.floor(n/1e3/60/60/24/30);n-=1e3*r*60*60*24*30;var l=Math.floor(n/1e3/60/60/24);n-=1e3*l*60*60*24;var c=Math.floor(n/1e3/60/60);n-=1e3*c*60*60;var h=Math.floor(n/1e3/60);n-=1e3*h*60;var d=Math.floor(n/1e3),u=[];return a>1?(u.push(a+" years"),o=!0):1==a&&(u.push(a+" year"),o=!0),r>1?(u.push(r+" months"),o=!0):1==r&&(u.push(r+" month"),o=!0),l>1?u.push(l+" days"):1==l&&u.push(l+" day"),c>1?u.push(c+" hours"):1==c&&u.push(c+" hour"),h>1?u.push(h+" minutes"):1==h&&u.push(h+" minute"),d>1?u.push(d+" seconds"):1==d&&u.push(d+" second"),u.length>2&&(u=u.slice(0,2)),{delta:i,text:s+u.join(" "),highlight:o}}(e,o),l=r.highlight?"color:red;":"";a.innerHTML=" "+r.text,a.title=e,a.setAttribute("style",l);var c=t.getResponseHeader("Content-Type"),h=t.responseURL.replace(window.location.origin,""),d=document.createElement("a");d.innerHTML=h.split("/").splice(3).join("/"),d._wm_href=h,d.title=c,d.onmouseover=R,d.onmouseout=$;var u=document.createElement("div");u.setAttribute("data-delta",r.delta),u.appendChild(d),u.append(a),n.appendChild(u);var p=Array.prototype.slice.call(n.childNodes,0);p.sort(function(t,e){return e.getAttribute("data-delta")-t.getAttribute("data-delta")}),n.innerHTML="";for(var m=0,f=p.length;m0)for(var n=0;n0)for(var n=0;n0)for(const t of n)r.push(t.notice)}const l=!!t.getAttribute("birdwatch");if(l){const n=function(t){let e=t.match(/^https?:\/\/(?:twitter|x)\.com\/i\/web\/status\/(\d+)/);if(e)return e[1];if(e=t.match(/^https?:\/\/twitter\.com\/[^/]+\/status\/(\d+)/),e)return e[1];return null}(e.url);if(n){const e=new URLSearchParams([["url",`https://x.com/i/web/status/${n}`]]),s=`${F}?${e}`,o=await D(s,{credentials:"omit"}),{status:i,notes:a}=await o.json();if("success"==i&&a?.length>0){const e=(t.getAttribute("birdwatch-browse")||J)+n;r.push(`This post has ${a.length} community note${a.length>1?"s":""}`)}}}r.length>0&&function(t,e){try{const n=document.createElement("div");n.setAttribute("style","background-color:#666;color:#fff;font-weight:bold;text-align:center"),n.textContent="NOTICE";const s=document.createElement("div");s.className="wm-capinfo-content";for(let t of e)"string"==typeof t&&i(()=>{const e=document.createElement("div");e.innerHTML=t,s.appendChild(e)});t.appendChild(n),i(()=>t.appendChild(s)),Y(!0)}catch(t){console.error("failed to build content of %o - maybe notice text is malformed: %s",$notice,e)}}(t,r)}(s,n):Y(!0)),function(){const t=q.querySelector("#wm-capinfo-collected-by");if(!t||"api"!=t.getAttribute("source"))return;switch(t.getAttribute("trigger")){case"load":V();break;case"hover":I&&I.addEventListener("mouseenter",()=>V())}}()}function Y(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=q._dstate||{root:!1},n=!1;e.root?q._dstate={root:!1}:t?q._dstate={root:!1,notice:!0}:e.notice?q._dstate={root:!1}:(q._dstate={root:!0},n=!0);const{root:s,notice:o}=q._dstate;if(s?(q.style.display="block",I.classList.add("wm-open"),I.classList.remove("wm-closed")):o?(q.style.display="block",q.classList.add("notice-only"),I.classList.add("wm-open"),I.classList.remove("wm-closed")):(q.style.display="none",q.classList.remove("notice-only"),I.classList.remove("wm-open"),I.classList.add("wm-closed")),n){const t=q.querySelector("#wm-capresources");A(P.timestamp,P.staticPrefix,t),V()}}const W="https://wayback-api.archive.org/services/context/notices",F="https://wayback-api.archive.org/services/context/birdwatch",J="https://wayback-api.archive.org/services/context/birdwatch/_browse/";const X="/__wb/provenance",z="https://archive.org/images/notfound.png",G=75;async function V(){if(j)return;const t=q.querySelector("#wm-capinfo-collected-by");if(!t||"api"!=t.getAttribute("source"))return;const e=t.getAttribute("token");if(e){j=!0;try{const n=new URLSearchParams([["t",e]]),s=await D(`${X}?${n}`,{credentials:"omit"});if(!s.ok)return void(s.status>=500&&(j=!1));const{collection:o,organization:a}=await s.json();o&&function(t,e,n){i(()=>{const s=document.createElement("div");s.setAttribute("style","background-color:#666;color:#fff;font-weight:bold;text-align:center;padding:2px 0;"),s.textContent="COLLECTED BY";const o=document.createElement("div");o.id="wm-collected-by-content",o.setAttribute("style","padding:3px;position:relative"),n&&o.appendChild(K(n,"Organization","50%")),o.appendChild(K(e,"Collection","49%")),t.appendChild(s),t.appendChild(o)})}(t,o,a)}catch(t){j=!1,console.warn("failed to load COLLECTED BY: %s",t)}}}function K(t,e,n){const s=document.createElement("div");s.setAttribute("style",`display:inline-block;vertical-align:top;width:${n};`);const o=document.createElement("span");o.className="c-logo",o.setAttribute("style",`background-image:url(${t.logo||z});`),s.appendChild(o);const i=document.createElement("div");i.appendChild(document.createTextNode(`${e}: `));const a=document.createElement("a");a._no_rewrite=!0,a.setAttribute("style","color:#33f;"),a.setAttribute("href",t.url),a.setAttribute("target","_new");const r=document.createElement("span");return r.className="wm-title",r.textContent=t.name,a.appendChild(r),i.appendChild(a),s.appendChild(i),t.description&&s.appendChild(function(t){const e=document.createElement("div");e.setAttribute("style",`max-height:${G}px;overflow:hidden;position:relative;`);const n=document.createElement("iframe");n._no_rewrite=!0,n.setAttribute("sandbox","allow-popups allow-popups-to-escape-sandbox"),n.setAttribute("scrolling","no"),n.setAttribute("frameborder","0"),n.setAttribute("title","collection description"),n.setAttribute("style",`display:block;width:100%;height:${G}px;border:0;overflow:hidden;`),n.setAttribute("srcdoc",function(t){return''+t+""}(t)),e.appendChild(n);const s=document.createElement("div");return s.setAttribute("style",`position:absolute;top:0;left:0;width:100%;height:${G}px;pointer-events:none;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 90%,rgba(255,255,255,1) 100%);`),e.appendChild(s),e}(t.description)),s}const Q=window.JSON,Z=window.open,tt=window.location.hash||"",et=window.Date,nt=document;var st=document,ot=function(t){return st.getElementById(t)};var it,at="/static/";function rt(t,e){var n=ot(t);n&&(n.style.visibility=e?"visible":"hidden")}function lt(t,e){c(t)||(t=[t]);for(var n=0;n{})}if(window.__wm={init:function(e){!function(){var t=document.cookie.split(";");if(t.length>40)for(var e=0;e1?n-1:0),i=1;i0;)U.appendChild(N.children[0]);if(h)for(var R=0;R baseHeight=%s",t,e,n),N.style.height=n+"px",document.documentElement.style.setProperty("--wm-toolbar-height",n+"px")}window.top!=window.self&&"force"!=N.getAttribute("toolbar-mode")||(N.style.display="block");var D=!1,q=!0;const I=ot("donato-if")?.contentWindow;var P=ot("donato");if(console.debug("$donato = %o",P),P)if(window.top!=window.self)P.style.display="none",console.debug("hid $donato as window.top != window.self");else{var j=ot("donato-base");window.addEventListener("message",function(t){if(t.source===I){var e="string"==typeof t.data?Q.parse(t.data):t.data;if(console.log("got message %o",e),"set height"==e.event){var n=e.value,s=e.bannerHeight;if("number"!=typeof n||n<=0)return;if(!q)return;if(e.value,D)return;P.style.height=s+"px",j.style.height=n+"px",O()}else if("open modal"==e.event)j.style.height="",document.body.classList.add("wm-modal"),window.scrollTo(0,0),D=!0;else if("close modal"==e.event)P.style.marginBottom="0px",document.body.classList.remove("wm-modal"),D=!1;else if("hide banner"==e.event){P.style.height=0,P.style.visibility="hidden";var o=new et(et.now()+24*e.value*3600*1e3);document.cookie="donation=x; domain=archive.org; path=/; expires="+o.toUTCString(),q=!1,D=!1,O()}}},!1),console.debug("installed message listener to #donato-base: %o",j)}ot("wm-tb-close").addEventListener("click",t=>{ot("wm-ipp-inside").style.display="none",t.preventDefault(),O()});var W=ot("wm-ipp-sparkline");function F(t){var e="mouseenter"==t.type?1:0;if(e!==E){var n=ot("wm-ipp"),s=ot("displayYearEl"),o=ot("displayMonthEl"),i=ot("displayDayEl");e?n.className="hi":(n.className="",s.innerHTML=g,o.innerHTML=v(_-1),i.innerHTML=C(T,2)),M.style.display=e?"inline":"none",L.style.display=e?"inline":"none",E=e}}ot("wm-expand").addEventListener("click",t=>{t.stopPropagation(),t.preventDefault(),Y()}),ot("wm-graph-anchor")._no_rewrite=!0,(M=nt.createElement("div")).className="yt",M.style.display="none",M.style.width=n+"px",M.style.height=e+"px",(L=nt.createElement("div")).className="mt",L.style.display="none",L.style.width=s+"px",L.style.height=e+"px",W.appendChild(M),W.appendChild(L);var J=ot("wm-sparkline-canvas");W.onmouseenter=F,W.onmouseleave=F,W.onmousemove=function(e){var o,i,a=W,l=function(t){var e=0;return t.pageX||t.pageY?e=t.pageX:(t.clientX||t.clientY)&&(e=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft),e}(e),c=(o=a,i=nt.documentElement,(void 0!==o.getBoundingClientRect?o.getBoundingClientRect():{top:0,left:0}).left+(window.scrollX||i.scrollLeft)-(i.clientLeft||0)),h=Math.min(Math.max(0,l-c),t),d=h%n,u=Math.floor(h/n),p=Math.min(11,Math.floor(d/s)),f=12*u+p,g=d%2==1?15:1,w=C(u+r)+C(p+1,2)+C(g,2)+"000000";if(ot("displayYearEl").innerHTML=u+r,ot("displayMonthEl").innerHTML=v(p),ot("wm-graph-anchor").href=m.replayUrl(w),k!=u){var y=u*n;M.style.left=y+"px",k=u}if(A!=f){var b=u+f*s+1;L.style.left=b+"px",A=f}};const X=ot("wm-toolbar");var z=ot("wm-sparkline-canvas");if(z.getContext&&z.getContext("2d")){var G="/__wb/sparkline?output=json&url="+encodeURIComponent(i)+(o&&"&collection="+o||"");"async"==X.getAttribute("nav")&&(G+=`&nav=${it}`),l("GET",G,function(n){if(200==n.status){for(var s=Q.parse(n.responseText),o=s.years,a=Object.getOwnPropertyNames(o),l=s.years=[],c=0;c1?"captures":"capture"}`;var p=y(o,"%d %b %Y");a!=o&&(p+=` - ${y(a,"%d %b %Y")}`);const m=document.createElement("div");m.className="r",m.title="Timespan for captures of this URL",m.innerText=p,e.innerHTML="",e.appendChild(h),e.appendChild(m)}(s),s.nav&&function(t,e){let{prev:n,next:s,monthPrev:o,monthNext:i,yearPrev:a,yearNext:r}=e;function l(e,n,s){if(null!=n){const o=y(n,"%H:%M:%S %b %d, %Y"),i=t.querySelector(e),a=document.createElement("a"),r=a._orig_setAttribute??a.setAttribute;r.call(a,"href",m.replayUrl(n)),r.call(a,"title",o),s&&(i.textContent=y(n,s));for(let t=i.firstChild;t;t=i.firstChild)a.appendChild(t);i.appendChild(a)}}l(".m .b",o,"%b"),l(".m .f",i,"%b"),l(".y .b",a,"%Y"),l(".y .f",r,"%Y"),l(".d .b",n),l(".d .f",s)}(X.querySelector("div.n"),s.nav),function(t,e,n,s,o,i,a){var r=s.getContext("2d");if(r){r.fillStyle="#FFF";var l=(new b).getUTCFullYear(),c=e/(l-o+1),h=x(t.years),d=h[0],u=n/h[1];if(i>=o){var p=T(i);r.fillStyle="#FFFFA5",r.fillRect(p,0,c,n)}for(var m=o;m<=l;m++)p=T(m),r.beginPath(),r.moveTo(p,0),r.lineTo(p,n),r.lineWidth=1,r.strokeStyle="#CCC",r.stroke();a=parseInt(a)-1;for(var f=(c-1)/12,g=0;g0){var _=Math.ceil(C*u);r.fillStyle=m==i&&y==a?"#EC008C":"#000",r.fillRect(Math.round(v),Math.ceil(n-_),Math.ceil(f),Math.round(_))}v+=f}}}function T(t){return Math.ceil((t-o)*c)+.5}}(s,t,e,z,r,g,_)}})}else{var V=new Image(t,e);V.src="/__wb/sparkline?url="+encodeURIComponent(i)+"&width="+t+"&height="+e+"&selected_year="+g+"&selected_month="+_+(o&&"&collection="+o||""),V.alt="sparkline",V.id="sparklineImgId",V.border="0",J.parentNode.replaceChild(V,J)}function K(t){return t.filter(t=>void 0===t.excluded).map(t=>t.display_name)}ot("wm-share-facebook").onclick=function(t){const e=this.dataset.url;return Z("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e),"","height=400,width=600"),t.preventDefault(),!1},ot("wm-share-twitter").onclick=function(t){const e=this.dataset.url;return Z("https://x.com/intent/post?text="+encodeURIComponent(e)+"&via=internetarchive","","height=446,width=600"),t.preventDefault(),!1},new S(ot("wmtbURL"),{delay:400,source:function(t,e){l("GET","/__wb/search/host?q="+encodeURIComponent(t),function(n){if(void 0!==(n=Q.parse(n.response)).hosts&&n.hosts.length>0){var s=K(n.hosts);e(s)}else void 0!==n.isUrl&&!0===n.isUrl&&void 0===n.excluded?e([t]):l("GET","/__wb/search/anchor?q="+encodeURIComponent(t),function(t){if(void 0!==(t=Q.parse(t.response))&&t.length>0){var n=K(t.slice(0,5));e(n)}})})},onSelect:function(t,e,n){ot("wmtb").submit()}}),ot("wmtb").onsubmit=function(t){var e=ot("wmtbURL").value;if(0!==e.indexOf("http://")&&0!==e.indexOf("https://")&&!e.match(/[\w\.]{2,256}\.[a-z]{2,4}/gi))return document.location.href="/web/*/"+ot("wmtbURL").value,t.preventDefault(),!1},function(t,e,n){!function(t,e){l("HEAD",t,function(t){e(t.status<300,t.responseURL)})}("/web/"+e+"/http://web.archive.org/screenshot/"+t,function(t,s){if(!t)return n(!1);var o=function(t){var e=ct.exec(t);return e&&e[1]?e[1]:null}(s);if(!o)return console.warn("failed to extract timestamp from %s",s),void n(!1);var i=(w(o).getTime()-w(e).getTime())/1e3;console.log("screenshot delta: "+i+"s"),n(i>0&&i<60,i)})}(i,it,function(t,e){t?(ot("wm-screenshot").title="screenshot (delta: "+e+"s)",lt("wm-screenshot",!0)):lt("wm-screenshot",!1)}),d&&function(t,e){!function(t,e,n){const s="/web/"+e+"id_/http://wayback-metadata.archive.org/youtube-dl/"+t;l("GET",s,n)}(t,e,function(t){if(t.status<300){const e=Q.parse(t.responseText);lt("wm-video",!0),ot("wm-video").href=e.url,ot("wm-video").title="Video: "+e.title}else lt("wm-video",!1)})}(i,it),B(ot("wm-capinfo"),ot("wm-expand"),m),new H(ot("wm-save-snapshot-open"),i,it),O()},ajax:l,sp:function(){return at},pc:function(t){(Math.random()=0&&document.cookie.search("logged-in-sig")>=0)&&window.addEventListener("load",dt)}},window.parent!==window.self){const t={event:"playbackReady",pageUrl:document.location.href,pageTitle:document.title};window.parent.postMessage(JSON.stringify(t),"*"),document.addEventListener("DOMContentLoaded",()=>{const t={event:"domContentLoaded",pageUrl:document.location.href,pageTitle:document.title};window.parent.postMessage(JSON.stringify(t),"*")}),window.addEventListener("pagehide",t=>{const e={event:"pagehide",pageUrl:t.currentTarget.document.location.href,pageTitle:t.currentTarget.document.title};window.parent.postMessage(JSON.stringify(e),"*")}),"undefined"!=typeof navigation&&navigation.addEventListener("navigate",t=>{if("replace"===t.navigationType){const e={event:"navigate",pageUrl:t.destination.url,pageTitle:document.title};window.parent.postMessage(JSON.stringify(e),"*")}})}})(); // @license-end