@qxs-bns/utils 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +11 -0
- package/es/index.js.map +1 -0
- package/es/src/argo-log.js +78 -0
- package/es/src/argo-log.js.map +1 -0
- package/es/src/date-transfer.js +34 -0
- package/es/src/date-transfer.js.map +1 -0
- package/es/src/device.js +23 -0
- package/es/src/device.js.map +1 -0
- package/es/src/file-operations.js +105 -0
- package/es/src/file-operations.js.map +1 -0
- package/es/src/json.js +67 -0
- package/es/src/json.js.map +1 -0
- package/es/src/oss-uploader.js +115 -0
- package/es/src/oss-uploader.js.map +1 -0
- package/es/src/storage.js +113 -0
- package/es/src/storage.js.map +1 -0
- package/es/src/types.js +38 -0
- package/es/src/types.js.map +1 -0
- package/es/src/use-api.js +65 -0
- package/es/src/use-api.js.map +1 -0
- package/es/src/watermark.js +209 -0
- package/es/src/watermark.js.map +1 -0
- package/lib/index.js +40 -1
- package/lib/index.js.map +1 -1
- package/lib/src/argo-log.js +79 -1
- package/lib/src/argo-log.js.map +1 -1
- package/lib/src/date-transfer.js +35 -1
- package/lib/src/date-transfer.js.map +1 -1
- package/lib/src/device.js +27 -1
- package/lib/src/device.js.map +1 -1
- package/lib/src/file-operations.js +107 -1
- package/lib/src/file-operations.js.map +1 -1
- package/lib/src/json.js +69 -1
- package/lib/src/json.js.map +1 -1
- package/lib/src/oss-uploader.js +119 -1
- package/lib/src/oss-uploader.js.map +1 -1
- package/lib/src/storage.js +114 -1
- package/lib/src/storage.js.map +1 -1
- package/lib/src/types.js +46 -1
- package/lib/src/types.js.map +1 -1
- package/lib/src/use-api.js +66 -1
- package/lib/src/use-api.js.map +1 -1
- package/lib/src/watermark.js +192 -13
- package/lib/src/watermark.js.map +1 -1
- package/package.json +26 -27
- package/{es → types}/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -0
- package/{es → types}/src/argo-log.d.ts +1 -0
- package/types/src/argo-log.d.ts.map +1 -0
- package/{es → types}/src/date-transfer.d.ts +1 -0
- package/types/src/date-transfer.d.ts.map +1 -0
- package/types/src/device.d.ts +18 -0
- package/types/src/device.d.ts.map +1 -0
- package/{es → types}/src/file-operations.d.ts +1 -0
- package/types/src/file-operations.d.ts.map +1 -0
- package/{lib → types}/src/json.d.ts +1 -0
- package/types/src/json.d.ts.map +1 -0
- package/{es → types}/src/oss-uploader.d.ts +2 -2
- package/types/src/oss-uploader.d.ts.map +1 -0
- package/{lib → types}/src/storage.d.ts +1 -0
- package/types/src/storage.d.ts.map +1 -0
- package/{es → types}/src/types.d.ts +1 -0
- package/types/src/types.d.ts.map +1 -0
- package/{es → types}/src/use-api.d.ts +3 -4
- package/types/src/use-api.d.ts.map +1 -0
- package/{es → types}/src/watermark.d.ts +1 -0
- package/types/src/watermark.d.ts.map +1 -0
- package/types/tsconfig.tsbuildinfo +1 -0
- package/README.md +0 -65
- package/es/_virtual/_commonjs-dynamic-modules.mjs +0 -7
- package/es/_virtual/_commonjs-dynamic-modules.mjs.map +0 -1
- package/es/_virtual/_commonjsHelpers.mjs +0 -7
- package/es/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/es/_virtual/ali-oss/dist/aliyun-oss-sdk.mjs +0 -20195
- package/es/_virtual/ali-oss/dist/aliyun-oss-sdk.mjs.map +0 -1
- package/es/_virtual/aliyun-oss-sdk.mjs +0 -8
- package/es/_virtual/aliyun-oss-sdk.mjs.map +0 -1
- package/es/_virtual/aliyun-oss-sdk2.mjs +0 -5
- package/es/_virtual/aliyun-oss-sdk2.mjs.map +0 -1
- package/es/_virtual/ans-javascript-sdk/sdk/AnalysysAgent_JS_SDK.es6.min.mjs +0 -2142
- package/es/_virtual/ans-javascript-sdk/sdk/AnalysysAgent_JS_SDK.es6.min.mjs.map +0 -1
- package/es/_virtual/xlsx/xlsx.mjs +0 -24583
- package/es/_virtual/xlsx/xlsx.mjs.map +0 -1
- package/es/index.mjs +0 -35
- package/es/index.mjs.map +0 -1
- package/es/src/argo-log.mjs +0 -68
- package/es/src/argo-log.mjs.map +0 -1
- package/es/src/date-transfer.mjs +0 -17
- package/es/src/date-transfer.mjs.map +0 -1
- package/es/src/device.d.ts +0 -4
- package/es/src/device.mjs +0 -24
- package/es/src/device.mjs.map +0 -1
- package/es/src/file-operations.mjs +0 -79
- package/es/src/file-operations.mjs.map +0 -1
- package/es/src/json.d.ts +0 -15
- package/es/src/json.mjs +0 -45
- package/es/src/json.mjs.map +0 -1
- package/es/src/oss-uploader.mjs +0 -89
- package/es/src/oss-uploader.mjs.map +0 -1
- package/es/src/storage.d.ts +0 -26
- package/es/src/storage.mjs +0 -81
- package/es/src/storage.mjs.map +0 -1
- package/es/src/types.mjs +0 -37
- package/es/src/types.mjs.map +0 -1
- package/es/src/use-api.mjs +0 -44
- package/es/src/use-api.mjs.map +0 -1
- package/es/src/watermark.mjs +0 -147
- package/es/src/watermark.mjs.map +0 -1
- package/lib/_virtual/_commonjs-dynamic-modules.js +0 -2
- package/lib/_virtual/_commonjs-dynamic-modules.js.map +0 -1
- package/lib/_virtual/_commonjsHelpers.js +0 -2
- package/lib/_virtual/_commonjsHelpers.js.map +0 -1
- package/lib/_virtual/ali-oss/dist/aliyun-oss-sdk.js +0 -85
- package/lib/_virtual/ali-oss/dist/aliyun-oss-sdk.js.map +0 -1
- package/lib/_virtual/aliyun-oss-sdk.js +0 -2
- package/lib/_virtual/aliyun-oss-sdk.js.map +0 -1
- package/lib/_virtual/aliyun-oss-sdk2.js +0 -2
- package/lib/_virtual/aliyun-oss-sdk2.js.map +0 -1
- package/lib/_virtual/ans-javascript-sdk/sdk/AnalysysAgent_JS_SDK.es6.min.js +0 -30
- package/lib/_virtual/ans-javascript-sdk/sdk/AnalysysAgent_JS_SDK.es6.min.js.map +0 -1
- package/lib/_virtual/xlsx/xlsx.js +0 -105
- package/lib/_virtual/xlsx/xlsx.js.map +0 -1
- package/lib/index.d.ts +0 -10
- package/lib/src/argo-log.d.ts +0 -32
- package/lib/src/date-transfer.d.ts +0 -11
- package/lib/src/device.d.ts +0 -4
- package/lib/src/file-operations.d.ts +0 -42
- package/lib/src/oss-uploader.d.ts +0 -43
- package/lib/src/types.d.ts +0 -26
- package/lib/src/use-api.d.ts +0 -47
- package/lib/src/watermark.d.ts +0 -47
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.js"),r=require("./ali-oss/dist/aliyun-oss-sdk.js");var s=r.__require();const t=e.getDefaultExportFromCjs(s);exports.default=t;
|
|
2
|
-
//# sourceMappingURL=aliyun-oss-sdk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aliyun-oss-sdk.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aliyun-oss-sdk2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});typeof JSON!="object"&&(JSON={}),function(){var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(t){var r=meta[t];return typeof r=="string"?r:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var r,n,o,a,s,c=gap,y=t[e];switch(y&&typeof y=="object"&&typeof y.toJSON=="function"&&(y=y.toJSON(e)),typeof rep=="function"&&(y=rep.call(t,e,y)),typeof y){case"string":return quote(y);case"number":return isFinite(y)?String(y):"null";case"boolean":case"null":return String(y);case"object":if(!y)return"null";if(gap+=indent,s=[],Object.prototype.toString.apply(y)==="[object Array]"){for(a=y.length,r=0;r<a;r+=1)s[r]=str(r,y)||"null";return o=s.length===0?"[]":gap?`[
|
|
2
|
-
`+gap+s.join(`,
|
|
3
|
-
`+gap)+`
|
|
4
|
-
`+c+"]":"["+s.join(",")+"]",gap=c,o}if(rep&&typeof rep=="object")for(a=rep.length,r=0;r<a;r+=1)typeof rep[r]=="string"&&(o=str(n=rep[r],y))&&s.push(quote(n)+(gap?": ":":")+o);else for(n in y)Object.prototype.hasOwnProperty.call(y,n)&&(o=str(n,y))&&s.push(quote(n)+(gap?": ":":")+o);return o=s.length===0?"{}":gap?`{
|
|
5
|
-
`+gap+s.join(`,
|
|
6
|
-
`+gap)+`
|
|
7
|
-
`+c+"}":"{"+s.join(",")+"}",gap=c,o}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="",typeof r=="number")for(n=0;n<r;n+=1)indent+=" ";else typeof r=="string"&&(indent=r);if(rep=t,t&&typeof t!="function"&&(typeof t!="object"||typeof t.length!="number"))throw new Error("JSON.stringify");return str("",{"":e})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var r,n,o=e[t];if(o&&typeof o=="object")for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&((n=walk(o,r))!==void 0?o[r]=n:delete o[r]);return reviver.call(e,t,o)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();var fieldTemplate={base:{outer:["appid","xwho","xwhat","xwhen","xcontext"],xcontext:["$lib","$lib_version","$platform","$debug","$is_login"]},$startup:{xcontext:["$screen_width","$screen_height","$web_crawler","$time_zone","$language","$session_id","$is_first_time","$is_first_day","$utm_campaign_id","$utm_source","$utm_medium","$utm_term","$utm_content","$utm_campaign","$is_time_calibrated"]},$track:{xcontext:["$screen_width","$screen_height","$web_crawler","$time_zone","$language","$is_first_day","$session_id","$utm_campaign_id","$utm_source","$utm_medium","$utm_term","$utm_content","$utm_campaign","$is_time_calibrated"]},$pageview:{xcontext:["$screen_width","$screen_height","$web_crawler","$time_zone","$language","$session_id","$is_first_day","$referrer","$referrer_domain","$title","$url","$startup_time","$utm_campaign_id","$utm_source","$utm_medium","$utm_term","$utm_content","$utm_campaign","$is_time_calibrated"]},$alias:{xcontext:["$original_id"]},$getPresetProperties:{xcontext:["$screen_width","$screen_height","$time_zone","$session_id","$language"]}},baseConfig={base:{appid:"",$debug:0,uploadURL:"",auto:!0,autoProfile:!0,hash:!0,autoWebstay:!0,singlePage:!0,pageProperty:{},$lib_version:"4.5.5",cross_subdomain:!0,cross_subdomain_super:!0,allowTimeCheck:!1,isHybrid:!1,getDataTimeout:1e4,sendDataTimeout:1e4,isMessageSDK:!1},status:{code:200,FnName:"",key:"",value:"",errorCode:"",successCode:""},keywords:fieldTemplate.base.xcontext,baseJson:fieldTemplate.base.outer,sendNum:1800},_keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function _utf8Encode(e){e=e.replace(/\r\n/g,`
|
|
8
|
-
`);for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}function _utf8Decode(e){for(var t="",r=0,n=0,o=0,a=0;r<e.length;)(n=e.charCodeAt(r))<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(o=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&o),r+=2):(o=e.charCodeAt(r+1),a=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&a),r+=3);return t}function Util(){}function CheckChinese(e){return!!new RegExp("[\\u4E00-\\u9FFF]+","g").test(e)}Util.prototype.paramType=function(e){return Object.prototype.toString.call(e).replace("[object ","").replace("]","")},Util.prototype.objHasKay=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Util.prototype.ArrayToObj=function(e){for(var t={},r=0;r<e.length;r++)t[e[r]]="";return t},Util.prototype.keyValueToObje=function(e,t){var r={};return r[e]=t,r},Util.prototype.toDeep=function(e){var t=null;if(this.paramType(e)==="Array"){t=[];for(var r=0;r<e.length;r++)t.push(this.toDeep(e[r]))}else if(this.paramType(e)==="Object")for(var n in t={},e)t[n]=this.toDeep(e[n]);else t=e;return t},Util.prototype.toDeepObj=function(e,t){var r={};if(this.paramType(e)==="String")return r=this.keyValueToObje(e,t);if(this.paramType(e)==="Array")return r=this.ArrayToObj(e);if(this.paramType(e)==="Object")for(var n in e)r[n]=this.toDeepObj(e[n]);return r},Util.prototype.toDeep=function(e){var t=null;if(this.paramType(e)==="Array"){t=[];for(var r=0;r<e.length;r++)t.push(this.toDeep(e[r]))}else if(this.paramType(e)==="Object")for(var n in t={},e)t[n]=this.toDeep(e[n]);else t=e;return t},Util.prototype.toObj=function(e,t){var r={};return this.paramType(e)==="String"?r=this.keyValueToObje(e,t):this.paramType(e)==="Array"?r=this.ArrayToObj(e):this.paramType(e)==="Object"?e:r},Util.prototype.objMerge=function(e,t){if(this.paramType(e)!=="Object"||this.paramType(t)!=="Object")return e;var r={};for(var n in e)r[n]=e[n];for(var o in t){var a=t[o],s=r[o],c=this.paramType(a),y=this.paramType(s);r[o]=s&&y==="Object"&&c==="Object"?this.objMerge(s,a):y==="Array"&&c==="Array"?this.arrayMergeUnique(s,a):c==="Function"&&y==="Function"?this.compose(s,a):a}return r},Util.prototype.compose=function(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}},Util.prototype.fnMerge=function(e,t){return this.objMerge(e,t)},Util.prototype.arrayUnique=function(e){for(var t=[],r={},n=0;n<e.length;n++)r[e[n]]||(r[e[n]]=!0,t.push(e[n]));return t},Util.prototype.arrayMerge=function(e,t){for(var r=[],n=0;n<e.length;n++){var o=e[n];this.paramType(e[n])==="Object"&&(o=this.toDeep(e[n])),r.push(o)}for(var a=0;a<t.length;a++){var s=t[a];this.paramType(t[a])==="Object"&&(s=this.toDeep(t[a])),r.push(s)}return r},Util.prototype.arrayMergeUnique=function(e,t){return e.push.apply(e,t),this.arrayUnique(e)},Util.prototype.encode=function(e){var t,r,n,o,a,s,c,y="",p=0;for(e=_utf8Encode(e);p<e.length;)o=(t=e.charCodeAt(p++))>>2,a=(3&t)<<4|(r=e.charCodeAt(p++))>>4,s=(15&r)<<2|(n=e.charCodeAt(p++))>>6,c=63&n,isNaN(r)?s=c=64:isNaN(n)&&(c=64),y=y+_keyStr.charAt(o)+_keyStr.charAt(a)+_keyStr.charAt(s)+_keyStr.charAt(c);return y},Util.prototype.decode=function(e){var t,r,n,o,a,s,c="",y=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");y<e.length;)t=_keyStr.indexOf(e.charAt(y++))<<2|(o=_keyStr.indexOf(e.charAt(y++)))>>4,r=(15&o)<<4|(a=_keyStr.indexOf(e.charAt(y++)))>>2,n=(3&a)<<6|(s=_keyStr.indexOf(e.charAt(y++))),c+=String.fromCharCode(t),a!==64&&(c+=String.fromCharCode(r)),s!==64&&(c+=String.fromCharCode(n));return c=_utf8Decode(c)},Util.prototype.isEmptyObject=function(e){for(var t in e)return!1;return!0},Util.prototype.format=function(e,t){var r=e.getTimezoneOffset(),n={"M+":(e=new Date(e.getTime()+60*r*1e3+288e5)).getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),"S+":e.getMilliseconds()};for(var o in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,RegExp.$1.length===3?(""+n[o]).length<3?("00"+n[o]).substr(("00"+n[o]).length-3,("00"+n[o]).length):n[o]:("00"+n[o]).substr((""+n[o]).length)));return t.toString()},Util.prototype.MD5=function(e,t){function r($,v){return $<<v|$>>>32-v}function n($,v){var A,C,E,_,T;return E=2147483648&$,_=2147483648&v,T=(1073741823&$)+(1073741823&v),(A=1073741824&$)&(C=1073741824&v)?2147483648^T^E^_:A|C?1073741824&T?3221225472^T^E^_:1073741824^T^E^_:T^E^_}function o($,v,A,C,E,_,T){return $=n($,n(n(function(U,O,k){return U&O|~U&k}(v,A,C),E),T)),n(r($,_),v)}function a($,v,A,C,E,_,T){return $=n($,n(n(function(U,O,k){return U&k|O&~k}(v,A,C),E),T)),n(r($,_),v)}function s($,v,A,C,E,_,T){return $=n($,n(n(function(U,O,k){return U^O^k}(v,A,C),E),T)),n(r($,_),v)}function c($,v,A,C,E,_,T){return $=n($,n(n(function(U,O,k){return O^(U|~k)}(v,A,C),E),T)),n(r($,_),v)}function y($){var v,A="",C="";for(v=0;v<=3;v++)A+=(C="0"+($>>>8*v&255).toString(16)).substr(C.length-2,2);return A}var p,m,w,b,S,d,l,u,g,h;for(p=function($){for(var v,A=$.length,C=A+8,E=16*((C-C%64)/64+1),_=Array(E-1),T=0,U=0;U<A;)T=U%4*8,_[v=(U-U%4)/4]=_[v]|$.charCodeAt(U)<<T,U++;return T=U%4*8,_[v=(U-U%4)/4]=_[v]|128<<T,_[E-2]=A<<3,_[E-1]=A>>>29,_}(e),l=1732584193,u=4023233417,g=2562383102,h=271733878,m=0;m<p.length;m+=16)w=l,b=u,S=g,d=h,l=o(l,u,g,h,p[m+0],7,3614090360),h=o(h,l,u,g,p[m+1],12,3905402710),g=o(g,h,l,u,p[m+2],17,606105819),u=o(u,g,h,l,p[m+3],22,3250441966),l=o(l,u,g,h,p[m+4],7,4118548399),h=o(h,l,u,g,p[m+5],12,1200080426),g=o(g,h,l,u,p[m+6],17,2821735955),u=o(u,g,h,l,p[m+7],22,4249261313),l=o(l,u,g,h,p[m+8],7,1770035416),h=o(h,l,u,g,p[m+9],12,2336552879),g=o(g,h,l,u,p[m+10],17,4294925233),u=o(u,g,h,l,p[m+11],22,2304563134),l=o(l,u,g,h,p[m+12],7,1804603682),h=o(h,l,u,g,p[m+13],12,4254626195),g=o(g,h,l,u,p[m+14],17,2792965006),l=a(l,u=o(u,g,h,l,p[m+15],22,1236535329),g,h,p[m+1],5,4129170786),h=a(h,l,u,g,p[m+6],9,3225465664),g=a(g,h,l,u,p[m+11],14,643717713),u=a(u,g,h,l,p[m+0],20,3921069994),l=a(l,u,g,h,p[m+5],5,3593408605),h=a(h,l,u,g,p[m+10],9,38016083),g=a(g,h,l,u,p[m+15],14,3634488961),u=a(u,g,h,l,p[m+4],20,3889429448),l=a(l,u,g,h,p[m+9],5,568446438),h=a(h,l,u,g,p[m+14],9,3275163606),g=a(g,h,l,u,p[m+3],14,4107603335),u=a(u,g,h,l,p[m+8],20,1163531501),l=a(l,u,g,h,p[m+13],5,2850285829),h=a(h,l,u,g,p[m+2],9,4243563512),g=a(g,h,l,u,p[m+7],14,1735328473),l=s(l,u=a(u,g,h,l,p[m+12],20,2368359562),g,h,p[m+5],4,4294588738),h=s(h,l,u,g,p[m+8],11,2272392833),g=s(g,h,l,u,p[m+11],16,1839030562),u=s(u,g,h,l,p[m+14],23,4259657740),l=s(l,u,g,h,p[m+1],4,2763975236),h=s(h,l,u,g,p[m+4],11,1272893353),g=s(g,h,l,u,p[m+7],16,4139469664),u=s(u,g,h,l,p[m+10],23,3200236656),l=s(l,u,g,h,p[m+13],4,681279174),h=s(h,l,u,g,p[m+0],11,3936430074),g=s(g,h,l,u,p[m+3],16,3572445317),u=s(u,g,h,l,p[m+6],23,76029189),l=s(l,u,g,h,p[m+9],4,3654602809),h=s(h,l,u,g,p[m+12],11,3873151461),g=s(g,h,l,u,p[m+15],16,530742520),l=c(l,u=s(u,g,h,l,p[m+2],23,3299628645),g,h,p[m+0],6,4096336452),h=c(h,l,u,g,p[m+7],10,1126891415),g=c(g,h,l,u,p[m+14],15,2878612391),u=c(u,g,h,l,p[m+5],21,4237533241),l=c(l,u,g,h,p[m+12],6,1700485571),h=c(h,l,u,g,p[m+3],10,2399980690),g=c(g,h,l,u,p[m+10],15,4293915773),u=c(u,g,h,l,p[m+1],21,2240044497),l=c(l,u,g,h,p[m+8],6,1873313359),h=c(h,l,u,g,p[m+15],10,4264355552),g=c(g,h,l,u,p[m+6],15,2734768916),u=c(u,g,h,l,p[m+13],21,1309151649),l=c(l,u,g,h,p[m+4],6,4149444226),h=c(h,l,u,g,p[m+11],10,3174756917),g=c(g,h,l,u,p[m+2],15,718787259),u=c(u,g,h,l,p[m+9],21,3951481745),l=n(l,w),u=n(u,b),g=n(g,S),h=n(h,d);return t===32?y(l)+y(u)+y(g)+y(h):y(u)+y(g)},Util.prototype.clientTimeZone=function(){var e=new Date().getTimezoneOffset(),t=parseInt(e/60),r=e%60,n="-";return(t<=0||r<0)&&(n="+",t=-t,r<0&&(r=-r)),(t+="").length===1&&(t="0"+t),(r+="").length===1&&(r="0"+r),n+t+":"+r},Util.prototype.delEmpty=function(e){var t={};for(var r in e){var n=!0,o=this.paramType(e[r]);o!=="Object"?(e[r]||o==="Number"&&!isNaN(e[r])||o==="Boolean"||(n=!1),n===!0&&(t[r]=e[r])):t[r]=this.delEmpty(e[r])}for(var a in t){var s=[];for(var c in t[a])s.push(t[a][c]);s.length===0&&t[a].constructor===Object&&delete t[a]}return t},Util.prototype.addEvent=function(e,t,r,n){if(document.addEventListener)if(this.paramType(e)!=="Array"&&this.paramType(e)!=="HTMLCollection"||!e.length||e===window)e.addEventListener(t,r,n);else for(var o=0;o<e.length;o++)this.addEvent(e[o],t,r,n);else if(e.length&&e!==window)for(var a=0;a<e.length;a++)this.addEvent(e[a],t,r);else e.attachEvent("on"+t,function(){return r.call(e,window.event)})},Util.prototype.removeEvent=function(e,t,r,n){if(document.removeEventListener)if(e.length)for(var o=0;o<e.length;o++)this.removeEvent(e[o],t,r,n);else e.removeEventListener(t,r,n);else if(e.length)for(var a=0;a<e.length;a++)this.removeEvent(e[a],t,r);else e.detachEvent("on"+t,function(){return r.call(e,window.event)})},Util.prototype.addEleLable=function(e,t,r,n){var o=document,a=o.createElement(e),s=n||o.body||o.getElementsByTagName("body")[0];return r&&(a.id=r),t&&(a.className=t),s.appendChild(a),a},Util.prototype.addScript=function(e,t,r){var n=document,o=n.createElement("script"),a=n.getElementsByTagName("script");o.type="text/javascript",o.async=!0,o.id=e;var s="";if(t){if(this.paramType(t)==="Array")return void(0,t[0])([t[1]],r);s=t.charAt(t.length-1)==="/"?t:t+"/"}else if(n.getElementById("ARK_SDK"))s=n.getElementById("ARK_SDK").src;else for(var c=0;c<a.length;c++)if(a[c].src&&a[c].src.indexOf("AnalysysAgent_JS_SDK")>-1){s=a[c].src;break}var y=s.substring(0,s.lastIndexOf("/")+1);o.src=y+e+".min.js?v="+this.format(new Date,"yyyyMMddhhmm"),o.onload=setTimeout(r,500),a[0].parentNode.insertBefore(o,a[0])},Util.prototype.GetUrlParam=function(e){var t=document.location.toString(),r=window.name;this.paramType(r)==="String"&&r.indexOf(e)>-1&&(t=r);var n=t.split("?");if(n.length>1){for(var o,a=[],s=1;s<n.length;s++)a.push.apply(a,n[s].split("&"));for(var c=0;c<a.length;c++)if((o=a[c].split("="))!=null&&o[0]===e){var y=o[1];if(o[1].indexOf("#")>-1&&(y=y.split("#")[0]),y.indexOf("%")>-1){try{var p=decodeURI(y);if(CheckChinese(p))return p}catch{}if(this.paramType(window.AnalysysModule)==="Object"&&this.paramType(window.AnalysysModule.decodeGBK)==="Function")try{return window.AnalysysModule.decodeGBK(y,"gbk")}catch{}}return y}return""}return""},Util.prototype.stringSlice=function(e,t){return e.slice(0,t)},Util.prototype.trim=function(e){return this.paramType(e)==="String"?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):e},Util.prototype.changeHash=function(e){var t=window.history.pushState,r=window.history.replaceState;window.history.pushState=function(){t.apply(window.history,arguments),e.apply(e)},window.history.replaceState=function(){r.apply(window.history,arguments),e.apply(e)};var n;"on"+(n=window.ActiveXObject||"ActiveXObject"in window?"hashchange":"popstate")in window&&this.addEvent(window,n,function(){setTimeout(e,0)})},Util.prototype.deviceType=function(){var e=navigator.userAgent;return e.indexOf("Tablet")>-1&&e.indexOf("PC")<0||e.indexOf("Pad")>-1||e.indexOf("Nexus 7")>-1?"tablet":e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1?"phone":"desktop"},Util.prototype.checkTypeList=function(e,t){var r=this.paramType(e);if(r==="String"){var n=window.location.href,o=window.location.protocol+"//"+window.location.host,a=o+window.location.pathname;if([n,o,a+"index.html",a,a+window.location.hash].indexOf(e)>-1)return!0}else{if(r==="Function")return e.call(e,t);if(r==="Array"){for(var s=0;s<e.length;s++)if(this.checkTypeList(e[s],t)===!0)return!0}}return!1},Util.prototype.selectorAllEleList=function(e){var t=[],r=e.split(".")[0];if(this.paramType(document.querySelectorAll)==="Function"&&e.indexOf("|")<0)try{return document.querySelectorAll(e)}catch{}var n="";if(e.indexOf("#")>-1){n=e.split(".")[0].split("#")[1];var o=document.getElementById(n);o&&t.push(o)}else{if(e.indexOf(".")<0)return document.getElementsByTagName(r);if(e.indexOf("[")>-1&&e.indexOf("]")>-1)for(var a=document.getElementsByTagName("*"),s=e.replace("[","").replace("]",""),c=0;c<a.length;c++){var y=a[c].getAttribute(s);this.paramType(y)==="String"&&t.push(o)}else for(var p=document.getElementsByTagName(r),m=0;m<p.length;m++){var w=p[m],b=this.paramType(w.className)==="String"?w.className.split(" "):[];b.length>0&&(r+"."+b.join(".")).indexOf(e)>-1&&t.push(w)}}return t},Util.prototype.getDomainFromUrl=function(e,t){if(t==="")return"";var r=(t=t||window.location.hostname).split("/");if(r.length>2&&(t=r[2]),/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(t)===!0||t==="localhost")return"";var n=t.split("."),o=e===!0?2:n.length;(this.paramType(o)!=="Number"||o<2)&&(o=2);var a=[];if(!(n.length>1))return"";n.length<o&&(o=n.length);for(var s=n.length-1;s>=0&&a.length!==o;s--)a.push(n[s]);return a.reverse().join(".")},Util.prototype.isiOS=!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),Util.prototype.delNotHybrid=function(e){return delete e.$is_first_day,delete e.$session_id,delete e.$is_time_calibrated,delete e.$startup_time,e},Util.prototype.getUrlPath=function(){var e=window.location.hash;return e.indexOf("?")>-1&&(e=e.split("?")[0]),window.location.host+window.location.pathname+e},Util.prototype.detectZoom=function(){for(var e=this.selectorAllEleList("meta"),t=1,r=0;r<e.length;r++){var n=e[r].getAttribute("content");if(n&&n.indexOf("initial-scale=")>-1)for(var o=n.split(","),a=0;a<o.length;a++)o[a].indexOf("initial-scale")>-1&&(t=parseFloat(o[a].split("=")[1]))}return t};var Util$1=new Util,Local="",Session="";try{Local=typeof window.localStorage=="object"?window.localStorage:"",Session=typeof window.sessionStorage=="object"?window.sessionStorage:""}catch(e){}function Storage(){this.localName="FZ_STROAGE",this.sessionName="FZ_SESSION",this.cookieName="FZ_STROAGE."+Util$1.getDomainFromUrl(baseConfig.base.cross_subdomain),this.checkSubdomain(),this.localObj=this.getLocal(),this.sessionObj=this.getSession()}Storage.prototype.checkSubdomain=function(){var e=window.AnalysysAgent||[];if(Util$1.paramType(e)==="Array")for(var t=0;t<e.length;t++)e[t][0]==="cross_subdomain"&&Util$1.paramType(e[t][1])==="Boolean"&&(baseConfig.base.cross_subdomain=e[t][1]);if(e&&Util$1.objHasKay(e.config||{},"cross_subdomain")&&(baseConfig.base.cross_subdomain=e.config.cross_subdomain),baseConfig.base.cross_subdomain===!0){var r=this.getCookie(this.cookieName)||Util$1.encode("{}");if(r=JSON.parse(Util$1.decode(decodeURIComponent(r))),Util$1.paramType(r)==="Object"&&!Util$1.isEmptyObject(r)){var n=r.ARK_ID,o={};Util$1.objHasKay(r,"ARKSUPER")===!0&&(o=r.ARKSUPER,delete r.ARKSUPER);var a=Util$1.objMerge(this.localObj||{},r);baseConfig.base.cross_subdomain_super!==!0||Util$1.isEmptyObject(o)||(a=Util$1.objMerge({ARKSUPER:o},a)),this.setLocal(this.localName,a),this.setCookie("ARK_ID",n)}}},Storage.prototype.setLocal=function(e,t){this.localObj=this.getLocal(),e===this.localName?this.localObj=t:this.localObj[e]=t;try{if(Local?(Local.setItem(this.localName,Util$1.encode(JSON.stringify(this.localObj))),Session.setItem(this.localName,Util$1.encode(JSON.stringify(this.localObj)))):e!=="POSTDATA"&&this.setCookie(this.cookieName,encodeURIComponent(Util$1.encode(JSON.stringify(this.localObj)))),e!=="POSTDATA"&&baseConfig.base.cross_subdomain===!0){var r=Util$1.toDeep(this.localObj);delete r.POSTDATA,this.setCookie(this.cookieName,encodeURIComponent(Util$1.encode(JSON.stringify(r))))}}catch{}},Storage.prototype.getLocal=function(e){try{var t=Util$1.encode("{}");return Local?(t=Local.getItem(this.localName))||Session.getItem(this.localName)&&(t=Session.getItem(this.localName),Local.setItem(this.localName,t)):t=(t=this.getCookie(this.cookieName))?decodeURIComponent(t):Util$1.encode(JSON.stringify(this.localObj)),this.localObj=JSON.parse(Util$1.decode(t)),e?this.localObj[e]:this.localObj}catch{return e?"":{}}},Storage.prototype.removeLocal=function(e){if(this.localObj=this.getLocal(),Util$1.objHasKay(this.localObj,e)&&delete this.localObj[e],Util$1.isEmptyObject(this.localObj))try{Local&&(Local.removeItem(this.localName),Session.removeItem(this.localName)),this.removeCookie(this.cookieName)}catch{}else if(Local&&(Local.setItem(this.localName,Util$1.encode(JSON.stringify(this.localObj))),Session.setItem(this.localName,Util$1.encode(JSON.stringify(this.localObj)))),e!=="POSTDATA"&&e!=="ARK_ID"&&baseConfig.base.cross_subdomain===!0){var t=Util$1.toDeep(this.localObj);delete t.POSTDATA,delete t.ARK_ID,this.setCookie(this.cookieName,Util$1.encode(JSON.stringify(t)))}},Storage.prototype.setSession=function(e,t){this.sessionObj=this.getSession(),this.sessionObj[e]=t;try{Session?(Session.setItem(this.sessionName,Util$1.encode(JSON.stringify(this.sessionObj))),this.removeCookie(this.sessionName)):e!=="POSTDATA"&&this.setCookie(this.sessionName,Util$1.encode(JSON.stringify(this.sessionObj)),"session")}catch{}},Storage.prototype.getSession=function(e){try{var t=Util$1.encode("{}");return Session?(t=Session.getItem(this.sessionName)||Util$1.encode("{}"),this.removeCookie(this.sessionName)):(t=this.getCookie(this.sessionName))||(t=Util$1.encode(JSON.stringify(this.sessionObj))),this.sessionObj=JSON.parse(Util$1.decode(t)),e?this.sessionObj[e]:this.sessionObj}catch{return{}}},Storage.prototype.removeSession=function(e){if(this.sessionObj=this.getSession(),Util$1.objHasKay(this.sessionObj,e)&&delete this.sessionObj[e],Util$1.isEmptyObject(this.sessionObj))try{Session?(Session.removeItem(this.sessionName),this.removeCookie(this.sessionName)):this.removeCookie(this.sessionName)}catch{}else Session&&Session.setItem(this.sessionName,Util$1.encode(JSON.stringify(this.sessionObj)))},Storage.prototype.setCookie=function(e,t,r){var n="."+Util$1.getDomainFromUrl(baseConfig.base.cross_subdomain),o=n?"; domain="+n:"",a="";if(r!=="session"){var s=new Date;s.setTime(s.getTime()+31536e6),a="; expires="+s.toGMTString()}document.cookie=e+"="+t+a+"; path=/"+o},Storage.prototype.getCookie=function(e){e=e||this.localName;var t=document.cookie;if(typeof t!="string")return"";var r,n,o=e+"=",a=t.split(/[;&]/);for(r=0;r<a.length;r++){for(n=a[r];n.charAt(0)===" ";)n=n.substring(1,n.length);if(n.indexOf(o)===0)return n.substring(o.length,n.length)||""}},Storage.prototype.removeCookie=function(e,t,r){t=Util$1.paramType(t)==="Boolean"?t:baseConfig.base.cross_subdomain;var n="."+Util$1.getDomainFromUrl(t),o=n?"; domain="+n:"";if(r!=="session"){var a=new Date;a.setTime(a.getTime()-94608e6);var s="; expires="+a.toGMTString()}document.cookie=e+"="+s+"; path=/"+o};var Storage$1=new Storage,UTM={utm_campaign_id:Util$1.GetUrlParam("campaign_id"),utm_source:Util$1.GetUrlParam("utm_source")||Util$1.GetUrlParam("hmsr"),utm_medium:Util$1.GetUrlParam("utm_medium")||Util$1.GetUrlParam("hmpl"),utm_term:Util$1.GetUrlParam("utm_term")||Util$1.GetUrlParam("hmkw"),utm_content:Util$1.GetUrlParam("utm_content")||Util$1.GetUrlParam("hmci"),utm_campaign:Util$1.GetUrlParam("utm_campaign")||Util$1.GetUrlParam("hmcu")};function clearUTM(){UTM={utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:""}}function SessionId(){this.sessionId=Storage$1.getLocal("SEESIONID")||this.setId(),this.sessionDate=Storage$1.getLocal("SEESIONDATE")||0}SessionId.prototype.setId=function(){var e=+new Date;return this.sessionId=Util$1.MD5("JS"+e.toString()+1e7*Math.random()),this.sessionDate=e,Storage$1.setLocal("SEESIONID",this.sessionId),Storage$1.setLocal("SEESIONDATE",this.sessionDate),this.sessionId},SessionId.prototype.getId=function(){var e=new Date,t=e.getTime(),r=e.getTimezoneOffset(),n=new Date(t+60*r*1e3+288e5).getDate();this.sessionDate=Storage$1.getLocal("SEESIONDATE")||0;var o=this.sessionDate===0?0:new Date(this.sessionDate+60*r*1e3+288e5).getDate();return(!this.sessionId||!this.sessionDate||Number(t)-Number(this.sessionDate)>18e5||n!==o)&&(clearUTM(),this.setId()),this.sessionDate=t,Storage$1.setLocal("SEESIONDATE",t),this.sessionId=Storage$1.getLocal("SEESIONID")||this.setId(),this.sessionId};var sessionId=new SessionId,UA=navigator.userAgent.toLowerCase();function checkSpider(){return!!UA.match(/(bot|crawler|spider|scrapy|dnspod|ia_archiver|jiankongbao|slurp|transcoder|networkbench|oneapm|PhantomJS|BingPreview)/i)}function getId(){var e=Storage$1.getLocal("ARK_LOGINID")||Storage$1.getLocal("ARK_TRACKID")||Storage$1.getLocal("ARK_ID");return e&&e!=="[object Object]"||(e=setUUId(),Storage$1.setLocal("ARK_ID",e)),Storage$1.setCookie("ARK_ID",getIdentifyId()||getUUId()),e}function setUUId(){var e=new Date().getTime().toString()+(1e4*Math.random()).toString(),t="JS"+Util$1.MD5(e.toString(),32)+Util$1.MD5(e.toString(),32).slice(0,4);return Storage$1.setCookie("ARK_ID",t),t}function getUUId(){var e=Storage$1.getLocal("ARK_ID");return e||(e=setUUId(),Storage$1.setLocal("ARK_ID",e)),e}function removeUUId(){Storage$1.removeLocal("ARK_ID")}function getAliasId(){return Storage$1.getLocal("ARK_LOGINID")}function removeAliasId(){Storage$1.removeLocal("ARK_LOGINID")}function getIdentifyId(){return Storage$1.getLocal("ARK_TRACKID")}function removeIdentifyId(){Storage$1.removeLocal("ARK_TRACK_LOGIN"),Storage$1.removeLocal("ARK_TRACKID")}var base=baseConfig.base;function appkey(e){base.appid=e}function getAppId(){return base.appid}function debugMode(e){base.$debug=e}function getDebugMode(){return base.$debug}function uploadURL(e){e.charAt(e.length-1)!=="/"&&(e+="/"),base.uploadURL=e}function getUploadURL(){return base.uploadURL.charAt(base.uploadURL.length-1)!=="/"&&(base.uploadURL+="/"),base.uploadURL}function nowDate(){return+new Date+(Storage$1.getLocal("ANSSERVERTIME")?Number(Storage$1.getLocal("ANSSERVERTIME")):0)}function timeCalibration(){return!!Storage$1.getLocal("ANSSERVERTIME")}function getXwhat(){return baseConfig.status.FnName}function isLogin(){var e=!1;return(getAliasId()||Storage$1.getLocal("ARK_TRACK_LOGIN"))&&(e=!0),e}var timeZone="GMT"+Util$1.clientTimeZone(),language=(navigator.language||navigator.browserLanguage).toLowerCase();function getSessionId(){return sessionId.getId()}function isFirstTime(){var e=Storage$1.getLocal("FRISTIME");return Storage$1.setLocal("FRISTIME",!1),e}function isFirstDay(){var e=Util$1.format(new Date,"yyyyMMdd"),t=Storage$1.getLocal("FRISTDAY");return!t||e===t}function originalId(){return getIdentifyId()||getUUId()}var referrer=document.referrer||"";function setReferrer(e){referrer=e}function getReferrer(){var e=referrer;try{e=decodeURIComponent(referrer)}catch{}return baseConfig.base.isHybrid===!0&&(e=e.replace(/"/g,'\\"')),e}function getReferrerDomain(){return Util$1.getDomainFromUrl(!1,referrer)}function getTitle(){return document.title}function startupTime(){return Storage$1.getSession("STARTUPTIME")||""}function getUrl(){var e=window.location.href;try{e=decodeURIComponent(e)}catch{}return baseConfig.base.isHybrid===!0&&(e=e.replace(/"/g,'\\"')),e}function getLibVersion(){return base.$lib_version}function getScreenWidth(){return Util$1.paramType(Number(window.screen.width))==="Number"?Number(window.screen.width):0}function getScreenHeight(){return Util$1.paramType(Number(window.screen.height))==="Number"?Number(window.screen.height):0}var oldUTM=Storage$1.getSession("ARK_UTM")||"";function utmCampaignId(){return UTM.utm_campaign_id}function utmSource(){return UTM.utm_source}function utmMedium(){return UTM.utm_medium}function utmTerm(){return UTM.utm_term}function utmContent(){return UTM.utm_content}function utmCampaign(){return UTM.utm_campaign}UTM.utm_campaign||UTM.utm_source||UTM.utm_medium||UTM.utm_campaign_id||UTM.utm_term||UTM.utm_content?(oldUTM!==JSON.stringify(UTM)&&sessionId.setId(),Storage$1.setSession("ARK_UTM",JSON.stringify(UTM))):(clearUTM(),Storage$1.removeSession("ARK_UTM"));var getField=Object.freeze({__proto__:null,getAppId,getId,getUploadURL,appkey,debugMode,uploadURL,getDebugMode,nowDate,getXwhat,isLogin,timeZone,language,getSessionId,isFirstTime,isFirstDay,originalId,getReferrer,getReferrerDomain,getTitle,getUrl,getScreenWidth,getScreenHeight,startupTime,checkSpider,getLibVersion,utmCampaignId,utmSource,utmMedium,utmTerm,utmContent,utmCampaign,timeCalibration,setReferrer}),fieldRules={resetKeywords:["appid","$debug","uploadUrl"],uploadURL:{valueType:0,value:getUploadURL,check:{value:["isString","nimLength","isUrl"],errorCode:"60007",successCode:"20008"}},appid:{valueType:0,value:getAppId,check:{value:["isString","nimLength"],errorCode:"60006",successCode:"20006"}},hash:{check:{value:["isBoolean"],errorCode:"60003"}},auto:{check:{value:["isBoolean"],errorCode:"60003"}},autoProfile:{check:{value:["isBoolean"],errorCode:"60003"}},pageProperty:{check:{value:["isObject"],errorCode:"600016"}},xwho:{valueType:0,value:getId,check:{value:["isString","nimLength"]}},xwhen:{valueType:0,value:nowDate},xwhat:{valueType:0,value:getXwhat,check:{value:["isString","nimLength"]}},xcontext:{$lib:{valueType:1,value:"JS"},$lib_version:{valueType:0,value:getLibVersion,check:{value:["isString"],successCode:"20007"}},$platform:{valueType:1,value:"JS"},$debug:{valueType:0,value:getDebugMode,check:{value:["isNumber","isDebug"]}},$is_login:{valueType:0,value:isLogin,check:{value:["isBoolean"]}},$screen_width:{valueType:0,value:getScreenWidth,check:{value:["isNumber"]}},$screen_height:{valueType:0,value:getScreenHeight,check:{value:["isNumber"]}},$time_zone:{valueType:1,value:timeZone},$language:{valueType:1,value:language},$session_id:{valueType:0,value:getSessionId},$is_first_time:{valueType:0,value:isFirstTime},$is_first_day:{valueType:0,value:isFirstDay},$referrer:{valueType:0,value:getReferrer},$referrer_domain:{valueType:0,value:getReferrerDomain},$title:{valueType:0,value:getTitle},$url:{valueType:0,value:getUrl},$startup_time:{valueType:0,value:startupTime},$web_crawler:{valueType:0,value:checkSpider},$original_id:{valueType:0,value:originalId},$utm_campaign_id:{valueType:0,value:utmCampaignId},$utm_source:{valueType:0,value:utmSource},$utm_medium:{valueType:0,value:utmMedium},$utm_term:{valueType:0,value:utmTerm},$utm_content:{valueType:0,value:utmContent},$utm_campaign:{valueType:0,value:utmCampaign},$is_time_calibrated:{valueType:0,value:timeCalibration}},xcontextCommonRule:{check:{key:["isString","length99","notSpecialCharacters","keywords"],value:["notObject","isArrayString","length255"]}},$track:{check:{key:["isString","notSpecialCharacters","length99"]}},$alias:{check:{key:["isString","keyLength255"]}},$profile_increment:{check:{key:["isString","length99","notSpecialCharacters"],value:["isNumber"]}},$profile_unset:{check:{key:["isString","length99","notSpecialCharacters"]}},$pageview:{check:{key:["isString","keyLength255"]}}},lifecycle={},fieldRules$1={"visitorConfigURL ":{check:{value:["isUrl"]}}},fieldTemplate$1={};function getElementContent(e,t){var r="";if(e.tagName.toLowerCase()==="input"?r=e.value||"":e.tagName.toLowerCase()==="img"?r=e.getAttribute("alt")||e.getAttribute("title")||"":e.tagName.toLowerCase()==="a"&&(r=e.getAttribute("title")||""),!r)for(var n=e.childNodes,o=0;o<n.length;o++)n[o].nodeType===3&&(r+=n[o].nodeValue);return r=r&&Util$1.paramType(r)==="String"?r.replace(/[\r\n]/g," ").replace(/[ ]+/g," "):"",e.tagName.toLowerCase()==="input"&&e.type!=="button"&&e.type!=="submit"&&t!==!0?"":r=Util$1.trim(r)}var errorMessage={common:`{FN}:Property key invalid, nonsupport value: $lib/$lib_version/$platform/$first_visit_time/$debug/$is_login
|
|
9
|
-
current KEY:{KEY}`,60001:`{FN}:Property key invalid, support type: String
|
|
10
|
-
current key:{KEY}
|
|
11
|
-
`,60002:`{FN}:Property value invalid of key[{KEY}], support type: Number
|
|
12
|
-
current value:{VALUE}
|
|
13
|
-
current type: {VALUETYPE}`,60003:`{FN}:Property value invalid of key[{KEY}], support type: Boolean
|
|
14
|
-
current value:{VALUE}
|
|
15
|
-
current type: {VALUETYPE}`,60004:`{FN}:Property value invalid of key[{KEY}], support type: Array
|
|
16
|
-
current value:{VALUE}
|
|
17
|
-
current type: {VALUETYPE}`,60005:"{FN}:The length of the property[{KEY}] value (string[{VALUE}]) needs to be 1-255 !",60006:"Please set appkey first.",60007:"Please set uploadURL first.",60008:"Send message failed.",60009:"{FN}:The length of the property key (string[{KEY}]) needs to be 1-125 !",600010:"{FN}:The length of the property key (string[{KEY}]) needs to be 1-99 !",600011:"{FN}:[{KEY}] does not conform to naming rules!",600012:`{FN}:Property key invalid, nonsupport value: $lib/$lib_version/$platform/$first_visit_time/$debug/$is_login
|
|
18
|
-
current KEY:{KEY}`,600013:`{FN}:Property value invalid of key[{KEY}], support type: Array with String as its internal element
|
|
19
|
-
current value:{VALUE}
|
|
20
|
-
current type: {VALUETYPE}`,600016:`{FN}:Property value invalid of key[{KEY}], support type: Object
|
|
21
|
-
current value:{VALUE}
|
|
22
|
-
current type: {VALUETYPE}`,600017:"{FN}:The length of the property key (string[{KEY}]) needs to be 1-255 !",600018:`{FN}:Property value invalid of key[{KEY}] invalid, support type: String
|
|
23
|
-
current value:{VALUE}
|
|
24
|
-
current type: {VALUETYPE}`,600019:"{FN}:The length of the property[{KEY}] value (string[{VALUE}]) needs to be 1-255 !",600020:`{FN}:Property value invalid of key[{KEY}], support type: Boolean/Array/String/Number
|
|
25
|
-
current value:{VALUE}
|
|
26
|
-
current type: {VALUETYPE}`},successMessage={common:"",20001:"Send message success",20002:"{FN}: set success ({VALUE})",20003:"{FN}:({VALUE}) delete success",20004:"{FN}:clear success",20005:"{FN}:reset success",20006:"set appkey success. current appkey : {VALUE}",20007:"Init Analysys JS sdk success, version : {VALUE}",20008:"set uploadURL success. current uploadURL : {VALUE}",20009:"{FN}:[{KEY}] : get failed",20010:"{FN}:[{KEY}] : get success. ({VALUE})",20011:"{FN}:({VALUE}) delete failed",20013:"aliasID already bound"};function successLog(e){if(baseConfig.base.$debug===1||baseConfig.base.$debug===2){var t=baseConfig.status,r=t.successCode,n=t.FnName,o=t.key,a=t.value,s=successMessage[r]||successMessage.common;Util$1.paramType(o)==="String"&&o.length>30&&(o=Util$1.stringSlice(o,30)+"..."),Util$1.paramType(n)==="String"&&n.length>30&&(n=Util$1.stringSlice(n,30)+"...");var c=s.replace("{FN}",n).replace("{KEY}",o).replace("{VALUE}",a);e&&(c=e),c&&window.console&&window.console.log&&window.console.log(c)}}function errorLog(){if(baseConfig.base.$debug===1||baseConfig.base.$debug===2){var e=baseConfig.status,t=e.errorCode,r=e.FnName,n=e.key,o=e.value;Util$1.paramType(o)==="Object"&&(o=JSON.stringify(o));var a=Util$1.paramType(o);t!=="600018"||n||(t="600011"),t!=="60005"||n||(t="600017"),(t==="600017"||t==="600019"||t==="60009"||t==="600010"||t==="60005")&&Util$1.paramType(o)==="String"&&o.length&&o.length>30&&(o=Util$1.stringSlice(o,30)+"..."),Util$1.paramType(n)==="String"&&n.length>30&&(n=Util$1.stringSlice(n,30)+"..."),Util$1.paramType(r)==="String"&&r.length>30&&(r=Util$1.stringSlice(r,30)+"...");var s=(errorMessage[t]||errorMessage.common).replace("{FN}",r).replace("{KEY}",n).replace("{VALUE}",o).replace("{VALUETYPE}",a);if(window.console&&window.console.warn&&window.console.warn(s),lifecycle$5.errorLog&&lifecycle$5.errorLog.init&&t!=="60008"){var c=baseConfig.status.FnName;lifecycle$5.errorLog.init(s),baseConfig.status.FnName=c}}}var androidModel={hashCode:"",width:0,height:0,aleft:0,atop:0,classes:[],clickable:!1,alpha:1,hidden:0,text:"",subviews:[],new_path:[],url:""},iosModel={id:"",class:[],properties:{alpha:{values:[{value:1}]},userInteractionEnabled:{values:[{value:!0}]},enabled:{values:[{value:!0}]},hidden:{values:[{value:!1}]},subviews:{values:[{value:[]}]},superview:{values:[{value:0}]},frame:{values:[{value:{AX:0,AY:0,Height:0,Width:0}}]}},new_path:[],url:"",controlEvent:"64"},id=0,rootId=0,eleList=[];function getDomList(e,t,r){if(e.nodeType!==1)return null;var n="web"+(id===0?rootId:rootId+""+id),o=e,a=[],s=[],c=e.tagName.toLowerCase(),y=!0;for(["a","button","input","select","textarea"].indexOf(c)>-1&&(y=!1);o!==null;){var p=o.children;if(!p)break;if(p.length>0){for(var m=0;m<p.length;m++)if(id++,p[m].nodeType===1&&p[m].tagName&&["canvas","svg","use","script","meta","style"].indexOf(p[m].tagName.toLowerCase())<0)if(p[m].tagName==="TABLE")for(var w=p[m].children,b=0;b<w.length;b++){id++;var S=getDomList(w[b],n,y),d=getConstantStyle(w[b],"position");S&&(d==="absolute"?s.push(S):a.push(S))}else{var l=getDomList(p[m],n,y),u=getConstantStyle(p[m],"position");l&&(u==="absolute"?s.push(l):a.push(l))}}a=Util$1.arrayMerge(a,s),o=o.children}var g={};return(g=Util$1.isiOS===!0?setiOSModel(e,n,t,a,r):setAndroidModel(e,n,t,a,r)).url=Util$1.getUrlPath(),g.root_id="web"+rootId,e.tagName!=="TABLE"&&eleList.push(g),n}var detect=Util$1.detectZoom();function setiOSModel(e,t,r,n,o){var a=JSON.parse(JSON.stringify(iosModel)),s=eleOffset(e);a.id=t,a.properties.frame.values[0].value.Width=(e.offsetWidth||e.scrollWidth||e.clientWidth)*detect,a.properties.frame.values[0].value.Height=(e.offsetHeight||e.offsetHeight||e.clientHeight)*detect,a.properties.frame.values[0].value.AX=s.left*detect,a.properties.frame.values[0].value.AY=s.top*detect;var c=domParentList(e);a.new_path=c.newPath,a.class=e.className&&Util$1.paramType(e.className)==="String"?e.className.split(" "):[],a.eg_text=getElementContent(e),a.properties.enabled.values[0].value=!0,a.properties.subviews.values[0].value=n,a.properties.superview.values[0].value=r,a.bodyWidth=(window.innerWidth||document.body.offsetWidth||document.body.scrollWidth||document.body.clientWidth)*detect,a.bodyHeight=(window.innerHeight||document.body.offsetHeight||document.body.scrollHeight||document.body.clientHeight)*detect,a.bodyScrollTop=s.bodyScrollTop*detect,a.bodyScrollLeft=s.bodyScrollLeft*detect,a.eleScrollTop=s.eleScrollTop*detect,a.eleScrollLeft=s.eleScrollLeft*detect;var y=(e.style.filter!==""?e.style.filter.match(/opacity:[/S/s]*?\)/)[0]:e.style.opacity)||1;return a.properties.alpha.values[0].value=y,o===!1&&(a.properties.userInteractionEnabled.values[0].value=!1,a.properties.enabled.values[0].value=!1),a}function setAndroidModel(e,t,r,n,o){var a=JSON.parse(JSON.stringify(androidModel)),s=eleOffset(e),c=domParentList(e);return a.new_path=c.newPath,a.hashCode=t,a.parentid=r,a.bodyWidth=(window.innerWidth||document.body.offsetWidth||document.body.scrollWidth||document.body.clientWidth)*detect,a.bodyHeight=(window.innerHeight||document.body.offsetHeight||document.body.scrollHeight||document.body.clientHeight)*detect,a.innerHeight={innerHeight:window.innerHeight,scrollHeight:document.body.scrollHeight,offsetHeight:document.body.offsetHeight,clientHeight:document.body.clientHeight},a.width=(e.offsetWidth||e.scrollWidth||e.clientWidth)*detect,a.height=(e.offsetHeight||e.scrollHeight||e.clientHeight)*detect,a.aleft=(s.left-s.eleScrollLeft)*detect,a.atop=(s.top-s.eleScrollTop)*detect,a.bodyScrollTop=0,a.bodyScrollLeft=0,a.eleScrollTop=s.eleScrollTop*detect,a.eleScrollLeft=s.eleScrollLeft*detect,a.clickable=o!==!1,a.text=getElementContent(e),a.alpha=(e.style.filter!==""?e.style.filter.match(/opacity:[/S/s]*?\)/)[0]:e.style.opacity)||1,a.classes=e.className&&Util$1.paramType(e.className)==="String"?e.className.split(" "):[],a.subviews=n,a}function HybridVisual(e){if(eleList=[],rootId=e||+new Date,getDomList(document.body,id),id=0,Util$1.isiOS===!0)return JSON.stringify(eleList);window.AnalysysAgentHybrid.onVisualDomList(JSON.stringify(eleList))}var HybridAns={visitorEventList:[],visitorProperties:{},getVisualDomList:function(e){return HybridVisual(e)},onEventList:function(e){e=e||[],Util$1.paramType(e)==="String"&&(e=JSON.parse(e));for(var t=[],r=[],n=0;n<e.length;n++)if(e[n].isAll===1||!e[n].target_page||e[n].target_page===Util$1.getUrlPath()){e[n].bindings=e[n].props_binding,t.push(e[n]);var o={eventID:e[n].event_id,eventName:e[n].event_name||""};r.push(o)}HybridAns.visitorEventList=t,successLog("Get Visual Event List from app"),successLog(JSON.stringify(r,null,2))},getProperty:function(e){Util$1.paramType(e)==="String"&&(e=JSON.parse(e));var t=getRelated(e);if(Util$1.isiOS===!0)return JSON.stringify(t);window.AnalysysAgentHybrid.onProperty(JSON.stringify(t))},onProperty:function(e,t){if(Util$1.paramType(HybridAns.visitorProperties[t])==="Function"){if(Util$1.paramType(e)==="String"&&(e=JSON.parse(e)),Util$1.paramType(e)==="Array"){for(var r={},n=0;n<e.length;n++)r=Util$1.objMerge(r,e[n]);e=r}return HybridAns.visitorProperties[t].call(HybridAns.visitorProperties[t],e),delete HybridAns.visitorProperties[t],!0}return!1}};function getPath(e){for(var t=e.tagName.toLowerCase(),r="",n=Util$1.paramType(e.className)!=="String"?[]:e.className.split(" "),o=0;o<n.length;o++)n[o]&&n[o].indexOf("ARK")<0&&(r+="."+n[o]);return{className:r,id:e.id||"",tagName:t}}function domParentList(e,t){for(var r=[],n=[],o=e;o!=null;)if(o.nodeType===1){var a=getPath(o),s=null;s=getEleIndex(o),r.push(a.tagName+(a.id?"#"+a.id:"")+a.className);var c={id:a.id,tagName:a.tagName};a.row!==null?c.row=s.row:c.index=s.index,n.push(Util$1.delEmpty(c)),o=o.parentNode}else o=o.parentNode;return{path:r.join("<"),newPath:n}}function getEleIndex(e){for(var t=e.parentNode,r=0,n=!0,o=null;t!==null&&n===!0;)if(t.nodeType===1){for(var a=t.children,s=[],c={},y=0;y<a.length;y++){var p=getPath(a[y]);s.push(p),e===a[y]&&(c=p,r=y)}for(var m=!1,w=0;w<a.length;w++)s[w].tagName===c.tagName&&(m=!0);m===!0&&(o=r),n=!1}else t=t.parentNode;return{row:o,index:r}}function parentContrast(e,t){for(var r=0;r<e.length;r++)if(e[r].split(".")[0]!==t[r].split(".")[0])return!1;return!0}function newPathContrast(e,t,r){var n=e.newPath,o=Util$1.arrayMerge([],n),a=Util$1.arrayMerge([],t),s=Util$1.arrayMerge([],n),c=e.ele;if(o===a)return!0;if(o.length<a.length)return!1;if(e.ele&&o.length>a.length){var y=o.length-a.length;o.splice(0,y);for(var p=0;p<y;p++)c=c.parentNode||document.body;s=Util$1.arrayMerge([],o)}for(var m=!0,w=0;w<a.length;){var b=a[w],S=o[w];if(Util$1.objHasKay(S,"row")===!0&&Util$1.objHasKay(b,"row")===!1&&Util$1.objHasKay(S,"index")===!1&&delete S.row,b.id&&b.id!==S.id||b.tagName!==S.tagName||S.index!==b.index||S.row!==b.row){m=!1;break}w++}return m===!0&&(e.newPath=s,e.ele=c),m}function isClassContrast(e,t){var r=e?e.className:null;return!!(Util$1.paramType(r)==="String"&&Util$1.paramType(t)==="String"&&(r=Util$1.trim(r)||null,t=Util$1.trim(t)||null,r&&t&&r.indexOf(t)>-1))}function bindingContrast(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(n.prop_name==="text"){if(getElementContent(e)!==n.value)return!1}else if(n.prop_name==="class"&&!isClassContrast(e,n.value))return!1}return!0}function pathContrast(e,t,r){var n=!0,o=!1;if(t.bindings=t.bindings||t.props_binding,e.newPath&&t.newPath&&(o=!0,n=newPathContrast(e,t.newPath)),n===!0&&t.bindings&&t.bindings.length>0&&(o=!0,n=bindingContrast(e.ele,t.bindings)),o)return n;var a=e.path||e.link,s=t.path||t.link,c=e.index||0,y=t.index||0,p=e.ele||null,m=t.isText||"";if(m!==""&&m!==getElementContent(p))return!1;if(a===s&&c===y)return!0;var w=a.split("<"),b=s.split("<");if(w.length<b.length)return!1;if(w.length>b.length){var S=w.length-b.length;w=w.splice(S);for(var d=p;S>0&&d;)d=d.parentNode,S--;if(!d)return!1;c=setIndex(d,w.join("<"))}return!(!parentContrast(w,b)||c!==y)}function parseNewPath(e,t,r){var n=null;if(r)if(t===0){if(e.length===1)return r;n=e.slice(0,e.length-t),r=r.parentNode}else for(n=e.slice(0,e.length-1);t>0;){if(!(r=r.parentNode))return null;t--}else r=document,n=e;for(var o=r,a=n.length-1;a>=0;){var s=n[a],c=s.tagName,y=Util$1.paramType(s.row)==="Number"?s.row:s.index,p=s.id||"";if(c==="html"&&(y=0),Util$1.paramType(y)!=="Number")return null;var m=o.children;if(m.length<y||!(o=m[y])||p&&o.id!==p||Util$1.paramType(o.tagName)==="String"&&c!==o.tagName.toLowerCase())return null;a--}return o}function parserDom(e){var t=[];if(e.indexOf("<")<0)return[{elePath:e}];for(var r=e.split("<"),n=0;n<r.length;n++){var o=r[n];t.push({elePath:o})}return t}function getEleScroll(e){for(var t=0,r=0;e!=null&&e!==document.body;)t+=e.scrollTop||0,r+=e.scrollLeft||0,e=e.parentNode;return{scrollTop:t,scrollLeft:r}}function eleOffset(e){for(var t=0,r=0,n=getEleScroll(e),o=n.scrollTop,a=n.scrollLeft,s=!1;e&&e.tagName&&["canvas","svg","use","script","meta","style"].indexOf(e.tagName.toLowerCase())<0;){t+=e.offsetTop,r+=e.offsetLeft;try{var c=getConstantStyle(e,"transform");c&&c!=="none"&&(r+=parseFloat(c.substring(6).split(",")[4]),t+=parseFloat(c.substring(6).split(",")[5]))}catch{}try{var y=getConstantStyle(e,"position");y&&y==="fixed"&&(s=!0)}catch{}e=e.offsetParent}return s===!0&&(t+=o,r+=a,t+=document.body.scrollTop||document.documentElement.scrollTop||0,r+=document.body.scrollLeft||document.documentElement.scrollLeft||0),{top:t,left:r,hidden:!1,bodyScrollTop:document.documentElement.scrollTop||document.body.scrollTop||0,bodyScrollLeft:document.documentElement.scrollLeft||document.body.scrollLeft||0,eleScrollTop:o,eleScrollLeft:a}}function getConstantStyle(e,t){var r=document.defaultView;return r&&r.getComputedStyle?document.defaultView.getComputedStyle(e,null)[t]:e.currentStyle?e.currentStyle[t]:0}function setIndex(e,t){var r=parserDom(t);if(r.length===0)return 0;var n=r[0];n.elePath.indexOf("#")>-1&&(n.elePath="#"+n.elePath.split("#")[1]);for(var o=Util$1.selectorAllEleList(n.elePath),a=0,s=0;s<o.length;s++)if(pathContrast({path:domParentList(o[s]).path},{path:t})===!0){if(o[s]===e)return a;a++}return 0}function backH5PathProPath(e,t){return Util$1.arrayMerge([],t.h5_path)}function getRelated(e,t,r,n){if(!e)return{};Util$1.paramType(e)==="Object"&&(e=[e]);for(var o={},a=[],s={},c=0;c<e.length;c++){var y=e[c],p=y.target.h5_path,m=y.target.step;if(p){var w=parseNewPath(p,m,n),b=w?getElementContent(w,!0):"",S=getProperties(y.properties,b);o=Util$1.objMerge(o,S)}else a.push(y)}if(a.length>0){if(Util$1.isiOS!==!1)return HybridAns.visitorProperties[r]=function(d){return function(l){d=Util$1.objMerge(d,l),t(d)}}(o),void(window.AnalysysModule&&window.AnalysysModule.moduleStatus===!0?window.AnalysysModule.getPro(a,r):window.webkit.messageHandlers.AnalysysAgentGetProperty.postMessage([JSON.stringify(a),r]));s=window.AnalysysAgentHybrid.getProperty(JSON.stringify(a)),Util$1.paramType(s)==="String"&&(s=JSON.parse(s)),o=Util$1.objMerge(o,s)}else Util$1.isiOS===!0&&baseConfig.base.isHybrid===!0&&t&&t(o);return o}function getProperties(e,t){for(var r={},n=0;n<e.length;n++){var o=e[n],a=o.prop_type;t=Util$1.objHasKay(o,"value")===!0?o.value:t;var s=o.regex,c=o.key;if(s)try{s=Util$1.decode(s),t=new RegExp(s).exec(t)}catch{}if(a==="number")try{t=Number(t)}catch{}else if(a==="bool")Util$1.paramType(t)!=="Boolean"&&(t==="true"||t==="1"?t=!0:t!=="false"&&t!=="0"||(t=!1));else try{t=t.toString()}catch{}r[c]=t}return r}function backEasyPath(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].tagName);return t.join(">")}function checkNewPathBase(e,t){if(!t)return!!e;var r=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(t));r.reverse(),n.reverse();var o=backEasyPath(r),a=backEasyPath(n);return o.indexOf(a)>-1}function getJSON(e){if(Util$1.paramType(e)==="String"){e.indexOf(`
|
|
27
|
-
`)>-1&&(e=e.replace(/[\r\n]/g,""));try{return JSON.parse(e)}catch{}try{return window.AnalysysModule.zipInflate(e)}catch{}return e==="H4sIAAAAAAAAAKtWSs5PSVWyMjIwqAUAVAOW6gwAAAA="?{code:200}:e==="H4sIAAAAAAAAAKtWSs5PSVWyMjUwqAUA7TtBdwwAAAA="?{code:500}:e==="H4sIAAAAAAAAAKtWSs5PSVWyMjEy0FHKLU5XslJySSxJVHBJTS6qLChRcC0qyi/S01OqBQBdATGSKQAAAA=="?{code:420}:{code:200}}return Util$1.paramType(e)==="Object"?e:{code:200}}function GetHttpObj(){var e=null;if(window.XDomainRequest)return new window.XDomainRequest;if(window.XMLHttpRequest)e=new window.XMLHttpRequest;else try{e=new window.ActiveXObject("Microsoft.XMLHTTP")}catch{try{e=new window.ActiveXObject("Msxml2.XMLHTTP")}catch{e=new window.XMLHttpRequest}}return e}function xmlhttp(e){var t=!1,r=new GetHttpObj;r.onload=function(){t||(t=!0,e.success(getJSON(r.responseText),r))},r.onerror=function(){t||(t=!0,e.error(getJSON(r.responseText),r))},r.onreadystatechange=function(a,s){return function(){if(a.readyState===4){try{if(a.getAllResponseHeaders().indexOf("Date")>-1||a.getAllResponseHeaders().indexOf("date")>-1){var c=+new Date,y=a.getResponseHeader("Date")||a.getResponseHeader("date");y&&baseConfig.base.allowTimeCheck===!0?Storage$1.setLocal("ANSSERVERTIME",+new Date(y)-c):Storage$1.setLocal("ANSSERVERTIME",0)}}catch{}if(a.status>=200&&a.status<300||a.status===304){if(t)return;t=!0,s.success(getJSON(a.responseText),a)}else{if(t)return;t=!0,s.error()}a.onreadystatechange=null,a.onload=null}}}(r,e);try{r.open(e.type,e.url,!0);try{r.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch{}var n=baseConfig.base.sendDataTimeout;if(e.type==="GET"?(n=baseConfig.base.getDataTimeout,r.send(null)):r.send(e.data),Util$1.paramType(n)==="Number")if(Util$1.paramType(r.timeout)==="Number")r.timeout=n;else{var o=function(a){return function(){a.abort()}}(r);setTimeout(o,n)}}catch{}}function ajax(){this.url="",this.data="",this.type="GET",this.success=function(){},this.error=function(){}}function getMsg(e){Util$1.addEvent(window,"message",function(t){var r=t.data;try{Util$1.paramType(r)==="String"&&(r=JSON.parse(r))}catch{}console.log("获取可视化消息===>",JSON.stringify(r,null,2)),e(r)})}ajax.prototype.get=function(e){var t=[];for(var r in e.data)t.push(r+"="+encodeURIComponent(e.data[r]));var n=e.url.indexOf("?")>-1?e.url+"&"+t.join("&"):e.url+"?"+t.join("&");this.url=n,this.data=e.data,this.type="GET",this.success=e.success||function(){},this.error=e.error||function(){},xmlhttp(this)},ajax.prototype.post=function(e){this.url=e.url,this.data=e.data,this.type="POST",this.success=e.success||function(){},this.error=e.error||function(){},xmlhttp(this)};var visitorConfig={},patt=/\d{13}/g,clickEleObj={path:"",index:0,ele:null,newPath:{},elePostion:{}};function loadVisitorSDK(){var e=[];Util$1.addScript("AnalysysAgent_JS_SDK_VISUAL",visitorConfig.SDKFileDirectory,function(){if(window.AnalysysModule&&window.AnalysysModule.visual)for(var t=0;t<e.length;t++)window.AnalysysModule.visual.msg(e[t])}),window.ARK_VISUAL={config:visitorConfig},Storage$1.setSession("visitor",!0),getMsg(function(t){window.AnalysysModule&&window.AnalysysModule.visual?window.AnalysysModule.visual.msg(t):e.push(t)})}function IsReverse(e){return e.split("").reverse().join("")}function checkPointBase(e,t){var r=IsReverse(e),n=IsReverse(t);return r.indexOf(n)>-1}function addElesListener(){visitorConfig.isHybrid===!0&&(visitorEventList=HybridAns.visitorEventList);var e=domParentList(clickEleObj.ele),t=parsePath(e.path);clickEleObj.elePath=t.clickPath,clickEleObj.path=e.path,clickEleObj.newPath=e.newPath;for(var r=[],n=0;n<visitorEventList.length;n++){var o=Util$1.toDeep(visitorEventList[n]);o.newPath=o.new_path;var a=o.path,s=o.index,c=o.newPath,y=o.bindings,p=o.eleClass,m=!1;(c||y)&&checkNewPathBase(clickEleObj.newPath,c)==1&&pathContrast(clickEleObj,o)===!0?m=!0:c||y||checkPointBase(clickEleObj.elePath,a)!==!0||(clickEleObj.index=setIndex(clickEleObj.ele,clickEleObj.path),(p===clickEleObj.eleClass&&s===clickEleObj.index||pathContrast(clickEleObj,o)===!0)&&(m=!0)),m===!0&&(o.ele=clickEleObj.ele,o.elePostion=clickEleObj.elePostion,r.push(o))}for(var w=0;w<r.length;w++){var b=r[w],S=b.new_path,d=b.bindings,l=b.ele,u=b.appEventId||b.event_id,g=b.isText;if(S||d){var h="Track"+ +new Date,$=function(C,E,_){return function(T){T=T||{},E&&E.length>0&&(T=Util$1.objMerge(T,getProperties(E))),T=Util$1.delEmpty(T),visitorConfig.isHybrid===!0?Util$1.isiOS===!0&&window.AnalysysModule&&window.AnalysysModule.moduleStatus===!0?window.AnalysysModule.track(C,T,_):Util$1.isiOS===!0?window.webkit.messageHandlers.AnalysysAgentTrack.postMessage([C,JSON.stringify(T),JSON.stringify(_)]):window.AnalysysAgentHybrid.AnalysysAgentTrack(C,JSON.stringify(T),JSON.stringify(_)):window.AnalysysAgent.track(C,T)}}(u,b.properties,b.elePostion);if(b.related&&b.related.length>0)for(var v=0;v<b.related.length;v++){var A=b.related[v].target;A.h5_path&&(A.path=A.h5_path,b.related[v].target.h5_path=backH5PathProPath(b.newPath,A))}else b.related=[];if(Util$1.isiOS===!0&&visitorConfig.isHybrid===!0)return void getRelated(b.related,$,h,l);$(getRelated(b.related,null,null,l))}else g?g===getElementContent(l)&&window.AnalysysAgent.track(u):window.AnalysysAgent.track(u)}}var visitorEventList=[];function getVisitorEvent(){if(visitorConfig.isHybrid===!0){if(window.AnalysysModule&&window.AnalysysModule.moduleStatus===!0)window.AnalysysModule.eventList();else if(Util$1.isiOS===!0&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.AnalysysAgentGetEventList)window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.AnalysysAgentGetEventList.postMessage([]);else if(window.AnalysysAgentHybrid){var e=window.AnalysysAgentHybrid.getEventList();e&&HybridAns.onEventList(e)}}else if(visitorConfig.visitorConfigURL){var t=window.location.hash;t&&t.indexOf("?")>-1&&(t=t.split("?")[0]);var r=window.location.protocol+"//"+window.location.host+window.location.pathname+t;visitorEventList=[],getPoint(r)}}function parsePath(e){for(var t=e.split("<"),r=t[0].split(".")[1]||"",n=[],o=0;o<t.length;o++)n.push(t[o].split(".")[0]);return{class:r,clickPath:n.join("<")}}function getPoint(e){var t=visitorConfig.visitorConfigURL+"configure",r={url:t,data:{appkey:visitorConfig.appid,lib:"Js",url:e},success:function(n){if((n=visitorConfig.visitorEventList||n).code===0){for(var o=[],a=[],s=0;s<n.data.length;s++){var c=n.data[s],y=parsePath(c.link),p=c.index,m=y.clickClass,w=y.clickPath,b=c.isText,S=c.link;patt.test(S)===!0&&(S=S.replace(patt,"")),o.push({index:p,eleClass:m,elePath:w,isText:b,path:S,appEventId:c.appEventId,new_path:c.new_path,bindings:c.props_binding,related:c.related,properties:c.properties});var d={eventID:c.appEventId,eventName:c.appEventName||""};a.push(d)}visitorEventList=o,successLog("Get Visual Event List from "+t),successLog(JSON.stringify(a,null,2))}},error:function(){}};new ajax().get(r)}var url=window.location.href,detect$1=Util$1.detectZoom();function pcMouseOver(e){var t=!1;e.touches&&e.touches.length>0&&(e=e.touches[0],t=!0);for(var r=e.target||e.srcElement,n=Util$1.paramType(r.className)!=="String"?[]:r.className.split(" "),o="",a=0;a<n.length;a++)n[a]&&n[a].indexOf("ARK")<0&&(o+="."+n[a]);(clickEleObj={ele:r,eleClass:o,index:0}).elePostion={$pos_left:e.clientX*detect$1,$pos_top:e.clientY*detect$1,$pos_width:r.offsetWidth*detect$1,$pos_height:r.offsetHeight*detect$1},t?addElesListener():Util$1.addEvent(r,"mousedown",addElesListener,!0)}function pcMouseOut(e){var t=(e=e||window.event).target||e.srcElement;clickEleObj={},Util$1.removeEvent(t,"mousedown",addElesListener,!0)}function addEventListener(){Util$1.deviceType()==="desktop"&&visitorConfig.isHybrid===!1?(Util$1.addEvent(document,"mouseover",pcMouseOver,!0),Util$1.addEvent(document,"mouseout",pcMouseOut,!0)):Util$1.addEvent(document,"touchstart",pcMouseOver,!0),Util$1.changeHash(function(){url!==window.location.href&&(url=window.location.href,getVisitorEvent())})}function visitorInit(e){return(visitorConfig=e).visitorConfigURL=Util$1.trim(visitorConfig.visitorConfigURL),e.isHybrid===!1&&window.self!==window.top&&(Util$1.GetUrlParam("visual")||Storage$1.getSession("visitor")===!0&&window.location.href.indexOf("arkheatmap=true")<0)?document.getElementById("AnalysysAgent_JS_SDK_VISUAL")||loadVisitorSDK():(visitorConfig.visitorConfigURL||e.isHybrid===!0)&&(visitorConfig.visitorConfigURL&&visitorConfig.visitorConfigURL.charAt(visitorConfig.visitorConfigURL.length-1)!=="/"&&(visitorConfig.visitorConfigURL+="/"),getVisitorEvent(),addEventListener()),e}var lifecycle$1={AnalysysAgent:{init:visitorInit}},visitor=Object.freeze({__proto__:null,fieldRules:fieldRules$1,fieldTemplate:fieldTemplate$1,lifecycle:lifecycle$1}),startDate=+new Date,root=null;function setRootEle(e){root=e||document.body}function getViewPortWidth(){return document.documentElement.clientWidth||document.body.clientWidth}function getViewPortHeight(){return document.documentElement.clientHeight||document.body.clientHeight}function getScrollTop(){return root.scrollTop||document.documentElement.scrollTop||document.body.scrollTop}function getDuration(){var e=+new Date,t=e-startDate;if(startDate=e,Util$1.paramType(baseConfig.base.webstayDuration)==="Number"&&baseConfig.base.webstayDuration>0){if(t>baseConfig.base.webstayDuration)return baseConfig.base.webstayDuration}else if(t>18e6)return 18e6;return t}function getDeviceType(){return Util$1.deviceType()}var fieldRules$2={autoWebstay:{check:{value:["isBoolean"]}},xcontext:{$viewport_width:{valueType:0,value:getViewPortWidth},$viewport_position:{valueType:0,value:getScrollTop},$viewport_height:{valueType:0,value:getViewPortHeight},$event_duration:{valueType:0,value:getDuration},$device_type:{valueType:0,value:getDeviceType}}},fieldTemplate$2={$webstay:{xcontext:["$referrer","$referrer_domain","$title","$url","$viewport_width","$viewport_position","$viewport_height","$event_duration","$device_type","$session_id","$is_time_calibrated","$is_first_day"]}},elePostion={ele:"",click_x:0,click_y:0,clickEle:""};function domParentList$1(e){for(var t=[],r=e;r!=null;){var n=0;if(r.parentNode){var o=r.parentNode.children;if(o)for(var a=0;a<o.length;a++)o[a]===r&&(n=a)}var s=r.tagName;if(s){s=s.toLowerCase();var c=r.id?"#"+r.id:"",y=r.className&&Util$1.paramType(r.className)==="String"?r.className.split(" "):[];if(y.length>0){for(var p="",m=0;m<y.length;m++)y[m]&&y[m].indexOf("ARK")<0&&(p+="."+y[m]);t.push(s+c+p+"|"+n)}else t.push(s+c+"|"+n);r=r.parentNode}else r=r.parentNode}return t.join("<")}function getPageWidth(){return document.documentElement.scrollWidth}function getPageHeight(){return document.documentElement.scrollHeight}function getClickX(){return elePostion.click_x}function getClickY(){return elePostion.click_y}function getElementPath(){return domParentList$1(elePostion.ele)}function getUrlPath(){var e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.hash;try{e=decodeURIComponent(e)}catch{}return baseConfig.base.isHybrid===!0&&(e=e.replace(/"/g,'\\"')),e}function getElementX(){return elePostion.elementX}function getElementY(){return elePostion.elementY}function getElementType(){return elePostion.ele.tagName.toLowerCase()}function getElementClick(){return Util$1.paramType(elePostion.ele.onclick)==="Function"}function getElementAttrClick(){return elePostion.ele&&elePostion.ele.getAttribute("data-ark-click")!==null}function checkElementConfig(e){if(!e||Util$1.paramType(e)==="Array"&&e.length===0||Util$1.paramType(e)==="String"&&e==="")return!1;var t=elePostion.ele;if(Util$1.paramType(e)==="String"){var r=t.tagName.toLowerCase(),n=Util$1.paramType(t.className)==="String"?"."+t.className.split(" ").join("."):"",o=t.id?"#"+t.id:"";if(r===e.toLowerCase()||n===e||o===e||r+n===e||r+o===e||o+n===e||r+o+n===e)return!0}else if(Util$1.paramType(e)==="Array"){for(var a=0;a<e.length;a++)if(checkElementConfig(e[a])===!0)return!0}else{if(Util$1.paramType(e)==="Function")return e.call(e,t)||!1;if(typeof e=="object"&&e===t)return!0}return!1}function getParentClickableElement(){for(var e=elePostion.ele;elePostion.ele!=null;)if(elePostion.ele.nodeType===1){if(getElementClick()||getElementClickable()===1||getElementAttrClick()||checkElementConfig(baseConfig.base.trackList)){e=elePostion.ele;break}elePostion.ele=elePostion.ele.parentNode}else elePostion.ele=elePostion.ele.parentNode;elePostion.ele=e}function getElementClickable(){var e=getElementType();if(["a","button","input","select","textarea","svg"].indexOf(e)>-1||getElementAttrClick()||checkElementConfig(baseConfig.base.trackList)){if(e==="svg"&&elePostion.ele.children&&elePostion.ele.children.length>0){for(var t=0,r=elePostion.ele.children,n=0;n<r.length;n++)r[n].tagName.toLowerCase()==="use"&&(r[n].getAttribute("xlink:href")||getElementAttrClick()||checkElementConfig(baseConfig.base.trackList))&&(t=1);return t}return 1}return 0}function getEleContent(){return getElementContent(elePostion.ele)}function getDeviceType$1(){return Util$1.deviceType()}function getElementId(){return elePostion.ele.id||elePostion.ele.getAttribute("id")||""}function getElementName(){return elePostion.ele.getAttribute("name")||""}function getElementClassName(){var e=elePostion.ele.getAttribute("class")||"";if(e){for(var t=e.split(" "),r=[],n=0;n<t.length;n++)t[n]!==""&&r.push(t[n]);return e="."+r.join(".")}return""}function getElementTargetUrl(){var e=elePostion.ele.getAttribute("href");if(e&&e.indexOf("javascript:")<0){try{e=decodeURIComponent(e)}catch{}return baseConfig.base.isHybrid===!0&&(e=e.replace(/"/g,'\\"')),e}return""}function eleCss(e,t){var r,n,o,a;if(e){if(typeof t=="string")return getConstantStyle$1(e,t);if(Array.isArray(t)){for(o={},a=0,r=t.length;a<r;a++)o[n=t[a]]=getConstantStyle$1(e,n);return o}}}function eleScroll(e){for(var t=0,r=0;e!=null&&e!==document.body;)e.nodeType===1&&(t+=e.scrollTop,r+=e.scrollLeft),e=e.parentNode;return{scrollLeft:r,scrollTop:t}}function eleOffset$1(e){for(var t=0,r=0,n=!1,o=!1;e!=null;)t+=e.offsetTop,r+=e.offsetLeft,n||(n=!(eleCss(e,"display")!=="none"&&eleCss(e,"width")!=="0px"&&eleCss(e,"height")!=="0px")),eleCss(e,"position")==="fixed"&&(o=!0),e=e.offsetParent;return o===!0&&(t+=document.documentElement.scrollTop||document.body.scrollTop,r+=document.documentElement.scrollLeft||document.body.scrollLeft),{top:t,left:r,hidden:n}}function isElmentReady(){return!!(document&&document.documentElement&&document.getElementsByTagName&&document.getElementById&&document.body&&document.documentElement.scrollWidth!==0)}function getConstantStyle$1(e,t){var r=document.defaultView;return r&&r.getComputedStyle?document.defaultView.getComputedStyle(e,null)[t]:e.currentStyle[t]}(function(){if(typeof window=="object")if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=function(d){for(var l=window.document,u=o(l);u;)u=o(l=u.ownerDocument);return l}(),t=[],r=null,n=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return r||(r=function(d,l){n=d&&l?w(d,l):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach(function(u){u._checkForIntersections()})}),r},s._resetCrossOriginUpdater=function(){r=null,n=null},s.prototype.observe=function(d){if(!this._observationTargets.some(function(l){return l.element==d})){if(!d||d.nodeType!=1)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:d,entry:null}),this._monitorIntersections(d.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(d){this._observationTargets=this._observationTargets.filter(function(l){return l.element!=d}),this._unmonitorIntersections(d.ownerDocument),this._observationTargets.length==0&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var d=this._queuedEntries.slice();return this._queuedEntries=[],d},s.prototype._initThresholds=function(d){var l=d||[0];return Array.isArray(l)||(l=[l]),l.sort().filter(function(u,g,h){if(typeof u!="number"||isNaN(u)||u<0||u>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return u!==h[g-1]})},s.prototype._parseRootMargin=function(d){var l=(d||"0px").split(/\s+/).map(function(u){var g=/^(-?\d*\.?\d+)(px|%)$/.exec(u);if(!g)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(g[1]),unit:g[2]}});return l[1]=l[1]||l[0],l[2]=l[2]||l[0],l[3]=l[3]||l[1],l},s.prototype._monitorIntersections=function(d){var l=d.defaultView;if(l&&this._monitoringDocuments.indexOf(d)==-1){var u=this._checkForIntersections,g=null,h=null;if(this.POLL_INTERVAL?g=l.setInterval(u,this.POLL_INTERVAL):(c(l,"resize",u,!0),c(d,"scroll",u,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in l&&(h=new l.MutationObserver(u)).observe(d,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(d),this._monitoringUnsubscribes.push(function(){var v=d.defaultView;v&&(g&&v.clearInterval(g),y(v,"resize",u,!0)),y(d,"scroll",u,!0),h&&h.disconnect()}),d!=(this.root&&this.root.ownerDocument||e)){var $=o(d);$&&this._monitorIntersections($.ownerDocument)}}},s.prototype._unmonitorIntersections=function(d){var l=this._monitoringDocuments.indexOf(d);if(l!=-1){var u=this.root&&this.root.ownerDocument||e;if(!this._observationTargets.some(function($){var v=$.element.ownerDocument;if(v==d)return!0;for(;v&&v!=u;){var A=o(v);if((v=A&&A.ownerDocument)==d)return!0}return!1})){var g=this._monitoringUnsubscribes[l];if(this._monitoringDocuments.splice(l,1),this._monitoringUnsubscribes.splice(l,1),g(),d!=u){var h=o(d);h&&this._unmonitorIntersections(h.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var d=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var l=0;l<d.length;l++)d[l]()},s.prototype._checkForIntersections=function(){if(this.root||!r||n){var d=this._rootIsInDom(),l=d?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(u){var g=u.element,h=p(g),$=this._rootContainsTarget(g),v=u.entry,A=d&&$&&this._computeTargetAndRootIntersection(g,h,l),C=u.entry=new a({time:window.performance&&performance.now&&performance.now(),target:g,boundingClientRect:h,rootBounds:r&&!this.root?null:l,intersectionRect:A});v?d&&$?this._hasCrossedThreshold(v,C)&&this._queuedEntries.push(C):v&&v.isIntersecting&&this._queuedEntries.push(C):this._queuedEntries.push(C)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(d,l,u){if(window.getComputedStyle(d).display!="none"){for(var g,h,$,v,A,C,E,_,T=l,U=S(d),O=!1;!O&&U;){var k=null,N=U.nodeType==1?window.getComputedStyle(U):{};if(N.display=="none")return null;if(U==this.root||U.nodeType==9)if(O=!0,U==this.root||U==e)r&&!this.root?!n||n.width==0&&n.height==0?(U=null,k=null,T=null):k=n:k=u;else{var L=S(U),P=L&&p(L),R=L&&this._computeTargetAndRootIntersection(L,P,u);P&&R?(U=L,k=w(P,R)):(U=null,T=null)}else{var I=U.ownerDocument;U!=I.body&&U!=I.documentElement&&N.overflow!="visible"&&(k=p(U))}if(k&&(g=k,h=T,$=void 0,v=void 0,A=void 0,C=void 0,E=void 0,_=void 0,$=Math.max(g.top,h.top),v=Math.min(g.bottom,h.bottom),A=Math.max(g.left,h.left),C=Math.min(g.right,h.right),_=v-$,T=(E=C-A)>=0&&_>=0&&{top:$,bottom:v,left:A,right:C,width:E,height:_}||null),!T)break;U=U&&S(U)}return T}},s.prototype._getRootRect=function(){var d;if(this.root)d=p(this.root);else{var l=e.documentElement,u=e.body;d={top:0,left:0,right:l.clientWidth||u.clientWidth,width:l.clientWidth||u.clientWidth,bottom:l.clientHeight||u.clientHeight,height:l.clientHeight||u.clientHeight}}return this._expandRectByRootMargin(d)},s.prototype._expandRectByRootMargin=function(d){var l=this._rootMarginValues.map(function(g,h){return g.unit=="px"?g.value:g.value*(h%2?d.width:d.height)/100}),u={top:d.top-l[0],right:d.right+l[1],bottom:d.bottom+l[2],left:d.left-l[3]};return u.width=u.right-u.left,u.height=u.bottom-u.top,u},s.prototype._hasCrossedThreshold=function(d,l){var u=d&&d.isIntersecting?d.intersectionRatio||0:-1,g=l.isIntersecting?l.intersectionRatio||0:-1;if(u!==g)for(var h=0;h<this.thresholds.length;h++){var $=this.thresholds[h];if($==u||$==g||$<u!=$<g)return!0}},s.prototype._rootIsInDom=function(){return!this.root||b(e,this.root)},s.prototype._rootContainsTarget=function(d){return b(this.root||e,d)&&(!this.root||this.root.ownerDocument==d.ownerDocument)},s.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},s.prototype._unregisterInstance=function(){var d=t.indexOf(this);d!=-1&&t.splice(d,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=a}function o(d){try{return d.defaultView&&d.defaultView.frameElement||null}catch{return null}}function a(d){this.time=d.time,this.target=d.target,this.rootBounds=m(d.rootBounds),this.boundingClientRect=m(d.boundingClientRect),this.intersectionRect=m(d.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!d.intersectionRect;var l=this.boundingClientRect,u=l.width*l.height,g=this.intersectionRect,h=g.width*g.height;this.intersectionRatio=u?Number((h/u).toFixed(4)):this.isIntersecting?1:0}function s(d,l){var u,g,h,$=l||{};if(typeof d!="function")throw new Error("callback must be a function");if($.root&&$.root.nodeType!=1)throw new Error("root must be an Element");this._checkForIntersections=(u=this._checkForIntersections.bind(this),g=this.THROTTLE_TIMEOUT,h=null,function(){h||(h=setTimeout(function(){u(),h=null},g))}),this._callback=d,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin($.rootMargin),this.thresholds=this._initThresholds($.threshold),this.root=$.root||null,this.rootMargin=this._rootMarginValues.map(function(v){return v.value+v.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function c(d,l,u,g){typeof d.addEventListener=="function"?d.addEventListener(l,u,g):typeof d.attachEvent=="function"&&d.attachEvent("on"+l,u)}function y(d,l,u,g){typeof d.removeEventListener=="function"?d.removeEventListener(l,u,g):typeof d.detatchEvent=="function"&&d.detatchEvent("on"+l,u)}function p(d){var l;try{l=d.getBoundingClientRect()}catch{}return l?(l.width&&l.height||(l={top:l.top,right:l.right,bottom:l.bottom,left:l.left,width:l.right-l.left,height:l.bottom-l.top}),l):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function m(d){return!d||"x"in d?d:{top:d.top,y:d.top,bottom:d.bottom,left:d.left,x:d.left,right:d.right,width:d.width,height:d.height}}function w(d,l){var u=l.top-d.top,g=l.left-d.left;return{top:u,left:g,height:l.height,width:l.width,bottom:u+l.height,right:g+l.width}}function b(d,l){for(var u=l;u;){if(u==d)return!0;u=S(u)}return!1}function S(d){var l=d.parentNode;return d.nodeType==9&&d!=e?o(d):l&&l.nodeType==11&&l.host?l.host:l&&l.assignedSlot?l.assignedSlot.parentNode:l}})();var interval=null,topValue=0;function initWebStay(){function e(){return isRoot===!0?document.documentElement.scrollTop||document.body.scrollTop:rootEle.scrollTop||0}function t(){var r=e();topValue===r&&(clearTimeout(interval),interval=null,window.AnalysysAgent&&window.AnalysysAgent.freeApi?window.AnalysysAgent.freeApi("$webstay"):setTimeout(function(){t()},100))}Util$1.addEvent(rootEle,"scroll",function(){clearTimeout(interval),interval=setTimeout(t,1e3),topValue=e()})}function getChildEle(e){for(var t=(e||document.body).childNodes,r=document.body,n=0;n<t.length;n++)if(t[n].nodeType===1){if(hasScrollbar(t[n])===!0)return isRoot=!1,t[n];r=getChildEle(t[n])}return r}function hasScrollbar(e){var t=0,r=0,n=document.body.scrollHeight;return e?(t=e.scrollHeight,r=e.clientHeight):(t=document.body.scrollHeight,r=window.innerHeight||document.documentElement.clientHeight),t>r&&t>n}var rootEle=null,isRoot=!0;function getRootEle(e){var t=null;if(e.autoHeatmap===!0&&e.autoWebstay===!0&&e.isHybrid===!1){var r=e.webstayRootEle;if(r)if(Util$1.paramType(r)==="String"){var n=Util$1.selectorAllEleList(r);n.length>0&&(t=n[0])}else Util$1.paramType(r)==="Function"?t=r.call(r)||null:typeof r=="object"&&r.nodeType===1&&(t=r);t?(isRoot=!1,rootEle=t):rootEle=getChildEle(),rootEle!==document.body&&rootEle||(rootEle=window),setRootEle(rootEle),initWebStay()}}function autoWebstayInit(e){return window.location.href.indexOf("visual=true")>-1||window.location.href.indexOf("arkheatmap=true")>-1||(isElmentReady()===!1?setTimeout(function(){autoWebstayInit(e)},300):getRootEle(e)),e}var lifecycle$2={AnalysysAgent:{init:autoWebstayInit}},webstay=Object.freeze({__proto__:null,fieldRules:fieldRules$2,fieldTemplate:fieldTemplate$2,lifecycle:lifecycle$2}),fieldRules$3={autoHeatmap:{check:{value:["isBoolean"]}},xcontext:{$page_width:{valueType:0,value:getPageWidth},$page_height:{valueType:0,value:getPageHeight},$click_x:{valueType:0,value:getClickX},$click_y:{valueType:0,value:getClickY},$element_path:{valueType:0,value:getElementPath},$url_path:{valueType:0,value:getUrlPath},$element_x:{valueType:0,value:getElementX},$element_y:{valueType:0,value:getElementY},$element_type:{valueType:0,value:getElementType},$element_clickable:{valueType:0,value:getElementClickable},$element_content:{valueType:0,value:getEleContent},$device_type:{valueType:0,value:getDeviceType$1},$element_id:{valueType:0,value:getElementId},$element_name:{valueType:0,value:getElementName},$element_target_url:{valueType:0,value:getElementTargetUrl},$element_class_name:{valueType:0,value:getElementClassName}}},fieldTemplate$3={$web_click:{xcontext:["$page_width","$page_height","$click_x","$click_y","$element_path","$url_path","$url","$title","$session_id","$device_type","$session_id","$is_time_calibrated","$element_x","$element_y","$element_type","$element_clickable","$element_content","$is_first_day","$element_id","$element_name","$element_target_url","$element_class_name"]}},heatmapConfig={};function loadHeatmapSDK(){document.body&&document.getElementsByTagName("body")[0]?(Util$1.addScript("AnalysysAgent_JS_SDK_HEATMAP",heatmapConfig.SDKFileDirectory),window.ARK_HEATMAP={config:heatmapConfig}):setTimeout(loadHeatmapSDK,50)}function addClickEvent(e){var t=e||window.event;t.touches&&t.touches.length>0&&(t=t.touches[0]);var r=t.target||t.srcElement;if(!(Util$1.checkTypeList(heatmapConfig.heatMapBlackList,r)||heatmapConfig.heatMapWhiteList&&!Util$1.checkTypeList(heatmapConfig.heatMapWhiteList,r))){var n=document.documentElement.scrollLeft||document.body.scrollLeft,o=document.documentElement.scrollTop||document.body.scrollTop,a=t.pageX||t.clientX+n,s=t.pageY||t.clientY+o;elePostion.click_x=a,elePostion.click_y=s,elePostion.clickEle=elePostion.ele=r,getParentClickableElement();var c=eleScroll(elePostion.ele),y=eleOffset$1(elePostion.ele);elePostion.elementX=a-(y.left-c.scrollLeft),elePostion.elementY=s-(y.top-c.scrollTop),!a||!s||a<=0||s<=0||(window.AnalysysAgent&&window.AnalysysAgent.freeApi?window.AnalysysAgent.freeApi("$web_click"):setTimeout(function(){addClickEvent(e)},100))}}function initHeatmap(){Util$1.deviceType()=="desktop"?Util$1.addEvent(document,"click",addClickEvent):Util$1.addEvent(document,"touchstart",addClickEvent)}function heatmapInit(e){return heatmapConfig=e,window.location.href.indexOf("arkheatmap=true")>-1||window.name.indexOf("arkheatmap=true")>-1?(window.name===""&&(window.name=window.location.href),loadHeatmapSDK()):e.autoHeatmap===!0&&e.isHybrid===!1&&initHeatmap(),e}for(var lifecycle$3={AnalysysAgent:{init:heatmapInit}},heatmap=Object.freeze({__proto__:null,fieldRules:fieldRules$3,fieldTemplate:fieldTemplate$3,lifecycle:lifecycle$3}),fieldRules$4={xcontext:{$user_agent:{valueType:1,value:window.navigator.userAgent.replace(/"/g,'\\"')}}},temp={},event=["$startup","$track","$pageview","$webstay","$web_click","$user_click"],common={xcontext:["$user_agent"]},i=0;i<event.length;i++)temp[event[i]]=common;var ua=Object.freeze({__proto__:null,fieldRules:fieldRules$4,fieldTemplate:temp}),fieldRules$5={xcontext:{$page_width:{valueType:0,value:getPageWidth},$page_height:{valueType:0,value:getPageHeight},$element_path:{valueType:0,value:getElementPath},$url_path:{valueType:0,value:getUrlPath},$element_type:{valueType:0,value:getElementType},$element_clickable:{valueType:0,value:getElementClickable},$element_content:{valueType:0,value:getEleContent},$device_type:{valueType:0,value:getDeviceType$1},$element_id:{valueType:0,value:getElementId},$element_name:{valueType:0,value:getElementName},$element_target_url:{valueType:0,value:getElementTargetUrl},$element_class_name:{valueType:0,value:getElementClassName}}},fieldTemplate$4={$user_click:{xcontext:["$url_path","$url","$title","$is_first_day","$session_id","$is_time_calibrated","$device_type","$element_type","$element_path","$element_content","$element_id","$element_name","$element_target_url","$element_class_name"]}},userClickConfig={};function addClickEvent$1(e){var t=e||window.event;t.touches&&t.touches.length>0&&(t=t.touches[0]);var r=t.target||t.srcElement;if(!(Util$1.checkTypeList(userClickConfig.autoClickBlackList,r)||userClickConfig.autoClickWhiteList&&!Util$1.checkTypeList(userClickConfig.autoClickWhiteList,r))&&(elePostion.ele=r,getParentClickableElement(),getElementClickable()===1)){var n=userClickConfig.user_click_property,o={};if(Util$1.paramType(n)==="Object"){for(var a in n)Util$1.paramType(n[a])==="Function"&&(n[a]=n[a].call(n[a],r));o=n}else Util$1.paramType(n)==="Function"&&(o=n.call(n,r));var s=elePostion.ele.getAttribute("data-ark-click")||{};if(Util$1.paramType(s)==="String")try{s=JSON.parse(s)}catch{}Util$1.paramType(s)!=="Object"&&(s={}),Util$1.paramType(o)==="Object"&&(s=Util$1.objMerge(o,s)),window.AnalysysAgent.freeApi("$user_click",s)}}function addListenerUserClick(){Util$1.deviceType()==="desktop"?Util$1.addEvent(document,"mousedown",addClickEvent$1):Util$1.addEvent(document,"touchstart",addClickEvent$1)}function userClickInit(e){return userClickConfig=e,e.autoTrack===!0&&addListenerUserClick(),e}for(var lifecycle$4={AnalysysAgent:{init:userClickInit}},userClick=Object.freeze({__proto__:null,fieldRules:fieldRules$5,fieldTemplate:fieldTemplate$4,lifecycle:lifecycle$4}),plugList=[visitor,webstay,heatmap,ua,userClick],fieldRules$6=fieldRules||{},fieldTemplate$5=fieldTemplate||{},lifecycle$5=lifecycle||{},i$1=0;i$1<plugList.length;i$1++)plugList[i$1].fieldRules&&(fieldRules$6=Util$1.objMerge(fieldRules$6,plugList[i$1].fieldRules)),plugList[i$1].fieldTemplate&&(fieldTemplate$5=Util$1.objMerge(fieldTemplate$5,plugList[i$1].fieldTemplate)),plugList[i$1].lifecycle&&(lifecycle$5=Util$1.fnMerge(lifecycle$5,plugList[i$1].lifecycle));for(var eventTemp={},commonTemp={},baseTemp=fieldTemplate$5.base,outerTemp=baseTemp.outer,i$2=0;i$2<outerTemp.length;i$2++)baseTemp[outerTemp[i$2]]?commonTemp[outerTemp[i$2]]=Util$1.toObj(baseTemp[outerTemp[i$2]]):commonTemp[outerTemp[i$2]]="";for(var key in fieldTemplate$5)if(key!=="base"){var keyTemp=Util$1.toDeepObj(fieldTemplate$5[key]);eventTemp[key+"base"]=keyTemp,eventTemp[key]=Util$1.objMerge(commonTemp,keyTemp)}function temp$1(e){return eventTemp[e]||eventTemp.commonTemp}eventTemp.commonTemp=commonTemp;var CheckField=function(){};CheckField.prototype=Util$1,CheckField.prototype.isString=function(e){return baseConfig.status.errorCode="60001",Util$1.paramType(e)==="String"},CheckField.prototype.isNumber=function(e){return baseConfig.status.errorCode="60002",Util$1.paramType(e)==="Number"},CheckField.prototype.isBoolean=function(e){return baseConfig.status.errorCode="60003",Util$1.paramType(e)==="Boolean"},CheckField.prototype.isObject=function(e){return this.paramType(e)==="Object"},CheckField.prototype.lengthRule=function(e,t,r){this.isNumber(r)||(r=1/0);var n=!0;return this.isNumber(t)&&e.length&&e.length>t&&e.length<r+1||(baseConfig.status.errorCode="60005",n=!1),n},CheckField.prototype.nimLength=function(e){return this.lengthRule(e,0)},CheckField.prototype.length99=function(e){var t=this.lengthRule(e,0,99);return t||(baseConfig.status.errorCode="600010"),t},CheckField.prototype.length125=function(e){var t=this.lengthRule(e,0,125);return t||(baseConfig.status.errorCode="60009"),t},CheckField.prototype.length255=function(e){if(!(e||this.isString(e)||this.isNumber(e)||this.isBoolean(e)))return baseConfig.status.errorCode="60005",!1;this.paramType(e)!=="String"&&(e=e.toString());var t=this.lengthRule(e,0,255);return t||(baseConfig.status.errorCode="600019"),t},CheckField.prototype.keyLength255=function(e){var t=this.length255(e);return t||(baseConfig.status.errorCode="600017"),t},CheckField.prototype.isUrl=function(e){var t=e;return new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/).test(t)===!0||(baseConfig.status.errorCode="60006",!1)},CheckField.prototype.isDebug=function(e){return!(!this.isNumber(e)||e!==0&&e!==1&&e!==2)},CheckField.prototype.notObject=function(e){var t=!this.isObject(e);return t||(baseConfig.status.errorCode="600020"),t},CheckField.prototype.notSpecialCharacters=function(e){return!(new RegExp("[\\u4E00-\\u9FA5]|[\\uFE30-\\uFFA0]","gi").test(e)||!/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e))||(baseConfig.status.errorCode="600011",!1)},CheckField.prototype.isArrayString=function(e){if(this.paramType(e)==="Array")for(var t=0;t<e.length;t++){if(this.paramType(e[t])!=="String")return baseConfig.status.errorCode="600013",!1;if(!this.length255(e[t]))return e[t]&&e[t].length>500&&(e[t]=Util$1.stringSlice(e[t],499)+"$"),baseConfig.status.value=e[t],!1}return!0},CheckField.prototype.keywords=function(e){return!(baseConfig.keywords.indexOf(e)>-1)||(baseConfig.status.errorCode="600012",!1)};var checkRule=new CheckField;function check(e,t){for(var r=0;r<t.length;r++)if(!checkRule[t[r]](e))return!1;return!0}function checkFields(e,t,r){var n=r.check,o=!0;if(!n)return o;var a=n.key,s=n.value||fieldRules$6.xcontextCommonRule.value;return a&&(baseConfig.status.code=200,o=check(e,a),baseConfig.status.key=e,o||(baseConfig.status.code=400,errorLog())),s&&(baseConfig.status.code=200,o=check(t,s),Util$1.paramType(t)!=="Array"&&(baseConfig.status.value=t),o||(baseConfig.status.code=400,errorLog())),o}function resetCode(){baseConfig.status={code:200,FnName:baseConfig.status.FnName,key:"",value:"",errorCode:"",successCode:""}}function fillField(e,t){var r=t||fieldRules$6,n={};for(var o in e){var a=e[o],s=r[o];if(s){var c="";if(Util$1.paramType(a)==="Object"){var y=fillField(a,s);n[o]=y}else Util$1.objHasKay(s,"valueType")&&(s.valueType===0&&(c=s.value(),Util$1.paramType(c)==="String"&&c.length>500?n[o]=Util$1.stringSlice(c,499)+"$":n[o]=c),s.valueType===1&&(c=s.value,Util$1.paramType(c)==="String"&&c.length>500?n[o]=Util$1.stringSlice(c,499)+"$":n[o]=c))}}return n}function clearCache(e){if(!(e=e||!1)){var t=baseConfig.base;for(var r in t)Util$1.paramType(t[r])!=="Object"&&(r==="$debug"||r==="appid"||r==="uploadURL")&&(Storage$1.getLocal("ANS"+r.toUpperCase())!==t[r]&&(e=!0),e&&Storage$1.setLocal("ANS"+r.toUpperCase(),t[r]))}return e&&(removeAliasId(),removeIdentifyId(),Storage$1.removeLocal("ARKSUPER"),Storage$1.removeSession("STARTUP"),Storage$1.setLocal("FRISTDAY",Util$1.format(new Date,"yyyyMMdd")),Storage$1.setLocal("FRISTIME",!0),Storage$1.removeLocal("POSTDATA"),Storage$1.removeLocal("ANSSERVERTIME"),Storage$1.removeLocal("ARKFRISTPROFILE")),e}function isStartUp(){var e=Storage$1.getSession("STARTUP")||!1,t=Storage$1.getCookie("ARK_STARTUP");if(document.referrer!==""&&t&&baseConfig.base.cross_subdomain===!0){var r=JSON.parse(Util$1.decode(decodeURIComponent(t))),n=r.STARTUP,o=r.STARTUPTIME;Storage$1.setSession("STARTUP",n),Storage$1.setSession("STARTUPTIME",o),e=Storage$1.getSession("STARTUP")||!1}if(e===!1){var a=Util$1.format(new Date,"yyyy-MM-dd hh:mm:ss.SSS");Storage$1.setSession("STARTUP",!0),Storage$1.setSession("STARTUPTIME",a),sessionId.setId(),baseConfig.base.cross_subdomain===!0&&Storage$1.setCookie("ARK_STARTUP",encodeURIComponent(Util$1.encode(JSON.stringify({STARTUP:!0,STARTUPTIME:a}))),"session")}return e}function checkBase(){for(var e in baseConfig.base){resetCode(),baseConfig.status.key=e;var t=fieldRules$6[e];e==="$debug"&&(t=fieldRules$6.xcontext[e]),e==="$lib_version"&&(t=fieldRules$6.xcontext[e]);var r=t;if(r&&!checkFields(e,baseConfig.base[e],r))return baseConfig.base[e]="",!1;successLog()}return!0}function checkPrivate(e,t,r){resetCode();var n=fieldRules$6[t]||fieldRules$6.xcontextCommonRule;if(Util$1.paramType(e)!=="Object"||r===!0){var o=n.check.key,a=check(Util$1.trim(e),o);if(baseConfig.status.key=e,!a)return errorLog(),!1}else for(var s in e)checkFields(s,e[s],n)||baseConfig.status.errorCode==="600019"&&Util$1.paramType(e[s])==="String"&&e[s].length>500&&(e[s]=Util$1.stringSlice(e[s],499)+"$");return!0}var postStatus=!0,sendType="img",rxDangerous=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function delRx(e){if(Util$1.paramType(e)==="Array")for(var t=0;t<e.length;t++)e[t]=delRx(e[t]);if(Util$1.paramType(e)==="Object")for(var r in e){var n=e[r];e[r]=delRx(n)}if(Util$1.paramType(e)==="String"){var o=e.replace(rxDangerous,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)});return Util$1.paramType(o)!=="Sting"?e:o}return e}function sendPost(e,t){if(!(Util$1.GetUrlParam("visual")&&Util$1.GetUrlParam("visual").indexOf("true")>-1)){sendType!=="img"&&(postStatus=!1);var r=e;Util$1.paramType(e)==="Array"&&(e=delRx(e),r=JSON.stringify(e)),window.AnalysysModal&&typeof window.AnalysysModal=="function"&&window.AnalysysModal(e);var n=function(){postStatus=!0,baseConfig.status.errorCode="60008",errorLog(),Util$1.paramType(t)==="Function"&&t.call(t)},o=function(s){return function(c){c.code===200||c.code===400||c.code===4200?(baseConfig.status.successCode="20001",successLog(),function(y){postStatus=!0;var p=Storage$1.getLocal("POSTDATA")||[];if(Util$1.isEmptyObject(p)&&(p=[],Storage$1.removeLocal("POSTDATA")),p.length!==0){for(var m=[],w=0;w<p.length;w++){for(var b=!1,S=0;S<y.length;S++)y[S].xwhen!==p[w].xwhen&&y[S].xwhen&&p[w].xwhen||(b=!0);b!==!1||Util$1.paramType(p[w])!=="Object"||Util$1.isEmptyObject(p[w])||m.push(p[w])}m.length>0&&sendType!=="img"?(Storage$1.setLocal("POSTDATA",m),sendPost(m)):Storage$1.removeLocal("POSTDATA")}else Storage$1.removeLocal("POSTDATA")}(s),Util$1.paramType(t)==="Function"&&t.call(t)):n()}}(e),a={url:baseConfig.base.uploadURL+"up?appid="+baseConfig.base.appid,data:r,success:o,error:n};successLog("Send message to server: "+baseConfig.base.uploadURL+"up?appid="+baseConfig.base.appid+`
|
|
28
|
-
data:`+r),lifecycle$5.upload&&lifecycle$5.upload.init?a=lifecycle$5.upload.init(a):window.AnalysysModule&&Util$1.paramType(window.AnalysysModule)==="Object"&&Util$1.paramType(window.AnalysysModule.uploadData)==="Function"&&(window.AnalysysModule.encryptInit(baseConfig.base),a=window.AnalysysModule.uploadData(a)),sendType!=="img"?sendType!=="post"?sendType!=="send"?new ajax().post(a):snedGet(a,"send"):new ajax().post(a):snedGet(a,"img")}}function setValidKey(e){var t={data:e.data,send_type:""},r=[];for(var n in t)r.push(n+"="+encodeURIComponent(t[n]));var o=e.url.indexOf("?")>-1?e.url+"&"+r.join("&"):e.url+"?"+r.join("&");o=o.replace(baseConfig.base.uploadURL,"/");var a=Util$1.MD5(o,32).split(""),s=a[2]+""+a[0]+a[4];return t.send_type=s,t}function snedGet(e,t){if(t==="send"&&navigator.sendBeacon)navigator.sendBeacon(e.url,e.data)&&e.success({code:200});else if(t!=="send"||navigator.sendBeacon||(t="img"),e.data=Util$1.encode(e.data),e.data=setValidKey(e),t==="img"){var r=[];for(var n in e.data)r.push(n+"="+encodeURIComponent(e.data[n]));var o=e.url.indexOf("?")>-1?e.url+"&"+r.join("&"):e.url+"?"+r.join("&"),a=document.createElement("img"),s=null;a.width=1,a.height=1,a.onerror=a.onload=function(){clearTimeout(s),e.success({code:200}),this.src="",this.onload=null,this.onerror=null,this.onabort=null},a.onabort=function(){this.src="",this.onload=null,this.onerror=null,this.onabort=null,e.error()},Util$1.paramType(baseConfig.base.sendDataTimeout)==="Number"&&(s=setTimeout(function(){a.onabort()},baseConfig.base.sendDataTimeout)),a.src=o}}function checkLogBaseJson(e){if(Util$1.paramType(e)==="Object"&&!Util$1.isEmptyObject(e)){for(var t=!0,r=0;r<baseConfig.baseJson.length;r++){var n=baseConfig.baseJson[r];n!=="xwhat"&&(!e[n]||Util$1.paramType(e[n])==="Object"&&Util$1.isEmptyObject(e[n]))&&(t=!1)}return t}return!1}function checkSavaData(e){var t=[];if(Util$1.paramType(e)==="Array"&&e.length>0)for(var r=0;r<e.length;r++){var n=checkSavaData(e[r]);n.length>0&&t.push.apply(t,n)}return Util$1.paramType(e)==="Object"&&!Util$1.isEmptyObject(e)&&checkLogBaseJson(e)&&t.push(e),t}function upLog(e,t){try{baseConfig.base.sendType&&(sendType=baseConfig.base.sendType),baseConfig.base.uploadURL.charAt(baseConfig.base.uploadURL.length-1)!=="/"&&(baseConfig.base.uploadURL+="/");var r=[];if(sendType==="img")r=checkSavaData(e);else{var n=Storage$1.getLocal("POSTDATA")||[];(n=checkSavaData(n)).length===0&&Storage$1.removeLocal("POSTDATA"),r=n,n.length<500?r.push.apply(r,checkSavaData(e)):r=checkSavaData(e),Storage$1.setLocal("POSTDATA",r)}if(postStatus===!1&&sendType!=="img")return void(Util$1.paramType(t)==="Function"&&t.call(t));if(r.length>0)if(sendType==="img")for(var o=0;o<r.length;o++)o===0?sendPost([r[o]],t):sendPost([r[o]]);else sendPost(r,t)}catch{}}function loadIframeUrl(e,t){if(document.body){var r=document.createElement("iframe");r.setAttribute("src",e),r.setAttribute("id","AnalysysAgentIframe"),r.setAttribute("style","display:none;"),document.body.appendChild(r),r.parentNode.removeChild(r)}else setTimeout(function(){loadIframeUrl(e)},200)}function transporter(e,t,r,n){var o={functionName:e,functionParams:t};Util$1.paramType(r)==="String"?o.callbackFunName=r:Util$1.paramType(r)==="Function"&&(n=r);var a=JSON.stringify(o);successLog(`Send message to app:
|
|
29
|
-
data:`+a),window.AnalysysModule&&window.AnalysysModule.moduleStatus===!0?window.AnalysysModule.upData(o):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.AnalysysAgent?postMessage(o):window.AnalysysAgentHybrid&&window.AnalysysAgentHybrid.analysysHybridCallNative?callNative(a):loadIframeUrl("analysysagent:"+a),Util$1.paramType(n)==="Function"&&n.call(n)}function backParamsArray(){for(var e=arguments,t=[],r=null,n=0;n<e.length;n++)if(e[n]!==void 0){if(Util$1.paramType(e[n])==="Object")for(var o in e[n])Util$1.paramType(e[n][o])==="Function"&&(e[n][o]=e[n][o].call(e[n][o]));Util$1.paramType(e[n])==="Function"?r=e[n]:t.push(e[n])}return{argArray:t,callback:r}}function postMessage(e){window.webkit.messageHandlers.AnalysysAgent.postMessage(e)}function callNative(e){window.AnalysysAgentHybrid.analysysHybridCallNative(e)}var pageCloseStatus=!1,pageUrl=window.location.href;function pageView(e,t,r){upLog(pageViewLog(e,t,r),r)}function pageViewLog(e,t,r){var n=e,o=t,a=r;window.AnalysysModule&&window.AnalysysModule.pageClose&&(pageCloseStatus===!0?window.AnalysysModule.pageClose.pageEndTrack():pageCloseStatus=!0,Util$1.paramType(n)==="String"?window.AnalysysModule.pageClose.createTime(+new Date,n):window.AnalysysModule.pageClose.createTime(+new Date)),baseConfig.status.FnName="$pageview",resetCode();var s={};Util$1.paramType(n)==="String"?checkPrivate(s={$title:n}):Util$1.paramType(n)==="Object"?(Util$1.paramType(o)==="Function"&&(a=o),o=n,n=""):Util$1.paramType(n)==="Function"&&(a=n,o="",n=""),Util$1.paramType(o)==="Function"&&(a=o,o="");var c={};if(Util$1.paramType(o)==="Object"){for(var y in o)Util$1.paramType(o[y])==="Function"&&(o[y]=o[y].call(o[y]));baseConfig.base.isHybrid===!1&&checkPrivate(o),c={xcontext:o||{}}}var p=Storage$1.getLocal("ARKSUPER")||{};baseConfig.base.isHybrid===!0&&(p={});var m=Util$1.objMerge({xcontext:p},c);m=Util$1.objMerge(m,{xcontext:s});var w=temp$1("$pageview"),b=Util$1.delEmpty(fillField(w));if(baseConfig.base.isHybrid===!0){w=temp$1("$pageviewbase"),b=Util$1.delEmpty(fillField(w));var S=Util$1.objMerge(b,m),d=backParamsArray(n||"",S=Util$1.delNotHybrid(Util$1.delEmpty(S.xcontext)),a);return transporter("pageView",d.argArray,d.callback),void setReferrer(pageUrl)}return setReferrer(pageUrl),Util$1.objMerge(b,m)}function hashPageView(){Util$1.changeHash(function(){if(pageUrl!==window.location.href){pageUrl=window.location.href;var e=!1;baseConfig.base.pageViewWhiteList&&Util$1.checkTypeList(baseConfig.base.pageViewWhiteList)?e=!0:Util$1.checkTypeList(baseConfig.base.pageViewBlackList)||(e=!0),e===!0&&pageView()}})}function track(e,t,r){baseConfig.status.FnName=e||"$track",resetCode(),checkPrivate(e,"$track",!0),baseConfig.status.FnName=e;var n={};if(Util$1.paramType(t)==="Function"&&(r=t,t={}),Util$1.paramType(t)==="Object"){for(var o in t)Util$1.paramType(t[o])==="Function"&&(t[o]=t[o].call(t[o]));checkPrivate(t),n={xcontext:t}}var a=Storage$1.getLocal("ARKSUPER")||{},s=Util$1.objMerge({xcontext:a},n);if(baseConfig.base.isHybrid!==!0){var c=fillField(temp$1("$track"));c.xcontext=Util$1.delEmpty(c.xcontext),upLog(Util$1.objMerge(c,s),r)}else{var y=fillField(temp$1("$trackbase"));y=Util$1.delEmpty(y);var p=Util$1.objMerge(y,s),m=backParamsArray(e,p=Util$1.delNotHybrid(Util$1.delEmpty(p.xcontext)),r);transporter("track",m.argArray,m.callback)}}function freeApi(e,t){baseConfig.status.FnName=e,resetCode();var r=temp$1(e);if(r)if(baseConfig.base.isHybrid!==!0){var n=fillField(r),o=Storage$1.getLocal("ARKSUPER")||{};Util$1.paramType(t)==="Object"&&(o=Util$1.objMerge(o,t)),n=Util$1.objMerge(n,{xcontext:o}),upLog(Util$1.delEmpty(n))}else{var a=fillField(temp$1(e+"base"));transporter("track",backParamsArray(e,Util$1.delNotHybrid(Util$1.delEmpty(a.xcontext))).argArray)}}function getPresetProperties(e){if(baseConfig.status.FnName="$getPresetProperties",resetCode(),baseConfig.base.isHybrid===!0){var t="AnsCallback"+ +new Date;return window[t]=function(){e.apply(e,arguments),delete window[t]},void transporter("getPresetProperties",[],t)}var r=fillField(temp$1("$getPresetProperties"));r.xcontext.$first_visit_time=Storage$1.getLocal("ARKFRISTPROFILE")||"",delete r.xcontext.$is_login;var n=Util$1.delEmpty(r.xcontext);return Util$1.paramType(e)==="Function"&&e.call(e,n),n}function alias(e,t){if(baseConfig.status.FnName="$alias",resetCode(),e===Storage$1.getLocal("ARK_LOGINID"))return baseConfig.status.successCode="20013",successLog(),Util$1.paramType(t)==="Function"&&t.call(t),!1;if(baseConfig.base.isHybrid!==!0)if(checkPrivate(e,"$alias",!0)){Storage$1.setLocal("ARK_LOGINID",e);var r=fillField(temp$1("$alias"));if(upLog(Util$1.delEmpty(r),t),baseConfig.base.autoProfile===!0){baseConfig.status.FnName="$profile_set_once";var n=fillField(temp$1("$profile_set_once")),o=Storage$1.getLocal("ARKFRISTPROFILE")||Util$1.format(new Date,"yyyy-MM-dd hh:mm:ss.SSS"),a={$first_visit_time:o,$first_visit_language:(navigator.language||navigator.browserLanguage).toLowerCase()},s=Util$1.objMerge(n,{xcontext:a});upLog(Util$1.delEmpty(s)),Storage$1.setLocal("ARKFRISTPROFILE",o)}}else Util$1.paramType(t)==="Function"&&t.call(t);else{var c=backParamsArray(e,"",t);transporter("alias",c.argArray,c.callback)}}function identify(e,t,r){if(baseConfig.status.FnName="$identify",resetCode(),baseConfig.base.isHybrid!==!0)checkPrivate(e,"$alias",!0)&&(Util$1.paramType(t)==="Boolean"&&t===!0?Storage$1.setLocal("ARK_TRACK_LOGIN",!0):Util$1.paramType(t)==="Function"&&(r=t),Storage$1.setLocal("ARK_TRACKID",e),Storage$1.setCookie("ARK_ID",e),baseConfig.status.successCode="20002",baseConfig.status.value=e,successLog(),Util$1.paramType(r)==="Function"&&r.call(r),window.AnalysysModal&&typeof window.AnalysysModal=="function"&&window.AnalysysModal([{xwhat:"$identify",xwho:e}]));else{var n=backParamsArray(e,r);transporter("identify",n.argArray,n.callback)}}function profileSet(e,t,r){baseConfig.status.FnName="$profile_set",resetCode(),Util$1.paramType(e)==="Object"&&Util$1.paramType(t)==="Function"?(r=t,t=""):Util$1.paramType(e)==="String"&&Util$1.paramType(t)==="Function"&&(t=t.call(t));var n=Util$1.toObj(e,t);for(var o in n)Util$1.paramType(n[o])==="Function"&&(n[o]=n[o].call(n[o]));if(baseConfig.base.isHybrid!==!0){checkPrivate(n,"$profile_set");var a=temp$1("$profile_set"),s=Util$1.delEmpty(fillField(a));upLog(Util$1.objMerge(s,{xcontext:n}),r)}else{var c=backParamsArray(e,t,r);transporter("profileSet",c.argArray,c.callback)}}function profileSetOnce(e,t,r){baseConfig.status.FnName="$profile_set_once",resetCode(),Util$1.paramType(e)==="Object"&&Util$1.paramType(t)==="Function"?(r=t,t=""):Util$1.paramType(e)==="String"&&Util$1.paramType(t)==="Function"&&(t=t.call(t));var n=Util$1.toObj(e,t);for(var o in n)Util$1.paramType(n[o])==="Function"&&(n[o]=n[o].call(n[o]));if(baseConfig.base.isHybrid!==!0){checkPrivate(n,"$profile_set_once");var a=temp$1("$profile_set_once"),s=Util$1.delEmpty(fillField(a));upLog(Util$1.objMerge(s,{xcontext:n}),r)}else{var c=backParamsArray(n,r);transporter("profileSetOnce",c.argArray,c.callback)}}function profileIncrement(e,t,r){baseConfig.status.FnName="$profile_increment",resetCode(),Util$1.paramType(e)==="Object"&&Util$1.paramType(t)==="Function"?(r=t,t=""):Util$1.paramType(e)==="String"&&Util$1.paramType(t)==="Function"&&(t=t.call(t));var n=Util$1.toObj(e,t);for(var o in n)Util$1.paramType(n[o])==="Function"&&(n[o]=n[o].call(n[o]));if(baseConfig.base.isHybrid!==!0){checkPrivate(n,"$profile_increment");var a=temp$1("$profile_increment"),s=Util$1.delEmpty(fillField(a));upLog(Util$1.objMerge(s,{xcontext:n}),r)}else{var c=backParamsArray(e,t,r);transporter("profileIncrement",c.argArray,c.callback)}}function profileAppend(e,t,r){baseConfig.status.FnName="$profile_append",resetCode(),Util$1.paramType(e)==="Object"&&Util$1.paramType(t)==="Function"?(r=t,t=""):Util$1.paramType(e)==="String"&&Util$1.paramType(t)==="Function"&&(t=t.call(t));var n=Util$1.toObj(e,t);for(var o in n)Util$1.paramType(n[o])==="Function"&&(n[o]=n[o].call(n[o]));if(baseConfig.base.isHybrid!==!0){checkPrivate(n,"$profile_append");var a=temp$1("$profile_append"),s=Util$1.delEmpty(fillField(a));upLog(Util$1.objMerge(s,{xcontext:n}),r)}else{var c=backParamsArray(e,t,r);transporter("profileAppend",c.argArray,c.callback)}}function profileUnset(e,t){baseConfig.status.FnName="$profile_unset",resetCode(),Util$1.paramType(e)==="Function"&&(e=e.call(e)),checkPrivate(e,"$profile_unset",e);var r=Util$1.toObj(e,"");if(baseConfig.base.isHybrid!==!0){checkPrivate(r,"$profile_unset");var n=fillField(temp$1("$profile_unset"));upLog(Util$1.objMerge(n,{xcontext:r}),t)}else{var o=backParamsArray(e,t);transporter("profileUnset",o.argArray,o.callback)}}function profileDelete(e){baseConfig.status.FnName="$profile_delete",resetCode(),baseConfig.base.isHybrid!==!0?upLog(fillField(temp$1("$profile_delete")),e):transporter("profileDelete",[],e)}function registerSuperProperty(e,t,r){baseConfig.status.FnName="$registerSuperProperty",resetCode(),Util$1.paramType(e)==="Object"&&Util$1.paramType(t)==="Function"?(r=t,t=""):Util$1.paramType(e)==="String"&&Util$1.paramType(t)==="Function"&&(t=t.call(t));var n=Util$1.toObj(e,t);for(var o in n)Util$1.paramType(n[o])==="Function"&&(n[o]=n[o].call(n[o]));if(baseConfig.base.isHybrid!==!0){checkPrivate(n,"$registerSuperProperty");var a=Storage$1.getLocal("ARKSUPER")||{},s=Util$1.objMerge(a,n);Storage$1.setLocal("ARKSUPER",s),baseConfig.status.successCode="20002",baseConfig.status.value=JSON.stringify(n),successLog(),Util$1.paramType(r)==="Function"&&r.call(r)}else{var c=backParamsArray(e,t,r);transporter("registerSuperProperty",c.argArray,c.callback)}}function registerSuperProperties(e,t,r){baseConfig.status.FnName="$registerSuperProperties",resetCode(),Util$1.paramType(e)==="Object"&&Util$1.paramType(t)==="Function"?(r=t,t=""):Util$1.paramType(e)==="String"&&Util$1.paramType(t)==="Function"&&(t=t.call(t));var n=Util$1.toObj(e,t);for(var o in n)Util$1.paramType(n[o])==="Function"&&(n[o]=n[o].call(n[o]));if(baseConfig.base.isHybrid!==!0){checkPrivate(n,"$registerSuperProperties");var a=Storage$1.getLocal("ARKSUPER")||{},s=Util$1.objMerge(a,n);Storage$1.setLocal("ARKSUPER",s),baseConfig.status.successCode="20002",baseConfig.status.value=JSON.stringify(n),successLog(),Util$1.paramType(r)==="Function"&&r.call(r)}else{var c=backParamsArray(e,t,r);transporter("registerSuperProperties",c.argArray,c.callback)}}function getSuperProperty(e,t){if(baseConfig.status.FnName="$getSuperProperty",resetCode(),baseConfig.base.isHybrid===!0){var r=backParamsArray(e),n="AnsCallback"+ +new Date;return window[n]=function(){t.apply(t,arguments),delete window[n]},void transporter("getSuperProperty",r.argArray,n)}checkPrivate(e,"$getSuperProperty",!0);var o=Storage$1.getLocal("ARKSUPER")||{},a=o[e];return{}.hasOwnProperty.call(o,e)?(baseConfig.status.successCode="20010",baseConfig.status.value=a):(baseConfig.status.successCode="20009",a=""),baseConfig.status.key=e,successLog(),Util$1.paramType(t)==="Function"&&t.call(t,a),a}function getSuperProperties(e){if(baseConfig.status.FnName="$getSuperProperties",resetCode(),baseConfig.base.isHybrid===!0){var t="AnsCallback"+ +new Date;return window[t]=function(){e.apply(e,arguments),delete window[t]},void transporter("getSuperProperties",[],t)}var r=Storage$1.getLocal("ARKSUPER")||{};return baseConfig.status.successCode="20010",baseConfig.status.value=JSON.stringify(r),successLog(),Util$1.paramType(e)==="Function"&&e.call(e,r),r}function unRegisterSuperProperty(e,t){if(baseConfig.status.FnName="$unregisterSuperProperty",resetCode(),baseConfig.base.isHybrid!==!0){checkPrivate(e,"$unregisterSuperProperty",!0);var r=Storage$1.getLocal("ARKSUPER")||{};Object.prototype.hasOwnProperty.call(r,e)?(delete r[e],Storage$1.setLocal("ARKSUPER",r),baseConfig.status.successCode="20003"):baseConfig.status.successCode="20011",baseConfig.status.value=e,successLog(),Util$1.paramType(t)==="Function"&&t.call(t)}else{var n=backParamsArray.apply(e,arguments),o=n.argArray;transporter("unRegisterSuperProperty",o,n.callback)}}function clearSuperProperties(e){if(baseConfig.status.FnName="$clearSuperProperties",resetCode(),baseConfig.base.isHybrid!==!0)Storage$1.setLocal("ARKSUPER",{}),baseConfig.status.successCode="20004",successLog(),Util$1.paramType(e)==="Function"&&e.call(e);else{var t=backParamsArray(e);transporter("clearSuperProperties",t.argArray,t.callback)}}function reset(e){baseConfig.base.isHybrid!==!0?(resetCode(),removeUUId(),clearSuperProperties(),clearCache(!0),sessionId.setId(),baseConfig.base.autoProfile===!0?profileSetOnce({$reset_time:Util$1.format(new Date,"yyyy-MM-dd hh:mm:ss.SSS")},e):Util$1.paramType(e)==="Function"&&e.call(e),baseConfig.status.FnName="$reset",baseConfig.status.successCode="20005",successLog()):transporter("reset",[],e)}function getDistinctId(e){if(baseConfig.base.isHybrid===!0){var t="AnsCallback"+ +new Date;return window[t]=function(){e.apply(e,arguments),delete window[t]},void transporter("getDistinctId",[],t)}var r=getIdentifyId()||getUUId();return Util$1.paramType(e)==="Function"&&e.call(e,r),r}var ans=Object.freeze({__proto__:null,pageView,profileSet,profileSetOnce,profileIncrement,profileAppend,profileUnset,profileDelete,alias,identify,track,registerSuperProperty,registerSuperProperties,getSuperProperty,getSuperProperties,unRegisterSuperProperty,clearSuperProperties,reset,freeApi,getDistinctId,getPresetProperties});function startUp(){var e=[];if(baseConfig.base.isHybrid!==!1||checkBase()){var t=Storage$1.getLocal("ARKSUPER")||{};if(baseConfig.base.isHybrid===!1&&isStartUp()===!1){var r=!0;if((Util$1.checkTypeList(baseConfig.base.startUpBlackList)||baseConfig.base.startUpWhiteList&&!Util$1.checkTypeList(baseConfig.base.startUpWhiteList))&&(r=!1),r===!0){baseConfig.status.FnName="$startup";var n=fillField(temp$1("$startup"));n=Util$1.objMerge(n,{xcontext:t}),e.push(Util$1.delEmpty(n))}}var o=Storage$1.getLocal("ARKFRISTPROFILE")||!1;if(baseConfig.base.isHybrid===!1&&baseConfig.base.autoProfile===!0&&!o){baseConfig.status.FnName="$profile_set_once";var a=fillField(temp$1("$profile_set_once")),s=Storage$1.getLocal("ARKFRISTPROFILE")||Util$1.format(new Date,"yyyy-MM-dd hh:mm:ss.SSS"),c={$first_visit_time:s,$first_visit_language:(navigator.language||navigator.browserLanguage).toLowerCase()},y=Util$1.objMerge(a,{xcontext:c});e.push(Util$1.delEmpty(y)),Storage$1.setLocal("ARKFRISTPROFILE",s)}if(baseConfig.base.auto===!0){var p=!1;if(baseConfig.base.pageViewWhiteList&&Util$1.checkTypeList(baseConfig.base.pageViewWhiteList)?p=!0:Util$1.checkTypeList(baseConfig.base.pageViewBlackList)||(p=!0),p===!0){var m=pageViewLog(baseConfig.base.pageProperty);e.push(m)}baseConfig.base.hash!==!0&&baseConfig.base.singlePage!==!0||hashPageView()}e.length>0&&upLog(e)}else errorLog()}function ieCreat(){Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length>>>0,r=Number(arguments[1])||0;for((r=r<0?Math.ceil(r):Math.floor(r))<0&&(r+=t);r<t;r++)if(r in this&&this[r]===e)return r;return-1})}window.AnalysysAgent=window.AnalysysAgent||{};var AnalysysAgent=window.AnalysysAgent,AnalysysModule=window.AnalysysModule||{},config=AnalysysAgent.config||{},param=AnalysysAgent.param||[];if(AnalysysAgent.isInit!==!0)for(var key$1 in ans)AnalysysAgent[key$1]=function(e){return function(){var t=arguments;if(e.indexOf("get")>-1)return ans[e].apply(ans[e],t);param.push([e,arguments])}}(key$1);function isHybrid(){window.navigator.userAgent.indexOf("AnalysysAgent/Hybrid")>-1&&(baseConfig.base.isHybrid=!0),window.AnalysysAgentHybrid&&window.AnalysysAgentHybrid.isHybrid()===!0&&(baseConfig.base.isHybrid=!0),AnalysysModule&&AnalysysModule.moduleStatus===!0&&AnalysysModule.isHybrid()}function _createAnsSDK(){for(var e in AnalysysAgent.isInit=!0,ans)AnalysysAgent[e]=ans[e];for(var t in config)Util$1.paramType(getField[t])==="Function"?getField[t](config[t]):baseConfig.base[t]=config[t];if(baseConfig.base.isHybrid===!0)for(var r in HybridAns)AnalysysAgent[r]=AnalysysModule.moduleStatus===!0?AnalysysModule.onEvent(r,HybridAns):HybridAns[r];AnalysysAgent.config=baseConfig.base,clearCache();for(var n=0;n<param.length;n++){var o=param[n];Util$1.objHasKay(ans,o[0])&&(o[0]==="identify"||o[0]==="alias"||o[0].indexOf("Super")>-1)&&ans[o[0]].apply(ans[o[0]],o[1])}lifecycle$5.AnalysysAgent&&lifecycle$5.AnalysysAgent.init&&lifecycle$5.AnalysysAgent.init(baseConfig.base),startUp();for(var a=0;a<param.length;a++){var s=param[a];Util$1.objHasKay(ans,s[0])&&s[0]!=="identify"&&s[0]!=="alias"&&s[0].indexOf("Super")<0&&ans[s[0]].apply(ans[s[0]],s[1])}}if(ieCreat(),isHybrid(),AnalysysAgent.init=function(e){Util$1.paramType(config)!=="Object"||AnalysysAgent.isInit&&baseConfig.base.isHybrid!==!0||AnalysysModule.moduleStatus&&(AnalysysModule.moduleStatus!==!0||e.isHybrid!==!0&&e.isARKH5!==!0)||(e.isARKH5!==!0&&(config=e),_createAnsSDK())},!AnalysysAgent.isInit){if(Util$1.paramType(AnalysysAgent)==="Array")for(var i$3=0;i$3<AnalysysAgent.length;i$3++)if(Util$1.paramType(ans[AnalysysAgent[i$3][0]])==="Function"){var fnName=AnalysysAgent[i$3][0];AnalysysAgent[i$3].splice(0,1),param.push([fnName,AnalysysAgent[i$3]])}else config[AnalysysAgent[i$3][0]]=AnalysysAgent[i$3][1];Util$1.isEmptyObject(config)!==!1||AnalysysModule.moduleStatus||_createAnsSDK()}exports.default=AnalysysAgent;
|
|
30
|
-
//# sourceMappingURL=AnalysysAgent_JS_SDK.es6.min.js.map
|