/g,">").replace(/\x22/g,""").replace(/\x27/g,"'"):""};fusion.parent=function(){var Y=parent;while(true){try{if(Y.document&&Y.document.domain==document.domain){return Y}}catch(Z){}if(Y==top){return window}try{Y=Y.parent}catch(Z){return window}}}();fusion.searchChain=function(ae,Z,aa,ab){Z=Z||fusion.parent||window;aa=aa||top;var Y=Z,ac,af=0,ad=[];while(true){ac=false;try{Y.document&&Y.document.domain==document.domain&&(ac=true)}catch(ag){}if(ac){if(ab){ad.push(Y)}else if(ae(Y)===true){return Y}}if(Y==aa||Y==top){if(ab){break}else{return null}}Y=Y.parent}if(ab){while(ad.length){if(ae(Y=ad.pop())===true){return Y}}return null}};var P=O(),I=function(){return false},v;fusion.searchChain(function(Z){var Y;e.platform=="qzone"&&Z.QZONE&&(Y=Z.QZONE.call)&&(v=Y);if(e.platform=="qzone"&&Z.QZONE&&(Y=Z.QZONE.appCanvas)){var ac=0;try{ac=Y.base.appInfo.appid}catch(ad){}fusion.call("control.activeOutLinkMonitor",{args:{appid:ac}});var ae=0,aa=function(){try{if(!Y.lang.appInfo||Y.lang.appInfo.hasmobile==void 0){ae++;if(ae>=6){return}setTimeout(aa,5000)}else{Y.lang.appInfo.hasmobile&&fusion.call("dialog.showAutoPush",{args:{isPortal:Y.lang.isPortal}})}}catch(ah){}};aa();try{var ab=b.getIntRandom();Y._HANDLER=Y._HANDLER||{};Y._HANDLER["_CANVAS2APP_"+ab]=function(ah){ah=ah||{};var aj=ah.key||"",ai=ah.args;switch(aj){case"callMethod":fusion.call(ai.name,{args:ai.args});break}};var aa=Y.send2app=new Z.Function("opt","var _ref=QZONE.appCanvas;try{_ref=_ref._HANDLER._CANVAS2APP_"+ab+";return _ref?(_ref(opt),true):false}catch(_){return false}");if(typeof aa!="function"){if(!Z._FUSION_SEND2APP_AGENT){var af=Z.document,ag=af.createElement("script");ag.innerHTML="var _FUSION_SEND2APP_AGENT = function (sn){return function (opt){_ref=QZONE.appCanvas;try{_ref=_ref._HANDLER['_CANVAS2APP_' + sn];return _ref?(_ref(opt),true):false}catch(_){return false}}};";af.getElementsByTagName("head")[0].appendChild(ag)}aa=Y.send2app=Z._FUSION_SEND2APP_AGENT(ab)}aa._HANDLER=window;I=function(){try{if(!Y.send2canvas){return false}Y.send2canvas.apply(Y,Array.prototype.slice.call(arguments,0));return true}catch(ah){return false}};I({key:"onInit"})}catch(ad){}}});fusion.addPlugin({"addiction.enable":function(Y,Z){},"addiction.reportTokenId":function(Y,ae){var aa=false;try{top.location.host==="gameapp.qq.com"&&top.location.pathname.indexOf("/qq/game/"+Y.appid)===0&&(aa=true)}catch(af){}if(!aa){return}var ab=function(ag,ah,ai){var al=Math.ceil(Math.random()*100000),aj="_Callback_"+al.toString(),ak=false;window[aj]=function(){ak=true};b.loadScript("https://appcenter.qzone.qq.com/services/qq_game_center_token?appid="+ag+"&appname="+encodeURIComponent(ah)+"&token_id="+ai+"&jsonpCallback="+aj);setTimeout(function(){!ak&&ab(ag,ah,ai)},5000)},ad=Y.param,ac,Z;Z=ad.match(/token_id=([a-zA-Z0-9\-]+)/);Z.length===2&&(ac=Z[1],ab(Y.appid,Y.appname,ac))},"canvas.setHeight":function(Y,Z){if(!Y.height||Y.height<0){fusion.reject(Z);return}var aa=function(ad){for(var ab=1,ae=c._dom.length;ab=ab.length&&fusion.consume(ae)},aa)}},"control.showFullWindow":function(Z,ad){var aa={appid:fusion.INFO.appid,title:Z.title||"",url:Z.url,height:Z.height||0,width:Z.width||0,showTitleOnly:true},Y=document.createElement("a");Y.href=aa.url;typeof String.prototype.endsWith==="undefined"&&(String.prototype.endsWith=function(ae){return this.indexOf(ae,this.length-ae.length)!==-1});var ac=function(ag,af){var ah=document.getElementsByTagName("head")[0],ae=document.createElement("script");ae.type="text/javascript";ae.src=ag;ae.onreadystatechange=af;ae.onload=af;ah.appendChild(ae)},ab=function(ae){window.fusionFullScreen(ae)};(Y.hostname.endsWith(".myqcloud.com")||Y.hostname.endsWith(".qqopenapp.com")||Y.hostname.endsWith(".qzoneapp.com")||Y.hostname.endsWith(".twsapp.com")||Y.hostname.endsWith(".qq.com"))&&(typeof window.fusionFullScreen==="undefined"?ac("//qzonestyle.gtimg.cn/open/fusion/fullscreen.js",function(){ab(aa)}):ab(aa))},"control.checkSameUin":function(Z,Y){P==0||O()==P?fusion.consume(Y):fusion.reject(Y)},"control.onActivityRegistered":function(Z,Y){I({key:"onActivityRegistered"})?fusion.consume(Y):fusion.reject(Y)},"control.getAccessInfo":function(aa,Y){var Z=function(ac,ad){var ae=new RegExp("(?:\\?|#|&)"+ac+"=([^&]*)(?:$|&|#)","i"),ab=ae.exec(ad);return ab?ab[1]:""};fusion.searchChain(function(ab){var ac={via:Z("via",ab.location.href)||"FUSION.NULL",magic_str:ab.QZONE&&ab.QZONE.appCanvas&&ab.QZONE.appCanvas.lang.appInfo.magic_str||""},ad="";fusion.consume(Y,{args:ac});return true},false,false,true)},"nav.relogin":function(Z){var Y;fusion.searchChain(function(aa){var ab;if(aa.QZONE&&aa.QZONE.appCanvas&&aa.QZONE.appCanvas.adapter&&(ab=aa.QZONE.appCanvas.adapter.getAppUrl)){try{Y=ab(e.appid,{via:"QZ.RELOGIN"});aa.location.href=Y;return true}catch(ac){}}})||(Y={qzone:"http://gameapp.qq.com/"+e.appid,pengyou:"http://apps.pengyou.com/"+e.appid,pyqq:"http://apps.pengyou.qq.com/"+e.appid,weibo:"http://app.t.qq.com/app/play/"+e.appid}[e.platform])&&(top.location.href=Y+"?via=QZ.RELOGIN")},"nav.toApp":function(Y){var Z=function(ab,ac){var ad=new RegExp("(?:\\?|#|&)"+ab+"=([^&]*)(?:$|&|#)","i"),aa=ad.exec(ac);return aa?aa[1]:""};fusion.searchChain(function(ab){var af,aa,ac;if(ab.QZONE&&ab.QZONE.appCanvas&&ab.QZONE.appCanvas.adapter&&(af=ab.QZONE.appCanvas.adapter.getAppUrl)){try{aa=af(Y.appid)}catch(ag){}}else{e.platform=="weibo"&&(aa="http://app.t.qq.com/app/play/"+Y.appid)}try{ac=top.productInfo.id;ac==="16db8314-bc2f-4c94-a424-1612b7f05876"&&(aa="https://game.qzone.qq.com/qq/game/"+Y.appid);ac==="6bba8142-5a24-4336-9254-bcaa2ae90be8"&&(aa="http://gameapp.qq.com/game/"+Y.appid);var ad=[];if(ac){var ae=Z("via",top.location.href);ae&&ae.length>0&&ad.push("via="+ae);top.location.href.indexOf("DEBUG")>-1&&ad.push("DEBUG");top.location.href.indexOf("NOLOCALSTORAGE")>-1&&ad.push("NOLOCALSTORAGE")}ad.length>0&&(aa=aa+"?"+ad.join("&"))}catch(ag){}if(aa){if(ac){top.location.href=aa}else{Y.self?ab.location.href=aa:window.open(aa);return true}}})},"nav.toFriendHome":function(Y){fusion.searchChain(function(aa){var Z;Z=/^[0-9A-F]{32}$/.test(Y.openid)?{qzone:"https://apphub.qzone.qq.com/fusion/cgi-bin/qzapps/userapp_redirect.cgi",pengyou:"http://fusion.pengyou.com/cgi-bin/xyapps/xy_third_jump_HomePage.cgi",pyqq:"https://apphub.qzone.qq.com/fusion/cgi-bin/xyapps/xy_third_jump_HomePage.cgi"}[e.platform]+"?appid="+e.appid+"&openid="+Y.openid:{qzone:"https://user.qzone.qq.com/",pengyou:"http://profile.pengyou.com/index.php?mod=profile&u=",pyqq:"http://profile.pengyou.qq.com/index.php?mod=profile&u="}[e.platform]+Y.openid;if(Z){Y.self?aa.location.href=Z:window.open(Z);return true}})},"nav.toHome":function(Y){fusion.searchChain(function(aa){var Z={qzone:"https://rc.qzone.qq.com/infocenter",pengyou:"http://home.pengyou.com/index.php?mod=home",pyqq:"http://home.pengyou.qq.com/index.php?mod=home",weibo:"http://t.qq.com/"}[e.platform];Y.self?aa.location.href=Z:window.open(Z);return true})},"nav.openFullScreen":function(Z){var aa={appid:fusion.INFO.appid,title:Z.serverName||Z.title||"",url:Z.url,showTitleOnly:true},Y=document.createElement("a");Y.href=aa.url;typeof String.prototype.endsWith==="undefined"&&(String.prototype.endsWith=function(ad){return this.indexOf(ad,this.length-ad.length)!==-1});var ac=function(af,ae){var ag=document.getElementsByTagName("head")[0],ad=document.createElement("script");ad.type="text/javascript";ad.src=af;ad.onreadystatechange=ae;ad.onload=ae;ag.appendChild(ad)},ab=function(ad){window.fusionFullScreen(ad)};(Y.hostname.endsWith(".myqcloud.com")||Y.hostname.endsWith(".qqopenapp.com")||Y.hostname.endsWith(".qzoneapp.com")||Y.hostname.endsWith(".twsapp.com")||Y.hostname.endsWith(".qq.com"))&&(typeof window.fusionFullScreen==="undefined"?ac("//qzonestyle.gtimg.cn/open/fusion/fullscreen.js",function(){ab(aa)}):ab(aa))},"control.getRewardType":function(ac,Y){var ab=function(){try{return top.location.href===top.location.href}catch(ad){return false}}();if(!ab){fusion.reject(Y,{args:{rewardType:"HomeV6"}});return}var Z=(top.location.search||"").match(/via=([\.a-z0-9]+)/i);if(Z&&Z.length===2&&Z[1].indexOf("QZSTORE.V6")>-1){if(b.ua.ie){fusion.consume(Y,{args:{rewardType:"HomeV6"}});return}else if(top.document.referrer){var aa=document.createElement("a");aa.href=top.document.referrer;if(aa.host==="game.qzone.qq.com"){fusion.consume(Y,{args:{rewardType:"HomeV6"}});return}}}fusion.reject(Y,{args:{rewardType:"HomeV6"}})}});fusion._complete()}});fusion.use("api")();