"use strict";function gray(){$require(["cmsAjax"],function(e){var t=window.location.origin+"/ndesigner/api/gray";e.cmsAjax.postJson(t).then(function(e){200==e.code&&($("html")[0].style="filter:progid:DXImageTransform.Microsoft.Basiclmage(grayscale=1);-webkit-filter:grayscale(100%);")})})}function festival(){isFrontEnv()&&$require(["cmsAjax"],function(e){e.cmsAjax.get("/fwebapi/cms/lowcode/festivalPendant/getSettings").then(function(e){var t;e.data&&200==e.data.code&&e.data.settings&&(1==(t=e.data.settings).location&&window.pageObj&&1!=window.pageObj.isHomePage||(e=t.showTime&&2==t.showTime.length&&t.nowTime>=t.showTime[0]&&t.nowTime<=t.showTime[1]||!t.showTime||0==t.showTime.length,t.isOpen&&e&&$require(["/npublic/commonjs/restival.js"],function(e){e.init(t)})))})})}window.pageObj&&1==window.pageObj.isHomePage&&gray(),festival();var smsFlag=!1,smsShowFun=null;function smartServiceInit(){function a(){$require(["pl_toast"],function(){$.pl_toast({msg:i18n.sms_no})}),smsFlag=!1,smsShowFun=function(){$.pl_toast({msg:i18n.sms_no})}}$require(["cmsAjax"],function(e){var t=__ce.smartServiceUrl||"https://web-visitor.yun300.cn",n="".concat(t,"/visitormanager/intelligent/front/checkAndRegister?tenantId=").concat(tenant.tenantId,"&instance=").concat(tenant.bossProductInstance),t={account:localStorage.getItem("account_".concat(tenant.tenantId))};e.cmsAjax.postJson(n,t).then(function(t){200==t.status&&t.data?(t.data.account&&localStorage.setItem("account_".concat(tenant.tenantId),t.data.account),$require(["/npublic/commonjs/smartService.js"],function(e){smsFlag=!0,smsShowFun=new e(t.data)})):a()},function(){a()})})}function preventFish(){var e=location.hostname,t=getCookie("realhost")||"";t&&t!=e&&(t="/repository/cheat?req="+e+"&rel="+t,$.ajax({url:t}))}function wxShare(){$require(["cmsAjax","/npublic/commonjs/jweixin/jweixin.js","pl_util"],function(e){var t={pageUrl:location.href,appCode:pageObj.appId,tid:pageObj.contentType,pageType:pageObj.pageType,isHomePage:pageObj.isHomePage,pageId:pageObj.pageId,contentId:pageObj._detailId,pageName:pageObj.name};e.cmsAjax.postJson("/fwebapi/cms/api/tdk/getWxShareInfo",t).then(function(e){var t,n;e.data.wxJsConfig&&(t=e.data.wxJsConfig,e=e.data.wxShareContent,n={title:e.title,desc:e.desc,link:location.href,imgUrl:$.handleDataImg(e.imgUrl)},wx.config({debug:!1,appId:t.appId,timestamp:t.timestamp,nonceStr:t.nonceStr,signature:t.signature,jsApiList:["updateAppMessageShareData","updateTimelineShareData"]}),wx.ready(function(){wx.updateAppMessageShareData(n),wx.updateTimelineShareData(n)}))})})}$(document).on("click","[smartService]",function(){isFrontEnv()&&(smsShowFun?smsFlag?smsShowFun.showFun():smsShowFun():smartServiceInit())}),268516!=tenant.tenantId&&preventFish(),isWeixin()&&wxShare();