"use strict";function gray(){$require(["cmsAjax"],function(n){var t=window.location.origin+"/ndesigner/api/gray";n.cmsAjax.postJson(t).then(function(n){200==n.code&&($("html")[0].style="filter:progid:DXImageTransform.Microsoft.Basiclmage(grayscale=1);-webkit-filter:grayscale(100%);")})})}function festival(){isFrontEnv()&&$require(["cmsAjax"],function(n){n.cmsAjax.get("/fwebapi/cms/lowcode/festivalPendant/getSettings").then(function(n){var t;n.data&&200==n.data.code&&n.data.settings&&(1==(t=n.data.settings).location&&window.pageObj&&1!=window.pageObj.isHomePage||(n=t.showTime&&2==t.showTime.length&&t.nowTime>=t.showTime[0]&&t.nowTime<=t.showTime[1]||!t.showTime||0==t.showTime.length,t.isOpen&&n&&$require(["/npublic/commonjs/restival.js"],function(n){n.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(n){var t=__ce.smartServiceUrl||"https://web-visitor.yun300.cn",e="".concat(t,"/visitormanager/intelligent/front/checkAndRegister?tenantId=").concat(tenant.tenantId,"&instance=").concat(tenant.bossProductInstance),t={account:localStorage.getItem("account_".concat(tenant.tenantId))};n.cmsAjax.postJson(e,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(n){smsFlag=!0,smsShowFun=new n(t.data)})):a()},function(){a()})})}function preventFish(){var n=location.hostname,t=getCookie("realhost")||"";t&&t!=n&&(t="/repository/cheat?req="+n+"&rel="+t,$.ajax({url:t}))}$(document).on("click","[smartService]",function(){isFrontEnv()&&(smsShowFun?smsFlag?smsShowFun.showFun():smsShowFun():smartServiceInit())}),preventFish();