function checkBrowserSupport(){try{if(!window.hasOwnProperty("crypto")||"object"!=typeof window.crypto.subtle)return"crypto";if(!window.hasOwnProperty("TextEncoder"))return"TextEncoder";if(!window.hasOwnProperty("WebAssembly")||"function"!=typeof window.WebAssembly.instantiate)return"WebAssembly"}catch(e){return console.error(e),"ECMAScript 2017 / ES2017"}return!0}function showBrowserCompatibilityWarning(e){function r(e){return OC.L10N.translate("passwords",e)}var o,t,n=OC.filePath("passwords","img","browser/"),a=document.getElementById("main"),s=r("CompatHeadline"),i=r("CompatText1")+"<br>"+r("CompatText2");throw"WebAssembly"===e&&(o=null,(t=OCP.InitialState.loadState("passwords","settings"))&&t["server.handbook.url"]&&(o=t["server.handbook.url.web"]+"Enable-WebAssembly"),s=r("CompatWASMHeadline"),i=r("CompatWASMText1")+"<br>"+r("CompatWASMText2")+"<br>"+(o?'<a target="_blank" rel="noreferrer noopener" href="'+o+'">':"")+r("CompatWASMHandbookLink")+(o?"</a>":"")+"<br><br>"+r("CompatWASMText3")),a.innerHTML='<div class="passwords-browser-compatibility"><h1 class="title">'+s+'</h1><div class="message">'+i+'</div><div class="browser"><a target="_blank" rel="noreferrer noopener" href="https://www.mozilla.org/firefox/new/" style="background-image: url('+n+'firefox.png)">Firefox</a><a target="_blank" rel="noreferrer noopener" href="https://vivaldi.com/download/" style="background-image: url('+n+'vivaldi.png)">Vivaldi</a><a target="_blank" rel="noreferrer noopener" href="https://brave.com/" style="background-image: url('+n+'brave.png)">Brave</a><a target="_blank" rel="noreferrer noopener" href="https://www.torproject.org/download/" style="background-image: url('+n+'tor.png)">Tor Browser</a></div></div>',a.setAttribute("class",""),console.error("Browser does not support "+e),new Error("Browser does not support "+e)}function checkSystem(){var e=checkBrowserSupport();!0!==e&&showBrowserCompatibilityWarning(e)}window.addEventListener("DOMContentLoaded",checkSystem,!1);