/*! For license information please see LICENSES */ (window.webpackJsonp=window.webpackJsonp||[]).push([[35],{139:function(e,t,r){e.exports=function(){function e(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function t(){return Date.now&&e(Date.now)?Date.now():(new Date).getTime()}function r(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function i(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),r(e)&&e.getRandomValues){var t=new Uint32Array(1);return e.getRandomValues(t)[0]/Math.pow(2,32)}}return mt(1e19)/1e19}function n(e){var t=null;try{t=JSON.parse(e)}catch(e){}return t}function a(e,t){this.lockGetPrefix=e||"lock-get-prefix",this.lockSetPrefix=t||"lock-set-prefix"}function s(e){return"function"==typeof e||!(!e||"object"!=typeof e)&&s(e.listener)}function l(){this._events={}}function c(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function u(e){for(var t={},i=(e=e||"").substring(1).split("&"),r=0;r Invalid URL");var r=e.split("#"),i=r[0],n=r.slice(1).join("#");for(var a in t=this._regex.exec(i),this._fields)void 0!==t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=n},new t(e)}function _(e){var t={};if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(e){return!1}}())(t=new URL(e)).searchParams||(t.searchParams=function(){var e=u(t.search);return{get:function(t){return e[t]}}}());else{if(d(e)||(e=String(e)),e=p(e),!1===/^https?:\/\/.+/.test(e))return void ht.log("Invalid URL");var r=f(e);t.hash=r._values.Fragment,t.host=r._values.Host?r._values.Host+(r._values.Port?":"+r._values.Port:""):"",t.href=r._values.URL,t.password=r._values.Password,t.pathname=r._values.Path,t.port=r._values.Port,t.search=r._values.QueryString?"?"+r._values.QueryString:"",t.username=r._values.Username,t.hostname=r._values.Hostname,t.protocol=r._values.Protocol?r._values.Protocol+":":"",t.origin=r._values.Origin?r._values.Origin+(r._values.Port?":"+r._values.Port:""):"",t.searchParams=function(){var e=u("?"+r._values.QueryString);return{get:function(t){return e[t]}}}()}return t}function g(e){return!(!e||1!==e.nodeType)}function h(e){return void 0===e}function v(t){return Array.isArray&&e(v)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function y(e){return new yt(e)}function b(e,t,r,i){function n(e){return e&&(e.preventDefault=n.preventDefault,e.stopPropagation=n.stopPropagation,e._getPath=n._getPath),e}function a(e,t,r,i){return function(a){if(a=a||n(window.event)){a.target=a.srcElement;var s,o,l=!0;return"function"==typeof r&&(s=r(a)),o=t.call(e,a),"beforeunload"!==i?(!1!==s&&!1!==o||(l=!1),l):void 0}}}n._getPath=function(){return this.path||this.composedPath&&this.composedPath()||y(this.target).getParents()},n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0};var s=function(e,t,r){if(void 0===i&&"click"===t&&(i=!0),e&&e.addEventListener)e.addEventListener(t,(function(e){e._getPath=n._getPath,r.call(this,e)}),i);else{var s="on"+t,o=e[s];e[s]=a(e,r,o,t)}};s.apply(null,arguments)}function w(e){var t="pushState"in window.history?"popstate":"hashchange";b(window,t,e)}function S(e){if(e)return void 0!==window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if(void 0!==window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){ht.log(e)}}}function k(e,t,r){if(null==e)return!1;if(wt&&e.forEach===wt)e.forEach(t,r);else if(v(e))for(var i=0,n=e.length;i=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(e){n.onreadystatechange=null,n.onload=null}},n.open(e.type,e.url,!0);try{e.credentials&&(n.withCredentials=!0),r(e.header)&&k(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(e){ht.log(e)}n.send(e.data||null)}function O(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(k(e,(function(e,i,n){r.push(t(e,i,n))})),r)}function C(e){var t=[];try{t=O(atob(e).split(""),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}))}catch(e){t=[]}try{return decodeURIComponent(t.join(""))}catch(e){return t.join("")}}function j(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})))}catch(r){t=e}return t}function T(e){return k(Array.prototype.slice.call(arguments,1),(function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])})),e}function $(e){var t=e;try{t=decodeURI(e)}catch(r){t=e}return t}function N(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",r=t.length-1,i={},n=0;for(n=0;n=2&&!/^(\d+\.)+\d+$/.test(r))for(var n="."+i.splice(i.length-1,1);i.length>0;)if(n="."+i.splice(i.length-1,1)+n,document.cookie=t+"=true; path=/; domain="+n,-1!==document.cookie.indexOf(t+"=true")){var a=new Date;return a.setTime(a.getTime()-1e3),document.cookie=t+"=true; expires="+a.toGMTString()+"; path=/; SameSite=Lax; domain="+n,n}return""}function J(e){if(!d(e))return null;var t,i=e.split(">");return(t=function e(t){var r,a=i.shift();if(!a)return t;try{r=function(e,t){var r;if("body"===(e=p(e)))return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var i=e.split(":nth-of-type");if(!i[0]||!i[1])return null;var n=i[0],a=i[1].match(/\(([0-9]+)\)/);if(!a||!a[1])return null;var s=Number(a[1]);if(!(g(t)&&t.children&&t.children.length>0))return null;for(var o=t.children,l=0;l0)return null}return r||null}(a,t)}catch(e){ht.log(e)}return r&&g(r)?e(r):null}())&&g(t)?t:null}function U(e,t){var r="",i="";return e.textContent?r=p(e.textContent):e.innerText&&(r=p(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),i=r||"","input"!==t&&"INPUT"!==t||(i=e.value||""),i}function R(e,t){t&&"string"==typeof t||(t="hostname解析异常");var r=null;try{r=_(e).hostname}catch(e){ht.log("getHostname传入的url参数不合法!")}return r||t}function K(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(e){return""}}function q(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=c(e);var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":c(r[1])}function H(e){var t={},i=e.split("?")[1]||"";return i&&(t=u("?"+i)),t}function B(){return void 0!==window.matchMedia||void 0!==window.msMatchMedia}function M(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/ qq\/([\d.]+)/))?t.qqBuildinBrowser=Number(e[1].split(".")[0]):(e=r.match(/mqqbrowser\/([\d.]+)/))?t.qqBrowser=Number(e[1].split(".")[0]):(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function W(e){return d(e)?$(e=p(e)):$(location.href)}function F(e){return d(e)?$(e=p(e)):$(location.pathname)}function V(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function z(e,t){if("string"==typeof t)return V(e,t);if(v(t)){for(var r=!1,i=0;i0)for(var a=e.split(""),s=0;st)for(n=r+n;(l=31*n+o)t;)n=n/2+o;n=31*n+o}return n}function G(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var i=0;i41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function se(){return void 0!==window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function oe(t){if(!r(t)||!d(t.callbackName))return ht.log("JSONP 请求缺少 callbackName"),!1;t.success=e(t.success)?t.success:function(){},t.error=e(t.error)?t.error:function(){},t.data=t.data||"";var i=document.createElement("script"),n=document.getElementsByTagName("head")[0],a=null,s=!1;if(n.appendChild(i),ie(t.timeout)&&(a=setTimeout((function(){return!s&&(t.error("timeout"),window[t.callbackName]=function(){ht.log("call jsonp error")},a=null,n.removeChild(i),void(s=!0))}),t.timeout)),window[t.callbackName]=function(){clearTimeout(a),a=null,t.success.apply(null,arguments),window[t.callbackName]=function(){ht.log("call jsonp error")},n.removeChild(i)},t.url.indexOf("?")>-1?t.url+="&callbackName="+t.callbackName:t.url+="?callbackName="+t.callbackName,r(t.data)){var o=[];k(t.data,(function(e,t){o.push(t+"="+e)})),t.data=o.join("&"),t.url+="&"+t.data}i.onerror=function(e){return!s&&(window[t.callbackName]=function(){ht.log("call jsonp error")},clearTimeout(a),a=null,n.removeChild(i),t.error(e),void(s=!0))},i.src=t.url}function le(t){({visibleHandler:e(t.visible)?t.visible:function(){},hiddenHandler:e(t.hidden)?t.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return void 0!==document[this.hidden]},init:function(){void 0!==document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):void 0!==document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):void 0!==document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):void 0!==document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;b(document,this.visibilityChange,(function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()}),1)}else b(window,"focus",this.visibleHandler),b(window,"blur",this.hiddenHandler)}}).init()}function ce(e){e=P({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&((t=document.createElement("link")).rel="stylesheet",t.href=e.url),"js"===e.type&&((t=document.createElement("script")).async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function ue(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function de(e,t){t="number"==typeof t?t:13;for(var i=(e=String(e)).split(""),r=0,a=i.length;r-1?e.config.send_type:br.para.send_type)&&!1===ae()&&(r="image"),"ajax"===r&&!1===se()&&(r="image"),r}(e)){case"image":return new or(e);case"ajax":return new lr(e);case"beacon":return new cr(e);default:return new or(e)}}function ze(){this.sendTimeStamp=0,this.timer=null,this.serverUrl="",this.hasTabStorage=!1}function Xe(e){var t=this;this.type=e,this.resultCbs={},this.timeoutCbs={},this.timerId=null,this.appCallJsCallback=null,window.sensorsdata_app_call_js||(window.sensorsdata_app_call_js=function(e,t){if(e in window.sensorsdata_app_call_js.modules)return window.sensorsdata_app_call_js.modules[e](t)}),window.sensorsdata_app_call_js.modules=window.sensorsdata_app_call_js.modules||{},window.sensorsdata_app_call_js.modules[this.type]=function(e){try{var r=C(e)||e;try{r=JSON.parse(r)}catch(e){}var n=r&&r.message_id;if(n&&t.resultCbs[n]){if(e=r,t.timeoutCbs[n]&&t.timeoutCbs[n].isTimeout)return void(t.resultCbs[n].callbacks.length=0);if(t.resultCbs[n])for(var a in t.resultCbs[n].result=e,clearTimeout(t.timerId),t.timeoutCbs[n].callbacks.length=0,t.resultCbs[n].callbacks)t.resultCbs[n].callbacks[a].call(null,e),t.resultCbs[n].callbacks.splice(a,1);return}return t.appCallJsCallback&&t.appCallJsCallback.call(null,e)}catch(t){console.log("app 回调 js 异常",e)}}}function Ze(t){try{if(br.bridge.activeBridge&&e(br.bridge.activeBridge.handleCommand))return br.bridge.activeBridge.handleCommand(t)}catch(e){br.log("Error: handle command exception:"+e)}return br.log("数据发往App失败,App没有暴露bridge,type:"+t.callType),!1}function Ge(e){this.bridge=new Xe(e.type)}function Ye(e){var t=null;try{var r=JSON.parse(window.name);t=r[e]?c(r[e]):null}catch(e){t=null}return null===t&&(t=q(location.href,e)||null),t}function Qe(e){function t(){var e=[];i.touch_app_bridge||e.push(br.debug.defineMode("1")),r(br.para.app_js_bridge)||(e.push(br.debug.defineMode("2")),i.verify_success=!1),r(br.para.heatmap)&&"default"==br.para.heatmap.clickmap||e.push(br.debug.defineMode("3")),"fail"===i.verify_success&&e.push(br.debug.defineMode("4")),new br.SDKJSBridge("app_alert").notifyApp({data:e})}var i=br.bridge.bridge_info;if(br.bridge.hasVisualModeBridge())if(r(br.para.heatmap)&&"default"==br.para.heatmap.clickmap)if(r(br.para.app_js_bridge)&&"success"===i.verify_success)if(e)sa_jssdk_app_define_mode(br,e);else{var n=location.protocol;ce({success:function(){setTimeout((function(){"undefined"!=typeof sa_jssdk_app_define_mode&&sa_jssdk_app_define_mode(br,e)}),0)},error:function(){},type:"js",url:(n=G(["http:","https:"],n)>-1?n:"https:")+"//static.sensorsdata.cn/sdk/"+br.lib_version+"/vapph5define.min.js"})}else t();else t()}function tr(){br.readyState.setState(3),new br.SDKJSBridge("visualized").onAppNotify((function(){Qe("undefined"!=typeof sa_jssdk_app_define_mode)})),Qe(!1),br.bridge.app_js_bridge_v1(),Kt.initPage(),br.para.is_track_single_page&&Qt.on("switch",(function(e){var t=function(t){t=t||{},e!==location.href&&(Kt.pageProp.referrer=W(e),br.quick("autoTrack",P({$url:W(),$referrer:W(e)},t)))};if("boolean"==typeof br.para.is_track_single_page)t();else if("function"==typeof br.para.is_track_single_page){var i=br.para.is_track_single_page();r(i)?t(i):!0===i&&t()}})),!br.para.app_js_bridge&&br.para.batch_send&>.isSupport()&&br.batchSend.batchInterval(),br.store.init(),br.vtrackBase.init(),br.readyState.setState(4),br._q&&v(br._q)&&br._q.length>0&&k(br._q,(function(e){br[e[0]].apply(br,Array.prototype.slice.call(e[1]))})),r(br.para.heatmap)&&(Gt.initHeatmap(),Gt.initScrollmap())}function et(){kr.isSeachHasKeyword()?kr.hasKeywordHandle():window.parent!==self&&Pr.isSearchHasKeyword()?Pr.verifyVtrackMode():kr.isWindowNameHasKeyword()?kr.windowNameHasKeywordHandle():kr.isStorageHasKeyword()?kr.storageHasKeywordHandle():window.parent!==self&&Pr.isStorageHasKeyword()?Pr.verifyVtrackMode():(tr(),Pr.notifyUser())}function tt(e){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1}}function nt(e,t,r){var i=null;try{i=JSON.parse(JSON.stringify(e||null))}catch(e){ge(e)}this.getOriginalData=function(){return i},this.getPosition=function(){return t},this.cancellationToken=new tt,this.sensors=r}function it(e){if(!r(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}function at(e){e&&e.dataStage&&Cr.registerStageImplementation(e.dataStage),e&&e.businessStage&&Tr.registerStageImplementation(e.businessStage),e&&e.sendStage&&jr.registerStageImplementation(e.sendStage)}function st(e,t){$r[e]&&$r[e](t)}function ot(e){e.kit=sr,e.saEvent=Xt,this.dataStage=zt,this.sendStage=ur,this.businessStage=ar}function lt(t){return r(t)?(k(t,(function(r,i){if(v(r)){var n=[];k(r,(function(e){d(e)?n.push(e):ge("您的数据-",i,r,"的数组里的值必须是字符串,已经将其删除")})),t[i]=n}d(r)||ie(r)||A(r)||Q(r)||v(r)||e(r)||"$option"===i||(ge("您的数据-",i,r,"-格式不满足要求,我们已经将其删除"),delete t[i])})),t):t}function ct(e){var t=["$element_selector","$element_path"],i=["sensorsdata_app_visual_properties"];r(e)&&k(e,(function(n,a){if(r(n))ct(e[a]);else if(d(n)){if(G(i,a)>-1)return;e[a]=function(e,t){return ie(t)&&e.length>t?(ge("字符串长度超过限制,已经做截取--"+e),e.slice(0,t)):e}(n,G(t,a)>-1?1024:Nt.max_string_length)}}))}function ut(e){var t=e.properties;r(t)?(lt(t),function(e){r(e)&&k(["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"],(function(t,r){t in e&&(r<3?(delete e[t],ge("您的属性- "+t+"是保留字段,我们已经将其删除")):ge("您的属性- "+t+"是保留字段,请避免其作为属性名"))}))}(t),function(e){void 0!==e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),void 0!==e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}(e),function(e){k(e,(function(t,r){Re({propertyKey:r},(function(t,i,n){return t||"keyLength"===n||delete e[r],!0}))}))}(t),ct(t)):"properties"in e&&(e.properties={}),fe(e),function(e){"item_type"in e&&Re({item_type:e.item_type},(function(t){return t||delete e.item_type,!0})),"item_id"in e&&Re({item_id:e.item_id},(function(t,r,i){return t||"string"!==i||delete e.item_id,!0}))}(e)}function pt(){this.dataStage=Nr}function ft(e){e&&(ht.setup(ge),br._=P($t,ir),br.ee=er,br.sendState=dr,br.events=new br._.EventEmitterSa,br.batchSend=_r,br.bridge=gr,br.SDKJSBridge=Xe,br.JSBridge=Ge,br.store=Wt,br.vtrackBase=mr,br.unlimitedDiv=vr,br.customProp=yr,br.vtrackcollect=wr,br.vapph5collect=Sr,br.heatmap=Gt,br.detectMode=et,br.registerFeature=at,br.registerInterceptor=st,at(new ot(br)),at(new pt(br)));var t=e?rr:Or;for(var r in t)br[r]=t[r];br.on=Ke,br.ee=er,br.use=Be}var br={};(function(){var e={function:!0,object:!0},t=e[typeof window]&&window||this,i=t.JSON,r=t.JSON3,a=!1,s=function r(i,n){function a(e,t){try{e()}catch(e){t&&t()}}function s(e){if(null!=s[e])return s[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=s("json-stringify")&&s("date-serialization")&&s("json-parse");else if("date-serialization"==e){if(t=s("json-stringify")&&b){var r=n.stringify;a((function(){t='"-271821-04-20T00:00:00.000Z"'==r(new d(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==r(new d(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new d(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==r(new d(-1))}))}}else{var i,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var u="function"==typeof(r=n.stringify);u&&((i=function(){return 1}).toJSON=i,a((function(){u="0"===r(0)&&"0"===r(new l)&&'""'==r(new c)&&r(v)===h&&r(h)===h&&r()===h&&"1"===r(i)&&"[1]"==r([i])&&"[null]"==r([h])&&"null"==r(null)&&"[null,null,null]"==r([h,v,null])&&r({a:[i,!0,!1,null,"\0\b\n\f\r\t"]})==o&&"1"===r(null,i)&&"[\n 1,\n 2\n]"==r([1,2],null,1)}),(function(){u=!1}))),t=u}if("json-parse"==e){var p,f=n.parse;"function"==typeof f&&a((function(){0!==f("0")||f(!1)||(i=f(o),(p=5==i.a.length&&1===i.a[0])&&(a((function(){p=!f('"\t"')})),p&&a((function(){p=1!==f("01")})),p&&a((function(){p=1!==f("1.")}))))}),(function(){p=!1})),t=p}}return s[e]=!!t}function o(e){return T(this)}i||(i=t.Object()),n||(n=t.Object());var l=i.Number||t.Number,c=i.String||t.String,u=i.Object||t.Object,d=i.Date||t.Date,p=i.SyntaxError||t.SyntaxError,f=i.TypeError||t.TypeError,_=i.Math||t.Math,g=i.JSON||t.JSON;if("object"==typeof g&&g)return n.stringify=g.stringify,n.parse=g.parse,n.runInContext=r,n;var h,m=u.prototype,v=m.toString,y=m.hasOwnProperty,b=new d(-0xc782b5b800cec);if(a((function(){b=-109252==b.getUTCFullYear()&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()})),s["bug-string-char-index"]=s["date-serialization"]=s.json=s["json-stringify"]=s["json-parse"]=null,!s("json")){var w="[object Function]",S="[object Number]",k="[object String]",P="[object Array]",D=s("bug-string-char-index"),O=function(t,r){var i,n,a,s=0;for(a in(i=function(){this.valueOf=0}).prototype.valueOf=0,n=new i)y.call(n,a)&&s++;return i=n=null,s?O=function(e,t){var r,i,n=v.call(e)==w;for(r in e)n&&"prototype"==r||!y.call(e,r)||(i="constructor"===r)||t(r);(i||y.call(e,r="constructor"))&&t(r)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],O=function(t,r){var i,a,s=v.call(t)==w,o=!s&&"function"!=typeof t.constructor&&e[typeof t.hasOwnProperty]&&t.hasOwnProperty||y;for(i in t)s&&"prototype"==i||!o.call(t,i)||r(i);for(a=n.length;i=n[--a];)o.call(t,i)&&r(i)}),O(t,r)};if(!s("json-stringify")&&!s("date-serialization")){var C={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},j=function(e,t){return("000000"+(t||0)).slice(-e)},T=function(e){var t,r,i,n,a,s,o,l,c;if(b)t=function(e){r=e.getUTCFullYear(),i=e.getUTCMonth(),n=e.getUTCDate(),s=e.getUTCHours(),o=e.getUTCMinutes(),l=e.getUTCSeconds(),c=e.getUTCMilliseconds()};else{var u=_.floor,d=[0,31,59,90,120,151,181,212,243,273,304,334],p=function(e,t){return d[t]+365*(e-1970)+u((e-1969+(t=+(t>1)))/4)-u((e-1901+t)/100)+u((e-1601+t)/400)};t=function(e){for(n=u(e/864e5),r=u(n/365.2425)+1970-1;p(r+1,0)<=n;r++);for(i=u((n-p(r,0))/30.42);p(r,i+1)<=n;i++);n=1+n-p(r,i),s=u((a=(e%864e5+864e5)%864e5)/36e5)%24,o=u(a/6e4)%60,l=u(a/1e3)%60,c=a%1e3}}return(T=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+j(6,r<0?-r:r):j(4,r))+"-"+j(2,i+1)+"-"+j(2,n)+"T"+j(2,s)+":"+j(2,o)+":"+j(2,l)+"."+j(3,c)+"Z",r=i=n=s=o=l=c=null):e=null,e})(e)};if(s("json-stringify")&&!s("date-serialization")){var $=n.stringify;n.stringify=function(e,t,r){var i=d.prototype.toJSON;d.prototype.toJSON=o;var n=$(e,t,r);return d.prototype.toJSON=i,n}}else{var N=function(e){var t=e.charCodeAt(0),r=C[t];return r||"\\u00"+j(2,t.toString(16))},A=/[\x00-\x1f\x22\x5c]/g,x=function(e){return A.lastIndex=0,'"'+(A.test(e)?e.replace(A,N):e)+'"'},I=function(e,t,r,i,n,s,o){var l,c,u,p,_,g,m,y,b;if(a((function(){l=t[e]})),"object"==typeof l&&l&&(l.getUTCFullYear&&"[object Date]"==v.call(l)&&l.toJSON===d.prototype.toJSON?l=T(l):"function"==typeof l.toJSON&&(l=l.toJSON(e))),r&&(l=r.call(t,e,l)),l==h)return l===h?l:"null";switch("object"==(c=typeof l)&&(u=v.call(l)),u||c){case"boolean":case"[object Boolean]":return""+l;case"number":case S:return l>-1/0&&l<1/0?""+l:"null";case"string":case k:return x(""+l)}if("object"==typeof l){for(m=o.length;m--;)if(o[m]===l)throw f();if(o.push(l),p=[],y=s,s+=n,u==P){for(g=0,m=l.length;g0)for(i>10&&(i=10),n="";n.length=48&&n<=57||n>=97&&n<=102||n>=65&&n<=70||R();e+=J("0x"+a.slice(t,E));break;default:R()}else{if(34==n)break;for(n=a.charCodeAt(E),t=E;n>=32&&92!=n&&34!=n;)n=a.charCodeAt(++E);e+=a.slice(t,E)}if(34==a.charCodeAt(E))return E++,e;R();default:if(t=E,45==n&&(i=!0,n=a.charCodeAt(++E)),n>=48&&n<=57){for(48==n&&(n=a.charCodeAt(E+1))>=48&&n<=57&&R(),i=!1;E=48&&n<=57;E++);if(46==a.charCodeAt(E)){for(r=++E;r57);r++);r==E&&R(),E=r}if(101==(n=a.charCodeAt(E))||69==n){for(43!=(n=a.charCodeAt(++E))&&45!=n||E++,r=E;r57);r++);r==E&&R(),E=r}return+a.slice(t,E)}i&&R();var o=a.slice(E,E+4);if("true"==o)return E+=4,!0;if("fals"==o&&101==a.charCodeAt(E+4))return E+=5,!1;if("null"==o)return E+=4,null;R()}return"$"},q=function(e){var t,r;if("$"==e&&R(),"string"==typeof e){if("@"==(D?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];"]"!=(e=K());)r?","==e?"]"==(e=K())&&R():R():r=!0,","==e&&R(),t.push(q(e));return t}if("{"==e){for(t={};"}"!=(e=K());)r?","==e?"}"==(e=K())&&R():R():r=!0,","!=e&&"string"==typeof e&&"@"==(D?e.charAt(0):e[0])&&":"==K()||R(),t[e.slice(1)]=q(K());return t}R()}return e},H=function(e,t,r){var i=B(e,t,r);i===h?delete e[t]:e[t]=i},B=function(e,t,r){var i,n=e[t];if("object"==typeof n&&n)if(v.call(n)==P)for(i=n.length;i--;)H(v,O,n);else O(n,(function(e){H(n,e,r)}));return r.call(e,t,n)};n.parse=function(e,t){var r,i;return E=0,L=""+e,r=q(K()),"$"!=K()&&R(),E=L=null,t&&v.call(t)==w?B(((i={})[""]=r,i),"",t):r}}}return n.runInContext=r,n}(t,t.JSON3={noConflict:function(){return a||(a=!0,t.JSON=i,t.JSON3=r,i=r=null),s}});t.JSON={parse:s.parse,stringify:s.stringify}}).call(window),function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=function(e){var t=function(t){return e(String(t).replace(/[\t\n\f\r ]+/g,""))};return t.original=e,t}(e.atob)}else{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){for(var r,i,n,a,s="",o=0,l=(e=String(e)).length%3;o255||(n=e.charCodeAt(o++))>255||(a=e.charCodeAt(o++))>255)return"";s+=t.charAt((r=i<<16|n<<8|a)>>18&63)+t.charAt(r>>12&63)+t.charAt(r>>6&63)+t.charAt(63&r)}return l?s.slice(0,l-3)+"===".substring(l):s},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!i.test(e))return"";e+="==".slice(2-(3&e.length));for(var r,n,a,s="",o=0;o>16&255):64===a?String.fromCharCode(r>>16&255,r>>8&255):String.fromCharCode(r>>16&255,r>>8&255,255&r);return s}}}(window),String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)});var _t,ht={setup:function(e){_t=e},log:function(){(_t||console&&console.log||function(){}).apply(null,arguments)}},gt={get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t;try{t=JSON.parse(gt.get(e))||null}catch(e){ht.log(e)}return t},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(e){ht.log(e)}},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__local_store_support__",r="testIsSupportStorage";gt.set(t,r),gt.get(t)!==r&&(e=!1),gt.remove(t)}catch(t){e=!1}return e}},mt=function(){var e=(new Date).getTime();return function(t){return Math.ceil((e=(9301*e+49297)%233280)/233280*t)}}();a.prototype.get=function(e,r,a,s){if(!e)throw new Error("key is must");r=r||1e4,a=a||1e3,s=s||function(){};var o=this.lockGetPrefix+e,l=gt.get(o),c=String(i());return l&&(l=n(l)||{randomNum:0,expireTime:0}).expireTime>t()?s(null):(gt.set(o,JSON.stringify({randomNum:c,expireTime:t()+r})),void setTimeout((function(){(l=n(gt.get(o))||{randomNum:0,expireTime:0})&&l.randomNum===c?(s(gt.get(e)),gt.remove(e),gt.remove(o)):s(null)}),a))},a.prototype.set=function(e,r,a,s,o){if(!e||!r)throw new Error("key and val is must");a=a||1e4,s=s||1e3,o=o||function(){};var l=this.lockSetPrefix+e,c=gt.get(l),u=String(i());return c&&(c=n(c)||{randomNum:0,expireTime:0}).expireTime>t()?o({status:"fail",reason:"This key is locked"}):(gt.set(l,JSON.stringify({randomNum:u,expireTime:t()+a})),void setTimeout((function(){(c=n(gt.get(l))||{randomNum:0,expireTime:0}).randomNum===u?gt.set(e,r)&&o({status:"success"}):o({status:"fail",reason:"This key is locked"})}),s))},l.prototype.on=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].push(r?t:{listener:t,once:!1}),this},l.prototype.prepend=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].unshift(r?t:{listener:t,once:!1}),this},l.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},l.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},l.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var i=0,n=r.length;i=4&&(a=e(a,n),n=[]);return n.length>0&&(a=e(a,n)),a.toString(16)}()+"-"+t+"-"+e();return a||(String(i())+String(i())+String(i())).slice(2,15)}}(),yt=function(e){this.ele=e},bt=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};yt.prototype={addClass:function(e){return-1===(" "+this.ele.className+" ").indexOf(" "+e+" ")&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return-1!==t.indexOf(" "+e+" ")&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){return-1!==(" "+this.ele.className+" ").indexOf(" "+e+" ")},attr:function(e,t){return"string"==typeof e&&h(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument.documentElement;return{top:e.top+window.pageYOffset-t.clientTop,left:e.left+window.pageXOffset-t.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(e){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),y(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!v(r))return null;for(var i=r.length-1;i>=0;i--)if(t=r[i].style.getPropertyValue(e))return t},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return bt((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return bt(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return y(e=e&&11!==e.nodeType?e:null)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return y(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return y(e);return y(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),i=[],n=0;n-1?"landscape":"portrait";else if(B()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t},getUA:M,getURL:W,getURLPath:F,getURLSearchParams:u,hasAttribute:V,hasAttributes:z,hashCode:X,hashCode53:Z,indexOf:G,inherit:function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},isArguments:Y,isArray:v,isBoolean:Q,isDate:A,isElement:g,isEmptyObject:ee,isFunction:e,isHttpUrl:te,isIOS:re,isJSONString:ne,isNumber:ie,isObject:r,isString:d,isSupportBeaconSend:ae,isSupportCors:se,isUndefined:h,jsonp:oe,listenPageState:le,loadScript:ce,localStorage:gt,logger:ht,map:O,mediaQueriesSupported:B,now:t,removeScriptProtocol:ue,rot13defs:pe,rot13obfs:de,ry:y,safeJSONParse:n,searchObjDate:fe,sessionStorage:Ot,setCssStyle:_e,strToUnicode:function(e){if("string"!=typeof e)return ht.log("转换unicode错误",e),e;for(var t="",r=0;rr?(o&&(clearTimeout(o),o=null),l=u,s=e.apply(n,a),o||(n=a=null)):o||!1===i.trailing||(o=setTimeout(c,d)),s}},toArray:function(e){return e?e.toArray?e.toArray():v(e)||Y(e)?Array.prototype.slice.call(e):he(e):[]},trim:p,unique:function(e){for(var t,r=[],i={},n=0;nt._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var n=new Date;t={value:t,_expirationTimestamp_:"s"===String(r).slice(-1)?n.getTime()+1e3*Number(String(r).slice(0,-1)):n.getTime()+24*r*60*60*1e3}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+Nt.sdk_id+e}},Mt={checkIsAddSign:function(e){"track"===e.type&&(Ue()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=Ht.get("sensorsdata2015jssdkcross"+br.para.sdk_id),i={};null!=(r=me(r))&&ne(r)&&(i=JSON.parse(r)).$device_id&&(t=i.$device_id),t=t||e,!0===br.para.cross_subdomain?br.store.set("$device_id",t):(i.$device_id=t,i=JSON.stringify(i),br.para.encrypt_cookie&&(i=ve(i)),Ht.set("sensorsdata2015jssdkcross"+br.para.sdk_id,i,null,!0)),br.para.is_track_device_id&&(Kt.currentProps.$device_id=t)},storeInitCheck:function(){if(br.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};Ht.isSupport()?Ht.set(Je("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):Bt.set(Bt.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else Ue()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){var e=Kt.pageProp.url_domain,t={};""===e&&(e="url解析失败");var i=$e(document.referrer,!0);if(br.para.preset_properties.search_keyword_baidu?Ce(document.referrer)&&(!Pe()||r(i)&&i.active?br.store._state&&br.store._state.props&&(br.store._state.props.$search_keyword_id&&delete br.store._state.props.$search_keyword_id,br.store._state.props.$search_keyword_id_type&&delete br.store._state.props.$search_keyword_id_type,br.store._state.props.$search_keyword_id_hash&&delete br.store._state.props.$search_keyword_id_hash):(t.$search_keyword_id=Rt.id(),t.$search_keyword_id_type=Rt.type(),t.$search_keyword_id_hash=Z(t.$search_keyword_id))):br.store._state&&br.store._state.props&&(br.store._state.props.$search_keyword_id&&delete br.store._state.props.$search_keyword_id,br.store._state.props.$search_keyword_id_type&&delete br.store._state.props.$search_keyword_id_type,br.store._state.props.$search_keyword_id_hash&&delete br.store._state.props.$search_keyword_id_hash),br.store.save(),k(br.para.preset_properties,(function(i,n){if(-1===n.indexOf("latest_"))return!1;if(n=n.slice(7),i){if("wx_ad_click_id"===n&&"not_collect"===i)return!1;if("utm"!==n&&"url解析失败"===e)"wx_ad_click_id"===n?(t._latest_wx_ad_click_id="url的domain解析失败",t._latest_wx_ad_hash_key="url的domain解析失败",t._latest_wx_ad_callbacks="url的domain解析失败"):t["$latest_"+n]="url的domain解析失败";else if(Ce(document.referrer))switch(n){case"traffic_source_type":t.$latest_traffic_source_type=Ae();break;case"referrer":t.$latest_referrer=Kt.pageProp.referrer;break;case"search_keyword":$e()?t.$latest_search_keyword=$e():r(br.store._state)&&r(br.store._state.props)&&br.store._state.props.$latest_search_keyword&&delete br.store._state.props.$latest_search_keyword;break;case"landing_page":t.$latest_landing_page=W();break;case"wx_ad_click_id":var a=Ne(location.href);t._latest_wx_ad_click_id=a.click_id,t._latest_wx_ad_hash_key=a.hash_key,t._latest_wx_ad_callbacks=a.callbacks}}else if("utm"===n&&br.store._state&&br.store._state.props)for(var s in br.store._state.props)(0===s.indexOf("$latest_utm")||0===s.indexOf("_latest_")&&s.indexOf("_latest_wx_ad_")<0)&&delete br.store._state.props[s];else br.store._state&&br.store._state.props&&"$latest_"+n in br.store._state.props?delete br.store._state.props["$latest_"+n]:"wx_ad_click_id"==n&&br.store._state&&br.store._state.props&&!1===i&&k(["_latest_wx_ad_click_id","_latest_wx_ad_hash_key","_latest_wx_ad_callbacks"],(function(e){e in br.store._state.props&&delete br.store._state.props[e]}))})),br.register(t),br.para.preset_properties.latest_utm){var n=Kt.campaignParamsStandard("$latest_","_latest_"),a=n.$utms,s=n.otherUtms;ee(a)||br.register(a),ee(s)||br.register(s)}}},Wt={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{},identities:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getOriginDistinctId:function(){return this._state._distinct_id||this._state.distinct_id},getOriginUnionId:function(e){var t={},r=(e=e||this._state)._first_id||e.first_id,i=e._distinct_id||e.distinct_id;return r&&i?(t.login_id=i,t.anonymous_id=r):t.anonymous_id=i,t},getDistinctId:function(){var e=this.getUnionId();return e.login_id||e.anonymous_id},getUnionId:function(e){var t=this.getOriginUnionId(e);return t.login_id&&this._state.history_login_id&&this._state.history_login_id.name&&this._state.history_login_id.name!==br.IDENTITY_KEY.LOGIN&&(t.login_id=this._state.history_login_id.name+"+"+t.login_id),t},getFirstId:function(){return this._state._first_id||this._state.first_id},initSessionState:function(){var e=Ht.get("sensorsdata2015session"),t=null;null!==(e=me(e))&&"object"==typeof(t=n(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{};var r=this._state.distinct_id;this._state[e]=t,"first_id"===e?delete this._state._first_id:"distinct_id"===e&&delete this._state._distinct_id,this.save(),"distinct_id"===e&&r&&br.events.tempAdd("changeDistinctId",t)},change:function(e,t){this._state["_"+e]=t},setSessionProps:function(e){var t=this._sessionState;P(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;T(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};for(var i in r=t?e:P(this._state.props||{},e))"string"==typeof r[i]&&(r[i]=r[i].slice(0,br.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};T(t,e),this.set("props",t)},clearAllProps:function(e){var t;if(this._sessionState={},v(e)&&e.length>0)for(t=0;tNt.max_id_length)},keyLength:function(e){return!(!d(e)||e.length>Nt.max_key_length)},stringLength:function(e){return!(!d(e)||e.length>Nt.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(G(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(G(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=Wt._state.history_login_id;return!(t&&t.name&&t.name===e||G(this.bindReservedNames,e)>-1)}},Vt={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="Id"),e(qt[i])&&qt[i](r),"idLength"===i)||t}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,i){return t||("emptyString"===i&&(r="eventName"),e(qt[i])&&qt[i](r)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,i){return t||("emptyString"===i&&(r="Property key"),e(qt[i])&&qt[i](r)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(t,r,i){return t||e(qt[i])&&qt[i]("Property Value"),!0}},properties:function(t){return r(t)?k(t,(function(t,r){Re({propertyKey:r}),Re({propertyValue:t},(function(t,i,n){return t||(i=r+"'s Value",e(qt[n])&&qt[n](i)),!0}))})):Ft.voidZero(t)&&ge("properties可以没有,但有的话必须是对象"),!0},propertiesMust:function(e){return void 0!==e&&r(e)&&!ee(e)?this.properties.call(this,e):ge("properties必须是对象"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,i){return t||("emptyString"===i&&(r="item_type"),e(qt[i])&&qt[i](r)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(t,r,i){return t||("emptyString"===i&&(r="item_id"),e(qt[i])&&qt[i](r)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="login_id_key"),e(qt[i])&&qt[i](r),"keyLength"===i)||t}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="Key"),e(qt[i])&&qt[i](r),"keyLength"===i)||t}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="Key"),e(qt[i])&&qt[i](r),"keyLength"===i)||t}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(t,r,i){return!t&&("emptyString"===i&&(r="Value"),e(qt[i])&&qt[i](r),"idLength"===i)||t}},check:function(t,r,i){var n=this[t];if(e(n))return n.call(this,r);if(!n)return!1;for(var a=0;a-1)return i;if("area"===n&&"map"===a.tagName.toLowerCase()&&y(a).prev().tagName&&"img"===y(a).prev().tagName.toLowerCase())return y(a).prev();if("div"===n&&br.para.heatmap.collect_tags.div&&r.isDivLevelValid(i)&&((br.para.heatmap&&br.para.heatmap.collect_tags&&br.para.heatmap.collect_tags.div&&br.para.heatmap.collect_tags.div.max_level||1)>1||r.isCollectableDiv(i)))return i;if(r.isStyleTag(n)&&br.para.heatmap.collect_tags.div){var o=r.getCollectableParent(i);if(o&&r.isDivLevelValid(o))return o}return r.hasElement({event:t&&t.originalEvent||t,element:e},(function(e){return r.isUnlimitedTag(e)}))||null},getDivLevels:function(e,t){var i=Gt.getElementPath(e,!0,t).split(" > "),r=0;return k(i,(function(e){"div"===e&&r++})),r},isDivLevelValid:function(e){for(var t=br.para.heatmap&&br.para.heatmap.collect_tags&&br.para.heatmap.collect_tags.div&&br.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),i=r.length-1;i>=0;i--)if(Gt.getDivLevels(r[i],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var i=[];e.parentNode;){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){i.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){i.unshift(e.tagName.toLowerCase());break}if(e===document.body){i.unshift("body");break}i.unshift(e.tagName.toLowerCase()),e=e.parentNode}return i.join(" > ")},getClosestLi:function(e){return function(e,t){for(;e&&e!==document&&1===e.nodeType;e=e.parentNode)if(e.tagName.toLowerCase()===t)return e;return null}(e,"li")},getElementPosition:function(e,t,r){var n=br.heatmap.getClosestLi(e);if(!n)return null;var a=e.tagName.toLowerCase(),s=n.getElementsByTagName(a),o=s.length,l=[];if(o>1){for(var c=0;c1)return G(l,e)}return function(e){if(!e.parentNode)return"";if(1===y(e).getSameTypeSiblings().length)return 0;for(var t=0,a=e;y(a).previousElementSibling().ele;a=y(a).previousElementSibling().ele,t++);return t}(n)},setNotice:function(e){br.is_heatmap_render_mode=!0,br.para.heatmap||(br.errorMsg="您SDK没有配置开启点击图,可能没有数据!"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(br.errorMsg="您的当前页面是https的地址,神策分析环境也必须是https!"),br.para.heatmap_url||(br.para.heatmap_url=Le()+"//static.sensorsdata.cn/sdk/"+br.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,i=e.parentNode.children,n=0;n "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=ke({target:e});r.$element_selector=t||"",r.$element_path=br.heatmap.getElementPath(e,br.para.heatmap&&"not_use_id"===br.para.heatmap.element_selector);var i=br.heatmap.getElementPosition(e,r.$element_path,br.para.heatmap&&"not_use_id"===br.para.heatmap.element_selector);return ie(i)&&(r.$element_position=i),r},getPointerEventProp:function(e,t){function r(){return{scrollLeft:document.body.scrollLeft||document.documentElement.scrollLeft||0,scrollTop:document.body.scrollTop||document.documentElement.scrollTop||0}}function i(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function n(e){return Number(Number(e).toFixed(3))}return e?function(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+i(t).targetEleX||0,s=e.pageY||e.clientY+r().scrollTop||e.offsetY+i(t).targetEleY||0;return{$page_x:n(a),$page_y:n(s)}}(e):{}},start:function(t,i,n,a,s){var o=r(a)?a:{},l=e(s)?s:e(a)?a:void 0;if(br.para.heatmap&&br.para.heatmap.collect_element&&!br.para.heatmap.collect_element(i))return!1;var c=this.getEleDetail(i);if(br.para.heatmap&&br.para.heatmap.custom_property){var u=br.para.heatmap.custom_property(i);r(u)&&(c=P(c,u))}c=P(c,this.getPointerEventProp(t,i),o),"a"===n&&br.para.heatmap&&!0===br.para.heatmap.isTrackLink?br.trackLink({event:t,target:i},"$WebClick",c):br.track("$WebClick",c,l)},hasElement:function(e,t){var r;if(e.event){var i=e.event;r=i.path||i._getPath&&i._getPath()}else e.element&&(r=y(e.element).getParents());if(r&&v(r)&&r.length>0)for(var n=0;n-1)&&(!t||br.para.heatmap&&br.para.heatmap.collect_tags&&br.para.heatmap.collect_tags.div?!!(r(br.para.heatmap)&&r(br.para.heatmap.collect_tags)&&r(br.para.heatmap.collect_tags.div)&&v(br.para.heatmap.collect_tags.div.ignore_tags)&&G(br.para.heatmap.collect_tags.div.ignore_tags,e)>-1):G(["mark","/mark","strong","b","em","i","u","abbr","ins","del","s","sup"],e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(i,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(e){br.log(e)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,i=r?r.tagName.toLowerCase():"";if("body"===i)return!1;var n=br.para&&br.para.heatmap&&br.para.heatmap.collect_tags&&br.para.heatmap.collect_tags.div&&br.para.heatmap.collect_tags.div.max_level;if(i&&"div"===i&&(n>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(i,t))return this.getCollectableParent(r,t)}catch(e){br.log(e)}return!1},listenUrlChange:function(e){e(),br.ee.spa.on("switch",(function(){e()}))},initScrollmap:function(){if(!r(br.para.heatmap)||"default"!==br.para.heatmap.scroll_notice_map)return!1;var t=!0;br.para.scrollmap&&e(br.para.scrollmap.collect_url)&&this.listenUrlChange((function(){t=!!br.para.scrollmap.collect_url()}));var n=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout((function(){t.main(r)}),this.timeout))},t}({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,i=new Date,n=i-this.current_time;(n>br.para.heatmap.scroll_delay_time&&r-e.$viewport_position!=0||t)&&(e.$url=W(),e.$title=document.title,e.$url_path=F(),e.event_duration=Math.min(br.para.heatmap.scroll_event_duration,parseInt(n)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,br.track("$WebStay",e)),this.current_time=i}});n.current_time=new Date,Ee(window,"scroll",(function(){return!!t&&void n.go()})),Ee(window,"unload",(function(){return!!t&&void n.go("notime")}))},initHeatmap:function(){var t=this,i=!0;return!(!r(br.para.heatmap)||"default"!==br.para.heatmap.clickmap)&&(e(br.para.heatmap.collect_url)&&this.listenUrlChange((function(){i=!!br.para.heatmap.collect_url()})),"all"===br.para.heatmap.collect_elements?br.para.heatmap.collect_elements="all":br.para.heatmap.collect_elements="interact",void("all"===br.para.heatmap.collect_elements?Ee(document,"click",(function(e){if(!i)return!1;var r=e||window.event;if(!r)return!1;var n=r.target||r.srcElement;if("object"!=typeof n)return!1;if("string"!=typeof n.tagName)return!1;var a=n.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!n||!n.parentNode||!n.parentNode.children)return!1;var s=n.parentNode.tagName.toLowerCase();"a"===s||"button"===s?t.start(r,n.parentNode,s):t.start(r,n,a)})):Ee(document,"click",(function(e){if(!i)return!1;var n=e||window.event;if(!n)return!1;var a=n.target||n.srcElement,s=br.heatmap.getTargetElement(a,e);s?t.start(n,s,s.tagName.toLowerCase()):g(a)&&"div"===a.tagName.toLowerCase()&&r(br.para.heatmap)&&br.para.heatmap.get_vtrack_config&&br.unlimitedDiv.events.length>0&&br.unlimitedDiv.isTargetEle(a)&&t.start(n,a,a.tagName.toLowerCase(),{$lib_method:"vtrack"})}))))}},Yt={setOnlineState:function(e){if(!0===e&&r(br.para.jsapp)&&"function"==typeof br.para.jsapp.getData){br.para.jsapp.isOnline=!0;var t=br.para.jsapp.getData();v(t)&&t.length>0&&k(t,(function(e){ne(e)&&br.sendState.realtimeSend(JSON.parse(e))}))}else br.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return Kt.campaignParams()},getStayTime:function(){return(new Date-br._t)/1e3},setProfileLocal:function(e){if(!gt.isSupport())return br.setProfile(e),!1;if(!r(e)||ee(e))return!1;var t=br.store.readObjectVal("sensorsdata_2015_jssdk_profile"),i=!1;if(r(t)&&!ee(t)){for(var n in e)(!(n in t)||t[n]===e[n])&&n in t||(t[n]=e[n],i=!0);i&&(br.store.saveObjectVal("sensorsdata_2015_jssdk_profile",t),br.setProfile(e))}else br.store.saveObjectVal("sensorsdata_2015_jssdk_profile",e),br.setProfile(e)},setInitReferrer:function(){var e=je();br.setOnceProfile({_init_referrer:e,_init_referrer_host:Kt.pageProp.referrer_host})},setSessionReferrer:function(){var e=je();br.store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:Kt.pageProp.referrer_host})},setDefaultAttr:function(){Kt.register({_current_url:location.href,_referrer:je(),_referring_host:Kt.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var i=e.tagName.toLowerCase(),n=e.parentNode.tagName.toLowerCase(),a=br.para.heatmap&&br.para.heatmap.track_attr?br.para.heatmap.track_attr:["data-sensors-click"];"button"===i||"a"===i||"a"===n||"button"===n||"input"===i||"textarea"===i||z(e,a)||Gt.start(null,e,i,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var i=e.tagName.toLowerCase();Gt.start(null,e,i,t,r)}},autoTrackSinglePage:function(e,t){function i(){var e=Kt.campaignParams(),t={};return k(e,(function(e,r,i){-1!==(" "+br.source_channel_standard+" ").indexOf(" "+r+" ")?t["$"+r]=i[r]:t[r]=i[r]})),t}function n(e,t){br.track("$pageview",P({$referrer:a,$url:W(),$url_path:F(),$title:document.title},e,i()),t),a=W()}var a;a=this.autoTrackIsUsed?Kt.pageProp.url:Kt.pageProp.referrer;var s=!(e=r(e)?e:{}).not_set_profile;if(e.not_set_profile&&delete e.not_set_profile,n(e,t),this.autoTrackSinglePage=n,br.is_first_visitor&&s){var o={};br.para.preset_properties.search_keyword_baidu&&Ce(document.referrer)&&Pe()&&(o.$search_keyword_id=Rt.id(),o.$search_keyword_id_type=Rt.type(),o.$search_keyword_id_hash=Z(o.$search_keyword_id)),br.setOnceProfile(P({$first_visit_time:new Date,$first_referrer:je(),$first_browser_language:d(navigator.language)?navigator.language.toLowerCase():"取值异常",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"取值异常",$first_traffic_source_type:Ae(),$first_search_keyword:$e()},i(),o)),br.is_first_visitor=!1}},autoTrackWithoutProfile:function(e,t){e=r(e)?e:{},this.autoTrack(P(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=r(e)?e:{};var i=Kt.campaignParams(),n={};k(i,(function(e,t,r){-1!==(" "+br.source_channel_standard+" ").indexOf(" "+t+" ")?n["$"+t]=r[t]:n[t]=r[t]}));var a=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var s=location.href;if(br.para.is_single_page&&w((function(){var r=je(s,!0);br.track("$pageview",P({$referrer:r,$url:W(),$url_path:F(),$title:document.title},n,e),t),s=W()})),br.track("$pageview",P({$referrer:je(null,!0),$url:W(),$url_path:F(),$title:document.title},n,e),t),br.is_first_visitor&&a){var o={};br.para.preset_properties.search_keyword_baidu&&Ce(document.referrer)&&Pe()&&(o.$search_keyword_id=Rt.id(),o.$search_keyword_id_type=Rt.type(),o.$search_keyword_id_hash=Z(o.$search_keyword_id)),br.setOnceProfile(P({$first_visit_time:new Date,$first_referrer:je(null,!0),$first_browser_language:d(navigator.language)?navigator.language.toLowerCase():"取值异常",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"取值异常",$first_traffic_source_type:Ae(),$first_search_keyword:$e()},n,o)),br.is_first_visitor=!1}this.autoTrackIsUsed=!0},getAnonymousID:function(){return ee(br.store._state)?"请先初始化SDK":br.store._state._first_id||br.store._state.first_id||br.store._state._distinct_id||br.store._state.distinct_id},setPlugin:function(t){return!!r(t)&&void k(t,(function(t,i){e(t)&&(r(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[i]?t(window.SensorsDataWebJSSDKPlugin[i]):br.log(i+"没有获取到,请查阅文档,调整"+i+"的引入顺序!"))}))},useModulePlugin:function(){br.use.apply(br,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}},Qt=new l,li=new l,er={};er.spa=Qt,er.sdk=li,er.initSystemEvent=function(){!function(t){var a,r=location.href,i=window.history.pushState,n=window.history.replaceState;e(window.history.pushState)&&(window.history.pushState=function(){i.apply(window.history,arguments),t(r),r=location.href}),e(window.history.replaceState)&&(window.history.replaceState=function(){n.apply(window.history,arguments),t(r),r=location.href}),a=window.document.documentMode?"hashchange":i?"popstate":"hashchange",b(window,a,(function(){t(r),r=location.href}))}((function(e){Qt.emit("switch",e)}))},er.EVENT_LIST={spaSwitch:["spa","switch"],sdkAfterInitPara:["sdk","afterInitPara"],sdkBeforeInit:["sdk","beforeInit"],sdkAfterInit:["sdk","afterInit"]};var rr={__proto__:null,addReferrerHost:function(e){var t=!e.type||"profile"!==e.type.slice(0,7),i="取值异常";r(e.properties)&&(e.properties.$first_referrer&&(e.properties.$first_referrer_host=R(e.properties.$first_referrer,i)),t&&("$referrer"in e.properties&&(e.properties.$referrer_host=""===e.properties.$referrer?"":R(e.properties.$referrer,i)),br.para.preset_properties.latest_referrer&&br.para.preset_properties.latest_referrer_host&&(e.properties.$latest_referrer_host=""===e.properties.$latest_referrer?"":R(e.properties.$latest_referrer,i))))},addPropsHook:function(e){var t=!e.type||"profile"!==e.type.slice(0,7),r=br.para.preset_properties&&t;r&&br.para.preset_properties.url&&void 0===e.properties.$url&&(e.properties.$url=W()),r&&br.para.preset_properties.title&&void 0===e.properties.$title&&(e.properties.$title=document.title)},initPara:function(e){P(Nt,e||br.para||{}),br.para=Nt;var t,n={};if(r(br.para.is_track_latest))for(var i in br.para.is_track_latest)n["latest_"+i]=br.para.is_track_latest[i];for(t in br.para.preset_properties=P({},br.para_default.preset_properties,n,br.para.preset_properties||{}),br.para_default)void 0===br.para[t]&&(br.para[t]=br.para_default[t]);"string"==typeof br.para.server_url&&(br.para.server_url=p(br.para.server_url),br.para.server_url&&("://"===br.para.server_url.slice(0,3)?br.para.server_url=location.protocol.slice(0,-1)+br.para.server_url:"//"===br.para.server_url.slice(0,2)?br.para.server_url=location.protocol+br.para.server_url:"http"!==br.para.server_url.slice(0,4)&&(br.para.server_url=""))),"string"!=typeof br.para.web_url||"://"!==br.para.web_url.slice(0,3)&&"//"!==br.para.web_url.slice(0,2)||("://"===br.para.web_url.slice(0,3)?br.para.web_url=location.protocol.slice(0,-1)+br.para.web_url:br.para.web_url=location.protocol+br.para.web_url),"image"!==br.para.send_type&&"ajax"!==br.para.send_type&&"beacon"!==br.para.send_type&&(br.para.send_type="image"),br.debug.protocol.serverUrl(),br.bridge.initPara();var a={datasend_timeout:6e3,send_interval:6e3};gt.isSupport()&&se()&&"object"==typeof localStorage?!0===br.para.batch_send?br.para.batch_send=P({},a):"object"==typeof br.para.batch_send&&(br.para.batch_send=P({},a,br.para.batch_send)):br.para.batch_send=!1;var s=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],o=["www.baidu.","m.baidu.","m.sm.cn","so.com","sogou.com","youdao.com","google.","yahoo.com/","bing.com/","ask.com/"],l=["weibo.com","renren.com","kaixin001.com","douban.com","qzone.qq.com","zhihu.com","tieba.baidu.com","weixin.qq.com"],c={baidu:["wd","word","kw","keyword"],google:"q",bing:"q",yahoo:"p",sogou:["query","keyword"],so:"q",sm:"q"};"object"==typeof br.para.source_type&&(br.para.source_type.utm=v(br.para.source_type.utm)?br.para.source_type.utm.concat(s):s,br.para.source_type.search=v(br.para.source_type.search)?br.para.source_type.search.concat(o):o,br.para.source_type.social=v(br.para.source_type.social)?br.para.source_type.social.concat(l):l,br.para.source_type.keyword=r(br.para.source_type.keyword)?P(c,br.para.source_type.keyword):c);var d=["mark","/mark","strong","b","em","i","u","abbr","ins","del","s","sup"];if(br.para.heatmap&&!r(br.para.heatmap)&&(br.para.heatmap={}),r(br.para.heatmap)){br.para.heatmap.clickmap=br.para.heatmap.clickmap||"default",br.para.heatmap.scroll_notice_map=br.para.heatmap.scroll_notice_map||"default",br.para.heatmap.scroll_delay_time=br.para.heatmap.scroll_delay_time||4e3,br.para.heatmap.scroll_event_duration=br.para.heatmap.scroll_event_duration||18e3,br.para.heatmap.renderRefreshTime=br.para.heatmap.renderRefreshTime||1e3,br.para.heatmap.loadTimeout=br.para.heatmap.loadTimeout||1e3,!0!==br.para.heatmap.get_vtrack_config&&(br.para.heatmap.get_vtrack_config=!1);var f=v(br.para.heatmap.track_attr)?I(br.para.heatmap.track_attr,(function(e){return e&&"string"==typeof e})):[];f.push("data-sensors-click"),br.para.heatmap.track_attr=f,r(br.para.heatmap.collect_tags)?!0===br.para.heatmap.collect_tags.div?br.para.heatmap.collect_tags.div={ignore_tags:d,max_level:1}:r(br.para.heatmap.collect_tags.div)?(br.para.heatmap.collect_tags.div.ignore_tags?v(br.para.heatmap.collect_tags.div.ignore_tags)||(br.log("ignore_tags 参数必须是数组格式"),br.para.heatmap.collect_tags.div.ignore_tags=d):br.para.heatmap.collect_tags.div.ignore_tags=d,br.para.heatmap.collect_tags.div.max_level&&-1===G([1,2,3],br.para.heatmap.collect_tags.div.max_level)&&(br.para.heatmap.collect_tags.div.max_level=1)):br.para.heatmap.collect_tags.div=!1:br.para.heatmap.collect_tags={div:!1}}if(v(br.para.server_url)&&br.para.server_url.length)for(t=0;tbr.para.datasend_timeout&&(br.para.datasend_timeout=br.para.callback_timeout),br.para.heatmap&&br.para.heatmap.collect_tags&&r(br.para.heatmap.collect_tags)&&k(br.para.heatmap.collect_tags,(function(e,t){"div"!==t&&e&&br.heatmap.otherTags.push(t)})),br.para.heatmap&&"default"===br.para.heatmap.clickmap&&br.heatmap.initUnlimitedTags()},setInitVar:function(){br._t=br._t||1*new Date,br.lib_version=Lt,br.is_first_visitor=!1,br.source_channel_standard=Et},enableLocalLog:function(){if(Ot.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){br.log("enableLocalLog error: "+e.message)}},disableLocalLog:function(){Ot.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")},quick:function(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&Yt[t]?Yt[t].apply(Yt,r):void("function"==typeof t?t.apply(br,r):br.log("quick方法中没有这个功能"+e[0]))},use:Be,track:function(e,t,r){Xt.check({event:e,properties:t})&&Xt.send({type:"track",event:e,properties:t},r)},bind:function(e,t){return!!Xt.check({bindKey:e,bindValue:t})&&(br.store._state.identities[e]=t,br.store.save(),void Xt.send({type:"track_id_bind",event:"$BindID",properties:{}}))},unbind:function(e,t){if(!Xt.check({unbindKey:e,bindValue:t}))return!1;if(r(br.store._state.identities)&&br.store._state.identities.hasOwnProperty(e)&&br.store._state.identities[e]===t){var i=br.store.getUnionId().login_id;i&&e+"+"+t===i&&(br.store._state.distinct_id=br.store._state.first_id,br.store._state.first_id="",br.store.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete br.store._state.identities[e],br.store.save())}var n={};n[e]=t,Xt.send({identities:n,type:"track_id_unbind",event:"$UnbindID",properties:{}})},trackLink:function(e,t,r){function i(e,t,r){function i(e){function i(){a||(a=!0,location.href=n.href)}e.stopPropagation(),e.preventDefault();var a=!1;setTimeout(i,1e3),br.track(t,r,i)}var n=null;return(e=e||{}).ele&&(n=e.ele),e.event&&(n=e.target?e.target:e.event.target),r=r||{},!(!n||"object"!=typeof n)&&(!n.href||/^javascript/.test(n.href)||n.target||n.download||n.onclick?(br.track(t,r),!1):(e.event&&i(e.event),void(e.ele&&Ee(e.ele,"click",(function(e){i(e)})))))}"object"==typeof e&&e.tagName?i({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&i(e,t,r)},trackLinks:function(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&!(!e.href||/^javascript/.test(e.href)||e.target)&&void Ee(e,"click",(function(i){function n(){a||(a=!0,location.href=e.href)}i.preventDefault();var a=!1;setTimeout(n,1e3),br.track(t,r,n)}))},setItem:function(e,t,r){Xt.check({item_type:e,item_id:t,properties:r})&&Xt.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})},deleteItem:function(e,t){Xt.check({item_type:e,item_id:t})&&Xt.sendItem({type:"item_delete",item_type:e,item_id:t})},setProfile:function(e,t){Xt.check({propertiesMust:e})&&Xt.send({type:"profile_set",properties:e},t)},setOnceProfile:function(e,t){Xt.check({propertiesMust:e})&&Xt.send({type:"profile_set_once",properties:e},t)},appendProfile:function(e,t){Xt.check({propertiesMust:e})&&(k(e,(function(t,r){d(t)?e[r]=[t]:v(t)?e[r]=t:(delete e[r],br.log("appendProfile属性的值必须是字符串或者数组"))})),ee(e)||Xt.send({type:"profile_append",properties:e},t))},incrementProfile:function(e,t){var i=e;d(e)&&((e={})[i]=1),Xt.check({propertiesMust:e})&&(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}(e)?Xt.send({type:"profile_increment",properties:e},t):br.log("profile_increment的值只能是数字"))},deleteProfile:function(e){Xt.send({type:"profile_delete"},e),Wt.set("distinct_id",vt()),Wt.set("first_id","")},unsetProfile:function(e,t){var r=e,i={};d(e)&&(e=[]).push(r),v(e)?(k(e,(function(e){d(e)?i[e]=!0:br.log("profile_unset给的数组里面的值必须时string,已经过滤掉",e)})),Xt.send({type:"profile_unset",properties:i},t)):br.log("profile_unset的参数是数组")},identify:function(e,t){function r(e){br.store._state.identities.$identity_anonymous_id=e,br.store.save()}"number"==typeof e&&(e=String(e));var i=Wt.getFirstId();if(void 0===e){var n=vt();i?Wt.set("first_id",n):Wt.set("distinct_id",n),r(n)}else Xt.check({distinct_id:e})&&(!0===t?i?Wt.set("first_id",e):Wt.set("distinct_id",e):i?Wt.change("first_id",e):Wt.change("distinct_id",e),r(e))},trackSignup:function(e,t,r,i){"number"==typeof e&&(e=String(e)),Xt.check({distinct_id:e,event:t,properties:r})&&Me(e,t,r,i)},registerPage:function(e){Xt.check({properties:e})?P(Kt.currentProps,e):br.log("register输入的参数有误")},clearAllRegister:function(e){Wt.clearAllProps(e)},clearPageRegister:function(e){var t;if(v(e)&&e.length>0)for(t=0;t20&&this.pendingEvents.shift()},on:function(e,t,r,i){"function"==typeof t&&(this._events.push({type:e,callback:t,context:r||this}),i=!1!==i,this.pendingEvents.length>0&&i&&k(this.pendingEvents,(function(i){i.type===e&&t.apply(r,i.data)})))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var ir={__proto__:null,parseSuperProperties:ye,searchConfigData:be,strip_empty_properties:we,getCurrentDomain:Se,getEleInfo:ke,isBaiduTraffic:Pe,getReferrerEqid:De,getReferrerEqidType:Oe,getBaiduKeyword:Rt,isReferralTraffic:Ce,getReferrer:je,getKeywordFromReferrer:$e,getWxAdIdFromUrl:Ne,getReferSearchEngine:Te,getSourceFromReferrer:Ae,info:Kt,ajax:Ie,getElementContent:xe,cookie:Ht,addEvent:Ee,EventEmitterSa:nr,encrypt:ve,decryptIfNeeded:me},ar={stage:null,init:function(e){this.stage=e}},sr={buildData:function(e){var t={identities:{},distinct_id:br.store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(br.lib_version)},properties:{}};return r(e)&&r(e.identities)&&!ee(e.identities)?P(t.identities,e.identities):P(t.identities,Wt._state.identities),r(e)&&r(e.properties)&&!ee(e.properties)&&(e.properties.$lib_detail&&(t.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(t.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),P(t,br.store.getUnionId(),e),function(e){zt.stage.process("addCustomProps",e)}(t),r(e.properties)&&!ee(e.properties)&&P(t.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(t.properties=P({},Kt.properties(),Wt.getProps(),Wt.getSessionProps(),Kt.currentProps,t.properties),br.para.preset_properties.latest_referrer&&!d(t.properties.$latest_referrer)&&(t.properties.$latest_referrer="取值异常"),br.para.preset_properties.latest_search_keyword&&!d(t.properties.$latest_search_keyword)&&(br.para.preset_properties.search_keyword_baidu&&d(t.properties.$search_keyword_id)&&ie(t.properties.$search_keyword_id_hash)&&d(t.properties.$search_keyword_id_type)||(t.properties.$latest_search_keyword="取值异常")),br.para.preset_properties.latest_traffic_source_type&&!d(t.properties.$latest_traffic_source_type)&&(t.properties.$latest_traffic_source_type="取值异常"),br.para.preset_properties.latest_landing_page&&!d(t.properties.$latest_landing_page)&&(t.properties.$latest_landing_page="取值异常"),"not_collect"===br.para.preset_properties.latest_wx_ad_click_id?(delete t.properties._latest_wx_ad_click_id,delete t.properties._latest_wx_ad_hash_key,delete t.properties._latest_wx_ad_callbacks):br.para.preset_properties.latest_wx_ad_click_id&&!d(t.properties._latest_wx_ad_click_id)&&(t.properties._latest_wx_ad_click_id="取值异常",t.properties._latest_wx_ad_hash_key="取值异常",t.properties._latest_wx_ad_callbacks="取值异常"),d(t.properties._latest_wx_ad_click_id)&&(t.properties.$url=W())),t.properties.$time&&A(t.properties.$time)?(t.time=1*t.properties.$time,delete t.properties.$time):t.time=1*new Date,br.vtrackBase.addCustomProps(t),ye(t),Mt.checkIsAddSign(t),Mt.checkIsFirstTime(t),br.addReferrerHost(t),br.addPropsHook(t),function(e){zt.stage.process("formatData",e)}(t),t},sendData:function(e,t){var r=be(e.properties);!0===br.para.debug_mode?(br.log(e),br.saEvent.debugPath(JSON.stringify(e),t)):br.sendState.getSendCall(e,r,t)},encodeTrackData:function(e){var t=j(e),r="crc="+X(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)},getUtmData:function(){return ar.stage&&ar.stage.process("getUtmData")}},or=function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,br.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=function(e,t){var r=sr.encodeTrackData(t);return-1!==e.indexOf("?")?e+"&"+r:e+"?"+r}(e.server_url,e.data)};or.prototype.start=function(){var e=this;br.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},or.prototype.lastClear=function(){void 0!==M().ie?this.img.src="about:blank":this.img.src=""};var lr=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=Fe(e.data)};lr.prototype.start=function(){var e=this;Ie({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:br.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})};var cr=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=Fe(e.data)};cr.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout((function(){e.isEnd()}),40)};var ur={stage:null,init:function(e){this.stage=e},interceptor:{send:{entry:function(e,t){var r=t.sensors,i=e.callback;return r.para.app_js_bridge?r.para.app_js_bridge.is_mui?r.para.app_js_bridge.is_mui?window.plus&&window.plus.SDAnalytics&&window.plus.SDAnalytics.trackH5Event?(window.plus.SDAnalytics.trackH5Event(e),r._.isFunction(i)&&i(),e):!0===r.para.app_js_bridge.is_send?(r.sendState.prepareServerUrl(e),e):(r._.isFunction(i)&&i(),e):void 0:!0===r.para.app_js_bridge.is_send?(r.debug.apph5({data:e.data,step:"2",output:"all"}),r.sendState.prepareServerUrl(e),e):(r._.isFunction(i)&&i(),e):(r.debug.apph5({data:e.data,step:"1",output:"code"}),r.sendState.prepareServerUrl(e),e)}}}},dr={getSendCall:function(e,t,r){if(br.is_heatmap_render_mode)return!1;if(br.readyState.state<3)return br.log("初始化没有完成"),!1;e._track_id=Number(String(i()).slice(2,5)+String(i()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime();var n=e;e=JSON.stringify(e);var a={data:n,config:t,callback:r};return br.events.tempAdd("send",n),!br.para.app_js_bridge&&br.para.batch_send&>.isSupport()&&localStorage.length<100?(br.log(n),br.batchSend.add(a.data),!1):("item_set"===n.type||"item_delete"===n.type?this.prepareServerUrl(a):ur.stage.process("beforeSend",a),void br.log(n))},prepareServerUrl:function(e){if("object"==typeof e.config&&e.config.server_url)this.sendCall(e,e.config.server_url,e.callback);else if(v(br.para.server_url)&&br.para.server_url.length)for(var t=0;t-1&&r.splice(a,1),gt.remove(e[i])}gt.set(this.tabKey,JSON.stringify(this.generateTabStorageVal(r)))}},add:function(e){var r=pr+String(i()),a=gt.get(this.tabKey);null===a?(this.tabKey=fr+String(i()),a=this.generateTabStorageVal()):a=n(a)||this.generateTabStorageVal(),a.data.push(r),a.expireTime=t()+2*br.para.batch_send.send_interval,gt.set(this.tabKey,JSON.stringify(a)),br.store.saveObjectVal(r,e),"track_signup"!==e.type&&"$pageview"!==e.event||this.sendImmediately()},generateTabStorage:function(){this.tabKey=fr+String(i()),gt.set(this.tabKey,JSON.stringify(this.generateTabStorageVal()))},generateTabStorageVal:function(e){return{data:e=e||[],expireTime:t()+2*br.para.batch_send.send_interval,serverUrl:this.serverUrl}},sendImmediately:function(){this.send()},recycle:function(){for(var e={},i="sajssdk-lock-get-",s=0;sl.expireTime&&this.serverUrl===l.serverUrl&&new a(i).get(r,1e4,1e3,(function(e){if(e){null===gt.get(o.tabKey)&&o.generateTabStorage();var t=n(e)||o.generateTabStorageVal();gt.set(o.tabKey,JSON.stringify(o.generateTabStorageVal((n(gt.get(o.tabKey))||this.generateTabStorageVal()).data.concat(t.data))))}}))}else if(0===r.indexOf(i)){var p=n(gt.get(r))||{expireTime:0};t()-p.expireTime>1e4&>.remove(r)}}for(var c=0;c").pop()).slice(0,3)},configIsMatchNew:function(e,t){if(d(e.$element_selector)&&d(t.element_selector)){if("element_selector"===t.element_field&&"equal"===t.function)return e.$element_selector===t.element_selector;if("element_selector"===t.element_field&&"contain"===t.function)return e.$element_selector.indexOf(t.element_selector)>-1}if(d(e.$element_path)&&d(t.element_path)){if("element_path"===t.element_field&&"equal"===t.function)return e.$element_path===t.element_path;if("element_path"===t.element_field&&"contain"===t.function)return e.$element_path.indexOf(t.element_path)>-1}return!1},configIsMatch:function(e,t){return(!t.limit_element_content||t.element_content===e.$element_content)&&(!t.limit_element_position||t.element_position===String(e.$element_position))&&(t.element_field&&t.function?mr.configIsMatchNew(e,t):mr.configIsMatchOldVersion(e,t))},configIsMatchOldVersion:function(e,t){if(!t.element_path)return!1;if(void 0!==e.$element_position){if(t.element_path!==e.$element_path)return!1}else if(br.vtrackBase.isDiv({element_path:t.element_path})){if(e.$element_path.indexOf(t.element_path)<0)return!1}else if(t.element_path!==e.$element_path)return!1;return!0},filterConfig:function(e,t,i){var n=[];if(!i){var a=mr.initUrl();if(!a)return[];i=a.page_url}return"$WebClick"===e.event&&k(t,(function(t){r(t)&&("webclick"===t.event_type||"appclick"===t.event_type)&&r(t.event)&&t.event.url_host===i.host&&t.event.url_path===i.pathname&&mr.configIsMatch(e.properties,t.event)&&n.push(t)})),n},getPropElInLi:function(e,t){if(!(e&&g(e)&&d(t)))return null;if("li"!==e.tagName.toLowerCase())return null;var i=br.heatmap.getDomSelector(e);if(i){var r=J(i+t);return r||null}return br.log("----custom---获取同级属性元素失败,selector信息异常",i,t),null},getProp:function(e,t){if(!r(e))return!1;if(!(d(e.name)&&e.name.length>0))return br.log("----vcustom----属性名不合法,属性抛弃",e.name),!1;var i,n,a={};if("content"===e.method){var s;if(d(e.element_selector)&&e.element_selector.length>0)s=J(e.element_selector);else{if(!t||!d(e.list_selector))return br.log("----vcustom----属性配置异常,属性抛弃",e.name),!1;var o=J(t.properties.$element_selector);if(!o)return br.log("----vcustom----点击元素获取异常,属性抛弃",e.name),!1;var l=br.heatmap.getClosestLi(o);s=mr.getPropElInLi(l,e.list_selector)}if(!s||!g(s))return br.log("----vcustom----属性元素获取失败,属性抛弃",e.name),!1;if("input"===s.tagName.toLowerCase())i=s.value||"";else if("select"===s.tagName.toLowerCase()){var c=s.selectedIndex;ie(c)&&g(s[c])&&(i=xe(s[c],"select"))}else i=xe(s,s.tagName.toLowerCase());if(e.regular){try{n=new RegExp(e.regular).exec(i)}catch(t){return br.log("----vcustom----正则处理失败,属性抛弃",e.name),!1}if(null===n)return br.log("----vcustom----属性规则处理,未匹配到结果,属性抛弃",e.name),!1;if(!v(n)||!d(n[0]))return br.log("----vcustom----正则处理异常,属性抛弃",e.name,n),!1;i=n[0]}if("STRING"===e.type)a[e.name]=i;else if("NUMBER"===e.type){if(i.length<1)return br.log("----vcustom----未获取到数字内容,属性抛弃",e.name,i),!1;if(isNaN(Number(i)))return br.log("----vcustom----数字类型属性转换失败,属性抛弃",e.name,i),!1;a[e.name]=Number(i)}return a}return br.log("----vcustom----属性不支持此获取方式",e.name,e.method),!1},getAssignConfigs:function(e,t){var i=mr.initUrl();if(!i||!i.page_url)return[];if(!r(t))return[];var n=[];return t.events=t.events||t.eventList,v(t.events)&&t.events.length>0?(k(t.events,(function(t){r(t)&&r(t.event)&&t.event.url_host===i.page_url.host&&t.event.url_path===i.page_url.pathname&&e(t)&&n.push(t)})),n):[]},addCustomProps:function(e){if("success"===br.bridge.bridge_info.verify_success){var t=br.vapph5collect.customProp.geth5Props(JSON.parse(JSON.stringify(e)));r(t)&&!ee(t)&&(e.properties=P(e.properties,t))}var i=br.vtrackcollect.customProp.getVtrackProps(JSON.parse(JSON.stringify(e)));return r(i)&&!ee(i)&&(e.properties=P(e.properties,i)),e},init:function(){br.vtrackcollect.init(),"success"===br.bridge.bridge_info.verify_success&&br.vapph5collect.init()}},vr={events:[],init:function(e){this.filterWebClickEvents(e)},filterWebClickEvents:function(e){this.events=br.vtrackcollect.getAssignConfigs((function(e){return!(!r(e)||!0!==e.event.unlimited_div||"webclick"!==e.event_type)}),e)},isTargetEle:function(e){var t=br.heatmap.getEleDetail(e);if(!r(t)||!d(t.$element_path))return!1;for(var i=0;i0)}),e),this.events.length?this.configSwitch=!0:this.configSwitch=!1},getVtrackProps:function(e){var t={};return this.collectAble()?("$WebClick"===e.event&&(t=this.clickCustomPropMaker(e,this.events)),t):{}},clickCustomPropMaker:function(e,t,i){var n=this;i=i||this.filterConfig(e,t,br.vtrackcollect.url_info.page_url);var a={};return i.length?(k(i,(function(t){v(t.properties)&&t.properties.length>0&&k(t.properties,(function(t){var i=n.getProp(t,e);r(i)&&P(a,i)}))})),a):{}},getProp:mr.getProp,getPropElInLi:mr.getPropElInLi,filterConfig:mr.filterConfig},wr={unlimitedDiv:vr,config:{},storageEnable:!0,storage_name:"webjssdkvtrackcollect",para:{session_time:18e5,timeout:5e3,update_interval:18e5},url_info:{},timer:null,update_time:null,customProp:yr,initUrl:function(){var e=mr.initUrl();if(e){var t;try{(t=new f(br.para.server_url))._values.Path="/config/visualized/Web.conf",e.api_url=t.getUrl()}catch(e){return br.log("----vtrackcollect---API地址解析异常",e),!1}this.url_info=e}return e},init:function(){if(!r(br.para.heatmap)||!br.para.heatmap.get_vtrack_config)return!1;if(gt.isSupport()||(this.storageEnable=!1),!this.initUrl())return br.log("----vtrackcustom----初始化失败,url信息解析失败"),!1;if(this.storageEnable){var e=br.store.readObjectVal(this.storage_name);if(r(e)&&r(e.data))if(this.serverUrlIsSame(e.serverUrl)){this.config=e.data,this.update_time=e.updateTime,this.updateConfig(e.data);var i=(new Date).getTime()-this.update_time;if(ie(i)&&i>0&&i0&&t0&&k(a.properties,(function(i){if(r(i))if(!1===i.h5)v(t.sensorsdata_app_visual_properties)||(t.sensorsdata_app_visual_properties=[]),t.sensorsdata_app_visual_properties.push(i);else{var a=n.getProp(i,e);r(a)&&(t=P(t,a))}})),d(a.event_name)&&i.push(a.event_name))})),br.bridge.hasVisualModeBridge()&&(t.sensorsdata_web_visual_eventName=i)}return t.sensorsdata_app_visual_properties&&(t.sensorsdata_app_visual_properties=j(JSON.stringify(t.sensorsdata_app_visual_properties))),t},initAppGetPropsBridge:function(){var e=this,t=new br.SDKJSBridge("getJSVisualProperties");return t.onAppNotify((function(i){var n={};try{i=JSON.parse(C(i))}catch(e){br.log("getJSVisualProperties data parse error!")}if(r(i)){var s=i.sensorsdata_js_visual_properties,o=e.initUrl();o&&(o=o.page_url,v(s)&&s.length>0&&k(s,(function(t){if(r(t)&&t.url_host===o.host&&t.url_path===o.pathname&&t.h5){var i=e.getProp(t);r(i)&&(n=P(n,i))}})))}return"android"===br.bridge.bridge_info.platform&&t.notifyApp({data:n},i.message_id),n})),t}},getAssignConfigs:mr.getAssignConfigs,initUrl:mr.initUrl,init:function(){if(this.initUrl()){var e=this.getConfigFromApp();e&&this.updateConfigs(e),this.customProp.init(),this.initAppUpdateConfigBridge()}},initAppUpdateConfigBridge:function(){var e=this;return new br.SDKJSBridge("updateH5VisualConfig").onAppNotify((function(t){if(t){try{t=JSON.parse(C(t))}catch(e){return void br.log("updateH5VisualConfig result parse error!")}e.updateConfigs(t)}}))},getConfigFromApp:function(){var e=new br.SDKJSBridge("sensorsdata_get_app_visual_config").notifyApp();if(e)try{e=JSON.parse(C(e))}catch(t){e=null,br.log("getAppVisualConfig result parse error!")}return e},updateConfigs:function(e){this.events=this.filterConfigs(e),this.customProp.updateEvents(this.events)},filterConfigs:function(e){return this.getAssignConfigs((function(e){return!(!r(e)||!1===e.h5)}),e)}},kr={isSeachHasKeyword:function(){return""!==q(location.href,"sa-request-id")&&("string"==typeof sessionStorage.getItem("sensors-visual-mode")&&sessionStorage.removeItem("sensors-visual-mode"),!0)},hasKeywordHandle:function(){var e=location.href,t=q(e,"sa-request-id")||null,r=q(e,"sa-request-type")||null,i=q(e,"sa-request-url")||null;if(Gt.setNotice(i),Ot.isSupport())if(null!==i&&sessionStorage.setItem("sensors_heatmap_url",i),sessionStorage.setItem("sensors_heatmap_id",t),null!==r)"1"===r||"2"===r||"3"===r?sessionStorage.setItem("sensors_heatmap_type",r):r=null;else{var n=sessionStorage.getItem("sensors_heatmap_type");r=null!==n?n:null}this.isReady(t,r)},isReady:function(e,t,r){br.para.heatmap_url?ce({success:function(){setTimeout((function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(br,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(br.heatmap_version&&br.heatmap_version===br.lib_version||console.log("heatmap.js与sensorsdata.js版本号不一致,可能存在风险!")))}),0)},error:function(){},type:"js",url:br.para.heatmap_url}):br.log("没有指定heatmap_url的路径")},isStorageHasKeyword:function(){return Ot.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")},storageHasKeywordHandle:function(){Gt.setNotice(),kr.isReady(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),location.href)},isWindowNameHasKeyword:function(){try{var e=JSON.parse(window.name),t=d(e["sa-request-page-url"])?c(e["sa-request-page-url"]):null;return e["sa-request-id"]&&d(e["sa-request-id"])&&t===location.href}catch(e){return!1}},windowNameHasKeywordHandle:function(){function e(e){var r=t[e];return d(r)?c(r):null}var t=JSON.parse(window.name),r=e("sa-request-id"),i=e("sa-request-type"),n=e("sa-request-url");Gt.setNotice(n),Ot.isSupport()&&(null!==n&&sessionStorage.setItem("sensors_heatmap_url",n),sessionStorage.setItem("sensors_heatmap_id",r),null!==i?"1"===i||"2"===i||"3"===i?sessionStorage.setItem("sensors_heatmap_type",i):i=null:i=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),kr.isReady(r,i)}},Pr={isStorageHasKeyword:function(){return Ot.isSupport()&&"string"==typeof sessionStorage.getItem("sensors-visual-mode")},isSearchHasKeyword:function(){return(!0===Ye("sa-visual-mode")||"true"===Ye("sa-visual-mode"))&&("string"==typeof sessionStorage.getItem("sensors_heatmap_id")&&sessionStorage.removeItem("sensors_heatmap_id"),!0)},loadVtrack:function(){ce({success:function(){},error:function(){},type:"js",url:br.para.vtrack_url?br.para.vtrack_url:Le()+"//static.sensorsdata.cn/sdk/"+br.lib_version+"/vtrack.min.js"})},messageListener:function(e){if("sa-fe"!==e.data.source)return!1;if("v-track-mode"===e.data.type){if(e.data.data&&e.data.data.isVtrack)if(Ot.isSupport()&&sessionStorage.setItem("sensors-visual-mode","true"),e.data.data.userURL&&location.href.match(/sa-visual-mode=true/)){var t=function(e){return te(e)?ue(e):(br.log("可视化模式检测 URL 失败"),!1)}(e.data.data.userURL);t&&(window.location.href=t)}else Pr.loadVtrack();window.removeEventListener("message",Pr.messageListener,!1)}},removeMessageHandle:function(){window.removeEventListener&&window.removeEventListener("message",Pr.messageListener,!1)},verifyVtrackMode:function(){window.addEventListener&&window.addEventListener("message",Pr.messageListener,!1),Pr.postMessage()},postMessage:function(){try{window.parent&&window.parent.postMessage&&window.parent.postMessage({source:"sa-web-sdk",type:"v-is-vtrack",data:{sdkversion:"1.23.3"}},"*")}catch(e){br.log("浏览器版本过低,不支持 postMessage API")}},notifyUser:function(){var e=function(t){return"sa-fe"===t.data.source&&void("v-track-mode"===t.data.type&&(t.data.data&&t.data.data.isVtrack&&alert("当前版本不支持,请升级部署神策数据治理"),window.removeEventListener("message",e,!1)))};window.addEventListener&&window.addEventListener("message",e,!1),Pr.postMessage()}},Dr=["setItem","deleteItem","getAppStatus","track","quick","register","registerPage","registerOnce","trackSignup","setProfile","setOnceProfile","appendProfile","incrementProfile","deleteProfile","unsetProfile","identify","login","logout","trackLink","clearAllRegister","clearPageRegister"],Or={track:function(e,t,r){},quick:function(e,t,r,i){},register:function(e){},registerPage:function(e){},registerOnce:function(e){},clearAllRegister:function(e){},trackSignup:function(e,t,r,i){},setProfile:function(e,t){},setOnceProfile:function(e,t){},appendProfile:function(e,t){},incrementProfile:function(e,t){},deleteProfile:function(e){},unsetProfile:function(e,t){},identify:function(e,t){},login:function(e,t){},logout:function(e){},trackLink:function(e,t,r){},deleteItem:function(e,t){},setItem:function(e,t,r){},getAppStatus:function(e){},clearPageRegister:function(e){}};it.prototype.process=function(e,t){if(e&&e in this.processDef){var r=this.registeredInterceptors[e];if(r&&v(r)&&r.length>0)for(var i={current:0,total:r.length},n=new nt(t,i,br),a=0;a=2)&&(xr&&ft(!0),er.initSystemEvent(),br.setInitVar(),br.readyState.setState(2),br.initPara(e),er.sdk.emit("afterInitPara"),br.detectMode(),br.iOSWebClickPolyfill(),void er.sdk.emit("afterInit"))},xr?ft(!1):(ft(!0),k(Dr,(function(e){var t=br[e];br[e]=function(){if(br.readyState.state<3)return v(br._q)||(br._q=[]),br._q.push([e,arguments]),!1;if(br.readyState.getState())return t.apply(br,arguments);try{console.error("请先初始化神策JS SDK")}catch(e){br.log(e)}}})));var Ir=br;try{br.modules={},br.modules.Amp=function(){"use strict";var e={sd:null,init:function(e){if(this.sd)return!1;if(this.sd=e,!this.sd||!this.sd._)return!1;var t=this.sd._.cookie.get("sensors_amp_id"),r=this.sd.store._state.distinct_id;if(t&&t.length>0){var i="amp-"===t.slice(0,4);if(t!==r){if(!i)return!1;this.sd.store._state.first_id?(this.sd.identify(t,!0),this.sd.saEvent.send({original_id:t,distinct_id:r,type:"track_signup",event:"$SignUp",properties:{}},null),this.setAmpId(r)):this.sd.identify(t,!0)}}else this.setAmpId(r);this.addListener()},addListener:function(){var e=this;this.sd.events.on("changeDistinctId",(function(t){e.setAmpId(t)})),this.sd.events.isReady()},setAmpId:function(e){this.sd._.cookie.set("sensors_amp_id",e)}};return window.SensorsDataWebJSSDKPlugin&&"[object Object]"===Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?window.SensorsDataWebJSSDKPlugin.Amp=window.SensorsDataWebJSSDKPlugin.Amp||e:window.SensorsDataWebJSSDKPlugin={Amp:e},e}(),br.modules.Channel=function(){"use strict";var e,t,r,i={event_list:[],latest_event_initial_time:null,max_save_time:2592e6,init:function(i){function n(){return e=t._,r=t.store,!!e.localStorage.isSupport()&&(t.para.max_string_length=1024,a.eventList.init(),a.addLatestChannelUrl(),void a.addIsChannelCallbackEvent())}if(t||!i)return!1;var a=this;(t=i).on&&t.readyState.state<3?t.on("sdkAfterInitPara",n):n()},addIsChannelCallbackEvent:function(){t.registerPage({$is_channel_callback_event:function(e){if(e.event&&"$WebClick"!==e.event&&"$pageview"!==e.event&&"$WebStay"!==e.event&&"$SignUp"!==e.event)return!i.eventList.hasEvent(e.event)&&(i.eventList.add(e.event),!0)}})},addLatestChannelUrl:function(){var r=this.getUrlDomain(),n=this.cookie.getChannel();if("url解析失败"===r)this.registerAndSave({_sa_channel_landing_url:"",_sa_channel_landing_url_error:"url的domain解析失败"});else if(e.isReferralTraffic(document.referrer)){var a=e.getQueryParam(location.href,"sat_cf");e.isString(a)&&a.length>0?(this.registerAndSave({_sa_channel_landing_url:location.href}),i.channelLinkHandler()):this.registerAndSave({_sa_channel_landing_url:""})}else n?t.registerPage(n):t.registerPage({_sa_channel_landing_url:"",_sa_channel_landing_url_error:"取值异常"})},registerAndSave:function(e){t.registerPage(e),this.cookie.saveChannel(e)},cookie:{getChannel:function(){var t=e.decryptIfNeeded(e.cookie.get("sensorsdata2015jssdkchannel"));return t=e.safeJSONParse(t),!(!e.isObject(t)||!t.prop)&&t.prop},saveChannel:function(r){var i={prop:r},n=JSON.stringify(i);t.para.encrypt_cookie&&(n=e.encrypt(n)),e.cookie.set("sensorsdata2015jssdkchannel",n)}},channelLinkHandler:function(){this.eventList.reset(),t.track("$ChannelLinkReaching")},getUrlDomain:function(){var t=e.info.pageProp.url_domain;return""===t&&(t="url解析失败"),t},eventList:{init:function(){var t=this.get(),r=(new Date).getTime();if(t&&e.isNumber(t.latest_event_initial_time)&&e.isArray(t.eventList)){var n=r-t.latest_event_initial_time;n>0&&n0&&(1===arguments.length&&n(arguments[0])?e=arguments[0]:arguments.length>=2&&n(arguments[1])&&(e=arguments[1])),!s())return this.log("不支持当前系统,目前只支持Android和iOS"),!1;if(n(e)&&this.sd._.isNumber(e.timeout)&&e.timeout>=2500&&(this.timeout=e.timeout),!this.sd.para.server_url)return this.log("神策JS SDK配置项server_url未正确配置"),!1;var t=l(this.sd);this.apiURL=this.apiURL.replace("{origin}",t.origin).replace("{project}",t.project);var r=this.sd._.getQueryParam(window.location.href,"deeplink");if(!r)return this.log("当前页面缺少deeplink参数"),!1;r=window.decodeURIComponent(r);var i=o(r);return i?(this.key=i[2],this.apiURL=this.apiURL.replace("{key}",window.encodeURIComponent(i[2])),this.sd._.ajax({url:this.apiURL,type:"GET",cors:!0,credentials:!1,success:function(e){return e.errorMsg?(p.log("API报错:"+e.errorMsg),!1):(p.data=e,p.log("API查询成功,数据:"+JSON.stringify(e,null," ")),void(this.data.app_key&&(this.data.android_info&&this.data.android_info.url_schemes&&(this.data.android_info.url_schemes+="://sensorsdata/sd/"+this.data.app_key+"/"+this.key),this.data.ios_info&&this.data.ios_info.url_schemes&&(this.data.ios_info.url_schemes+="://sensorsdata/sd/"+this.data.app_key+"/"+this.key))))}.bind(this),error:function(){p.log("API查询出错")}}),void this.addListeners()):(this.log("当前页面的deeplink参数无效"),!1)},openDeepLink:function(){if(this.log("openDeeplink()"),!this.data)return this.log("没有Deep link数据!"),!1;if("iOS"===a){this.log("当前系统是iOS");var e=this.sd&&this.sd._&&this.sd._.getIOSVersion()>=9&&this.data.ios_info.ios_wake_url?this.data.ios_info.ios_wake_url:this.data.ios_info.url_schemes;this.log("唤起APP的地址:"+e),c(this,e,this.data.ios_info.download_url)}else this.log("当前系统是 android"),u(this,this.data.android_info.url_schemes,this.data.android_info.download_url)},log:function(e){this.sd&&this.sd.log(e)},addListeners:function(){var e=r().visibilityChange;e&&document.addEventListener(e,function(){clearTimeout(this.timer),this.log("visibilitychange, clear timeout:"+this.timer)}.bind(this),!1),window.addEventListener("pagehide",function(){this.log("page hide, clear timeout:"+this.timer),clearTimeout(this.timer)}.bind(this),!1)}};return n(window.SensorsDataWebJSSDKPlugin)?(window.SensorsDataWebJSSDKPlugin.Deeplink=window.SensorsDataWebJSSDKPlugin.Deeplink||p,window.SensorsDataWebJSSDKPlugin.deeplink=window.SensorsDataWebJSSDKPlugin.deeplink||p):window.SensorsDataWebJSSDKPlugin={Deeplink:p,deeplink:p},p}(),br.modules.Pageleave=function(){"use strict";function e(){this.sd=null,this.start_time=+new Date,this.page_show_status=!0,this.page_hidden_status=!1,this._={},this.timer=null,this.current_page_url=document.referrer,this.url=location.href,this.option={},this.heartbeat_interval_time=5e3,this.heartbeat_interval_timer=null,this.page_id=null,this.storage_name="sawebjssdkpageleave"}e.prototype.init=function(e,t){if(e){if(this.sd=e,this._=this.sd._,t){this.option=t;var i=t.heartbeat_interval_time;i&&(this._.isNumber(i)||this._.isNumber(1*i))&&1*i>0&&(this.heartbeat_interval_time=1e3*i)}this.page_id=Number(String(this._.getRandom()).slice(2,5)+String(this._.getRandom()).slice(2,4)+String((new Date).getTime()).slice(-4)),this.addEventListener(),!0===document.hidden?this.page_show_status=!1:this.addHeartBeatInterval(),this.log("PageLeave初始化完毕")}else this.log("神策JS SDK未成功引入")},e.prototype.log=function(e){this.sd&&this.sd.log(e)},e.prototype.refreshPageEndTimer=function(){var e=this;this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((function(){e.page_hidden_status=!1}),5e3)},e.prototype.hiddenStatusHandler=function(){clearTimeout(this.timer),this.timer=null,this.page_hidden_status=!1},e.prototype.pageStartHandler=function(){this.start_time=+new Date,1==!document.hidden?this.page_show_status=!0:this.page_show_status=!1,this.url=location.href},e.prototype.pageEndHandler=function(){if(!0!==this.page_hidden_status){var e=this.getPageLeaveProperties();!1===this.page_show_status&&delete e.event_duration,this.page_show_status=!1,this.page_hidden_status=!0,this.isCollectUrl(this.url)&&this.sd.track("$WebPageLeave",e),this.refreshPageEndTimer(),this.delHeartBeatData()}},e.prototype.addEventListener=function(){this.addPageStartListener(),this.addPageSwitchListener(),this.addSinglePageListener(),this.addPageEndListener()},e.prototype.addPageStartListener=function(){var e=this;"onpageshow"in window&&this._.addEvent(window,"pageshow",(function(){e.pageStartHandler(),e.hiddenStatusHandler()}))},e.prototype.isCollectUrl=function(e){return"function"!=typeof this.option.isCollectUrl||"string"!=typeof e||""===e||this.option.isCollectUrl(e)},e.prototype.addSinglePageListener=function(){var e=this;this.sd.ee&&this.sd.ee.spa.prepend("switch",(function(t){t!==location.href&&(e.url=t,e.pageEndHandler(),e.stopHeartBeatInterval(),e.current_page_url=e.url,e.pageStartHandler(),e.hiddenStatusHandler(),e.startHeartBeatInterval())}))},e.prototype.addPageEndListener=function(){var e=this;this._.each(["pagehide","beforeunload","unload"],(function(t){"on"+t in window&&e._.addEvent(window,t,(function(){e.pageEndHandler(),e.stopHeartBeatInterval()}))}))},e.prototype.addPageSwitchListener=function(){var e=this;this._.listenPageState({visible:function(){e.pageStartHandler(),e.hiddenStatusHandler(),e.startHeartBeatInterval()},hidden:function(){e.url=location.href,e.pageEndHandler(),e.stopHeartBeatInterval()}})},e.prototype.addHeartBeatInterval=function(){this._.localStorage.isSupport()&&this.startHeartBeatInterval()},e.prototype.startHeartBeatInterval=function(){var e=this;this.heartbeat_interval_timer&&this.stopHeartBeatInterval();var t=!0;this.isCollectUrl(this.url)||(t=!1),this.heartbeat_interval_timer=setInterval((function(){t&&e.saveHeartBeatData()}),this.heartbeat_interval_time),t&&this.saveHeartBeatData("is_first_heartbeat"),this.reissueHeartBeatData()},e.prototype.stopHeartBeatInterval=function(){clearInterval(this.heartbeat_interval_timer),this.heartbeat_interval_timer=null},e.prototype.saveHeartBeatData=function(e){var t=this.getPageLeaveProperties(),r=new Date;t.$time=r,"is_first_heartbeat"===e&&(t.event_duration=3.14);var i=this.sd.kit.buildData({type:"track",event:"$WebPageLeave",properties:t});try{"success"===this.sd.bridge.bridge_info.verify_success&&(i.properties.$time=1*r)}catch(e){this.log(e.message)}i.heartbeat_interval_time=this.heartbeat_interval_time,this.sd.store.saveObjectVal(this.storage_name+"-"+this.page_id,i)},e.prototype.delHeartBeatData=function(e){this._.localStorage.remove(e||this.storage_name+"-"+this.page_id)},e.prototype.reissueHeartBeatData=function(){for(var e=window.localStorage.length-1;e>=0;e--){var t=window.localStorage.key(e);if(t&&t!==this.storage_name+"-"+this.page_id&&0===t.indexOf(this.storage_name+"-")){var i=this.sd.store.readObjectVal(t);this._.isObject(i)&&1*new Date-i.time>i.heartbeat_interval_time+5e3&&(delete i.heartbeat_interval_time,this.sd.kit.sendData(i),this.delHeartBeatData(t))}}},e.prototype.getPageLeaveProperties=function(){var e=(+new Date-this.start_time)/1e3;(isNaN(e)||e<0)&&(e=0),e=Number(e.toFixed(3));var t=this._.getReferrer(this.current_page_url),r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body&&document.body.scrollTop||0;r=Math.round(r)||0;var i={$title:document.title,$url:this._.getURL(this.url),$url_path:this._.getURLPath(),$referrer_host:t?this._.getHostname(t):"",$referrer:t,$viewport_position:r};return 0!==e&&(i.event_duration=e),this._.extend(i,this.option.custom_props)};var t=new e;return window.SensorsDataWebJSSDKPlugin&&"[object Object]"===Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?window.SensorsDataWebJSSDKPlugin.PageLeave=window.SensorsDataWebJSSDKPlugin.PageLeave||t:window.SensorsDataWebJSSDKPlugin={PageLeave:t},t}(),br.modules.Pageload=function(){"use strict";var e={init:function(e){function t(){var i=window.performance||window.webkitPerformance||window.msPerformance||window.mozPerformance,r=0,a={$url:e._.getURL(),$title:document.title,$url_path:e._.getURLPath(),$referrer:e._.getReferrer(null,!0)};if(i&&i.timing){var s=i.timing;0===s.fetchStart||0===s.domContentLoadedEventEnd?e.log("performance 数据获取异常"):r=s.domContentLoadedEventEnd-s.fetchStart,function(t,r){if(t.getEntries&&"function"==typeof t.getEntries){for(var i=t.getEntries(),n=null,a=0;a=0&&n<10737418240&&(r.$page_resource_size=Number((n/1024).toFixed(3)))}}(i,a)}else e.log("浏览器未支持 performance API.");r>0&&(a.event_duration=Number((r/1e3).toFixed(3))),e.track("$WebPageLoad",a),window.removeEventListener?window.removeEventListener("load",t):window.detachEvent&&window.detachEvent("onload",t)}"complete"==document.readyState?t():window.addEventListener?window.addEventListener("load",t):window.attachEvent&&window.attachEvent("onload",t)}};return window.SensorsDataWebJSSDKPlugin&&"[object Object]"===Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?window.SensorsDataWebJSSDKPlugin.PageLoad=window.SensorsDataWebJSSDKPlugin.PageLoad||e:window.SensorsDataWebJSSDKPlugin={PageLoad:e},e}(),br.modules.RegisterProperties=function(){"use strict";function e(e){var t=this;this.sd=e.sd,this.currentProps=e.customRegister,this.interceptor={addCustomProps:{priority:0,entry:function(e){return function(e,t){if("track"!==e.type)return e;var r=t.sd,i=r._,n=r.saEvent.check,a=i.extend2Lev({properties:{}},e),s=t.currentProps,o=a.properties,l=a.event,c={};i.each(s,(function(e){if(i.isObject(e))e.events.indexOf(l)>-1&&n({properties:e.properties})&&(c=i.extend(c,e.properties));else if(i.isFunction(e)){var t=e({event:l,properties:o,data:a});i.isObject(t)&&!i.isEmptyObject(t)&&n({properties:t})&&(c=i.extend(c,t))}})),e.properties=i.extend(o,c)}(e,t),e}}}}function t(t){this.dataStage=new e(t)}function i(){this.sd=null,this.log=window.console&&window.console.log||function(){},this.customRegister=[]}e.prototype.init=function(){},i.prototype.init=function(e){e?(this.sd=e,this._=e._,this.log=e.log,e.registerFeature(new t(this))):this.log("神策JS SDK未成功引入")},i.prototype.register=function(e){return this.sd?void(this._.isObject(e)&&this._.isArray(e.events)&&e.events.length>0&&this._.isObject(e.properties)&&!this._.isEmptyObject(e.properties)?this.customRegister.push(e):this.log("RegisterProperties: register 参数错误")):void this.log("神策JS SDK未成功引入")},i.prototype.hookRegister=function(e){return this.sd?void(this._.isFunction(e)?this.customRegister.push(e):this.log("RegisterProperties: hookRegister 参数错误")):void this.log("神策JS SDK未成功引入")};var r=new i;return r.__constructor__=i,window.SensorsDataWebJSSDKPlugin&&"[object Object]"===Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?window.SensorsDataWebJSSDKPlugin.RegisterProperties=window.SensorsDataWebJSSDKPlugin.RegisterProperties||r:window.SensorsDataWebJSSDKPlugin={RegisterProperties:r},r}(),br.modules.RegisterPropertyPageHeight=function(){"use strict";function e(e){try{if("$pageview"!==e.event&&(!e.type||"profile"!==e.type.slice(0,7))){var n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,a=document.documentElement.scrollHeight||0,s={$page_height:Math.max(n,a)||0};e.properties=t._.extend(e.properties||{},s)}}catch(e){i("页面高度获取异常。")}return r.call(t.kit,e)}var t,r,i=window.console&&window.console.log||function(){},n={init:function(n){return i=(t=n)&&t.log||i,n&&n.kit&&n.kit.buildData?(r=t.kit.buildData,t.kit.buildData=e,void i("RegisterPropertyPageHeight 插件初始化完成")):void i("RegisterPropertyPageHeight 插件初始化失败,当前主sdk不支持 RegisterPropertyPageHeight 插件,请升级主sdk")}};return window.SensorsDataWebJSSDKPlugin&&"[object Object]"===Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?window.SensorsDataWebJSSDKPlugin.RegisterPropertyPageHeight=window.SensorsDataWebJSSDKPlugin.RegisterPropertyPageHeight||n:window.SensorsDataWebJSSDKPlugin={RegisterPropertyPageHeight:n},n}(),function(){"use strict";var e={getPart:function(e){var t=this.option.length;if(t)for(var i=0;i-1)return!0;return!1},getPartHash:function(e){var t=this.option.length;if(t)for(var i=0;i-1)return this.option[i].after_hash;return!1},getCurrenId:function(){var e=this.store.getDistinctId()||"",t=this.store.getFirstId()||"";return this._.urlSafeBase64&&this._.urlSafeBase64.encode?e=e?this._.urlSafeBase64.trim(this._.urlSafeBase64.encode(this._.base64Encode(e))):"":this._.rot13obfs&&(e=e?this._.rot13obfs(e):""),encodeURIComponent(t?"f"+e:"d"+e)},rewriteUrl:function(e,t){var i=/([^?#]+)(\?[^#]*)?(#.*)?/.exec(e),r="";if(i){var a,s=i[1]||"",n=i[2]||"",o=i[3]||"";return this.getPartHash(e)?(a=o.indexOf("_sasdk"),r=o.indexOf("?")>-1?a>-1?s+n+"#"+o.substring(1,a)+"_sasdk="+this.getCurrenId():s+n+"#"+o.substring(1)+"&_sasdk="+this.getCurrenId():s+n+"#"+o.substring(1)+"?_sasdk="+this.getCurrenId()):(a=n.indexOf("_sasdk"),r=/^\?(\w)+/.test(n)?a>-1?s+"?"+n.substring(1,a)+"_sasdk="+this.getCurrenId()+o:s+"?"+n.substring(1)+"&_sasdk="+this.getCurrenId()+o:s+"?"+n.substring(1)+"_sasdk="+this.getCurrenId()+o),t&&(t.href=r),r}},getUrlId:function(){var e=location.href.match(/_sasdk=([aufd][^\?\#\&\=]+)/);if(this._.isArray(e)&&e[1]){var t=decodeURIComponent(e[1]);return!t||"f"!==t.substring(0,1)&&"d"!==t.substring(0,1)||(this._.urlSafeBase64&&this._.urlSafeBase64.isUrlSafeBase64&&this._.urlSafeBase64.isUrlSafeBase64(t)?t=t.substring(0,1)+this._.base64Decode(this._.urlSafeBase64.decode(t.substring(1))):this._.rot13defs&&(t=t.substring(0,1)+this._.rot13defs(t.substring(1)))),t}return""},setRefferId:function(){var e=this.store.getDistinctId(),t=this.getUrlId();if(""===t)return!1;var r="a"===t.substring(0,1)||"d"===t.substring(0,1);return(t=t.substring(1))!==e&&(t&&r&&this.store.getFirstId()&&(this.sd.identify(t,!0),this.sd.saEvent.send({original_id:t,distinct_id:e,type:"track_signup",event:"$SignUp",properties:{}},null)),t&&r&&!this.store.getFirstId()&&this.sd.identify(t,!0),void(!t||r||this.store.getFirstId()||this.sd.login(t)))},addListen:function(){var e=this,t=function(t){var r,i,n=t.target,a=n.tagName.toLowerCase(),s=n.parentNode;if("a"===a&&n.href||s&&s.tagName&&"a"===s.tagName.toLowerCase()&&s.href){"a"===a&&n.href?(r=n.href,i=n):(r=s.href,i=s);var o=e._.URL(r).protocol;"http:"!==o&&"https:"!==o||e.getPart(r)&&e.rewriteUrl(r,i)}};e._.addEvent(document,"mousedown",t),window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0&&e._.addEvent(document,"pointerdown",t)},init:function(e,t){return this.sd=e,this._=e._,this.store=e.store,this.para=e.para,this._.isObject(t)&&this._.isArray(t.linker)&&t.linker.length>0?(this.setRefferId(),this.addListen(),this.option=t.linker,void(this.option=function(t){for(var r=t.length,i=[],n=0;n0&&(t=t.concat(e.para.source_channel),t=e._.unique(t)),e._.each(t,(function(t){(i=e._.getQueryParam(location.href,t)).length&&(r[t]=i)})),r}()}}})}))}};return window.SensorsDataWebJSSDKPlugin&&"[object Object]"===Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?window.SensorsDataWebJSSDKPlugin.Utm=window.SensorsDataWebJSSDKPlugin.Utm||t:window.SensorsDataWebJSSDKPlugin={Utm:t},t}(),br.use("AndroidBridge"),br.use("IOSBridge"),br.use("AndroidObsoleteBridge"),br.use("IOSObsoleteBridge"),br.use("Utm"),"string"==typeof window.sensorsDataAnalytic201505?(br.para=window[sensorsDataAnalytic201505].para,br._q=window[sensorsDataAnalytic201505]._q,window[sensorsDataAnalytic201505]=br,window.sensorsDataAnalytic201505=br,br.init()):void 0===window.sensorsDataAnalytic201505?window.sensorsDataAnalytic201505=br:Ir=window.sensorsDataAnalytic201505}catch(e){if("object"==typeof console&&console.log)try{console.log(e)}catch(e){br.log(e)}}return Ir}()},157:function(e,t,r){"use strict";(function(e){var r=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r0},e.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),d?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;c.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),_=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),j="undefined"!=typeof WeakMap?new WeakMap:new r,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=f.getInstance(),n=new C(t,r,this);j.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=j.get(this))[e].apply(t,arguments)}}));var $=void 0!==o.ResizeObserver?o.ResizeObserver:T;t.a=$}).call(this,r(23))},585:function(e,t){e.exports=function(e,t){var r,n=null;try{r=JSON.parse(e,t)}catch(e){n=e}return[n,r]}},688:function(e,t,r){"use strict";e.exports=r(689)},689:function(e,t,r){"use strict";var n,g,o,l,c;if("undefined"==typeof window||"function"!=typeof MessageChannel){var p=null,q=null,d=function(){if(null!==p)try{var a=t.unstable_now();p(!0,a),p=null}catch(e){throw setTimeout(d,0),e}},u=Date.now();t.unstable_now=function(){return Date.now()-u},n=function(a){null!==p?setTimeout(n,0,a):(p=a,setTimeout(d,0))},g=function(a,b){q=setTimeout(a,b)},o=function(){clearTimeout(q)},l=function(){return!1},c=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,_=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var y=_.now();t.unstable_now=function(){return _.now()-y}}var w=!1,S=null,k=-1,P=5,D=0;l=function(){return t.unstable_now()>=D},c=function(){},t.unstable_forceFrameRate=function(a){0>a||125>>1,r=a[t];if(!(void 0!==r&&0N(o,e))void 0!==c&&0>N(c,o)?(a[t]=c,a[l]=e,t=l):(a[t]=o,a[n]=e,t=n);else{if(!(void 0!==c&&0>N(c,e)))break e;a[t]=c,a[l]=e,t=l}}}return b}return null}function N(a,b){var e=a.sortIndex-b.sortIndex;return 0!==e?e:a.id-b.id}var A=[],x=[],I=1,E=null,L=3,J=!1,U=!1,R=!1;function K(a){for(var b=T(x);null!==b;){if(null===b.callback)$(x);else{if(!(b.startTime<=a))break;$(x),b.sortIndex=b.expirationTime,j(A,b)}b=T(x)}}function H(a){if(R=!1,K(a),!U)if(null!==T(A))U=!0,n(B);else{var b=T(x);null!==b&&g(H,b.startTime-a)}}function B(a,b){U=!1,R&&(R=!1,o()),J=!0;var e=L;try{for(K(b),E=T(A);null!==E&&(!(E.expirationTime>b)||a&&!l());){var r=E.callback;if(null!==r){E.callback=null,L=E.priorityLevel;var n=r(E.expirationTime<=b);b=t.unstable_now(),"function"==typeof n?E.callback=n:E===T(A)&&$(A),K(b)}else $(A);E=T(A)}if(null!==E)var c=!0;else{var d=T(x);null!==d&&g(H,d.startTime-b),c=!1}return c}finally{E=null,L=e,J=!1}}function M(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var W=c;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(a){a.callback=null},t.unstable_continueExecution=function(){U||J||(U=!0,n(B))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return T(A)},t.unstable_next=function(a){switch(L){case 1:case 2:case 3:var b=3;break;default:b=L}var e=L;L=b;try{return a()}finally{L=e}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=W,t.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var e=L;L=a;try{return b()}finally{L=e}},t.unstable_scheduleCallback=function(a,b,e){var r=t.unstable_now();if("object"==typeof e&&null!==e){var l=e.delay;l="number"==typeof l&&0r?(a.sortIndex=l,j(x,a),null===T(A)&&a===T(x)&&(R?o():R=!0,g(H,l-r))):(a.sortIndex=e,j(A,a),U||J||(U=!0,n(B))),a},t.unstable_shouldYield=function(){var a=t.unstable_now();K(a);var b=T(A);return b!==E&&null!==E&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime