代码拉取完成,页面将自动刷新
var popup={sa:{},info:{},lib_version:"0.4.5",defaultPara:{platform:"H5",preload_image:!0,encrypt_cookie:!1},serverData:{},localData:{global_popup_count:[],local_update_time:null,eventQueue:[],update_time:null},eventRule:{},convertPlans:[],isRun:!1,setArg:function(e){var t={};if(e&&"[object Object]"===Object.prototype.toString.call(e)){for(var n in e)n&&"popup_window_content"!==n&&(t[n]=e[n]);return JSON.stringify(t,null," ")}return e},log:function(){if(!0===popup.info.show_log&&"object"==typeof console&&"function"==typeof console.log)try{return arguments[0]=popup.setArg(arguments[0]),arguments[1]=popup.setArg(arguments[1]),console.log.apply(console,arguments)}catch(e){console.log(arguments[0])}},config:{storageName:"sensorsdata202002-popupdata",loadedSign:"SensorsData2015JSSDKH5PopupIsLoad"}},_={visibility:function(e){e=e||{};var t={hidden:undefined,visibilityChange:undefined,isSupported:function(){return"undefined"!=typeof this.hidden},_visible:e.onVisible,_hidden:e.onHidden,_nativeSwitch:function(){!0===document[this.hidden]?this._hidden():this._visible()},listen:function(){try{this.isSupported()?document.addEventListener(this.visibilityChange,function(){t._nativeSwitch.apply(t,arguments)},1):document.addEventListener?(window.addEventListener("focus",this._visible,1),window.addEventListener("blur",this._hidden,1)):(document.attachEvent("onfocusin",this._visible),document.attachEvent("onfocusout",this._hidden))}catch(e){}},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()}};t.init()},getRgba:function(e){return"object"!=typeof e?e:"rgba("+e.r+","+e.g+","+e.b+","+e.a+")"},conversionNum:function(e){if(e){if(/^[0|1]?\.\d+$/.test(e))return 100*Number(e)+"%";var t=/^(-?\d+(\.\d+)?)px$/.exec(e);return t?(Number(t[1])/375*window.screen.width).toFixed(2)+"px":e}},boxModel:function(e){return function(t){if("object"!=typeof t)return e+":"+t+";";var n="";for(var p in t)n+=e+"-"+p+":"+_.conversionNum(t[p])+";";return n}},localStorage:{get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t=null;try{t=JSON.parse(_.localStorage.get(e))||null}catch(n){}return t},set:function(e,t){window.localStorage.setItem(e,t)},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__sensorsdatasupport__",n="testIsSupportStorage";_.localStorage.set(t,n),_.localStorage.get(t)!==n&&(e=!1),_.localStorage.remove(t)}catch(p){e=!1}return e}},addEvent:function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation,t._getPath=e._getPath),t}e._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||function(){try{var t=e.target,n=[t];if(null===t||null===t.parentElement)return[];for(;null!==t.parentElement;)t=t.parentElement,n.unshift(t);return n}catch(p){return[]}}()},e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0};(function(t,n,p){if(t&&t.addEventListener)t.addEventListener(n,function(t){t._getPath=e._getPath,p.call(this,t)},!1);else{var o="on"+n,i=t[o];t[o]=function(t,n,p){return function(o){if(!(o=o||e(window.event)))return undefined;o.target=o.srcElement;var i,a,r=!0;return"function"==typeof p&&(i=p(o)),a=n.call(t,o),!1!==i&&!1!==a||(r=!1),r}}(t,p,i)}}).apply(null,arguments)},extend:function(e){var t=Array.prototype.slice;return _.each(t.call(arguments,1),function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])}),e},extend2Lev:function(e){return _.each(Array.prototype.slice.call(arguments,1),function(t){for(var n in t)void 0!==t[n]&&(_.isObject(t[n])&&_.isObject(e[n])?_.extend(e[n],t[n]):e[n]=t[n])}),e},each:function(e,t,n){var p=Object.prototype.hasOwnProperty,o=Array.prototype.forEach,i={};if(null==e)return!1;if(o&&e.forEach===o)e.forEach(t,n);else if(e.length===+e.length){for(var a=0,r=e.length;a<r;a++)if(a in e&&t.call(n,e[a],a,e)===i)return!1}else for(var s in e)if(p.call(e,s)&&t.call(n,e[s],s,e)===i)return!1},xhr:function(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}},ajax:function(e){function t(e){if(!e)return"";try{return JSON.parse(e)}catch(t){return{}}}e.timeout=e.timeout||2e4,e.credentials="undefined"==typeof e.credentials||e.credentials;var n=_.xhr(e.cors);if(!n)return!1;e.type||(e.type=e.data?"POST":"GET");var p,o=(e=_.extend({success:function(){},error:function(){}},e)).success,i=e.error;e.success=function(e){o(e),p&&(clearTimeout(p),p=null)},e.error=function(e){i(e),p&&(clearTimeout(p),p=null)},p=setTimeout(function(){!function(){try{_.isObject(n)&&n.abort&&n.abort()}catch(t){sd.log(t)}p&&(clearTimeout(p),p=null,e.error&&e.error(),n.onreadystatechange=null,n.onload=null,n.onerror=null)}()},e.timeout),"undefined"!=typeof XDomainRequest&&n instanceof XDomainRequest&&(n.onload=function(){e.success&&e.success(t(n.responseText)),n.onreadystatechange=null,n.onload=null,n.onerror=null},n.onerror=function(){e.error&&e.error(t(n.responseText),n.status),n.onreadystatechange=null,n.onerror=null,n.onload=null}),n.onreadystatechange=function(){try{4==n.readyState&&(n.status>=200&&n.status<300||304==n.status?e.success(t(n.responseText)):e.error(t(n.responseText),n.status),n.onreadystatechange=null,n.onload=null)}catch(p){n.onreadystatechange=null,n.onload=null}},n.open(e.type,e.url,!0);try{e.credentials&&(n.withCredentials=!0),_.isObject(e.header)&&_.each(e.header,function(e,t){n.setRequestHeader&&n.setRequestHeader(t,e)}),e.data&&(e.cors||n.setRequestHeader&&n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?n.setRequestHeader&&n.setRequestHeader("Content-type","application/json; charset=UTF-8"):n.setRequestHeader&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(a){sd.log(a)}n.send(e.data||null)},getUuid:function(){var e=function(){return Math.random().toString(16).replace(".","")};return function(){var t=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)}()+"-"+e()+"-"+e();return t||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},isEmptyObject:function(e){var t=Object.prototype.hasOwnProperty;if(_.isObject(e)){for(var n in e)if(t.call(e,n))return!1;return!0}return!1},filter:function(e,t,n){var p=Object.prototype.hasOwnProperty;if(e.filter)return e.filter(t);for(var o=[],i=0;i<e.length;i++)if(p.call(e,i)){var a=e[i];t.call(n,a,i,e)&&o.push(a)}return o},isObject:function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},getConvertNumberValue:function(e){return _.isString(e)&&(e=Number(e)),Math.floor(1e3*e)/1e3},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isString:function(e){return"[object String]"==Object.prototype.toString.call(e)},isDate:function(e){return"[object Date]"==Object.prototype.toString.call(e)},isBoolean:function(e){return"[object Boolean]"==Object.prototype.toString.call(e)},isNumber:function(e){return"[object Number]"==Object.prototype.toString.call(e)&&/[\d\.]+/.test(String(e))},isFunction:function(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t},getURLSearchParams:function(e){for(var t=function(e){return decodeURIComponent(e)},n={},p=(e=e||"").substring(1).split("&"),o=0;o<p.length;o++){var i=p[o].indexOf("=");if(-1!==i){var a=p[o].substring(0,i),r=p[o].substring(i+1);a=t(a),r=t(r),n[a]=r}}return n},URL:function(e){var t,n={},p=["hash","host","hostname","href","origin","password","pathname","port","protocol","search","username"];if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(e){return!1}}())(n=new URL(e)).searchParams||(n.searchParams=(t=_.getURLSearchParams(n.search),{get:function(e){return t[e]}}));else{if(!1===/^https?:\/\/.+/.test(e))throw"Invalid URL";var o=document.createElement("a");o.href=e;for(var i=p.length-1;i>=0;i--){var a=p[i];n[a]=o[a]}n.hostname&&"string"==typeof n.pathname&&0!==n.pathname.indexOf("/")&&(n.pathname="/"+n.pathname),n.searchParams=function(){var e=_.getURLSearchParams(n.search);return{get:function(t){return e[t]}}}()}return n},contentLoaded:function(e,t){var n=!1,p=!0,o=e.document,i=o.documentElement,a=o.addEventListener,r=a?"addEventListener":"attachEvent",s=a?"removeEventListener":"detachEvent",u=a?"":"on",l=function(p){"readystatechange"==p.type&&"complete"!=o.readyState||(("load"==p.type?e:o)[s](u+p.type,l,!1),!n&&(n=!0)&&t.call(e,p.type||p))},c=function(){try{i.doScroll("left")}catch(e){return void setTimeout(c,50)}l("poll")};if("complete"==o.readyState)t.call(e,"lazy");else{if(!a&&i.doScroll){try{p=!e.frameElement}catch(_){}p&&c()}o[r](u+"DOMContentLoaded",l,!1),o[r](u+"readystatechange",l,!1),e[r](u+"load",l,!1)}},indexOf:function(e,t){var n=e.indexOf;if(n)return n.call(e,t);for(var p=0;p<e.length;p++)if(t===e[p])return p;return-1}};popup._=_,popup.isSupportPopup=function(){return _.localStorage.isSupport()},popup.listenPageStateChange=function(){var e=!0;_.visibility({onVisible:function(){popup.log("\u9875\u9762\u89e6\u53d1visible-",(new Date).getMinutes(),"\u5206",(new Date).getSeconds()),!1===e&&(popup.updateDataAndSetListen.startState(),e=!0)},onHidden:function(){popup.log("\u9875\u9762\u89e6\u53d1hidden-",(new Date).getMinutes(),"\u5206",(new Date).getSeconds()),!0===e&&(popup.updateDataAndSetListen.stopAllState(),e=!1)}})},popup.getWebSDK=function(){return!!(_.isObject(window.sensorsDataAnalytic201505)&&_.isObject(window.sensorsDataAnalytic201505.readyState)&&window.sensorsDataAnalytic201505.readyState.state>=3)&&window.sensorsDataAnalytic201505},popup.getPopupInfo=function(e){if(!_.isObject(e)||!_.isObject(e.template))return{};var t={$sf_msg_title:"",$sf_msg_content:"",$sf_msg_image_url:""};return function n(e){_.each(e.subviews,function(e){var p=e.properties||{};"title"===p.msgType?t.$sf_msg_title=p.text:"content"===p.msgType?t.$sf_msg_content=p.text:"image"===e.type&&(t.$sf_msg_image_url=p.image),e.subviews&&n(e)})}(e.template),t},popup.getSFCampaign=function(e){e=_.isObject(e)?e:{};var t={planId:"",name:"",content:null,type:""};return t.planId=e.plan_id||"",t.name=e.cname||"",t.content=_.isObject(e.popup_window_content)?e.popup_window_content.content:"",t.type=_.isObject(e.popup_window_content)&&e.popup_window_content.popup_type?e.popup_window_content.popup_type:"PRESET",t},popup.getImageList=function(e){if(!_.isArray(e))return!1;for(var t,n,p=new RegExp('("(backgroundImage|image)":"(http(s)?://.[^"]*)")',"g"),o=new RegExp('http(s)?://.[^S^"]*'),i={},a=e.length,r=[],s=0;s<a;s++)if(_.isObject(e[s])&&"ACTIVE"===e[s].status.toLocaleUpperCase()&&!0===e[s].is_audience&&(e[s].strategy_id?!1!==e[s].is_trigger:!0!==e[s].is_control_group)&&e[s].popup_window_content&&e[s].popup_window_content.content&&(t=e[s].popup_window_content.content.match(p)))for(var u=0,l=t.length;u<l;u++)(n=t[u].match(o))&&n.length>0&&(i[n[0]]||(i[n[0]]=1));return _.each(i,function(e,t){r.push(t)}),r},popup.setIsLoad=function(){if(window.self===window.top){if(window[popup.config.loadedSign])return!1;if("undefined"==typeof window[popup.config.loadedSign])return window[popup.config.loadedSign]=!0,!0}else try{return!window.top[popup.config.loadedSign]&&(window.top[popup.config.loadedSign]=!0,!0)}catch(e){return popup.log("\u975e\u540c\u57df\u540diframe\u5185\u5d4c\u4e0d\u80fd\u83b7\u53d6\u7236\u7ea7\u7a97\u4f53\u5185\u5bb9",e),!0}};var IMAGE_MAP={close:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAe1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////NgkbwAAAAKHRSTlMA5if6t/B0UjMSxpAtJB4MBfTr30oY6NjV0r2loZ6XkoaBenFp3UA/LNePaQAAAsxJREFUWMOsltlygzAMRRXMZsAsAZJmX9v6/7+wg1QXpjGxCDkvyWTIQZauDcCgzKLrPtnUSyGW9SbZX6OshDcQh36lH6j8MJ7pTZd6lGX6sr0IP7SDj7CA6chLoBkEFzm14nM1/P/2eGti1RZFq+LmdtwGw7afJ1Ue1dogcGCW4QptqCO2OPe1IbnL0Y7dE23wc2bJgSn44MFTvIMwLeMUXqZGfGKUkp+MPC2dwUjMGhWwUL7pnXRUsdbIIpow84VG1k9Xmf1e5U8Kq/R/68memAPqcggTCQUNc9SdL+iCL5jMd0B1j/RErh3LYrRyLa2po2x8KngJ9Uk5sWUwpZoVvIiiulNLhMwgHDhDED2MEH8X3zCDL4HV/R8lRTOEWYS0KWzt8GEm/mNLihpHKOeqJY6yLqDnbO42F1r9eXCzitMOfkuqfvkXTId6h1phSi5/ncbgneAtnDCAxTAzIn+POhfDFOObzAEsNLu0HXO06a4BCwd89wEk1h2ezdwl0rObvS5nNreHurg/lxKwsNPoHjXrHVhI+lMK3xjvMH4YelYzCSzc8V3zrx9CWtu5MG67eWEdhBSmI+GT7eIZt+Nny7YJ+y8ON9/cF1tWVL7LzTdTi6sSMtw9AE432wwl7u6MzqotMNwcM7Glc/TafRyB4+aa4dhdcoV993EDlptphlt3zZ72TgM8N88MDe3vDQWE5V6tWGaKyAbwqaiA5+aZQeETkk6QFtxuvhlaOkVwwxfgdq/IvHKbocBj6ac5OzYCIASBKGo10n+HBgakMswbaYDgTmX3fzgafhD4G+Hhg1cGXnT4PMFHVayCdVcBXGBu7cKwACOOC2YwTsIQ7KI7LBywJrlyByupK9Kw/lto4VFLAqLdmRwJiBDWwjDOI0QPPhPXRn3yTlyrILND4w7oOw3h5AlTPk5U/ddrZSk4RWW+C9hp2rgru6GiP/678n2UFPV1AAAAAElFTkSuQmCC"},NODE_NAME_MAP={row:"div",column:"div",label:"pre",image:"img",button:"button",link:"button",image_button:"img"},NODE_STYLE_MAP={textAlign:"text-align",font:"font-size",backgroundColor:"background-color",borderWidth:function(e){return"border-width: "+e+";border-style: solid;"},borderColor:"border-color",cornerRadius:"border-radius",backgroundImage:function(e){return"background-image:url("+e+");background-repeat: no-repeat;background-size: 100% 100%;"},margin:_.boxModel("margin"),padding:_.boxModel("padding"),maxHeight:"max-height",maxWidth:"max-width",scrollableX:function(e){if(e)return"overflow-x:auto;"},scrollableY:function(e){if(e)return"overflow-y:auto;"}};function ElementRender(e){this.properties=e.properties,this.template=e.template,this.maskEle=null,this.containerEle=null,this.msg={$sf_msg_title:"",$sf_msg_content:"",$sf_msg_image_url:"",$sf_succeed:"",$sf_fail_reason:"",$sf_msg_id:"",plan:{}},this.popupCheckInstance=null}ElementRender.prototype={constructor:ElementRender,render:function(){var e=this;return!document.querySelector("div[data-sf-mask]")&&(e.template.isRoot=!0,e.containerEle=e.createView(e.template),e.maskEle=e.getElement({nodeName:"div",attr:{"data-sensors-click":!0},style:e.getStyle({position:"fixed",width:"100%",height:"100%",top:"0px",left:"0px",backgroundColor:_.getRgba(e.properties.maskColor),"z-index":999998})}),_.addEvent(e.maskEle,"click",function(t){if(t.target.getAttribute("data-ele-mask")&&e.properties.maskCloseEnabled)return popup.track.maskClick(e),!1;popup.track.elementClickCallback(t,e)}),e.maskEle.setAttribute("data-sf-mask",!0),e.maskEle.appendChild(e.containerEle),_.contentLoaded(window,function(){e.appendPopup()}),!0)},appendPopup:function(){if(window.self===window.top)document.body.appendChild(this.maskEle);else try{window.top.document.body.appendChild(this.maskEle)}catch(n){document.body.appendChild(this.maskEle)}var e=document.querySelector("[data-ele-mask] > div"),t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;e&&e.offsetHeight>t&&(e.style.marginTop="auto")},getElement:function(e){var t=e.nodeName||"div",n=e.style,p=e.attr,o=e.prop,i=e.child,a=e.action,r=e.element_info,s=document.createElement(t);return n&&s.setAttribute("style",n),p&&_.each(p,function(e,t){e&&s.setAttribute(t,e)}),o&&_.each(o,function(e,t){e&&(s[t]=e)}),i&&i.length&&_.each(i,function(e){if(!e)return!1;s.appendChild(e)}),a&&a.H5&&a.H5.length&&s.setAttribute("data-action",JSON.stringify(a.H5)),r&&s.setAttribute("data-info",JSON.stringify(r)),s},getStyle:function(e){var t="",n=["msgType","text","image","name","isHidden","align","localImageName"];return _.each(e,function(e,p){e=_.conversionNum(e);var o=NODE_STYLE_MAP[p];if(_.indexOf(n,p)>=0)return!1;_.isString(o)?t+=o+":"+_.getRgba(e)+";":_.isFunction(o)?t+=o(e)+";":t+=p+":"+_.getRgba(e)+";"}),t},createView:function(e){var t=[],n={"box-sizing":"border-box",display:"block","pointer-events":"auto",overflow:"hidden"},p={},o={},i=NODE_NAME_MAP[e.type]||null;e.properties=e.properties||{},e.layout=e.layout||{};var a=e.properties.font,r=a?1.7*parseInt(a)+"px":"normal";if(e.properties.isHidden)return!1;switch(e.properties.text?o.innerText=e.properties.text:e.properties.image&&(p["data-sensors-click"]=!0,e.properties.localImageName?p.src=IMAGE_MAP[e.properties.localImageName]:p.src=e.properties.image),e.isRoot&&(e.layout.margin.top="-40px",_.extend(n,{position:"relative","z-index":999999,"pointer-events":"none"})),e.type){case"row":n.display="flex";break;case"link":_.extend(n,{"text-decoration":"underline",outline:"none","letter-spacing":"1px","line-height":r});break;case"label":_.extend(n,{"white-space":"pre-wrap","word-wrap":"break-word","letter-spacing":"1px","line-height":r,"margin-top":"0px","margin-bottom":"0px"});break;case"button":_.extend(n,{outline:"none","letter-spacing":"1px","line-height":r})}_.extend(n,e.layout,e.properties),e.subviews&&e.subviews.length>0&&_.each(e.subviews,function(e){t.push(this.createView(e))},this);var s=this.getElement({element_info:{$sf_msg_element_type:e.type,$sf_msg_element_content:e.properties.text||""},nodeName:i,attr:p,prop:o,style:this.getStyle(n),child:t,action:e.action});if(e.layout.align){var u=document.createElement("div");n="display:flex;justify-content:"+{center:"center",left:"flex-start",right:"flex-end"}[e.layout.align]+";";return e.isRoot?(n+="width:100%;height:100%;overflow-y:auto;box-sizing: border-box;align-items:center;",u.setAttribute("style",n),u.setAttribute("data-ele-mask",!0)):u.setAttribute("style",n),u.appendChild(s),u}return s},destory:function(){var e=this.msg.plan.plan_id||"";if(window.self===window.top)document.body.removeChild(this.maskEle);else try{window.top.document.body.removeChild(this.maskEle)}catch(t){document.body.removeChild(this.maskEle)}popup.info.popup_listener.onClose(e),popup.info.popup_campaign_listener.onEnd(popup.getSFCampaign(this.msg.plan)),this.popupCheckInstance&&this.popupCheckInstance.resetPopupIntervalWindow()}},popup.ElementRender=ElementRender,popup.handlerCampaign=function(e){var t,n=e,p=_.getUuid()(),o=n.plan.popup_window_content;if(!_.isObject(o))return n.popupFailed(1001,!1,{uuid:p,content:"",plan:n.plan}),!1;if(o.content)try{t=JSON.parse(o.content)}catch(u){popup.log(u)}var i=popup.getSFCampaign(n.plan),a={state:"",isCustom:!1},r=!0;try{r=popup.info.popup_campaign_listener.shouldStart(i)}catch(u){r=!1,popup.log(u)}var s={uuid:p,content:t,plan:n.plan};switch(n.plan.strategy_id?n.plan.is_trigger?r?"CUSTOMIZED"===o.popup_type?"withoutCampaignListener"===popup.info.supportCustom?a.state="CAMPAIGN_CUSTOMIZED_NULL_LISTENER":"withoutStart"===popup.info.supportCustom?a.state="CAMPAIGN_CUSTOMIZED_LISTENER_NULL_START":_.isString(o.content)?a.state="CAMPAIGN_TRIGGER_CUSTOMIZED_START":a.state="DIALOG_NOT_SHOW_JSON_FAILED":"PRESET"===o.popup_type&&_.isObject(t)&&_.isObject(t.properties)&&_.isObject(t.template)?a.state="DIALOG_SHOW":a.state="DIALOG_NOT_SHOW_JSON_FAILED":a.state="CAMPAIGN_NOT_START_LISTENER_START":a.state="CAMPAIGN_NOT_START_TRIGGER":n.plan.is_control_group?a.state="DIALOG_NOT_SHOW":r?_.isObject(t)&&t.properties&&t.template?a.state="DIALOG_SHOW":a.state="DIALOG_NOT_SHOW_JSON_FAILED":a.state="CAMPAIGN_NOT_START_LISTENER_START",a.isCustom=!(!o.popup_type||"CUSTOMIZED"!==o.popup_type),popup.log("campaign:",a,"plan:",n.plan.cname),a.state){case"DIALOG_SHOW":n.showPopup(s);break;case"CAMPAIGN_TRIGGER_CUSTOMIZED_START":n.customCampaign(s);break;case"CAMPAIGN_NOT_START_LISTENER_START":n.popupFailed(1004,a.isCustom,s);break;case"CAMPAIGN_CUSTOMIZED_NULL_LISTENER":case"CAMPAIGN_CUSTOMIZED_LISTENER_NULL_START":n.popupFailed(1006,a.isCustom,s);break;case"DIALOG_NOT_SHOW_JSON_FAILED":n.popupFailed(1001,a.isCustom,s);break;case"CAMPAIGN_NOT_START_TRIGGER":n.popupFailed(1005,a.isCustom,s);break;case"DIALOG_NOT_SHOW":n.popupFailed(1003,a.isCustom,s);break;default:popup.log("CampaignState\u5f02\u5e38")}},popup.track={getPublicProps:function(e){var t=e.plan,n={$sf_lib_version:popup.lib_version,$sf_plan_type:"\u8fd0\u8425\u8ba1\u5212",$sf_channel_service_name:"SENSORS_FOCUS",$sf_channel_category:"POPUP",$sf_platform_tag:popup.info.platform,$sf_msg_id:e.$sf_msg_id};return _.isEmptyObject(t)||!_.isObject(t)?n:(n.$sf_plan_id=t.plan_id+"",n.$sf_plan_strategy_id=t.strategy_id?t.strategy_id:t.is_control_group?"-1":"0",t.audience_id&&(n.$sf_audience_id=t.audience_id+""),t.section_id&&(n.$sf_section_id=String(t.section_id),n.$sf_plan_type="\u65b0\u8d44\u6e90\u4f4d"),n)},popupDisplay:function(e){var t={$sf_msg_title:e.$sf_msg_title,$sf_msg_content:e.$sf_msg_content,$sf_msg_image_url:e.$sf_msg_image_url,$sf_succeed:e.$sf_succeed,$sf_fail_reason:e.$sf_fail_reason};this.trackEvent("$PlanPopupDisplay",t,e)},trackEvent:function(e,t,n){var p=popup.track.getPublicProps(n);_.extend(t,p),_.each(t,function(e,n){""!==e&&e!==undefined||delete t[n]}),popup.sa.track(e,t)},maskClick:function(e){if(!e.msg)return!1;var t={$sf_close_type:"POPUP_CLOSE_MASK",$sf_msg_title:e.msg.$sf_msg_title,$sf_msg_content:e.msg.$sf_msg_content,$sf_msg_image_url:e.msg.$sf_msg_image_url,$sf_msg_element_type:"mask",$sf_msg_action_id:e.properties.maskActionId};this.trackEvent("$PlanPopupClick",t,e.msg),e.destory()},elementClickCallback:function(e,t){var n=e.target,p=n.getAttribute("data-action"),o=n.getAttribute("data-info"),i=t.msg||{};if(!p)return!1;try{var a=(JSON.parse(p)||{})[0],r=JSON.parse(o)||{}}catch(e){popup.log("elementClickCallback error",e)}var s={type:a.type,value:_.isString(a.value)?a.value:"",extra:_.isObject(a.value)?a.value:""},u=t.msg.plan?t.msg.plan.plan_id:"",l={$sf_msg_title:i.$sf_msg_title,$sf_msg_content:i.$sf_msg_content,$sf_msg_image_url:i.$sf_msg_image_url,$sf_msg_element_type:r.$sf_msg_element_type,$sf_msg_element_content:r.$sf_msg_element_content,$sf_msg_element_action:a.type,$sf_msg_action_id:a.id,$sf_close_type:"close"===a.type?a.$sf_close_type:""};this.trackEvent("$PlanPopupClick",l,i);try{popup.info.popup_listener.onClick(u,s)}catch(e){popup.log("popup_listener.onClick error",e)}if("close"===a.type)t.destory();else if(a.closeable&&t.destory(),"auto"===popup.info.popup_listener.openlink&&"openlink"===a.type){if("http"!==a.value.slice(0,4))return!1;window.location.href=a.value}}};var salog=popup.log;popup.changeCovertStatus=function(e){var t=JSON.parse(JSON.stringify(popup.convertPlans));_.each(t,function(t,n){if(!t.is_in_convert_window)return!1;var p=t.is_in_convert_window.step,o=t.is_in_convert_window.uuid;if(popup.convertPlans[n].is_in_convert_window.step=Math.min(2*p,6e5),!e)return!1;_.each(e,function(e){e.popup_display_uuid===o&&e.convert_time&&(salog("--\u8f6c\u5316\u7a97\u53e3- \u76ee\u6807\u4e8b\u4ef6\u5df2\u7ecf\u5b8c\u6210 - \u6ee1\u8db3",popup.convertPlans[n].plan_id),delete popup.convertPlans[n].is_in_convert_window,popup.convertPlans.splice(n,1))})}),popup.updateDataAndSetListen.updateLocalData()},popup.asyncConvert=function(e){var t=popup.info.project,n=!1;if(!e&&0===popup.convertPlans.length)return!1;e&&(_.each(popup.convertPlans,function(t){t.plan_id===e.plan_id&&(n=!0)}),n||popup.convertPlans.push(e)),function p(){if(_.isEmptyObject(popup.localData)||!_.isArray(popup.convertPlans)||0===popup.convertPlans.length)return!1;var e=JSON.parse(JSON.stringify(popup.convertPlans)),n=e[0].is_in_convert_window&&e[0].is_in_convert_window.step||5e3,o=[];if(_.each(e,function(e,t){return!!e.is_in_convert_window&&((new Date).getTime()>e.is_in_convert_window.expire_time?(salog("--\u8f6c\u5316\u7a97\u53e3\u8d85\u65f6\u5df2\u7ecf\u8fc7\u671f - \u6ee1\u8db3",popup.convertPlans[t].plan_id),delete popup.convertPlans[t].is_in_convert_window,popup.convertPlans.splice(t,1),popup.updateDataAndSetListen.updateLocalData(),!1):(o.push(e.is_in_convert_window.uuid),e.is_in_convert_window.step||(e.is_in_convert_window.step=5e3,popup.convertPlans[t].is_in_convert_window.step=5e3),void(n>e.is_in_convert_window.step&&(n=e.is_in_convert_window.step))))}),!o.length)return!1;popup.asyncConvert.timer&&clearTimeout(popup.asyncConvert.timer),popup.asyncConvert.timer=setTimeout(function(){_.ajax({url:popup.info.api_base_url+"/sfo/popup_displays?project="+encodeURIComponent(t)+"&popup_display_uuids="+encodeURIComponent(o)+"&time="+(new Date).getTime(),type:"GET",cors:!0,credentials:!1,contentType:"application/json",success:function(e){popup.changeCovertStatus(e),p()},error:function(){popup.changeCovertStatus(),p()}})},n)}()},popup.ruleTime={getExpire:function(e,t){var n=t,p=Number(e.value)||0,o=Number(e.value)||0,i=String(e.unit).toLowerCase(),a=null,r={day:function(){return(a=new Date(n)).setHours(23),a.setMinutes(59),a.setSeconds(59),a.setMilliseconds(999),a=a.getTime()+864e5*(o-1)},week:function(){var e=(a=new Date(n)).getDay();0===e&&(e=7);var t=7-e;return a.setHours(23),a.setMinutes(59),a.setSeconds(59),a.setMilliseconds(999),a=a.getTime()+24*t*60*60*1e3+7*(o-1)*24*60*60*1e3},month:function(){var e=(a=new Date(n)).getMonth()+o;return e>=11?(a.setFullYear(a.getFullYear()+parseInt(e/12)),a.setMonth(e%12)):a.setMonth(e),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.getTime()},second:function(e){var t={month:2592e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3},o=null;return a=new Date(n),e in t&&(o=t[e]*p),a.getTime()+o}};return!0!==e.natural?r.second(i):i in r?r[i]():void 0},getLast:function(e,t){var n=Number(e.value)||0,p=Number(e.value)-1||0,o=String(e.unit).toLowerCase(),i=null,a={day:function(){return(i=new Date(t)).setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i=i.getTime()-864e5*p},week:function(){var e=(i=new Date(t)).getDay();return 0===e&&(e=7),--e,i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i=i.getTime()-(24*e*60*60*1e3+7*p*24*60*60*1e3)},month:function(){var e=(i=new Date(t)).getMonth()+1-p;return e<=0?(i.setFullYear(i.getFullYear()+(parseInt(e/12)-1)),i.setMonth(12+e%12-1)):i.setMonth(e-1),i.setDate(1),i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.getTime()},second:function(e){var p={month:2592e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3},o=null;return i=new Date(t),e in p&&(o=p[e]*n),i.getTime()-o}};return!0!==e.natural?a.second(o):o in a?a[o]():void 0},getArrMatchCount:function(e,t){var n=0;for(n=0;n<e.length;n++)if(t>=e[n])return n;return e.length}},popup.eventTriggerProcess=function(){if(!popup.updateDataAndSetListen.active_state)return!1;if(!_.isArray(popup.localData.eventQueue))return!1;if(0===popup.localData.eventQueue.length)return!1;if(popup.isRun)return!1;salog("\u4e8b\u4ef6\u961f\u5217---eventQueue",popup.localData.eventQueue);var e=!1,t=popup.localData.eventQueue[0],n=popup.eventRule[t.event];popup.isRun=!0,popup.localData.eventQueue.shift(),popup.updateDataAndSetListen.updateLocalData(),_.isArray(n)&&_.isObject(n[0])&&n.length>0&&(salog("--------------------\u89e6\u53d1\u4e8b\u4ef6\u5f00\u59cb--------------------"),_.each(n,function(e){_.isObject(e)&&"undefined"!=typeof e.match_state&&delete e.match_state,new popup.RuleCheck(e,t)}),_.each(n,function(t){!0===t.match_state?!1===e?(e=!0,salog("\u68c0\u67e5\u5b8c\u6bd5-\u4f18\u5148\u5f39\u7a97-\u5f00\u59cb",t.plan.cname),new popup.PopupCheck(t,!0)):!0===e&&(salog("\u68c0\u67e5\u5b8c\u6bd5-\u975e\u4f18\u5148\u5f39\u7a97-\u4e0d\u6e32\u67d3",t.plan.cname),new popup.PopupCheck(t,!1)):salog("\u68c0\u67e5\u5b8c\u6bd5-\u8ba1\u5212-\u4e0d\u6ee1\u8db3",t.plan.cname)}),e||popup.completeWindowLifecycle(),salog("--------------------\u89e6\u53d1\u4e8b\u4ef6\u7ed3\u675f--------------------"))},popup.completeWindowLifecycle=function(){popup.isRun=!1,popup.eventTriggerProcess()},popup.PopupCheck=function(e,t){this.plan=e.plan,this.current_time=(new Date).getTime(),t?this.renderPopup():this.hidePopup(),popup.updateDataAndSetListen.updateLocalData()},popup.PopupCheck.prototype.createPopupWindow=function(e,t){this.startConvertWindow(e),this.startPopupIntervalWindow(this.current_time),this.startPopupLimitWindow(),this.setGlobalLimit(),this.deletePlanAllWindow(),t&&popup.completeWindowLifecycle()},popup.PopupCheck.prototype.hidePopup=function(){this.deletePlanAllWindow()},popup.PopupCheck.prototype.renderPopup=function(){popup.handlerCampaign(this)},popup.PopupCheck.prototype.popupFailed=function(e,t,n){var p={1001:"\u9884\u89c8\u4fe1\u606f\u89e3\u6790\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u8ba1\u5212\u914d\u7f6e",1003:"\u5bf9\u7167\u7ec4",1004:"campaignShouldStart \u63a5\u53e3\u8fd4\u56de false",1005:"\u8ba1\u5212\u4e0b\u53d1 is_trigger \u4e3a false",1006:"\u81ea\u5b9a\u4e49\u89e6\u8fbe\u8ba1\u5212\u672a\u5b9e\u73b0\u5f39\u7a97\u751f\u547d\u5468\u671f\u56de\u8c03"}[e],o=popup.getPopupInfo(n.content);o.$sf_msg_id=n.uuid,o.plan=n.plan,o.$sf_succeed=!1,o.$sf_fail_reason=p,popup.track.popupDisplay(o),!t&&popup.info.popup_listener&&_.isFunction(popup.info.popup_listener.onLoadFailed)&&popup.info.popup_listener.onLoadFailed(n.plan.plan_id,e,p),popup.info.popup_campaign_listener.onFailed(popup.getSFCampaign(n.plan),e,p),this.createPopupWindow(n.uuid,!0)},popup.PopupCheck.prototype.customCampaign=function(e){var t=popup.getSFCampaign(e.plan),n=popup.getPopupInfo(e.content);n.$sf_msg_id=e.uuid,n.plan=e.plan,n.$sf_succeed=!0,popup.track.popupDisplay(n),popup.info.popup_campaign_listener.onStart(t),this.createPopupWindow(e.uuid,!0)},popup.PopupCheck.prototype.showPopup=function(e){if(!popup.ElementRender)return popup.log("\u6682\u4e0d\u652f\u6301\u9884\u7f6e\u5f39\u7a97UI"),!1;var t=new popup.ElementRender(e.content),n=popup.getPopupInfo(e.content);if(n.$sf_msg_id=e.uuid,n.plan=e.plan,n.$sf_succeed=!0,_.extend(t.msg,n),t.popupCheckInstance=this,popup.track.popupDisplay(n),!t.render())return salog("\u5f53\u524d\u9875\u9762\u5df2\u6709\u4e00\u4e2a\u5f39\u6846\u6b63\u5728\u6e32\u67d3\uff0c\u672c\u6b21\u5f39\u6846\u4e0d\u6e32\u67d3\uff01"),!1;popup.info.popup_campaign_listener.onStart(popup.getSFCampaign(e.plan)),this.createPopupWindow(e.uuid),popup.info.popup_listener.onLoadSuccess(e.plan.plan_id)},popup.PopupCheck.prototype.startConvertWindow=function(e){salog("--\u5f39\u7a97\u5c55\u793a-\u8f6c\u5316\u7a97\u53e3\u8bbe\u7f6e",this.plan.cname),_.isObject(this.plan.convert_window)&&this.plan.convert_window.value&&(this.plan.is_in_convert_window={expire_time:popup.ruleTime.getExpire(this.plan.convert_window,this.current_time),start_time:this.current_time,uuid:e},popup.asyncConvert(this.plan))},popup.PopupCheck.prototype.startPopupIntervalWindow=function(e){_.isObject(this.plan.popup_interval)&&this.plan.popup_interval.value&&(this.plan.is_in_popup_interval_window=popup.ruleTime.getExpire(this.plan.popup_interval,e))},popup.PopupCheck.prototype.resetPopupIntervalWindow=function(){var e=(new Date).getTime();this.startPopupIntervalWindow(e),this.resetGlobalLimit(e),popup.completeWindowLifecycle()},popup.PopupCheck.prototype.startPopupLimitWindow=function(){salog("--\u5f39\u7a97\u5c55\u793a-\u53c2\u4e0e\u9650\u5236\u7a97\u53e3\u8bbe\u7f6e\u91cd\u7f6e"),_.isObject(this.plan.re_enter)&&this.plan.re_enter.value&&(_.isObject(this.plan.is_in_popup_limit_window)?this.plan.is_in_popup_limit_window.count++:this.plan.is_in_popup_limit_window={expire_time:popup.ruleTime.getExpire(this.plan.re_enter,this.current_time),count:1})},popup.PopupCheck.prototype.setGlobalLimit=function(){salog("--\u5f39\u7a97\u5c55\u793a-\u5168\u5c40\u5f39\u7a97\u6b21\u6570\u8bbe\u7f6e"),_.isArray(popup.localData.global_popup_count)||(popup.localData.global_popup_count=[]),popup.localData.global_popup_count.unshift(this.current_time);for(var e=popup.localData.global_popup_count,t=e[e.length-1];t+7776e6<this.current_time||e.length>3e3;)e.pop(),t=e[e.length-1]},popup.PopupCheck.prototype.resetGlobalLimit=function(e){_.isArray(popup.localData.global_popup_count)&&popup.localData.global_popup_count.length>0&&(popup.localData.global_popup_count.shift(),popup.localData.global_popup_count.unshift(e))},popup.PopupCheck.prototype.deletePlanAllWindow=function(){var e=this.plan.pattern_popup.matcher_list;_.isArray(e)&&_.each(e,function(e){e.is_in_window&&(salog("--\u5f39\u7a97\u5c55\u793a-\u91cd\u7f6e\u5404\u4e2a\u89c4\u5219\u7684\u7a97\u53e3\u8ba1\u7b97-\u6210\u529f"),delete e.is_in_window)})},popup.RuleCheck=function(e,t){this.plan_match=e,this.plan=e.plan,this.rule_arr=e.rule,this.event_data=t,this.current_time=(new Date).getTime();var n="-------------\u68c0\u67e5-\u8ba1\u5212-("+this.plan.cname+")";_.each(this.rule_arr,function(e){n+="--\u5305\u542b\u89c4\u5219-("+e.event_name+"\uff09-\u89e6\u53d1"+e.params[0]+"\u6b21"}),salog(n),salog(this.plan),this.checkPlanIsExpire(),popup.updateDataAndSetListen.updateLocalData()},popup.RuleCheck.prototype.checkPlanIsExpire=function(){!this.plan.expire_at||_.isNumber(this.plan.expire_at)&&this.current_time<this.plan.expire_at?(salog("--\u8fc7\u671f-\u6ee1\u8db3",this.plan.cname),this.checkPlanIsAudience()):salog("--\u8fc7\u671f-\u4e0d\u6ee1\u8db3",this.plan.cname)},popup.RuleCheck.prototype.checkPlanIsAudience=function(){!0===this.plan.is_audience?(salog("--\u662f\u5426\u53d7\u4f17-\u6ee1\u8db3",this.plan.cname),this.checkPlanSuspend()):salog("--\u662f\u5426\u53d7\u4f17-\u4e0d\u6ee1\u8db3",this.plan.cname)},popup.RuleCheck.prototype.checkPlanSuspend=function(){this.plan.status&&"SUSPEND"===this.plan.status?salog("--\u6682\u505c-\u4e0d\u6ee1\u8db3",this.plan.cname):(salog("--\u6682\u505c-\u6ee1\u8db3",this.plan.cname),this.checkConvert())},popup.RuleCheck.prototype.checkConvert=function(){if(_.isObject(this.plan.is_in_convert_window)&&this.plan.is_in_convert_window.expire_time>this.current_time)salog("--\u5b58\u5728\u8f6c\u5316\u7a97\u53e3 - \u4e0d\u6ee1\u8db3",this.plan.is_in_convert_window);else if(_.isObject(this.plan.is_in_convert_window)&&this.current_time>this.plan.is_in_convert_window.expire_time){salog("--\u8f6c\u5316\u7a97\u53e3\u8d85\u65f6\u5df2\u7ecf\u8fc7\u671f - \u6ee1\u8db3",this.plan.plan_id),delete this.plan.is_in_convert_window;for(var e=0;e<popup.convertPlans.length;e++)this.plan.plan_id===popup.convertPlans[e].plan_id&&(popup.convertPlans.splice(e,1),e--);this.checkGlobalPopupInterval()}else salog("--\u4e0d\u5b58\u5728\u8f6c\u5316\u7a97\u53e3 - \u6ee1\u8db3",this.plan.is_in_convert_window),this.checkGlobalPopupInterval()},popup.RuleCheck.prototype.checkGlobalPopupInterval=function(){var e=popup.localData.global_popup_count;if(_.isArray(e)&&e.length>=1){var t=popup.ruleTime.getLast(popup.localData.popup_interval_global,this.current_time);t>e[0]?(salog("--\u5168\u5c40\u5f39\u7a97\u95f4\u9694-\u6ee1\u8db3-"+t+">\u4e0a\u6b21\u5f39\u7a97\u65f6\u95f4"+e[0]),this.checkPopupInterval()):salog("\u68c0\u67e5-\u5168\u5c40\u5f39\u7a97\u95f4\u9694-\u4e0d\u6ee1\u8db3-"+t+"<\u4e0a\u6b21\u5f39\u7a97\u65f6\u95f4"+e[0])}else salog("--\u5168\u5c40\u5f39\u7a97\u95f4\u9694-\u6ca1\u6709\u5f39\u8fc7\u7a97-\u6ee1\u8db3"),this.checkPopupInterval()},popup.RuleCheck.prototype.checkPopupInterval=function(){_.isNumber(this.plan.is_in_popup_interval_window)?this.current_time>this.plan.is_in_popup_interval_window?(salog("--\u5f39\u7a97\u95f4\u9694-\u5f53\u524d\u65f6\u95f4\u5927\u4e8e\u56fa\u5b9a\u5f39\u7a97\u95f4\u9694-\u6ee1\u8db3"),this.plan.is_in_popup_interval_window=null,this.checkProperties()):salog("--\u5f39\u7a97\u95f4\u9694-\u5f53\u524d\u65f6\u95f4\u5c0f\u4e8e\u56fa\u5b9a\u5f39\u7a97\u95f4\u9694-\u4e0d\u6ee1\u8db3"):(salog("--\u5f39\u7a97\u95f4\u9694-\u7a97\u53e3\u4e0d\u5b58\u5728-\u65b0\u5f00"),this.plan.is_in_popup_interval_window=null,this.checkProperties())},popup.RuleCheck.prototype.checkProperties=function(){var e={equal:function(e,t){if(!_.isNumber(e)&&!_.isString(e))return!1;for(var n=0,p=t.length;n<p;n++){if(!_.isNumber(t[n])&&!_.isString(t[n]))return!1;if(_.isString(e)){if(e===(_.isString(t[n])?t[n]:String(t[n])))return!0}else if(_.getConvertNumberValue(e)===_.getConvertNumberValue(t[n]))return!0}return!1},notEqual:function(e,t){if(!_.isNumber(e)&&!_.isString(e))return!1;for(var n=0,p=t.length;n<p;n++){if(!_.isNumber(t[n])&&!_.isString(t[n]))return!1;if(_.isString(e)){if(e===(_.isString(t[n])?t[n]:String(t[n])))return!1}else if(_.getConvertNumberValue(e)===_.getConvertNumberValue(t[n]))return!1}return!0},contain:function(e,t){return!!_.isString(e)&&e.indexOf(t[0])>=0},notContain:function(e,t){return!!_.isString(e)&&-1===e.indexOf(t[0])},isTrue:function(e){return!0===e},isFalse:function(e){return!1===e},isSet:function(e){return void 0!==e},notSet:function(e){return void 0===e},isEmpty:function(e){if(!_.isString(e)&&!_.isArray(e))return!1;if(_.isString(e))return""===e;for(var t=0;t<e.length;t++){if(""!==e[t].replace(/^\s+|\s+$/g,""))return!1}return!0},isNotEmpty:function(e){if(!_.isString(e)&&!_.isArray(e))return!1;if(_.isString(e))return""!==e;for(var t=0;t<e.length;t++){if(""===e[t].replace(/^\s+|\s+$/g,""))return!1}return!0},less:function(e,t){return!!_.isNumber(e)&&("undefined"!=typeof t[0]&&_.getConvertNumberValue(e)<_.getConvertNumberValue(t[0]))},greater:function(e,t){return!!_.isNumber(e)&&("undefined"!=typeof t[0]&&_.getConvertNumberValue(e)>_.getConvertNumberValue(t[0]))},between:function(e,t){if(!_.isNumber(e))return!1;if("undefined"==typeof t[0]&&"undefined"==typeof t[1])return!1;var n=_.getConvertNumberValue(e),p=_.getConvertNumberValue(t[0]),o=_.getConvertNumberValue(t[1]);return n>=p&&n<=o},isIn:function(e,t){if(!_.isArray(e))return!1;for(var n=0;n<e.length;n++)if(_.indexOf(t,e[n])>=0)return!0;return!1},notInclude:function(e,t){if(!_.isArray(e))return!1;for(var n=0;n<e.length;n++)if(-1===_.indexOf(t,e[n]))return!0;return!1},absolute_between:function(e,t){try{var n=new Date(t[0]),p=new Date(t[1]),o=new Date(e);return o>=n&&o<=p}catch(i){salog("absolute_between Error",i)}},absoluteBetween:function(e,t){try{var n=new Date(t[0]),p=new Date(t[1]),o=new Date(e);return o>=n&&o<=p}catch(i){salog("absolute_between Error",i)}}},t=this,n=_.filter(this.rule_arr,function(n){if(!n.filter||n.filter.conditions&&0===n.filter.conditions.length)return!0;var p=n.filter,o=p.relation,i="or"===String(o).toLowerCase(),a="and"===String(o).toLowerCase(),r=!!a,s=!0;return _.each(p.conditions,function(n){if(!s)return!1;if(!n.field)return!1;var p=n.field.lastIndexOf("."),o=n.params,u="in"===n["function"]?"isIn":n["function"];if(!e[u])return r=!1,s=!1,!1;if(p<0)return!1;var l=n.field.slice(p+1),c=t.event_data.properties,_=c[l];"$event_duration"===l&&void 0===_&&(_=c.event_duration);var d=e[u](_,o);i&&d&&(r=!0,s=!1),a&&!d&&(r=!1,s=!1)}),r});_.isArray(n)&&n.length>0?(this.checkWindowAndMatch(n),salog("--\u5c5e\u6027\u5339\u914d-\u6ee1\u8db3",n)):salog("--\u5c5e\u6027\u5339\u914d-\u4e0d\u6ee1\u8db3")},popup.RuleCheck.prototype.checkWindowAndMatch=function(e){var t=this,n=[];_.each(e,function(e){if(!e.params||!e.params[0])return salog("--\u7a97\u53e3\u671f\u548c\u6b21\u6570-\u89c4\u5219\u6570\u636e\u5f02\u5e38"),!1;var p=Number(e.params[0]);1===p?n.push(e):p>1&&_.isObject(e.window)&&e.window.value>0&&(!_.isObject(e.is_in_window)||!_.isNumber(e.is_in_window.expire_time)||e.is_in_window.expire_time<t.current_time?e.is_in_window={expire_time:popup.ruleTime.getExpire(e.window,t.current_time),count:1}:e.is_in_window.count=e.is_in_window.count+1,e.is_in_window.count>=p?n.push(e):salog("--\u7a97\u53e3\u671f\u548c\u6b21\u6570-\u89c4\u5219\u6570",e.is_in_window.count,"\u4e0d\u5339\u914d\u5f53\u524d\u6b21\u6570",p))}),n.length>0?(salog("--\u7a97\u53e3\u671f\u548c\u6b21\u6570-\u6709\u5339\u914d\u6210\u529f\u7684\u89c4\u5219",n),this.checkGlobalPopupLimit()):salog("--\u7a97\u53e3\u671f\u548c\u6b21\u6570-\u6ca1\u6709\u5339\u914d\u6210\u529f\u7684\u89c4\u5219",n)},popup.RuleCheck.prototype.checkGlobalPopupLimit=function(){var e=popup.localData.msg_limit_global,t=!0,n=this;_.isObject(e)&&!0===e.is_in_use&&_.isArray(e.limits)&&_.isArray(popup.localData.global_popup_count)&&!0===this.plan.global_msg_limit_enabled?(_.each(e.limits,function(e){if(_.isObject(e)&&_.isNumber(e.limit)){var p=popup.ruleTime.getLast(e,n.current_time),o=popup.ruleTime.getArrMatchCount(popup.localData.global_popup_count,p);salog("--\u5168\u5c40\u5f39\u7a97\u9650\u5236-\u5df2\u7ecf\u5f39\u7a97\u6b21\u6570-"+o+"-\u9650\u5236\u7684\u6b21\u6570"+e.limit+"-\u9650\u5236\u65f6\u95f4-"+p),t=o<e.limit?t&&!0:t&&!1}}),t?(salog("--\u5168\u5c40\u5f39\u7a97\u9650\u5236- \u6ee1\u8db3"),this.checkPopupLimit()):salog("--\u5168\u5c40\u5f39\u7a97\u9650\u5236-\u4e0d\u6ee1\u8db3")):(salog("--\u5168\u5c40\u5f39\u7a97\u9650\u5236- \u6ee1\u8db3"),this.checkPopupLimit())},popup.RuleCheck.prototype.checkPopupLimit=function(){if(!_.isObject(this.plan.re_enter)||!_.isNumber(this.plan.re_enter.value)||!_.isNumber(this.plan.re_enter.limit))return this.plan_match.match_state=!0,!1;_.isObject(this.plan.is_in_popup_limit_window)&&_.isNumber(this.plan.is_in_popup_limit_window.expire_time)&&_.isNumber(this.plan.is_in_popup_limit_window.count)?this.plan.is_in_popup_limit_window.expire_time<this.current_time?(salog("--\u53c2\u4e0e\u9650\u5236-\u8d85\u8fc7\u4e86\u53c2\u4e0e\u9650\u5236\u7a97\u53e3-\u5f00\u542f\u65b0\u7a97\u53e3-\u6ee1\u8db3",this.plan.is_in_popup_limit_window),delete this.plan.is_in_popup_limit_window,this.plan_match.match_state=!0):this.plan.is_in_popup_limit_window.count<this.plan.re_enter.limit?(salog("--\u53c2\u4e0e\u9650\u5236-\u5728\u7a97\u53e3\u5185\u4e14\u5728\u53c2\u4e0e\u9650\u5236\u6b21\u6570\u5185-\u6ee1\u8db3",this.plan.is_in_popup_limit_window),this.plan_match.match_state=!0):salog("--\u53c2\u4e0e\u9650\u5236-\u5728\u7a97\u53e3\u5185\u4f46\u662f\u8d85\u8fc7\u4e86\u53c2\u4e0e\u9650\u5236-\u4e0d\u6ee1\u8db3",this.plan.is_in_popup_limit_window):(this.plan.is_in_popup_limit_window?(salog("--\u53c2\u4e0e\u9650\u5236-\u6709\u7a97\u53e3\u4f46\u662f\u7a97\u53e3\u6570\u636e\u5f02\u5e38-\u5f00\u65b0\u7a97\u53e3-\u6ee1\u8db3",this.plan.is_in_popup_limit_window),delete this.plan.is_in_popup_limit_window):salog("--\u53c2\u4e0e\u9650\u5236-\u4e0d\u5b58\u5728\u7a97\u53e3-\u5f00\u65b0\u7a97\u53e3-\u6ee1\u8db3",this.plan.is_in_popup_limit_window),this.plan_match.match_state=!0)};var flag_dfm="dfm-enc-";function dfmapping(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",n=t.length-1,p={},o=0;for(o=0;o<t.length;o++)p[t.charAt(o)]=t.charAt(n-o);var i="";for(o=0;o<e.length;o++)e.charAt(o)in p?i+=p[e.charAt(o)]:i+=e.charAt(o);return i}function decrypt(e){return 0===e.indexOf(flag_dfm)&&(e=dfmapping(e=e.substring(flag_dfm.length))),e}function encrypt(e){return flag_dfm+dfmapping(e)}popup.store={delete_time:2592e6,init:function(){this.migrateLocalData(),popup.localData=this.getLocalData(),_.isNumber(popup.localData.config_pull_interval_ms)&&popup.localData.config_pull_interval_ms>0&&(popup.updateDataAndSetListen.interval_time=popup.localData.config_pull_interval_ms),this.removeLocalData(),popup.log("\u521d\u59cb\u5316-\u83b7\u53d6-\u5185\u5b58-localData")},getJSONData:function(){var e=_.localStorage.get(popup.config.storageName);_.isString(e)&&(e=decrypt(e));try{e=JSON.parse(e)}catch(t){_.log(t)}return e},saveJSONData:function(e){e=JSON.stringify(e),popup.info.encrypt_cookie&&(e=encrypt(e)),_.localStorage.set(popup.config.storageName,e)},migrateLocalData:function(){var e=this.getJSONData()||{},t=popup.sa.store.getDistinctId();if(e.popup_sdk_users&&e.popup_sdk_plans)return!1;var n={popup_sdk_plans:{},popup_sdk_users:{}};n.popup_sdk_plans[t]=e,n.popup_sdk_users[t]={user_id:t},this.saveJSONData(n)},getLocalData:function(){var e=this.getJSONData(),t=popup.sa.store.getDistinctId(),n=null;return e?(_.isObject(e.popup_sdk_users[t])&&e.popup_sdk_users[t].user_id&&(n=e.popup_sdk_users[t].user_id),n&&_.isObject(e.popup_sdk_plans[n])?(e.popup_sdk_plans[n].update_time=(new Date).getTime(),this.saveJSONData(e),e.popup_sdk_plans[n]):{}):{}},saveLocalData:function(){var e=this.getJSONData(),t=popup.sa.store.getDistinctId(),n=null;if(!e)return!1;e.popup_sdk_users&&_.isObject(e.popup_sdk_users[t])&&e.popup_sdk_users[t].user_id&&(n=e.popup_sdk_users[t].user_id,e.popup_sdk_plans[n]=popup.localData,this.saveJSONData(e))},removeLocalData:function(){var e=this.getJSONData(),t=this.delete_time;if(!e||!e.popup_sdk_plans||!e.popup_sdk_users)return!1;var n=JSON.parse(JSON.stringify(e.popup_sdk_plans)),p=JSON.parse(JSON.stringify(e.popup_sdk_users)),o=(new Date).getTime(),i=[];_.each(n,function(n,p){o-n.update_time>t&&(delete e.popup_sdk_plans[p],i.push(p))}),_.each(p,function(t,n){i.length>0&&_.each(i,function(p){t.user_id&&p===t.user_id&&delete e.popup_sdk_users[n]})}),this.saveJSONData(e)}},popup.updateDataAndSetListen={active_state:!0,interval_time:6e5,save_interval:null,data_interval:null,image_list:null,local_data:null,filterConvertPlans:function(){var e=popup.localData.popup_plans;if(!e||!_.isArray(e))return!1;var t=_.filter(e,function(e){return!!e.convert_window&&!!e.is_in_convert_window});popup.convertPlans=t,popup.log("\u521d\u59cb\u5316-\u5f02\u6b65\u7684convertWindow",popup.convertPlans),popup.asyncConvert()},diffData:function(){var e=popup.localData,t=JSON.parse(JSON.stringify(popup.serverData)),n=(new Date).getTime();if(!t||_.isEmptyObject(t))return!1;var p=n-t.server_current_time;if(Math.abs(p)>=6e5)return!1;if(!e||_.isEmptyObject(e)||!e.popup_plans||0===e.popup_plans.length)return _.extend(popup.localData,t),!1;var o=t.popup_plans;_.each(o,function(t,n){var p=null;if(_.each(e.popup_plans,function(e){e.plan_id===t.plan_id&&(p=e,t.audience_id||delete p.audience_id,_.isObject(t.window_update)&&_.each(t.window_update,function(e,n){p.window_update&&p.window_update[n]===e||("trigger_window"===n?p.pattern_popup.matcher_list=t.pattern_popup.matcher_list:"convert_window"===n&&p.is_in_convert_window&&t.convert_window&&p.is_in_convert_window.start_time&&(p.is_in_convert_window.expire_time=popup.ruleTime.getExpire(t.convert_window,p.is_in_convert_window.start_time)))}))}),!p)return!1;if(!t.window_update&&p.last_update_config_time!==t.last_update_config_time)return!1;var i=p.pattern_popup.matcher_list;_.extend2Lev(p,t),p.pattern_popup.matcher_list=i,o[n]=p}),_.extend(popup.localData,t)},getEventRule:function(){var e=popup.localData.popup_plans,t={};if(!e||!_.isArray(e))return!1;_.each(e,function(e){var n=e.pattern_popup.matcher_list;_.each(n,function(n){var p={plan:e,rule:[n]},o=n.event_name,i=!1;if(t[o]){if(_.each(t[o],function(t){t.plan.plan_id===e.plan_id&&(t.rule.push(n),i=!0)}),i)return!1;t[o].push(p)}else t[o]=[p]})}),_.each(t,function(e){e.sort(function(e,t){var n=t.plan.absolute_priority-e.plan.absolute_priority;return 0===n?t.plan.plan_id-e.plan.plan_id:n})}),popup.eventRule=t,popup.log("\u521d\u59cb\u5316-\u5f97\u5230\u4e8b\u4ef6\u548c\u8ba1\u5212\u7684\u5173\u7cfb"),popup.log("--------------------\u521d\u59cb\u5316\u5b8c\u6210--------------------\u7b49\u5f85\u4e8b\u4ef6\u89e6\u53d1\u8ba1\u5212--------------------")},registerListen:function(){var e=this;popup.sa.events.on("send",function(t){t.event&&popup.eventRule[t.event]&&(_.isArray(popup.localData.eventQueue)||(popup.localData.eventQueue=[]),popup.localData.eventQueue.push(t),e.updateLocalData(),popup.eventTriggerProcess())}),popup.sa.events.on("changeDistinctId",function(t){e.changeId()}),popup.sa.events.isReady()},setListenEvent:function(){this.diffData(),this.filterConvertPlans(),this.getEventRule(),this.updateLocalData()},loadImage:function(e){if(e.length<1)return!1;if(JSON.stringify(e)===JSON.stringify(this.image_list))return!1;this.image_list=e;for(var t=0;t<e.length;t++)n=e[t],void 0,(new Image).src=n;var n},getDataFromServer:function(e,t){var n=this,p=encodeURIComponent(popup.sa.store.getDistinctId()),o=encodeURIComponent(popup.info.platform),i=encodeURIComponent(popup.info.project);e=_.isFunction(e)?e:function(){},t=_.isFunction(t)?t:function(){},_.ajax({url:popup.info.api_base_url+"/sfo/user_popup_configs?distinct_id="+p+"&platform="+o+"&project="+i+"&time="+(new Date).getTime()+"&sdk_version="+popup.lib_version,type:"GET",cors:!0,credentials:!1,contentType:"application/json",success:function(p){if(!n.active_state)return t(),!1;popup.log("\u521d\u59cb\u5316-\u4fee\u6539-serverData-ajax\u83b7\u53d6"),_.isObject(p)&&p.server_current_time&&p.popup_plans&&/\d+\.\d+/.test(p.min_sdk_version_required)&&parseFloat(p.min_sdk_version_required)<=parseFloat(popup.lib_version)?(popup.serverData=p,_.isNumber(p.config_pull_interval_ms)&&p.config_pull_interval_ms>0&&(n.interval_time=p.config_pull_interval_ms),popup.serverData.local_update_time=(new Date).getTime(),popup.info.preload_image&&n.loadImage(popup.getImageList(p.popup_plans)),n.updateUserPlans(),n.setListenEvent()):(popup.log("\u521d\u59cb\u5316-\u6570\u636e\u5f02\u5e38-\u8bf7\u6c42\u8fd4\u56de\u7684\u6570\u636e\u9519\u8bef-\u4e2d\u6b62"),popup.serverData={},popup.localData={},n.updateLocalData()),e(),n.setIntervalTime(n.interval_time)},error:function(){if(!n.active_state)return t(),!1;popup.log("\u521d\u59cb\u5316-\u6570\u636e\u5f02\u5e38-\u8bf7\u6c42\u9519\u8bef-\u4e2d\u6b62"),popup.serverData={},e(),n.setIntervalTime(n.interval_time)}})},updateUserPlans:function(){var e=popup.store.getJSONData(),t=popup.sa.store.getDistinctId(),n=popup.serverData.user_id;e.popup_sdk_users[t]={user_id:n||t},n?e.popup_sdk_plans[n]?popup.localData=e.popup_sdk_plans[n]:e.popup_sdk_plans[t]&&(popup.localData=e.popup_sdk_plans[t],delete e.popup_sdk_plans[t]):e.popup_sdk_plans[t]&&(popup.localData=e.popup_sdk_plans[t]),popup.localData.update_time=(new Date).getTime(),popup.store.saveJSONData(e)},setIntervalTime:function(e){var t=this;this.data_interval=setTimeout(function(){popup.log("10\u5206\u949f\u5b9a\u65f6\u66f4\u65b0\u6570\u636e\u5f00\u59cb-------"),t.getDataFromServer()},e)},setFirstListen:function(){var e=this;this.getDataFromServer(function(){e.registerListen()})},updateLocalData:function(){var e=JSON.stringify(popup.localData);this.local_data!==e&&(this.local_data=e,popup.store.saveLocalData())},initial:function(){popup.store.init();var e=popup.localData.local_update_time,t=(new Date).getTime();if(_.isNumber(e)){var n=t-e;n<=0||n>=this.interval_time?this.setFirstListen():(this.setIntervalTime(this.interval_time-n),this.setListenEvent(),this.registerListen(),popup.info.preload_image&&this.loadImage(popup.getImageList(popup.localData.popup_plans)))}else this.setFirstListen()},changeId:function(){this.stopAllState(),this.startState({getLocalData:!1})},stopAllState:function(){this.active_state=!1,popup.eventRule={},this.data_interval&&window.clearTimeout(this.data_interval),this.save_interval&&window.clearInterval(this.save_interval),popup.asyncConvert.timer&&window.clearTimeout(popup.asyncConvert.timer),popup.convertPlans=[],popup.localData={},this.resetState()},resetState:function(){if("WEB"===popup.info.platform)return!1;!document.querySelector("div[data-sf-mask]")&&popup.isRun&&(popup.isRun=!1)},startState:function(e){this.active_state=!0,(e=e||{getLocalData:!0}).getLocalData&&(this.resetState(),popup.localData=popup.store.getLocalData()),this.getDataFromServer()}},popup.testSend={hasParam:function(){var e=_.URL(window.location.href).searchParams,t=e.get("sf_popup_test")||"",n=e.get("popup_window_id")||"",p=e.get("platform");return!(!t||!n)&&{sf_popup_test:t,popup_window_id:n,platform:p}},start:function(){var e=popup.info.project,t=popup.info.platform,n=this.hasParam().popup_window_id,p=this.hasParam().platform,o=encodeURIComponent(popup.sa.store.getDistinctId());if("WEB"===p)return popup.log("WEB\u7aef\u6d4b\u8bd5\u5f39\u7a97\u8bf7\u5728PC\u8bbe\u5907\u6253\u5f00\uff01"),!1;_.ajax({url:popup.info.api_base_url+"/sfo/popup_windows/"+n+"?project="+encodeURIComponent(e)+"&time="+(new Date).getTime()+"&sdk_version="+popup.lib_version+"&platform="+encodeURIComponent(t)+"&distinct_id="+o,type:"GET",credentials:!1,cors:!0,contentType:"application/json",success:function(e){var t,n=_.getUuid();_.isObject(e)||(popup.sa.log("\u6d4b\u8bd5\u5f39\u7a97-\u670d\u52a1\u7aef\u6570\u636e\u683c\u5f0f\u4e0d\u5408\u6cd5",e),e={});try{t=JSON.parse(e.content)}catch(i){popup.sa.log("\u6d4b\u8bd5\u5f39\u7a97-content\u89e3\u6790\u5931\u8d25,content:",e,i)}var p=popup.getPopupInfo(t);p.$sf_msg_id=n;var o={content:e.content,type:e.popup_type||"PRESET"};e.popup_type&&"CUSTOMIZED"===e.popup_type?_.isString(e.content)?"withoutCampaignListener"===popup.info.supportCustom||"withoutStart"===popup.info.supportCustom?(p.$sf_succeed=!1,p.$sf_fail_reason="\u81ea\u5b9a\u4e49\u89e6\u8fbe\u8ba1\u5212\u672a\u5b9e\u73b0\u5f39\u7a97\u751f\u547d\u5468\u671f\u56de\u8c03",popup.track.popupDisplay(p),popup.info.popup_campaign_listener.onFailed(o,1006,"\u81ea\u5b9a\u4e49\u89e6\u8fbe\u8ba1\u5212\u672a\u5b9e\u73b0\u5f39\u7a97\u751f\u547d\u5468\u671f\u56de\u8c03")):(p.$sf_succeed=!0,popup.track.popupDisplay(p),popup.info.popup_campaign_listener.onStart(o)):(p.$sf_succeed=!1,p.$sf_fail_reason="\u9884\u89c8\u4fe1\u606f\u89e3\u6790\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u8ba1\u5212\u914d\u7f6e",popup.track.popupDisplay(p),popup.info.popup_campaign_listener.onFailed(o,1001,"\u9884\u89c8\u4fe1\u606f\u89e3\u6790\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u8ba1\u5212\u914d\u7f6e")):_.isObject(t)&&_.isObject(t.properties)&&_.isObject(t.template)?(new popup.ElementRender(t).render(),p.$sf_succeed=!0,popup.track.popupDisplay(p),popup.info.popup_campaign_listener.onStart(o),popup.info.popup_listener.onLoadSuccess()):(p.$sf_succeed=!1,p.$sf_fail_reason="\u9884\u89c8\u4fe1\u606f\u89e3\u6790\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u8ba1\u5212\u914d\u7f6e",popup.track.popupDisplay(p),popup.info.popup_listener.onLoadFailed("",1001,"\u9884\u89c8\u4fe1\u606f\u89e3\u6790\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u8ba1\u5212\u914d\u7f6e"),popup.info.popup_campaign_listener.onFailed(o,1001,"\u9884\u89c8\u4fe1\u606f\u89e3\u6790\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u8ba1\u5212\u914d\u7f6e"))},error:function(e){popup.log("\u6d4b\u8bd5\u5f39\u7a97\u83b7\u53d6\u6570\u636e\u9519\u8bef",e)}})}},popup.setPara=function(e){_.isObject(e)||(e={}),popup.info=_.extend({},popup.defaultPara,e),popup.sa=popup.getWebSDK();var t=popup.sa;if(!t)return popup.log("web js sdk \u8fd8\u6ca1\u6709\u521d\u59cb\u5316\u5b8c\u6210"),!1;if(!0===t.para.encrypt_cookie&&(popup.info.encrypt_cookie=!0),!_.isString(popup.info.api_base_url)||"http"!==popup.info.api_base_url.slice(0,4))return popup.log("popup \u5fc5\u987b\u586b\u5199\u6709\u6548 api_base_url"),!1;if("http:"===popup.info.api_base_url.slice(0,5)&&"https:"===location.protocol)return popup.log("\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0capi_base_url \u4e5f\u5fc5\u987b\u662fhttps\uff01"),!1;if(popup.info.api_base_url="/"===popup.info.api_base_url.slice(-1)?popup.info.api_base_url.slice(0,-1):popup.info.api_base_url,!_.isString(t.para.server_url)||"http"!==t.para.server_url.slice(0,4))return popup.log("server_url \u5fc5\u987b\u586b\u5199\u6709\u6548\u6570\u636e\u63a5\u6536\u5730\u5740"),!1;if(popup.info.project||(popup.info.project=_.URL(t.para.server_url).searchParams.get("project")||"default"),_.isObject(popup.info.popup_listener)){var n=popup.info.popup_listener;_.isFunction(n.onClick)||(popup.info.popup_listener.onClick=function(){}),_.isFunction(n.onLoadSuccess)||(popup.info.popup_listener.onLoadSuccess=function(){}),_.isFunction(n.onLoadFailed)||(popup.info.popup_listener.onLoadFailed=function(){}),_.isFunction(n.onClose)||(popup.info.popup_listener.onClose=function(){}),_.isString(n.openlink)?"auto"!==n.openlink&&"customize"!==n.openlink&&(popup.info.popup_listener.openlink="customize"):popup.info.popup_listener.openlink="customize"}else popup.info.popup_listener={onClick:function(){},onLoadSuccess:function(){},onLoadFailed:function(){},onClose:function(){},openlink:"customize"};return popup.info.supportCustom=!0,_.isObject(popup.info.popup_campaign_listener)?(_.isFunction(popup.info.popup_campaign_listener.shouldStart)||(popup.info.popup_campaign_listener.shouldStart=function(){return!0}),_.isFunction(popup.info.popup_campaign_listener.onStart)||(popup.info.supportCustom="withoutStart",popup.info.popup_campaign_listener.onStart=function(){}),_.isFunction(popup.info.popup_campaign_listener.onEnd)||(popup.info.popup_campaign_listener.onEnd=function(){}),_.isFunction(popup.info.popup_campaign_listener.onFailed)||(popup.info.popup_campaign_listener.onFailed=function(){})):(popup.info.supportCustom="withoutCampaignListener",popup.info.popup_campaign_listener={shouldStart:function(){return!0},onStart:function(){},onEnd:function(){},onFailed:function(){}}),!0},popup.getBridgeState=function(){return!_.isObject(popup.sa.para.app_js_bridge)||!popup.sa.para.app_js_bridge.is_mui&&(!popup.sa.bridge||!popup.sa.bridge.is_verify_success)},popup.init=function(){if(!popup.isSupportPopup())return!1;if(window.screen.width&&Number(window.screen.width)>1024)return"object"==typeof console&&console.log&&console.log("H5 \u5f39\u7a97\u4ec5\u652f\u6301\u79fb\u52a8\u7aef\u548c ipad\uff0c\u6216\u8005\u5c4f\u5e55\u5bbd\u5ea6\u5c0f\u4e8e\u7b49\u4e8e 1024\u3002"),!1;var e={};return arguments.length>0&&(1===arguments.length&&_.isObject(arguments[0])?e=arguments[0]:arguments.length>=2&&_.isObject(arguments[1])&&(e=arguments[1])),!!this.setPara(e)&&(popup.info.platform="H5",!!popup.setIsLoad()&&(!!this.getBridgeState()&&void(popup.testSend.hasParam()?popup.testSend.start():(popup.listenPageStateChange(),popup.updateDataAndSetListen.initial()))))},window.SensorsDataWebJSSDKPlugin&&"[object Object]"==Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?(window.SensorsDataWebJSSDKPlugin.popup=window.SensorsDataWebJSSDKPlugin.popup||popup,window.SensorsDataWebJSSDKPlugin.Popup=window.SensorsDataWebJSSDKPlugin.Popup||popup):window.SensorsDataWebJSSDKPlugin={popup:popup,Popup:popup};export default popup;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。