diff --git a/.env b/.env index 4d151a3..ee4d33e 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ ANS=WX LIB=WeChat -LibVERSION=5.0.4.1 \ No newline at end of file +LibVERSION=5.0.5 \ No newline at end of file diff --git a/demo/demo/sdk/AnalysysAgent_WX_SDK.es6.min.js b/demo/demo/sdk/AnalysysAgent_WX_SDK.es6.min.js index 16c5d71..08930ef 100644 --- a/demo/demo/sdk/AnalysysAgent_WX_SDK.es6.min.js +++ b/demo/demo/sdk/AnalysysAgent_WX_SDK.es6.min.js @@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function w(e,t){var n=!1;if(i(e)||o(e)||a(e)||u(e))if(n=!0,i(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function x(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&w(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var P,T,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=T),e.setStorageSync(t,n)};function D(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function o(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,i),a),c)),r(n(e,u),t)}function i(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,i),a),c)),r(n(e,u),t)}function a(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,i),a),c)),r(n(e,u),t)}function u(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,i),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,g,h,v,m,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u>>29,i}(e),h=1732584193,v=4023233417,m=2562383102,y=271733878,f=0;f=0;n--){var r=T.POSTDATA[n];t[r.xwhen]&&T.POSTDATA.splice(n,1)}b()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rie.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ie),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ie)}))}))}function ue(e,t){var n,r=x(e,t);Object.keys(r).length&&(n=r,T.ARKSUPER=Object.assign({},T.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function ve(t){var n=l(T.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ie.uploadURL+"/up?appid="+ie.appkey,data:ge,encryptType:ie.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ie.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ie.sendDataTimeout}).then((function(e){j(ge),ge=[],ve(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(ve(),he++)}))}}function me(e,t){ie.appkey?ie.uploadURL?(M(e),ve(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}function $e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function Ae(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,i=Object.keys(o);if(i.length){var a="";return i.forEach((function(e,t){t&&(a+="&"),a+=e+"="+o[e]})),r+"?"+a}}return r}return""}function Se(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ee={};function Re(e){Ee.element_function=e.function||"",Ee.element_id=e.id||"",Ee.element_content=e.content||"",Ee.element_type=e.type||"",Ee.element_name=e.name||""}var we={xwho:function(){return U()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return ie.debugMode},$is_login:function(){return!!T.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=T.SEESIONDATE?new Date(T.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!T.SEESIONID||!T.SEESIONDATE||t-T.SEESIONDATE>18e5||o!==r)&&L(),T.SEESIONID;var e,t,n,r,o},$screen_width:function(){return P.screenWidth},$screen_height:function(){return P.screenHeight},$os:function(){var e=P.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return P.brand},$browser_version:function(){return P.version},$os_version:function(){return P.system?P.system.split(" ")[1]:""},$model:function(){return P.model},$language:function(){return P.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!T.ARKFRISTPROFILE},$is_first_day:function(){var e=T.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return T.ARKFRISTPROFILE},$first_visit_language:function(){return P.language},$original_id:function(){return T.ARK_TRACKID||T.ARK_ID},$is_time_calibrated:function(){return!(!ie.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return Ae(ie.autoCompleteURL)},$url_path:function(){return Ae()},$url_domain:function(){return Ae()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Se(Ee.element_content)},$element_id:function(){return Se(Ee.element_id)},$element_type:function(){return Se(Ee.element_type)},$element_function:function(){return Se(Ee.element_function)},$element_name:function(){return Se(Ee.element_name)},$appid:function(){return ie.$appid},$appname:function(){return ie.$appname}};function xe(e){var t={appid:ie.appkey,xwho:we.xwho(),xwhat:we.xwhat(e),xwhen:we.xwhen(),xcontext:{}},n=v[e];function r(e){var n=we[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Pe={};function Te(){return Pe}var be={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=x(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");be.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),Te(),n),me(o)}function Oe(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-be.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),Te(),t),Pe={},me(e)}}function Ie(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&w(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,x(o,e)),me(r)}function Ke(e,t){Ie("$profile_set_once",e,t)}function Ue(e,t){Ie("$profile_set",e,t)}function ke(e,t){Ie("$profile_increment",e,t)}function Le(e,t){Ie("$profile_append",e,t)}function Ne(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),me(n)}function Fe(){me(xe("$profile_delete"))}function Me(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Re(Object.assign(o,{function:n}));var i=xe("$user_click");i.xcontext=Object.assign({},i.xcontext,N(),Te()),me(i)}}function ze(e){Re({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),Te()),me(t)}function Be(){T.ARK_ID=k(),T.ARK_TRACKID="",T.ARK_LOGINID="",T.ARKSUPER={},T.ARKFRISTPROFILE="",T.ARKFRISTPROFILESEND=!1,L(),!0===ie.autoProfile&&Ke({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ge(e){be.timeEvent[e]=W()}function Ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function We(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),x(t,e)),be.timeEvent[e]&&(n.xcontext.$duration=W()-be.timeEvent[e],delete be[e]),me(n)}else S({code:600025,fn:"track",value:e})}function He(t){var n;E(t)?(n=t,T.ARK_TRACKID=n,b(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function qe(e){var t=T.ARK_TRACKID||T.ARK_ID;return e&&e(t),t}function Je(e){var t=x(e,"$pageProperty");!function(e){Pe=Object.assign({},Pe,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function Xe(e,t){var n=U(),r=Ae(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),i={$share_id:n,$share_level:o,$share_path:r},a={};t&&(a=x(t,"$share")),e.xcontext=Object.assign({},e.xcontext,i,N(),a),me(e)}))();var i="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var a=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+a+i,e}var Qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function et(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function tt(e){et(e,"onShow",(function(){if(!0===ie.auto){var e=$e().__wxExparserNodeId__;be.pageview.state[e]||(re(De)(),be.pageview.state[e]=!0)}else be.pageview.xwhen=W()}));var t=function(){var e=$e().__wxExparserNodeId__;be.pageview.state[e]&&delete be.pageview.state[e]};if(et(e,"onHide",(function(){ie.autoPageViewDuration&&Oe(),t()})),et(e,"onUnload",(function(){ie.autoPageViewDuration&&Oe(),t()})),1==ie.autoShare&&et(e,"onShareAppMessage",Xe),1==ie.autoTrack)for(var n in e){var r=e[n];s(r)&&Qe.indexOf(n)<0?et(e,n,Ye):s(r)&&"onTabItemTap"==n&&et(e,n,ze)}}var nt=App,rt=Page,ot=Component;function it(e){et(e,"onLaunch",(function(e){_e(e)})),et(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function w(e,t){var n=!1;if(i(e)||o(e)||a(e)||u(e))if(n=!0,i(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function x(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&w(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var P,T,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=T),e.setStorageSync(t,n)};function D(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function o(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,i),a),c)),r(n(e,u),t)}function i(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,i),a),c)),r(n(e,u),t)}function a(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,i),a),c)),r(n(e,u),t)}function u(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,i),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,g,h,v,m,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u>>29,i}(e),h=1732584193,v=4023233417,m=2562383102,y=271733878,f=0;f=0;n--){var r=T.POSTDATA[n];t[r.xwhen]&&T.POSTDATA.splice(n,1)}b()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rie.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ie),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ie)}))}))}function ue(e,t){var n,r=x(e,t);Object.keys(r).length&&(n=r,T.ARKSUPER=Object.assign({},T.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function ve(t){var n=l(T.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ie.uploadURL+"/up?appid="+ie.appkey,data:ge,encryptType:ie.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ie.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ie.sendDataTimeout}).then((function(e){j(ge),ge=[],ve(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(ve(),he++)}))}}function me(e,t){ie.appkey?ie.uploadURL?(M(e),ve(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}function $e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function Ae(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,i=Object.keys(o);if(i.length){var a="";return i.forEach((function(e,t){t&&(a+="&"),a+=e+"="+o[e]})),r+"?"+a}}return r}return""}function Se(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ee={};function Re(e){Ee.element_function=e.function||"",Ee.element_id=e.id||"",Ee.element_content=e.content||"",Ee.element_type=e.type||"",Ee.element_name=e.name||""}var we={xwho:function(){return U()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return ie.debugMode},$is_login:function(){return!!T.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=T.SEESIONDATE?new Date(T.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!T.SEESIONID||!T.SEESIONDATE||t-T.SEESIONDATE>18e5||o!==r)&&L(),T.SEESIONID;var e,t,n,r,o},$screen_width:function(){return P.screenWidth},$screen_height:function(){return P.screenHeight},$os:function(){var e=P.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return P.brand},$browser_version:function(){return P.version},$os_version:function(){return P.system?P.system.split(" ")[1]:""},$model:function(){return P.model},$language:function(){return P.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!T.ARKFRISTPROFILE},$is_first_day:function(){var e=T.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return T.ARKFRISTPROFILE},$first_visit_language:function(){return P.language},$original_id:function(){return T.ARK_TRACKID||T.ARK_ID},$is_time_calibrated:function(){return!(!ie.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return Ae(ie.autoCompleteURL)},$url_path:function(){return Ae()},$url_domain:function(){return Ae()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Se(Ee.element_content)},$element_id:function(){return Se(Ee.element_id)},$element_type:function(){return Se(Ee.element_type)},$element_function:function(){return Se(Ee.element_function)},$element_name:function(){return Se(Ee.element_name)},$appid:function(){return ie.$appid},$appname:function(){return ie.$appname}};function xe(e){var t={appid:ie.appkey,xwho:we.xwho(),xwhat:we.xwhat(e),xwhen:we.xwhen(),xcontext:{}},n=v[e];function r(e){var n=we[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Pe={};function Te(){return Pe}var be={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=x(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");be.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),Te(),n),me(o)}function Oe(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-be.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),Te(),t),Pe={},me(e)}}function Ie(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&w(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,x(o,e)),me(r)}function Ke(e,t){Ie("$profile_set_once",e,t)}function Ue(e,t){Ie("$profile_set",e,t)}function ke(e,t){Ie("$profile_increment",e,t)}function Le(e,t){Ie("$profile_append",e,t)}function Ne(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),me(n)}function Fe(){me(xe("$profile_delete"))}function Me(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Re(Object.assign(o,{function:n}));var i=xe("$user_click");i.xcontext=Object.assign({},i.xcontext,N(),Te()),me(i)}}function ze(e){Re({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),Te()),me(t)}function Be(){T.ARK_ID=k(),T.ARK_TRACKID="",T.ARK_LOGINID="",T.ARKSUPER={},T.ARKFRISTPROFILE="",T.ARKFRISTPROFILESEND=!1,L(),!0===ie.autoProfile&&Ke({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ge(e){be.timeEvent[e]=W()}function Ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function We(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),x(t,e)),be.timeEvent[e]&&(n.xcontext.$duration=W()-be.timeEvent[e],delete be[e]),me(n)}else S({code:600025,fn:"track",value:e})}function He(t){var n;E(t)?(n=t,T.ARK_TRACKID=n,b(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function qe(e){var t=T.ARK_TRACKID||T.ARK_ID;return e&&e(t),t}function Je(e){var t=x(e,"$pageProperty");!function(e){Pe=Object.assign({},Pe,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function Xe(e,t){var n=U(),r=Ae(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),i={$share_id:n,$share_level:o,$share_path:r},a={};t&&(a=x(t,"$share")),e.xcontext=Object.assign({},e.xcontext,i,N(),a),me(e)}))();var i="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var a=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+a+i,e}var Qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function et(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function tt(e){et(e,"onShow",(function(){if(!0===ie.auto){var e=$e().__wxExparserNodeId__;be.pageview.state[e]||(re(De)(),be.pageview.state[e]=!0)}else be.pageview.xwhen=W()}));var t=function(){var e=$e().__wxExparserNodeId__;be.pageview.state[e]&&delete be.pageview.state[e]};if(et(e,"onHide",(function(){ie.autoPageViewDuration&&Oe(),t()})),et(e,"onUnload",(function(){ie.autoPageViewDuration&&Oe(),t()})),1==ie.autoShare&&et(e,"onShareAppMessage",Xe),1==ie.autoTrack)for(var n in e){var r=e[n];s(r)&&Qe.indexOf(n)<0?et(e,n,Ye):s(r)&&"onTabItemTap"==n&&et(e,n,ze)}}var nt=App,rt=Page,ot=Component;function it(e){et(e,"onLaunch",(function(e){_e(e)})),et(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function w(e,t){var n=!1;if(i(e)||o(e)||a(e)||u(e))if(n=!0,i(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function x(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&w(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var P,T,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=T),e.setStorageSync(t,n)};function D(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function o(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,i),a),c)),r(n(e,u),t)}function i(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,i),a),c)),r(n(e,u),t)}function a(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,i),a),c)),r(n(e,u),t)}function u(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,i),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,g,h,v,m,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u>>29,i}(e),h=1732584193,v=4023233417,m=2562383102,y=271733878,f=0;f=0;n--){var r=T.POSTDATA[n];t[r.xwhen]&&T.POSTDATA.splice(n,1)}b()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rie.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ie),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ie)}))}))}function ue(e,t){var n,r=x(e,t);Object.keys(r).length&&(n=r,T.ARKSUPER=Object.assign({},T.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function ve(t){var n=l(T.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ie.uploadURL+"/up?appid="+ie.appkey,data:ge,encryptType:ie.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ie.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ie.sendDataTimeout}).then((function(e){j(ge),ge=[],ve(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(ve(),he++)}))}}function me(e,t){ie.appkey?ie.uploadURL?(M(e),ve(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}function $e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function Ae(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,i=Object.keys(o);if(i.length){var a="";return i.forEach((function(e,t){t&&(a+="&"),a+=e+"="+o[e]})),r+"?"+a}}return r}return""}function Se(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ee={};function Re(e){Ee.element_function=e.function||"",Ee.element_id=e.id||"",Ee.element_content=e.content||"",Ee.element_type=e.type||"",Ee.element_name=e.name||""}var we={xwho:function(){return U()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return ie.debugMode},$is_login:function(){return!!T.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=T.SEESIONDATE?new Date(T.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!T.SEESIONID||!T.SEESIONDATE||t-T.SEESIONDATE>18e5||o!==r)&&L(),T.SEESIONID;var e,t,n,r,o},$screen_width:function(){return P.screenWidth},$screen_height:function(){return P.screenHeight},$os:function(){var e=P.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return P.brand},$browser_version:function(){return P.version},$os_version:function(){return P.system?P.system.split(" ")[1]:""},$model:function(){return P.model},$language:function(){return P.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!T.ARKFRISTPROFILE},$is_first_day:function(){var e=T.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return T.ARKFRISTPROFILE},$first_visit_language:function(){return P.language},$original_id:function(){return T.ARK_TRACKID||T.ARK_ID},$is_time_calibrated:function(){return!(!ie.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return Ae(ie.autoCompleteURL)},$url_path:function(){return Ae()},$url_domain:function(){return Ae()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Se(Ee.element_content)},$element_id:function(){return Se(Ee.element_id)},$element_type:function(){return Se(Ee.element_type)},$element_function:function(){return Se(Ee.element_function)},$element_name:function(){return Se(Ee.element_name)},$appid:function(){return ie.$appid},$appname:function(){return ie.$appname}};function xe(e){var t={appid:ie.appkey,xwho:we.xwho(),xwhat:we.xwhat(e),xwhen:we.xwhen(),xcontext:{}},n=v[e];function r(e){var n=we[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Pe={};function Te(){return Pe}var be={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=x(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");be.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),Te(),n),me(o)}function Oe(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-be.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),Te(),t),Pe={},me(e)}}function Ie(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&w(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,x(o,e)),me(r)}function Ke(e,t){Ie("$profile_set_once",e,t)}function Ue(e,t){Ie("$profile_set",e,t)}function ke(e,t){Ie("$profile_increment",e,t)}function Le(e,t){Ie("$profile_append",e,t)}function Ne(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),me(n)}function Fe(){me(xe("$profile_delete"))}function Me(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Re(Object.assign(o,{function:n}));var i=xe("$user_click");i.xcontext=Object.assign({},i.xcontext,N(),Te()),me(i)}}function ze(e){Re({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),Te()),me(t)}function Be(){T.ARK_ID=k(),T.ARK_TRACKID="",T.ARK_LOGINID="",T.ARKSUPER={},T.ARKFRISTPROFILE="",T.ARKFRISTPROFILESEND=!1,L(),!0===ie.autoProfile&&Ke({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ge(e){be.timeEvent[e]=W()}function Ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function We(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),x(t,e)),be.timeEvent[e]&&(n.xcontext.$duration=W()-be.timeEvent[e],delete be[e]),me(n)}else S({code:600025,fn:"track",value:e})}function He(t){var n;E(t)?(n=t,T.ARK_TRACKID=n,b(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function qe(e){var t=T.ARK_TRACKID||T.ARK_ID;return e&&e(t),t}function Je(e){var t=x(e,"$pageProperty");!function(e){Pe=Object.assign({},Pe,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function Xe(e,t){var n=U(),r=Ae(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),i={$share_id:n,$share_level:o,$share_path:r},a={};t&&(a=x(t,"$share")),e.xcontext=Object.assign({},e.xcontext,i,N(),a),me(e)}))();var i="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var a=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+a+i,e}var Qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function et(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function tt(e){et(e,"onShow",(function(){if(!0===ie.auto){var e=$e().__wxExparserNodeId__;be.pageview.state[e]||(re(De)(),be.pageview.state[e]=!0)}else be.pageview.xwhen=W()}));var t=function(){var e=$e().__wxExparserNodeId__;be.pageview.state[e]&&delete be.pageview.state[e]};if(et(e,"onHide",(function(){ie.autoPageViewDuration&&Oe(),t()})),et(e,"onUnload",(function(){ie.autoPageViewDuration&&Oe(),t()})),1==ie.autoShare&&et(e,"onShareAppMessage",Xe),1==ie.autoTrack)for(var n in e){var r=e[n];s(r)&&Qe.indexOf(n)<0?et(e,n,Ye):s(r)&&"onTabItemTap"==n&&et(e,n,ze)}}var nt=App,rt=Page,ot=Component;function it(e){et(e,"onLaunch",(function(e){_e(e)})),et(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function w(e,t){var n=!1;if(i(e)||o(e)||a(e)||u(e))if(n=!0,i(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function x(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&w(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var P,T,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=T),e.setStorageSync(t,n)};function D(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function o(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,i),a),c)),r(n(e,u),t)}function i(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,i),a),c)),r(n(e,u),t)}function a(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,i),a),c)),r(n(e,u),t)}function u(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,i),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,g,h,v,m,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u>>29,i}(e),h=1732584193,v=4023233417,m=2562383102,y=271733878,f=0;f=0;n--){var r=T.POSTDATA[n];t[r.xwhen]&&T.POSTDATA.splice(n,1)}b()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rie.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ie),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ie)}))}))}function ue(e,t){var n,r=x(e,t);Object.keys(r).length&&(n=r,T.ARKSUPER=Object.assign({},T.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function ve(t){var n=l(T.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ie.uploadURL+"/up?appid="+ie.appkey,data:ge,encryptType:ie.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ie.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ie.sendDataTimeout}).then((function(e){j(ge),ge=[],ve(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(ve(),he++)}))}}function me(e,t){ie.appkey?ie.uploadURL?(M(e),ve(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}function $e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function Ae(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,i=Object.keys(o);if(i.length){var a="";return i.forEach((function(e,t){t&&(a+="&"),a+=e+"="+o[e]})),r+"?"+a}}return r}return""}function Se(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ee={};function Re(e){Ee.element_function=e.function||"",Ee.element_id=e.id||"",Ee.element_content=e.content||"",Ee.element_type=e.type||"",Ee.element_name=e.name||""}var we={xwho:function(){return U()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return ie.debugMode},$is_login:function(){return!!T.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=T.SEESIONDATE?new Date(T.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!T.SEESIONID||!T.SEESIONDATE||t-T.SEESIONDATE>18e5||o!==r)&&L(),T.SEESIONID;var e,t,n,r,o},$screen_width:function(){return P.screenWidth},$screen_height:function(){return P.screenHeight},$os:function(){var e=P.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return P.brand},$browser_version:function(){return P.version},$os_version:function(){return P.system?P.system.split(" ")[1]:""},$model:function(){return P.model},$language:function(){return P.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!T.ARKFRISTPROFILE},$is_first_day:function(){var e=T.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return T.ARKFRISTPROFILE},$first_visit_language:function(){return P.language},$original_id:function(){return T.ARK_TRACKID||T.ARK_ID},$is_time_calibrated:function(){return!(!ie.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return Ae(ie.autoCompleteURL)},$url_path:function(){return Ae()},$url_domain:function(){return Ae()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Se(Ee.element_content)},$element_id:function(){return Se(Ee.element_id)},$element_type:function(){return Se(Ee.element_type)},$element_function:function(){return Se(Ee.element_function)},$element_name:function(){return Se(Ee.element_name)},$appid:function(){return ie.$appid},$appname:function(){return ie.$appname}};function xe(e){var t={appid:ie.appkey,xwho:we.xwho(),xwhat:we.xwhat(e),xwhen:we.xwhen(),xcontext:{}},n=v[e];function r(e){var n=we[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Pe={};function Te(){return Pe}var be={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=x(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");be.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),Te(),n),me(o)}function Oe(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-be.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),Te(),t),Pe={},me(e)}}function Ie(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&w(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,x(o,e)),me(r)}function Ke(e,t){Ie("$profile_set_once",e,t)}function Ue(e,t){Ie("$profile_set",e,t)}function ke(e,t){Ie("$profile_increment",e,t)}function Le(e,t){Ie("$profile_append",e,t)}function Ne(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),me(n)}function Fe(){me(xe("$profile_delete"))}function Me(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Re(Object.assign(o,{function:n}));var i=xe("$user_click");i.xcontext=Object.assign({},i.xcontext,N(),Te()),me(i)}}function ze(e){Re({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),Te()),me(t)}function Be(){T.ARK_ID=k(),T.ARK_TRACKID="",T.ARK_LOGINID="",T.ARKSUPER={},T.ARKFRISTPROFILE="",T.ARKFRISTPROFILESEND=!1,L(),!0===ie.autoProfile&&Ke({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ge(e){be.timeEvent[e]=W()}function Ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function We(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),x(t,e)),be.timeEvent[e]&&(n.xcontext.$duration=W()-be.timeEvent[e],delete be[e]),me(n)}else S({code:600025,fn:"track",value:e})}function He(t){var n;E(t)?(n=t,T.ARK_TRACKID=n,b(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function qe(e){var t=T.ARK_TRACKID||T.ARK_ID;return e&&e(t),t}function Je(e){var t=x(e,"$pageProperty");!function(e){Pe=Object.assign({},Pe,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function Xe(e,t){var n=U(),r=Ae(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),i={$share_id:n,$share_level:o,$share_path:r},a={};t&&(a=x(t,"$share")),e.xcontext=Object.assign({},e.xcontext,i,N(),a),me(e)}))();var i="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var a=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+a+i,e}var Qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function et(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function tt(e){et(e,"onShow",(function(){if(!0===ie.auto){var e=$e().__wxExparserNodeId__;be.pageview.state[e]||(re(De)(),be.pageview.state[e]=!0)}else be.pageview.xwhen=W()}));var t=function(){var e=$e().__wxExparserNodeId__;be.pageview.state[e]&&delete be.pageview.state[e]};if(et(e,"onHide",(function(){ie.autoPageViewDuration&&Oe(),t()})),et(e,"onUnload",(function(){ie.autoPageViewDuration&&Oe(),t()})),1==ie.autoShare&&et(e,"onShareAppMessage",Xe),1==ie.autoTrack)for(var n in e){var r=e[n];s(r)&&Qe.indexOf(n)<0?et(e,n,Ye):s(r)&&"onTabItemTap"==n&&et(e,n,ze)}}var nt=App,rt=Page,ot=Component;function it(e){et(e,"onLaunch",(function(e){_e(e)})),et(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?l.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function x(e,t){var n=!1;if(a(e)||o(e)||i(e)||u(e))if(n=!0,a(e))E(e,255)||(n=!1);else if(i(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&x(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var w,P,D=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=P),e.setStorageSync(t,n)};function b(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function o(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,a),i),c)),r(n(e,u),t)}function a(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,a),i),c)),r(n(e,u),t)}function i(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,a),i),c)),r(n(e,u),t)}function u(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,a),i),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,p,l,d,g,h,m,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),a=Array(o-1),i=0,u=0;u>>29,a}(e),h=1732584193,m=4023233417,v=2562383102,y=271733878,f=0;f=0;n--){var r=P.POSTDATA[n];t[r.xwhen]&&P.POSTDATA.splice(n,1)}D()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rae.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ae),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ae)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,P.ARKSUPER=Object.assign({},P.ARKSUPER,n),D(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function pe(){return N()}function le(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function me(t){var n=p(P.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ae.uploadURL+"/up?appid="+ae.appkey,data:ge,encryptType:ae.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ae.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ae.sendDataTimeout}).then((function(e){j(ge),ge=[],me(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(me(),he++)}))}}function ve(e,t){ae.appkey?ae.uploadURL?(M(e),me(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function $e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,a=Object.keys(o);if(a.length){var i="";return a.forEach((function(e,t){t&&(i+="&"),i+=e+"="+o[e]})),r+"?"+i}}return r}return""}function Ae(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Se={};function Ee(e){Se.element_function=e.function||"",Se.element_id=e.id||"",Se.element_content=e.content||"",Se.element_type=e.type||"",Se.element_name=e.name||""}var Re={xwho:function(){return k()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return ae.debugMode},$is_login:function(){return!!P.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=P.SEESIONDATE?new Date(P.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!P.SEESIONID||!P.SEESIONDATE||t-P.SEESIONDATE>18e5||o!==r)&&L(),P.SEESIONID;var e,t,n,r,o},$screen_width:function(){return w.screenWidth},$screen_height:function(){return w.screenHeight},$os:function(){var e=w.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return w.brand},$browser_version:function(){return w.version},$os_version:function(){return w.system?w.system.split(" ")[1]:""},$model:function(){return w.model},$language:function(){return w.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!P.ARKFRISTPROFILE},$is_first_day:function(){var e=P.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return P.ARKFRISTPROFILE},$first_visit_language:function(){return w.language},$original_id:function(){return P.ARK_TRACKID||P.ARK_ID},$is_time_calibrated:function(){return!(!ae.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return $e(ae.autoCompleteURL)},$url_path:function(){return $e()},$url_domain:function(){return $e()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Ae(Se.element_content)},$element_id:function(){return Ae(Se.element_id)},$element_type:function(){return Ae(Se.element_type)},$element_function:function(){return Ae(Se.element_function)},$element_name:function(){return Ae(Se.element_name)},$appid:function(){return ae.$appid},$appname:function(){return ae.$appname}};function xe(e){var t={appid:ae.appkey,xwho:Re.xwho(),xwhat:Re.xwhat(e),xwhen:Re.xwhen(),xcontext:{}},n=m[e];function r(e){var n=Re[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Te={};function we(){return Te}var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");Pe.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),we(),n),ve(o)}function be(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-Pe.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),we(),t),Te={},ve(e)}}function Oe(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&x(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,T(o,e)),ve(r)}function Ie(e,t){Oe("$profile_set_once",e,t)}function Ue(e,t){Oe("$profile_set",e,t)}function ke(e,t){Oe("$profile_increment",e,t)}function Ke(e,t){Oe("$profile_append",e,t)}function Le(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),ve(n)}function Ne(){ve(xe("$profile_delete"))}function Fe(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Ee(Object.assign(o,{function:n}));var a=xe("$user_click");a.xcontext=Object.assign({},a.xcontext,N(),we()),ve(a)}}function Ce(e){Ee({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),we()),ve(t)}function Ve(){P.ARK_ID=K(),P.ARK_TRACKID="",P.ARK_LOGINID="",P.ARKSUPER={},P.ARKFRISTPROFILE="",P.ARKFRISTPROFILESEND=!1,L(),!0===ae.autoProfile&&Ie({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ye(e){Pe.timeEvent[e]=W()}function ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function Be(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),T(t,e)),Pe.timeEvent[e]&&(n.xcontext.$duration=W()-Pe.timeEvent[e],delete Pe[e]),ve(n)}else S({code:600025,fn:"track",value:e})}function Ge(t){var n;E(t)?(n=t,P.ARK_TRACKID=n,D(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function Ze(e){var t=P.ARK_TRACKID||P.ARK_ID;return e&&e(t),t}function We(e){var t=T(e,"$pageProperty");!function(e){Te=Object.assign({},Te,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function He(e,t){var n=k(),r=$e(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),a={$share_id:n,$share_level:o,$share_path:r},i={};t&&(i=T(t,"$share")),e.xcontext=Object.assign({},e.xcontext,a,N(),i),ve(e)}))();var a="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var i=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+i+a,e}var qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function Je(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function Xe(e){Je(e,"onShow",(function(){if(!0===ae.auto){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]||(re(De)(),Pe.pageview.state[e]=!0)}else Pe.pageview.xwhen=W()}));var t=function(){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]&&delete Pe.pageview.state[e]};if(Je(e,"onHide",(function(){ae.autoPageViewDuration&&be(),t()})),Je(e,"onUnload",(function(){ae.autoPageViewDuration&&be(),t()})),1==ae.autoShare&&Je(e,"onShareAppMessage",He),1==ae.autoTrack)for(var n in e){var r=e[n];s(r)&&qe.indexOf(n)<0?Je(e,n,je):s(r)&&"onTabItemTap"==n&&Je(e,n,Ce)}}var Qe=App,et=Page,tt=Component;function nt(e){Je(e,"onLaunch",(function(e){!function(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}(e)})),Je(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?l.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function x(e,t){var n=!1;if(a(e)||o(e)||i(e)||u(e))if(n=!0,a(e))E(e,255)||(n=!1);else if(i(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&x(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var w,P,D=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=P),e.setStorageSync(t,n)};function b(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function o(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,a),i),c)),r(n(e,u),t)}function a(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,a),i),c)),r(n(e,u),t)}function i(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,a),i),c)),r(n(e,u),t)}function u(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,a),i),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,p,l,d,g,h,m,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),a=Array(o-1),i=0,u=0;u>>29,a}(e),h=1732584193,m=4023233417,v=2562383102,y=271733878,f=0;f=0;n--){var r=P.POSTDATA[n];t[r.xwhen]&&P.POSTDATA.splice(n,1)}D()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rae.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ae),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ae)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,P.ARKSUPER=Object.assign({},P.ARKSUPER,n),D(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function pe(){return N()}function le(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function me(t){var n=p(P.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ae.uploadURL+"/up?appid="+ae.appkey,data:ge,encryptType:ae.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ae.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ae.sendDataTimeout}).then((function(e){j(ge),ge=[],me(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(me(),he++)}))}}function ve(e,t){ae.appkey?ae.uploadURL?(M(e),me(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function $e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,a=Object.keys(o);if(a.length){var i="";return a.forEach((function(e,t){t&&(i+="&"),i+=e+"="+o[e]})),r+"?"+i}}return r}return""}function Ae(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Se={};function Ee(e){Se.element_function=e.function||"",Se.element_id=e.id||"",Se.element_content=e.content||"",Se.element_type=e.type||"",Se.element_name=e.name||""}var Re={xwho:function(){return k()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return ae.debugMode},$is_login:function(){return!!P.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=P.SEESIONDATE?new Date(P.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!P.SEESIONID||!P.SEESIONDATE||t-P.SEESIONDATE>18e5||o!==r)&&L(),P.SEESIONID;var e,t,n,r,o},$screen_width:function(){return w.screenWidth},$screen_height:function(){return w.screenHeight},$os:function(){var e=w.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return w.brand},$browser_version:function(){return w.version},$os_version:function(){return w.system?w.system.split(" ")[1]:""},$model:function(){return w.model},$language:function(){return w.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!P.ARKFRISTPROFILE},$is_first_day:function(){var e=P.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return P.ARKFRISTPROFILE},$first_visit_language:function(){return w.language},$original_id:function(){return P.ARK_TRACKID||P.ARK_ID},$is_time_calibrated:function(){return!(!ae.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return $e(ae.autoCompleteURL)},$url_path:function(){return $e()},$url_domain:function(){return $e()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Ae(Se.element_content)},$element_id:function(){return Ae(Se.element_id)},$element_type:function(){return Ae(Se.element_type)},$element_function:function(){return Ae(Se.element_function)},$element_name:function(){return Ae(Se.element_name)},$appid:function(){return ae.$appid},$appname:function(){return ae.$appname}};function xe(e){var t={appid:ae.appkey,xwho:Re.xwho(),xwhat:Re.xwhat(e),xwhen:Re.xwhen(),xcontext:{}},n=m[e];function r(e){var n=Re[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Te={};function we(){return Te}var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");Pe.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),we(),n),ve(o)}function be(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-Pe.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),we(),t),Te={},ve(e)}}function Oe(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&x(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,T(o,e)),ve(r)}function Ie(e,t){Oe("$profile_set_once",e,t)}function Ue(e,t){Oe("$profile_set",e,t)}function ke(e,t){Oe("$profile_increment",e,t)}function Ke(e,t){Oe("$profile_append",e,t)}function Le(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),ve(n)}function Ne(){ve(xe("$profile_delete"))}function Fe(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Ee(Object.assign(o,{function:n}));var a=xe("$user_click");a.xcontext=Object.assign({},a.xcontext,N(),we()),ve(a)}}function Ce(e){Ee({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),we()),ve(t)}function Ve(){P.ARK_ID=K(),P.ARK_TRACKID="",P.ARK_LOGINID="",P.ARKSUPER={},P.ARKFRISTPROFILE="",P.ARKFRISTPROFILESEND=!1,L(),!0===ae.autoProfile&&Ie({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ye(e){Pe.timeEvent[e]=W()}function ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function Be(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),T(t,e)),Pe.timeEvent[e]&&(n.xcontext.$duration=W()-Pe.timeEvent[e],delete Pe[e]),ve(n)}else S({code:600025,fn:"track",value:e})}function Ge(t){var n;E(t)?(n=t,P.ARK_TRACKID=n,D(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function Ze(e){var t=P.ARK_TRACKID||P.ARK_ID;return e&&e(t),t}function We(e){var t=T(e,"$pageProperty");!function(e){Te=Object.assign({},Te,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function He(e,t){var n=k(),r=$e(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),a={$share_id:n,$share_level:o,$share_path:r},i={};t&&(i=T(t,"$share")),e.xcontext=Object.assign({},e.xcontext,a,N(),i),ve(e)}))();var a="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var i=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+i+a,e}var qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function Je(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function Xe(e){Je(e,"onShow",(function(){if(!0===ae.auto){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]||(re(De)(),Pe.pageview.state[e]=!0)}else Pe.pageview.xwhen=W()}));var t=function(){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]&&delete Pe.pageview.state[e]};if(Je(e,"onHide",(function(){ae.autoPageViewDuration&&be(),t()})),Je(e,"onUnload",(function(){ae.autoPageViewDuration&&be(),t()})),1==ae.autoShare&&Je(e,"onShareAppMessage",He),1==ae.autoTrack)for(var n in e){var r=e[n];s(r)&&qe.indexOf(n)<0?Je(e,n,je):s(r)&&"onTabItemTap"==n&&Je(e,n,Ce)}}var Qe=App,et=Page,tt=Component;function nt(e){Je(e,"onLaunch",(function(e){!function(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}(e)})),Je(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?l.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function x(e,t){var n=!1;if(a(e)||o(e)||i(e)||u(e))if(n=!0,a(e))E(e,255)||(n=!1);else if(i(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&x(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var w,P,D=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=P),e.setStorageSync(t,n)};function b(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function o(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,a),i),c)),r(n(e,u),t)}function a(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,a),i),c)),r(n(e,u),t)}function i(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,a),i),c)),r(n(e,u),t)}function u(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,a),i),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,p,l,d,g,h,m,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),a=Array(o-1),i=0,u=0;u>>29,a}(e),h=1732584193,m=4023233417,v=2562383102,y=271733878,f=0;f=0;n--){var r=P.POSTDATA[n];t[r.xwhen]&&P.POSTDATA.splice(n,1)}D()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rae.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ae),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ae)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,P.ARKSUPER=Object.assign({},P.ARKSUPER,n),D(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function pe(){return N()}function le(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function me(t){var n=p(P.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ae.uploadURL+"/up?appid="+ae.appkey,data:ge,encryptType:ae.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ae.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ae.sendDataTimeout}).then((function(e){j(ge),ge=[],me(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(me(),he++)}))}}function ve(e,t){ae.appkey?ae.uploadURL?(M(e),me(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function $e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,a=Object.keys(o);if(a.length){var i="";return a.forEach((function(e,t){t&&(i+="&"),i+=e+"="+o[e]})),r+"?"+i}}return r}return""}function Ae(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Se={};function Ee(e){Se.element_function=e.function||"",Se.element_id=e.id||"",Se.element_content=e.content||"",Se.element_type=e.type||"",Se.element_name=e.name||""}var Re={xwho:function(){return k()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return ae.debugMode},$is_login:function(){return!!P.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=P.SEESIONDATE?new Date(P.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!P.SEESIONID||!P.SEESIONDATE||t-P.SEESIONDATE>18e5||o!==r)&&L(),P.SEESIONID;var e,t,n,r,o},$screen_width:function(){return w.screenWidth},$screen_height:function(){return w.screenHeight},$os:function(){var e=w.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return w.brand},$browser_version:function(){return w.version},$os_version:function(){return w.system?w.system.split(" ")[1]:""},$model:function(){return w.model},$language:function(){return w.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!P.ARKFRISTPROFILE},$is_first_day:function(){var e=P.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return P.ARKFRISTPROFILE},$first_visit_language:function(){return w.language},$original_id:function(){return P.ARK_TRACKID||P.ARK_ID},$is_time_calibrated:function(){return!(!ae.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return $e(ae.autoCompleteURL)},$url_path:function(){return $e()},$url_domain:function(){return $e()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Ae(Se.element_content)},$element_id:function(){return Ae(Se.element_id)},$element_type:function(){return Ae(Se.element_type)},$element_function:function(){return Ae(Se.element_function)},$element_name:function(){return Ae(Se.element_name)},$appid:function(){return ae.$appid},$appname:function(){return ae.$appname}};function xe(e){var t={appid:ae.appkey,xwho:Re.xwho(),xwhat:Re.xwhat(e),xwhen:Re.xwhen(),xcontext:{}},n=m[e];function r(e){var n=Re[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Te={};function we(){return Te}var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");Pe.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),we(),n),ve(o)}function be(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-Pe.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),we(),t),Te={},ve(e)}}function Oe(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&x(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,T(o,e)),ve(r)}function Ie(e,t){Oe("$profile_set_once",e,t)}function Ue(e,t){Oe("$profile_set",e,t)}function ke(e,t){Oe("$profile_increment",e,t)}function Ke(e,t){Oe("$profile_append",e,t)}function Le(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),ve(n)}function Ne(){ve(xe("$profile_delete"))}function Fe(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Ee(Object.assign(o,{function:n}));var a=xe("$user_click");a.xcontext=Object.assign({},a.xcontext,N(),we()),ve(a)}}function Ce(e){Ee({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),we()),ve(t)}function Ve(){P.ARK_ID=K(),P.ARK_TRACKID="",P.ARK_LOGINID="",P.ARKSUPER={},P.ARKFRISTPROFILE="",P.ARKFRISTPROFILESEND=!1,L(),!0===ae.autoProfile&&Ie({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ye(e){Pe.timeEvent[e]=W()}function ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function Be(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),T(t,e)),Pe.timeEvent[e]&&(n.xcontext.$duration=W()-Pe.timeEvent[e],delete Pe[e]),ve(n)}else S({code:600025,fn:"track",value:e})}function Ge(t){var n;E(t)?(n=t,P.ARK_TRACKID=n,D(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function Ze(e){var t=P.ARK_TRACKID||P.ARK_ID;return e&&e(t),t}function We(e){var t=T(e,"$pageProperty");!function(e){Te=Object.assign({},Te,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function He(e,t){var n=k(),r=$e(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),a={$share_id:n,$share_level:o,$share_path:r},i={};t&&(i=T(t,"$share")),e.xcontext=Object.assign({},e.xcontext,a,N(),i),ve(e)}))();var a="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var i=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+i+a,e}var qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function Je(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function Xe(e){Je(e,"onShow",(function(){if(!0===ae.auto){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]||(re(De)(),Pe.pageview.state[e]=!0)}else Pe.pageview.xwhen=W()}));var t=function(){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]&&delete Pe.pageview.state[e]};if(Je(e,"onHide",(function(){ae.autoPageViewDuration&&be(),t()})),Je(e,"onUnload",(function(){ae.autoPageViewDuration&&be(),t()})),1==ae.autoShare&&Je(e,"onShareAppMessage",He),1==ae.autoTrack)for(var n in e){var r=e[n];s(r)&&qe.indexOf(n)<0?Je(e,n,je):s(r)&&"onTabItemTap"==n&&Je(e,n,Ce)}}var Qe=App,et=Page,tt=Component;function nt(e){Je(e,"onLaunch",(function(e){!function(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}(e)})),Je(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?l.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function x(e,t){var n=!1;if(a(e)||o(e)||i(e)||u(e))if(n=!0,a(e))E(e,255)||(n=!1);else if(i(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&x(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var w,P,D=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=P),e.setStorageSync(t,n)};function b(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function o(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,a),i),c)),r(n(e,u),t)}function a(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,a),i),c)),r(n(e,u),t)}function i(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,a),i),c)),r(n(e,u),t)}function u(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,a),i),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,p,l,d,g,h,m,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),a=Array(o-1),i=0,u=0;u>>29,a}(e),h=1732584193,m=4023233417,v=2562383102,y=271733878,f=0;f=0;n--){var r=P.POSTDATA[n];t[r.xwhen]&&P.POSTDATA.splice(n,1)}D()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rae.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ae),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ae)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,P.ARKSUPER=Object.assign({},P.ARKSUPER,n),D(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function pe(){return N()}function le(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function me(t){var n=p(P.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ae.uploadURL+"/up?appid="+ae.appkey,data:ge,encryptType:ae.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ae.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ae.sendDataTimeout}).then((function(e){j(ge),ge=[],me(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(me(),he++)}))}}function ve(e,t){ae.appkey?ae.uploadURL?(M(e),me(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function $e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,a=Object.keys(o);if(a.length){var i="";return a.forEach((function(e,t){t&&(i+="&"),i+=e+"="+o[e]})),r+"?"+i}}return r}return""}function Ae(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Se={};function Ee(e){Se.element_function=e.function||"",Se.element_id=e.id||"",Se.element_content=e.content||"",Se.element_type=e.type||"",Se.element_name=e.name||""}var Re={xwho:function(){return k()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return ae.debugMode},$is_login:function(){return!!P.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=P.SEESIONDATE?new Date(P.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!P.SEESIONID||!P.SEESIONDATE||t-P.SEESIONDATE>18e5||o!==r)&&L(),P.SEESIONID;var e,t,n,r,o},$screen_width:function(){return w.screenWidth},$screen_height:function(){return w.screenHeight},$os:function(){var e=w.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return w.brand},$browser_version:function(){return w.version},$os_version:function(){return w.system?w.system.split(" ")[1]:""},$model:function(){return w.model},$language:function(){return w.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!P.ARKFRISTPROFILE},$is_first_day:function(){var e=P.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return P.ARKFRISTPROFILE},$first_visit_language:function(){return w.language},$original_id:function(){return P.ARK_TRACKID||P.ARK_ID},$is_time_calibrated:function(){return!(!ae.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return $e(ae.autoCompleteURL)},$url_path:function(){return $e()},$url_domain:function(){return $e()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Ae(Se.element_content)},$element_id:function(){return Ae(Se.element_id)},$element_type:function(){return Ae(Se.element_type)},$element_function:function(){return Ae(Se.element_function)},$element_name:function(){return Ae(Se.element_name)},$appid:function(){return ae.$appid},$appname:function(){return ae.$appname}};function xe(e){var t={appid:ae.appkey,xwho:Re.xwho(),xwhat:Re.xwhat(e),xwhen:Re.xwhen(),xcontext:{}},n=m[e];function r(e){var n=Re[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Te={};function we(){return Te}var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");Pe.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),we(),n),ve(o)}function be(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-Pe.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),we(),t),Te={},ve(e)}}function Oe(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&x(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,T(o,e)),ve(r)}function Ie(e,t){Oe("$profile_set_once",e,t)}function Ue(e,t){Oe("$profile_set",e,t)}function ke(e,t){Oe("$profile_increment",e,t)}function Ke(e,t){Oe("$profile_append",e,t)}function Le(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),ve(n)}function Ne(){ve(xe("$profile_delete"))}function Fe(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Ee(Object.assign(o,{function:n}));var a=xe("$user_click");a.xcontext=Object.assign({},a.xcontext,N(),we()),ve(a)}}function Ce(e){Ee({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),we()),ve(t)}function Ve(){P.ARK_ID=K(),P.ARK_TRACKID="",P.ARK_LOGINID="",P.ARKSUPER={},P.ARKFRISTPROFILE="",P.ARKFRISTPROFILESEND=!1,L(),!0===ae.autoProfile&&Ie({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ye(e){Pe.timeEvent[e]=W()}function ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function Be(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),T(t,e)),Pe.timeEvent[e]&&(n.xcontext.$duration=W()-Pe.timeEvent[e],delete Pe[e]),ve(n)}else S({code:600025,fn:"track",value:e})}function Ge(t){var n;E(t)?(n=t,P.ARK_TRACKID=n,D(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function Ze(e){var t=P.ARK_TRACKID||P.ARK_ID;return e&&e(t),t}function We(e){var t=T(e,"$pageProperty");!function(e){Te=Object.assign({},Te,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function He(e,t){var n=k(),r=$e(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),a={$share_id:n,$share_level:o,$share_path:r},i={};t&&(i=T(t,"$share")),e.xcontext=Object.assign({},e.xcontext,a,N(),i),ve(e)}))();var a="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var i=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+i+a,e}var qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function Je(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function Xe(e){Je(e,"onShow",(function(){if(!0===ae.auto){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]||(re(De)(),Pe.pageview.state[e]=!0)}else Pe.pageview.xwhen=W()}));var t=function(){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]&&delete Pe.pageview.state[e]};if(Je(e,"onHide",(function(){ae.autoPageViewDuration&&be(),t()})),Je(e,"onUnload",(function(){ae.autoPageViewDuration&&be(),t()})),1==ae.autoShare&&Je(e,"onShareAppMessage",He),1==ae.autoTrack)for(var n in e){var r=e[n];s(r)&&qe.indexOf(n)<0?Je(e,n,je):s(r)&&"onTabItemTap"==n&&Je(e,n,Ce)}}var Qe=App,et=Page,tt=Component;function nt(e){Je(e,"onLaunch",(function(e){!function(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}(e)})),Je(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function P(e,t){var n=!1;if(o(e)||i(e)||a(e)||u(e))if(n=!0,o(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var i=e[r];R(r,{code:600023,fn:t,key:r})&&P(i,{code:600022,fn:t,key:r,value:i})&&(n[r]=i)}}return n}var D,w,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=w),e.setStorageSync(t,n)};function x(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^i^o:n|r?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function i(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,i,o),a),c)),r(n(e,u),t)}function o(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,i,o),a),c)),r(n(e,u),t)}function a(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,i,o),a),c)),r(n(e,u),t)}function u(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,i,o),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,y,m,g,h,v;for(s=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),a=0,u=0;u>>29,o}(e),m=1732584193,g=4023233417,h=2562383102,v=271733878,f=0;f=0;n--){var r=w.POSTDATA[n];t[r.xwhen]&&w.POSTDATA.splice(n,1)}b()}var V={networkType:""},j=!1;e.onNetworkStatusChange((function(e){V.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,i){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?i(t):r(t)},fail:function(e){n&&n(e),i(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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 i in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[i]).length<3?("00"+r[i]).substr(("00"+r[i]).length-3,("00"+r[i]).length):r[i]:("00"+r[i]).substr((""+r[i]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var q={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function J(t,n,r){if(!q[t]&&e.AnalysysAgent){var i=e.AnalysysAgent[n];s(i)&&i(r),q[t]=!0}}var H=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){J("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){J("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&j};function re(e,t){return function(){for(var n=[],r=0;roe.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(H(oe),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(oe)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,w.ARKSUPER=Object.assign({},w.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ye=[],me=0;function ge(t){var n=l(w.POSTDATA);if(!ye.length&&n.length){ye=n.splice(0,20);var r={url:oe.uploadURL+"/up?appid="+oe.appkey,data:ye,encryptType:oe.encryptType};if(A({key:r.url,value:ye,code:20012}),1===oe.debugMode)return C(ye),void(ye=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ye),Y({url:r.url,method:"POST",data:r.data,timeout:oe.sendDataTimeout}).then((function(e){C(ye),ye=[],ge(),t&&t(),A({code:20001}),me=0})).catch((function(e){ye=[],S({code:60008}),me<3&&(ge(),me++)}))}}function he(e,t){oe.appkey?oe.uploadURL?(M(e),ge(t)):S({code:60007}):S({code:60006})}var ve={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var i=n.options,o=Object.keys(i);if(o.length){var a="";return o.forEach((function(e,t){t&&(a+="&"),a+=e+"="+i[e]})),r+"?"+a}}return r}return""}function $e(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ae={},Se={xwho:function(){return K()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return oe.debugMode},$is_login:function(){return!!w.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),i=w.SEESIONDATE?new Date(w.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!w.SEESIONID||!w.SEESIONDATE||t-w.SEESIONDATE>18e5||i!==r)&&L(),w.SEESIONID;var e,t,n,r,i},$screen_width:function(){return D.screenWidth},$screen_height:function(){return D.screenHeight},$os:function(){var e=D.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return D.brand},$browser_version:function(){return D.version},$os_version:function(){return D.system?D.system.split(" ")[1]:""},$model:function(){return D.model},$language:function(){return D.language},$network:function(){return V.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!w.ARKFRISTPROFILE},$is_first_day:function(){var e=w.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return w.ARKFRISTPROFILE},$first_visit_language:function(){return D.language},$original_id:function(){return w.ARK_TRACKID||w.ARK_ID},$is_time_calibrated:function(){return!(!oe.allowTimeCheck||!Z)},$scene:function(){return ve.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ve.scene+""}()},$url:function(){return _e(oe.autoCompleteURL)},$url_path:function(){return _e()},$url_domain:function(){return _e()},$utm_campaign_id:function(){return ve.utm_campaign_id},$utm_source:function(){return ve.utm_source},$utm_medium:function(){return ve.utm_medium},$utm_term:function(){return ve.utm_term},$utm_content:function(){return ve.utm_content},$utm_campaign:function(){return ve.utm_campaign},$share_id:function(){return ve.share_id},$share_level:function(){return null==(e=ve.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ve.share_path},$element_content:function(){return $e(Ae.element_content)},$element_id:function(){return $e(Ae.element_id)},$element_type:function(){return $e(Ae.element_type)},$element_function:function(){return $e(Ae.element_function)},$element_name:function(){return $e(Ae.element_name)},$appid:function(){return oe.$appid},$appname:function(){return oe.$appname}};function Ee(e){var t={appid:oe.appkey,xwho:Se.xwho(),xwhat:Se.xwhat(e),xwhen:Se.xwhen(),xcontext:{}},n=g[e];function r(e){var n=Se[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Re={};var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function Te(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var i=Ee("$pageview");Pe.pageview.xwhen=i.xwhen,i.xcontext=Object.assign({},i.xcontext,N(),Re,n),he(i)}function De(e,t,n){var r=Ee(e),i={};c(t)&&(i=t),E(t)&&P(n)&&(i[t]=n),r.xcontext=Object.assign({},r.xcontext,T(i,e)),he(r)}function we(e,t){De("$profile_set_once",e,t)}function be(e,t){De("$profile_set",e,t)}function xe(e,t){De("$profile_increment",e,t)}function Oe(e,t){De("$profile_append",e,t)}function Ie(e){var t,n=Ee("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),he(n)}function Ue(){he(Ee("$profile_delete"))}function Ke(e){var t,n;(n=(t=e).query)&&(ve.utm_campaign_id=t.query.campaign_id,ve.utm_campaign=n.utm_campaign,ve.utm_content=n.utm_content,ve.utm_medium=n.utm_medium,ve.utm_source=n.utm_source,ve.utm_term=n.utm_term),n.share_id&&n.share_level&&n.share_path&&(ve.share_id=n.share_id,ve.share_level=n.share_level,ve.share_path=decodeURIComponent(n.share_path)),t.scene&&(ve.scene=t.scene),function(){for(var e=[],t=0;t-1?"&":"?";return e.path=e.path+a+o,e}var ze=function(){function e(){this.config={appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""},this.appStart=re(Ke),this.pageView=re(Te),this.share=Ye,this.registerSuperProperty=ce,this.registerSuperProperties=se,this.getSuperProperty=fe,this.getSuperProperties=le,this.unRegisterSuperProperty=pe,this.clearSuperProperties=de,this.profileSetOnce=we,this.profileSet=be,this.profileAppend=Oe,this.profileIncrement=xe,this.profileDelete=Ue,this.profileUnset=Ie,this.reset=Le,this.track=re(Me),this.timeEvent=Ne,this.alias=re(ke),this.getPresetProperties=Fe,this.identify=Ce,this.getDistinctId=Ve,this.pageProperty=je,I()}return e.prototype.init=function(e){var t=this;ae(e).then((function(e){t.config=e,A({code:20007})}))},e}();Object.keys({appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""}).forEach((function(e){Object.defineProperty(ze.prototype,e,{get:function(){return this.config[e]},set:function(t){var n,r=this;ae((n={},n[e]=t,n)).then((function(e){r.config=e}))},enumerable:!1,configurable:!0})}));var Be=new ze;e.AnalysysAgent=Be;export default Be; +***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function P(e,t){var n=!1;if(o(e)||i(e)||a(e)||u(e))if(n=!0,o(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var i=e[r];R(r,{code:600023,fn:t,key:r})&&P(i,{code:600022,fn:t,key:r,value:i})&&(n[r]=i)}}return n}var D,w,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=w),e.setStorageSync(t,n)};function x(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^i^o:n|r?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function i(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,i,o),a),c)),r(n(e,u),t)}function o(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,i,o),a),c)),r(n(e,u),t)}function a(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,i,o),a),c)),r(n(e,u),t)}function u(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,i,o),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,y,m,g,h,v;for(s=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),a=0,u=0;u>>29,o}(e),m=1732584193,g=4023233417,h=2562383102,v=271733878,f=0;f=0;n--){var r=w.POSTDATA[n];t[r.xwhen]&&w.POSTDATA.splice(n,1)}b()}var V={networkType:""},j=!1;e.onNetworkStatusChange((function(e){V.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,i){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?i(t):r(t)},fail:function(e){n&&n(e),i(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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 i in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[i]).length<3?("00"+r[i]).substr(("00"+r[i]).length-3,("00"+r[i]).length):r[i]:("00"+r[i]).substr((""+r[i]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var q={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function J(t,n,r){if(!q[t]&&e.AnalysysAgent){var i=e.AnalysysAgent[n];s(i)&&i(r),q[t]=!0}}var H=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){J("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){J("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&j};function re(e,t){return function(){for(var n=[],r=0;roe.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(H(oe),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(oe)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,w.ARKSUPER=Object.assign({},w.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ye=[],me=0;function ge(t){var n=l(w.POSTDATA);if(!ye.length&&n.length){ye=n.splice(0,20);var r={url:oe.uploadURL+"/up?appid="+oe.appkey,data:ye,encryptType:oe.encryptType};if(A({key:r.url,value:ye,code:20012}),1===oe.debugMode)return C(ye),void(ye=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ye),Y({url:r.url,method:"POST",data:r.data,timeout:oe.sendDataTimeout}).then((function(e){C(ye),ye=[],ge(),t&&t(),A({code:20001}),me=0})).catch((function(e){ye=[],S({code:60008}),me<3&&(ge(),me++)}))}}function he(e,t){oe.appkey?oe.uploadURL?(M(e),ge(t)):S({code:60007}):S({code:60006})}var ve={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var i=n.options,o=Object.keys(i);if(o.length){var a="";return o.forEach((function(e,t){t&&(a+="&"),a+=e+"="+i[e]})),r+"?"+a}}return r}return""}function $e(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ae={},Se={xwho:function(){return K()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return oe.debugMode},$is_login:function(){return!!w.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),i=w.SEESIONDATE?new Date(w.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!w.SEESIONID||!w.SEESIONDATE||t-w.SEESIONDATE>18e5||i!==r)&&L(),w.SEESIONID;var e,t,n,r,i},$screen_width:function(){return D.screenWidth},$screen_height:function(){return D.screenHeight},$os:function(){var e=D.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return D.brand},$browser_version:function(){return D.version},$os_version:function(){return D.system?D.system.split(" ")[1]:""},$model:function(){return D.model},$language:function(){return D.language},$network:function(){return V.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!w.ARKFRISTPROFILE},$is_first_day:function(){var e=w.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return w.ARKFRISTPROFILE},$first_visit_language:function(){return D.language},$original_id:function(){return w.ARK_TRACKID||w.ARK_ID},$is_time_calibrated:function(){return!(!oe.allowTimeCheck||!Z)},$scene:function(){return ve.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ve.scene+""}()},$url:function(){return _e(oe.autoCompleteURL)},$url_path:function(){return _e()},$url_domain:function(){return _e()},$utm_campaign_id:function(){return ve.utm_campaign_id},$utm_source:function(){return ve.utm_source},$utm_medium:function(){return ve.utm_medium},$utm_term:function(){return ve.utm_term},$utm_content:function(){return ve.utm_content},$utm_campaign:function(){return ve.utm_campaign},$share_id:function(){return ve.share_id},$share_level:function(){return null==(e=ve.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ve.share_path},$element_content:function(){return $e(Ae.element_content)},$element_id:function(){return $e(Ae.element_id)},$element_type:function(){return $e(Ae.element_type)},$element_function:function(){return $e(Ae.element_function)},$element_name:function(){return $e(Ae.element_name)},$appid:function(){return oe.$appid},$appname:function(){return oe.$appname}};function Ee(e){var t={appid:oe.appkey,xwho:Se.xwho(),xwhat:Se.xwhat(e),xwhen:Se.xwhen(),xcontext:{}},n=g[e];function r(e){var n=Se[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Re={};var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function Te(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var i=Ee("$pageview");Pe.pageview.xwhen=i.xwhen,i.xcontext=Object.assign({},i.xcontext,N(),Re,n),he(i)}function De(e,t,n){var r=Ee(e),i={};c(t)&&(i=t),E(t)&&P(n)&&(i[t]=n),r.xcontext=Object.assign({},r.xcontext,T(i,e)),he(r)}function we(e,t){De("$profile_set_once",e,t)}function be(e,t){De("$profile_set",e,t)}function xe(e,t){De("$profile_increment",e,t)}function Oe(e,t){De("$profile_append",e,t)}function Ie(e){var t,n=Ee("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),he(n)}function Ue(){he(Ee("$profile_delete"))}function Ke(e){var t,n;(n=(t=e).query)&&(ve.utm_campaign_id=t.query.campaign_id,ve.utm_campaign=n.utm_campaign,ve.utm_content=n.utm_content,ve.utm_medium=n.utm_medium,ve.utm_source=n.utm_source,ve.utm_term=n.utm_term),n.share_id&&n.share_level&&n.share_path&&(ve.share_id=n.share_id,ve.share_level=n.share_level,ve.share_path=decodeURIComponent(n.share_path)),t.scene&&(ve.scene=t.scene),function(){for(var e=[],t=0;t-1?"&":"?";return e.path=e.path+a+o,e}var ze=function(){function e(){this.config={appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""},this.appStart=re(Ke),this.pageView=re(Te),this.share=Ye,this.registerSuperProperty=ce,this.registerSuperProperties=se,this.getSuperProperty=fe,this.getSuperProperties=le,this.unRegisterSuperProperty=pe,this.clearSuperProperties=de,this.profileSetOnce=we,this.profileSet=be,this.profileAppend=Oe,this.profileIncrement=xe,this.profileDelete=Ue,this.profileUnset=Ie,this.reset=Le,this.track=re(Me),this.timeEvent=Ne,this.alias=re(ke),this.getPresetProperties=Fe,this.identify=Ce,this.getDistinctId=Ve,this.pageProperty=je,I()}return e.prototype.init=function(e){var t=this;ae(e).then((function(e){t.config=e,A({code:20007})}))},e}();Object.keys({appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""}).forEach((function(e){Object.defineProperty(ze.prototype,e,{get:function(){return this.config[e]},set:function(t){var n,r=this;ae((n={},n[e]=t,n)).then((function(e){r.config=e}))},enumerable:!1,configurable:!0})}));var Be=new ze;e.AnalysysAgent=Be;export default Be; diff --git a/demo/taro/sdk/AnalysysAgent_WX_SDK.custom.min.js b/demo/taro/sdk/AnalysysAgent_WX_SDK.custom.min.js index 259ca02..68d91c7 100644 --- a/demo/taro/sdk/AnalysysAgent_WX_SDK.custom.min.js +++ b/demo/taro/sdk/AnalysysAgent_WX_SDK.custom.min.js @@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function P(e,t){var n=!1;if(o(e)||i(e)||a(e)||u(e))if(n=!0,o(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var i=e[r];R(r,{code:600023,fn:t,key:r})&&P(i,{code:600022,fn:t,key:r,value:i})&&(n[r]=i)}}return n}var D,w,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=w),e.setStorageSync(t,n)};function x(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^i^o:n|r?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function i(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,i,o),a),c)),r(n(e,u),t)}function o(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,i,o),a),c)),r(n(e,u),t)}function a(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,i,o),a),c)),r(n(e,u),t)}function u(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,i,o),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,m,y,g,h,v;for(s=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),a=0,u=0;u>>29,o}(e),y=1732584193,g=4023233417,h=2562383102,v=271733878,f=0;f=0;n--){var r=w.POSTDATA[n];t[r.xwhen]&&w.POSTDATA.splice(n,1)}b()}var V={networkType:""},j=!1;e.onNetworkStatusChange((function(e){V.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,i){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?i(t):r(t)},fail:function(e){n&&n(e),i(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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 i in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[i]).length<3?("00"+r[i]).substr(("00"+r[i]).length-3,("00"+r[i]).length):r[i]:("00"+r[i]).substr((""+r[i]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var q={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function J(t,n,r){if(!q[t]&&e.AnalysysAgent){var i=e.AnalysysAgent[n];s(i)&&i(r),q[t]=!0}}var H=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){J("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){J("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&j};function re(e,t){return function(){for(var n=[],r=0;roe.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(H(oe),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(oe)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,w.ARKSUPER=Object.assign({},w.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var me=[],ye=0;function ge(t){var n=l(w.POSTDATA);if(!me.length&&n.length){me=n.splice(0,20);var r={url:oe.uploadURL+"/up?appid="+oe.appkey,data:me,encryptType:oe.encryptType};if(A({key:r.url,value:me,code:20012}),1===oe.debugMode)return C(me),void(me=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(me),Y({url:r.url,method:"POST",data:r.data,timeout:oe.sendDataTimeout}).then((function(e){C(me),me=[],ge(),t&&t(),A({code:20001}),ye=0})).catch((function(e){me=[],S({code:60008}),ye<3&&(ge(),ye++)}))}}function he(e,t){oe.appkey?oe.uploadURL?(M(e),ge(t)):S({code:60007}):S({code:60006})}var ve={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var i=n.options,o=Object.keys(i);if(o.length){var a="";return o.forEach((function(e,t){t&&(a+="&"),a+=e+"="+i[e]})),r+"?"+a}}return r}return""}function $e(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ae={},Se={xwho:function(){return K()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return oe.debugMode},$is_login:function(){return!!w.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),i=w.SEESIONDATE?new Date(w.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!w.SEESIONID||!w.SEESIONDATE||t-w.SEESIONDATE>18e5||i!==r)&&L(),w.SEESIONID;var e,t,n,r,i},$screen_width:function(){return D.screenWidth},$screen_height:function(){return D.screenHeight},$os:function(){var e=D.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return D.brand},$browser_version:function(){return D.version},$os_version:function(){return D.system?D.system.split(" ")[1]:""},$model:function(){return D.model},$language:function(){return D.language},$network:function(){return V.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!w.ARKFRISTPROFILE},$is_first_day:function(){var e=w.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return w.ARKFRISTPROFILE},$first_visit_language:function(){return D.language},$original_id:function(){return w.ARK_TRACKID||w.ARK_ID},$is_time_calibrated:function(){return!(!oe.allowTimeCheck||!Z)},$scene:function(){return ve.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ve.scene+""}()},$url:function(){return _e(oe.autoCompleteURL)},$url_path:function(){return _e()},$url_domain:function(){return _e()},$utm_campaign_id:function(){return ve.utm_campaign_id},$utm_source:function(){return ve.utm_source},$utm_medium:function(){return ve.utm_medium},$utm_term:function(){return ve.utm_term},$utm_content:function(){return ve.utm_content},$utm_campaign:function(){return ve.utm_campaign},$share_id:function(){return ve.share_id},$share_level:function(){return null==(e=ve.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ve.share_path},$element_content:function(){return $e(Ae.element_content)},$element_id:function(){return $e(Ae.element_id)},$element_type:function(){return $e(Ae.element_type)},$element_function:function(){return $e(Ae.element_function)},$element_name:function(){return $e(Ae.element_name)},$appid:function(){return oe.$appid},$appname:function(){return oe.$appname}};function Ee(e){var t={appid:oe.appkey,xwho:Se.xwho(),xwhat:Se.xwhat(e),xwhen:Se.xwhen(),xcontext:{}},n=g[e];function r(e){var n=Se[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Re={};var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function Te(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var i=Ee("$pageview");Pe.pageview.xwhen=i.xwhen,i.xcontext=Object.assign({},i.xcontext,N(),Re,n),he(i)}function De(e,t,n){var r=Ee(e),i={};c(t)&&(i=t),E(t)&&P(n)&&(i[t]=n),r.xcontext=Object.assign({},r.xcontext,T(i,e)),he(r)}function we(e,t){De("$profile_set_once",e,t)}function be(e,t){De("$profile_set",e,t)}function xe(e,t){De("$profile_increment",e,t)}function Oe(e,t){De("$profile_append",e,t)}function Ie(e){var t,n=Ee("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),he(n)}function Ue(){he(Ee("$profile_delete"))}function Ke(e){var t,n;(n=(t=e).query)&&(ve.utm_campaign_id=t.query.campaign_id,ve.utm_campaign=n.utm_campaign,ve.utm_content=n.utm_content,ve.utm_medium=n.utm_medium,ve.utm_source=n.utm_source,ve.utm_term=n.utm_term),n.share_id&&n.share_level&&n.share_path&&(ve.share_id=n.share_id,ve.share_level=n.share_level,ve.share_path=decodeURIComponent(n.share_path)),t.scene&&(ve.scene=t.scene),function(){for(var e=[],t=0;t-1?"&":"?";return e.path=e.path+a+o,e}var ze=function(){function e(){this.config={appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""},this.appStart=re(Ke),this.pageView=re(Te),this.share=Ye,this.registerSuperProperty=ce,this.registerSuperProperties=se,this.getSuperProperty=fe,this.getSuperProperties=le,this.unRegisterSuperProperty=pe,this.clearSuperProperties=de,this.profileSetOnce=we,this.profileSet=be,this.profileAppend=Oe,this.profileIncrement=xe,this.profileDelete=Ue,this.profileUnset=Ie,this.reset=Le,this.track=re(Me),this.timeEvent=Ne,this.alias=re(ke),this.getPresetProperties=Fe,this.identify=Ce,this.getDistinctId=Ve,this.pageProperty=je,I()}return e.prototype.init=function(e){var t=this;ae(e).then((function(e){t.config=e,A({code:20007})}))},e}();Object.keys({appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""}).forEach((function(e){Object.defineProperty(ze.prototype,e,{get:function(){return this.config[e]},set:function(t){var n,r=this;ae((n={},n[e]=t,n)).then((function(e){r.config=e}))},enumerable:!1,configurable:!0})}));var Be=new ze;e.AnalysysAgent=Be,module.exports=Be; +***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function P(e,t){var n=!1;if(o(e)||i(e)||a(e)||u(e))if(n=!0,o(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var i=e[r];R(r,{code:600023,fn:t,key:r})&&P(i,{code:600022,fn:t,key:r,value:i})&&(n[r]=i)}}return n}var D,w,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=w),e.setStorageSync(t,n)};function x(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^i^o:n|r?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function i(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,i,o),a),c)),r(n(e,u),t)}function o(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,i,o),a),c)),r(n(e,u),t)}function a(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,i,o),a),c)),r(n(e,u),t)}function u(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,i,o),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,m,y,g,h,v;for(s=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),a=0,u=0;u>>29,o}(e),y=1732584193,g=4023233417,h=2562383102,v=271733878,f=0;f=0;n--){var r=w.POSTDATA[n];t[r.xwhen]&&w.POSTDATA.splice(n,1)}b()}var V={networkType:""},j=!1;e.onNetworkStatusChange((function(e){V.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,i){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?i(t):r(t)},fail:function(e){n&&n(e),i(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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 i in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[i]).length<3?("00"+r[i]).substr(("00"+r[i]).length-3,("00"+r[i]).length):r[i]:("00"+r[i]).substr((""+r[i]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var q={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function J(t,n,r){if(!q[t]&&e.AnalysysAgent){var i=e.AnalysysAgent[n];s(i)&&i(r),q[t]=!0}}var H=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){J("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){J("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&j};function re(e,t){return function(){for(var n=[],r=0;roe.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(H(oe),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(oe)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,w.ARKSUPER=Object.assign({},w.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var me=[],ye=0;function ge(t){var n=l(w.POSTDATA);if(!me.length&&n.length){me=n.splice(0,20);var r={url:oe.uploadURL+"/up?appid="+oe.appkey,data:me,encryptType:oe.encryptType};if(A({key:r.url,value:me,code:20012}),1===oe.debugMode)return C(me),void(me=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(me),Y({url:r.url,method:"POST",data:r.data,timeout:oe.sendDataTimeout}).then((function(e){C(me),me=[],ge(),t&&t(),A({code:20001}),ye=0})).catch((function(e){me=[],S({code:60008}),ye<3&&(ge(),ye++)}))}}function he(e,t){oe.appkey?oe.uploadURL?(M(e),ge(t)):S({code:60007}):S({code:60006})}var ve={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var i=n.options,o=Object.keys(i);if(o.length){var a="";return o.forEach((function(e,t){t&&(a+="&"),a+=e+"="+i[e]})),r+"?"+a}}return r}return""}function $e(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ae={},Se={xwho:function(){return K()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return oe.debugMode},$is_login:function(){return!!w.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),i=w.SEESIONDATE?new Date(w.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!w.SEESIONID||!w.SEESIONDATE||t-w.SEESIONDATE>18e5||i!==r)&&L(),w.SEESIONID;var e,t,n,r,i},$screen_width:function(){return D.screenWidth},$screen_height:function(){return D.screenHeight},$os:function(){var e=D.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return D.brand},$browser_version:function(){return D.version},$os_version:function(){return D.system?D.system.split(" ")[1]:""},$model:function(){return D.model},$language:function(){return D.language},$network:function(){return V.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!w.ARKFRISTPROFILE},$is_first_day:function(){var e=w.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return w.ARKFRISTPROFILE},$first_visit_language:function(){return D.language},$original_id:function(){return w.ARK_TRACKID||w.ARK_ID},$is_time_calibrated:function(){return!(!oe.allowTimeCheck||!Z)},$scene:function(){return ve.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ve.scene+""}()},$url:function(){return _e(oe.autoCompleteURL)},$url_path:function(){return _e()},$url_domain:function(){return _e()},$utm_campaign_id:function(){return ve.utm_campaign_id},$utm_source:function(){return ve.utm_source},$utm_medium:function(){return ve.utm_medium},$utm_term:function(){return ve.utm_term},$utm_content:function(){return ve.utm_content},$utm_campaign:function(){return ve.utm_campaign},$share_id:function(){return ve.share_id},$share_level:function(){return null==(e=ve.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ve.share_path},$element_content:function(){return $e(Ae.element_content)},$element_id:function(){return $e(Ae.element_id)},$element_type:function(){return $e(Ae.element_type)},$element_function:function(){return $e(Ae.element_function)},$element_name:function(){return $e(Ae.element_name)},$appid:function(){return oe.$appid},$appname:function(){return oe.$appname}};function Ee(e){var t={appid:oe.appkey,xwho:Se.xwho(),xwhat:Se.xwhat(e),xwhen:Se.xwhen(),xcontext:{}},n=g[e];function r(e){var n=Se[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Re={};var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function Te(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var i=Ee("$pageview");Pe.pageview.xwhen=i.xwhen,i.xcontext=Object.assign({},i.xcontext,N(),Re,n),he(i)}function De(e,t,n){var r=Ee(e),i={};c(t)&&(i=t),E(t)&&P(n)&&(i[t]=n),r.xcontext=Object.assign({},r.xcontext,T(i,e)),he(r)}function we(e,t){De("$profile_set_once",e,t)}function be(e,t){De("$profile_set",e,t)}function xe(e,t){De("$profile_increment",e,t)}function Oe(e,t){De("$profile_append",e,t)}function Ie(e){var t,n=Ee("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),he(n)}function Ue(){he(Ee("$profile_delete"))}function Ke(e){var t,n;(n=(t=e).query)&&(ve.utm_campaign_id=t.query.campaign_id,ve.utm_campaign=n.utm_campaign,ve.utm_content=n.utm_content,ve.utm_medium=n.utm_medium,ve.utm_source=n.utm_source,ve.utm_term=n.utm_term),n.share_id&&n.share_level&&n.share_path&&(ve.share_id=n.share_id,ve.share_level=n.share_level,ve.share_path=decodeURIComponent(n.share_path)),t.scene&&(ve.scene=t.scene),function(){for(var e=[],t=0;t-1?"&":"?";return e.path=e.path+a+o,e}var ze=function(){function e(){this.config={appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""},this.appStart=re(Ke),this.pageView=re(Te),this.share=Ye,this.registerSuperProperty=ce,this.registerSuperProperties=se,this.getSuperProperty=fe,this.getSuperProperties=le,this.unRegisterSuperProperty=pe,this.clearSuperProperties=de,this.profileSetOnce=we,this.profileSet=be,this.profileAppend=Oe,this.profileIncrement=xe,this.profileDelete=Ue,this.profileUnset=Ie,this.reset=Le,this.track=re(Me),this.timeEvent=Ne,this.alias=re(ke),this.getPresetProperties=Fe,this.identify=Ce,this.getDistinctId=Ve,this.pageProperty=je,I()}return e.prototype.init=function(e){var t=this;ae(e).then((function(e){t.config=e,A({code:20007})}))},e}();Object.keys({appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""}).forEach((function(e){Object.defineProperty(ze.prototype,e,{get:function(){return this.config[e]},set:function(t){var n,r=this;ae((n={},n[e]=t,n)).then((function(e){r.config=e}))},enumerable:!1,configurable:!0})}));var Be=new ze;e.AnalysysAgent=Be,module.exports=Be; diff --git a/dist/AnalysysAgent_WX_SDK.custom.es6.min.js b/dist/AnalysysAgent_WX_SDK.custom.es6.min.js index ce9a131..002056f 100644 --- a/dist/AnalysysAgent_WX_SDK.custom.es6.min.js +++ b/dist/AnalysysAgent_WX_SDK.custom.es6.min.js @@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function P(e,t){var n=!1;if(o(e)||i(e)||a(e)||u(e))if(n=!0,o(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var i=e[r];R(r,{code:600023,fn:t,key:r})&&P(i,{code:600022,fn:t,key:r,value:i})&&(n[r]=i)}}return n}var D,w,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=w),e.setStorageSync(t,n)};function x(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^i^o:n|r?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function i(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,i,o),a),c)),r(n(e,u),t)}function o(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,i,o),a),c)),r(n(e,u),t)}function a(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,i,o),a),c)),r(n(e,u),t)}function u(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,i,o),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,y,m,g,h,v;for(s=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),a=0,u=0;u>>29,o}(e),m=1732584193,g=4023233417,h=2562383102,v=271733878,f=0;f=0;n--){var r=w.POSTDATA[n];t[r.xwhen]&&w.POSTDATA.splice(n,1)}b()}var V={networkType:""},j=!1;e.onNetworkStatusChange((function(e){V.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,i){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?i(t):r(t)},fail:function(e){n&&n(e),i(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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 i in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[i]).length<3?("00"+r[i]).substr(("00"+r[i]).length-3,("00"+r[i]).length):r[i]:("00"+r[i]).substr((""+r[i]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var q={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function J(t,n,r){if(!q[t]&&e.AnalysysAgent){var i=e.AnalysysAgent[n];s(i)&&i(r),q[t]=!0}}var H=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){J("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){J("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&j};function re(e,t){return function(){for(var n=[],r=0;roe.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(H(oe),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(oe)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,w.ARKSUPER=Object.assign({},w.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ye=[],me=0;function ge(t){var n=l(w.POSTDATA);if(!ye.length&&n.length){ye=n.splice(0,20);var r={url:oe.uploadURL+"/up?appid="+oe.appkey,data:ye,encryptType:oe.encryptType};if(A({key:r.url,value:ye,code:20012}),1===oe.debugMode)return C(ye),void(ye=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ye),Y({url:r.url,method:"POST",data:r.data,timeout:oe.sendDataTimeout}).then((function(e){C(ye),ye=[],ge(),t&&t(),A({code:20001}),me=0})).catch((function(e){ye=[],S({code:60008}),me<3&&(ge(),me++)}))}}function he(e,t){oe.appkey?oe.uploadURL?(M(e),ge(t)):S({code:60007}):S({code:60006})}var ve={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var i=n.options,o=Object.keys(i);if(o.length){var a="";return o.forEach((function(e,t){t&&(a+="&"),a+=e+"="+i[e]})),r+"?"+a}}return r}return""}function $e(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ae={},Se={xwho:function(){return K()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return oe.debugMode},$is_login:function(){return!!w.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),i=w.SEESIONDATE?new Date(w.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!w.SEESIONID||!w.SEESIONDATE||t-w.SEESIONDATE>18e5||i!==r)&&L(),w.SEESIONID;var e,t,n,r,i},$screen_width:function(){return D.screenWidth},$screen_height:function(){return D.screenHeight},$os:function(){var e=D.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return D.brand},$browser_version:function(){return D.version},$os_version:function(){return D.system?D.system.split(" ")[1]:""},$model:function(){return D.model},$language:function(){return D.language},$network:function(){return V.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!w.ARKFRISTPROFILE},$is_first_day:function(){var e=w.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return w.ARKFRISTPROFILE},$first_visit_language:function(){return D.language},$original_id:function(){return w.ARK_TRACKID||w.ARK_ID},$is_time_calibrated:function(){return!(!oe.allowTimeCheck||!Z)},$scene:function(){return ve.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ve.scene+""}()},$url:function(){return _e(oe.autoCompleteURL)},$url_path:function(){return _e()},$url_domain:function(){return _e()},$utm_campaign_id:function(){return ve.utm_campaign_id},$utm_source:function(){return ve.utm_source},$utm_medium:function(){return ve.utm_medium},$utm_term:function(){return ve.utm_term},$utm_content:function(){return ve.utm_content},$utm_campaign:function(){return ve.utm_campaign},$share_id:function(){return ve.share_id},$share_level:function(){return null==(e=ve.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ve.share_path},$element_content:function(){return $e(Ae.element_content)},$element_id:function(){return $e(Ae.element_id)},$element_type:function(){return $e(Ae.element_type)},$element_function:function(){return $e(Ae.element_function)},$element_name:function(){return $e(Ae.element_name)},$appid:function(){return oe.$appid},$appname:function(){return oe.$appname}};function Ee(e){var t={appid:oe.appkey,xwho:Se.xwho(),xwhat:Se.xwhat(e),xwhen:Se.xwhen(),xcontext:{}},n=g[e];function r(e){var n=Se[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Re={};var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function Te(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var i=Ee("$pageview");Pe.pageview.xwhen=i.xwhen,i.xcontext=Object.assign({},i.xcontext,N(),Re,n),he(i)}function De(e,t,n){var r=Ee(e),i={};c(t)&&(i=t),E(t)&&P(n)&&(i[t]=n),r.xcontext=Object.assign({},r.xcontext,T(i,e)),he(r)}function we(e,t){De("$profile_set_once",e,t)}function be(e,t){De("$profile_set",e,t)}function xe(e,t){De("$profile_increment",e,t)}function Oe(e,t){De("$profile_append",e,t)}function Ie(e){var t,n=Ee("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),he(n)}function Ue(){he(Ee("$profile_delete"))}function Ke(e){var t,n;(n=(t=e).query)&&(ve.utm_campaign_id=t.query.campaign_id,ve.utm_campaign=n.utm_campaign,ve.utm_content=n.utm_content,ve.utm_medium=n.utm_medium,ve.utm_source=n.utm_source,ve.utm_term=n.utm_term),n.share_id&&n.share_level&&n.share_path&&(ve.share_id=n.share_id,ve.share_level=n.share_level,ve.share_path=decodeURIComponent(n.share_path)),t.scene&&(ve.scene=t.scene),function(){for(var e=[],t=0;t-1?"&":"?";return e.path=e.path+a+o,e}var ze=function(){function e(){this.config={appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""},this.appStart=re(Ke),this.pageView=re(Te),this.share=Ye,this.registerSuperProperty=ce,this.registerSuperProperties=se,this.getSuperProperty=fe,this.getSuperProperties=le,this.unRegisterSuperProperty=pe,this.clearSuperProperties=de,this.profileSetOnce=we,this.profileSet=be,this.profileAppend=Oe,this.profileIncrement=xe,this.profileDelete=Ue,this.profileUnset=Ie,this.reset=Le,this.track=re(Me),this.timeEvent=Ne,this.alias=re(ke),this.getPresetProperties=Fe,this.identify=Ce,this.getDistinctId=Ve,this.pageProperty=je,I()}return e.prototype.init=function(e){var t=this;ae(e).then((function(e){t.config=e,A({code:20007})}))},e}();Object.keys({appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""}).forEach((function(e){Object.defineProperty(ze.prototype,e,{get:function(){return this.config[e]},set:function(t){var n,r=this;ae((n={},n[e]=t,n)).then((function(e){r.config=e}))},enumerable:!1,configurable:!0})}));var Be=new ze;e.AnalysysAgent=Be;export default Be; +***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function P(e,t){var n=!1;if(o(e)||i(e)||a(e)||u(e))if(n=!0,o(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var i=e[r];R(r,{code:600023,fn:t,key:r})&&P(i,{code:600022,fn:t,key:r,value:i})&&(n[r]=i)}}return n}var D,w,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=w),e.setStorageSync(t,n)};function x(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^i^o:n|r?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function i(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,i,o),a),c)),r(n(e,u),t)}function o(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,i,o),a),c)),r(n(e,u),t)}function a(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,i,o),a),c)),r(n(e,u),t)}function u(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,i,o),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,y,m,g,h,v;for(s=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),a=0,u=0;u>>29,o}(e),m=1732584193,g=4023233417,h=2562383102,v=271733878,f=0;f=0;n--){var r=w.POSTDATA[n];t[r.xwhen]&&w.POSTDATA.splice(n,1)}b()}var V={networkType:""},j=!1;e.onNetworkStatusChange((function(e){V.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,i){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?i(t):r(t)},fail:function(e){n&&n(e),i(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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 i in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[i]).length<3?("00"+r[i]).substr(("00"+r[i]).length-3,("00"+r[i]).length):r[i]:("00"+r[i]).substr((""+r[i]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var q={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function J(t,n,r){if(!q[t]&&e.AnalysysAgent){var i=e.AnalysysAgent[n];s(i)&&i(r),q[t]=!0}}var H=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){J("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){J("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&j};function re(e,t){return function(){for(var n=[],r=0;roe.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(H(oe),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(oe)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,w.ARKSUPER=Object.assign({},w.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ye=[],me=0;function ge(t){var n=l(w.POSTDATA);if(!ye.length&&n.length){ye=n.splice(0,20);var r={url:oe.uploadURL+"/up?appid="+oe.appkey,data:ye,encryptType:oe.encryptType};if(A({key:r.url,value:ye,code:20012}),1===oe.debugMode)return C(ye),void(ye=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ye),Y({url:r.url,method:"POST",data:r.data,timeout:oe.sendDataTimeout}).then((function(e){C(ye),ye=[],ge(),t&&t(),A({code:20001}),me=0})).catch((function(e){ye=[],S({code:60008}),me<3&&(ge(),me++)}))}}function he(e,t){oe.appkey?oe.uploadURL?(M(e),ge(t)):S({code:60007}):S({code:60006})}var ve={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var i=n.options,o=Object.keys(i);if(o.length){var a="";return o.forEach((function(e,t){t&&(a+="&"),a+=e+"="+i[e]})),r+"?"+a}}return r}return""}function $e(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ae={},Se={xwho:function(){return K()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return oe.debugMode},$is_login:function(){return!!w.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),i=w.SEESIONDATE?new Date(w.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!w.SEESIONID||!w.SEESIONDATE||t-w.SEESIONDATE>18e5||i!==r)&&L(),w.SEESIONID;var e,t,n,r,i},$screen_width:function(){return D.screenWidth},$screen_height:function(){return D.screenHeight},$os:function(){var e=D.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return D.brand},$browser_version:function(){return D.version},$os_version:function(){return D.system?D.system.split(" ")[1]:""},$model:function(){return D.model},$language:function(){return D.language},$network:function(){return V.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!w.ARKFRISTPROFILE},$is_first_day:function(){var e=w.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return w.ARKFRISTPROFILE},$first_visit_language:function(){return D.language},$original_id:function(){return w.ARK_TRACKID||w.ARK_ID},$is_time_calibrated:function(){return!(!oe.allowTimeCheck||!Z)},$scene:function(){return ve.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ve.scene+""}()},$url:function(){return _e(oe.autoCompleteURL)},$url_path:function(){return _e()},$url_domain:function(){return _e()},$utm_campaign_id:function(){return ve.utm_campaign_id},$utm_source:function(){return ve.utm_source},$utm_medium:function(){return ve.utm_medium},$utm_term:function(){return ve.utm_term},$utm_content:function(){return ve.utm_content},$utm_campaign:function(){return ve.utm_campaign},$share_id:function(){return ve.share_id},$share_level:function(){return null==(e=ve.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ve.share_path},$element_content:function(){return $e(Ae.element_content)},$element_id:function(){return $e(Ae.element_id)},$element_type:function(){return $e(Ae.element_type)},$element_function:function(){return $e(Ae.element_function)},$element_name:function(){return $e(Ae.element_name)},$appid:function(){return oe.$appid},$appname:function(){return oe.$appname}};function Ee(e){var t={appid:oe.appkey,xwho:Se.xwho(),xwhat:Se.xwhat(e),xwhen:Se.xwhen(),xcontext:{}},n=g[e];function r(e){var n=Se[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Re={};var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function Te(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var i=Ee("$pageview");Pe.pageview.xwhen=i.xwhen,i.xcontext=Object.assign({},i.xcontext,N(),Re,n),he(i)}function De(e,t,n){var r=Ee(e),i={};c(t)&&(i=t),E(t)&&P(n)&&(i[t]=n),r.xcontext=Object.assign({},r.xcontext,T(i,e)),he(r)}function we(e,t){De("$profile_set_once",e,t)}function be(e,t){De("$profile_set",e,t)}function xe(e,t){De("$profile_increment",e,t)}function Oe(e,t){De("$profile_append",e,t)}function Ie(e){var t,n=Ee("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),he(n)}function Ue(){he(Ee("$profile_delete"))}function Ke(e){var t,n;(n=(t=e).query)&&(ve.utm_campaign_id=t.query.campaign_id,ve.utm_campaign=n.utm_campaign,ve.utm_content=n.utm_content,ve.utm_medium=n.utm_medium,ve.utm_source=n.utm_source,ve.utm_term=n.utm_term),n.share_id&&n.share_level&&n.share_path&&(ve.share_id=n.share_id,ve.share_level=n.share_level,ve.share_path=decodeURIComponent(n.share_path)),t.scene&&(ve.scene=t.scene),function(){for(var e=[],t=0;t-1?"&":"?";return e.path=e.path+a+o,e}var ze=function(){function e(){this.config={appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""},this.appStart=re(Ke),this.pageView=re(Te),this.share=Ye,this.registerSuperProperty=ce,this.registerSuperProperties=se,this.getSuperProperty=fe,this.getSuperProperties=le,this.unRegisterSuperProperty=pe,this.clearSuperProperties=de,this.profileSetOnce=we,this.profileSet=be,this.profileAppend=Oe,this.profileIncrement=xe,this.profileDelete=Ue,this.profileUnset=Ie,this.reset=Le,this.track=re(Me),this.timeEvent=Ne,this.alias=re(ke),this.getPresetProperties=Fe,this.identify=Ce,this.getDistinctId=Ve,this.pageProperty=je,I()}return e.prototype.init=function(e){var t=this;ae(e).then((function(e){t.config=e,A({code:20007})}))},e}();Object.keys({appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""}).forEach((function(e){Object.defineProperty(ze.prototype,e,{get:function(){return this.config[e]},set:function(t){var n,r=this;ae((n={},n[e]=t,n)).then((function(e){r.config=e}))},enumerable:!1,configurable:!0})}));var Be=new ze;e.AnalysysAgent=Be;export default Be; diff --git a/dist/AnalysysAgent_WX_SDK.custom.min.js b/dist/AnalysysAgent_WX_SDK.custom.min.js index 259ca02..68d91c7 100644 --- a/dist/AnalysysAgent_WX_SDK.custom.min.js +++ b/dist/AnalysysAgent_WX_SDK.custom.min.js @@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function P(e,t){var n=!1;if(o(e)||i(e)||a(e)||u(e))if(n=!0,o(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var i=e[r];R(r,{code:600023,fn:t,key:r})&&P(i,{code:600022,fn:t,key:r,value:i})&&(n[r]=i)}}return n}var D,w,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=w),e.setStorageSync(t,n)};function x(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^i^o:n|r?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function i(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,i,o),a),c)),r(n(e,u),t)}function o(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,i,o),a),c)),r(n(e,u),t)}function a(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,i,o),a),c)),r(n(e,u),t)}function u(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,i,o),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,m,y,g,h,v;for(s=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),a=0,u=0;u>>29,o}(e),y=1732584193,g=4023233417,h=2562383102,v=271733878,f=0;f=0;n--){var r=w.POSTDATA[n];t[r.xwhen]&&w.POSTDATA.splice(n,1)}b()}var V={networkType:""},j=!1;e.onNetworkStatusChange((function(e){V.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,i){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?i(t):r(t)},fail:function(e){n&&n(e),i(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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 i in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[i]).length<3?("00"+r[i]).substr(("00"+r[i]).length-3,("00"+r[i]).length):r[i]:("00"+r[i]).substr((""+r[i]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var q={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function J(t,n,r){if(!q[t]&&e.AnalysysAgent){var i=e.AnalysysAgent[n];s(i)&&i(r),q[t]=!0}}var H=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){J("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){J("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&j};function re(e,t){return function(){for(var n=[],r=0;roe.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(H(oe),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(oe)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,w.ARKSUPER=Object.assign({},w.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var me=[],ye=0;function ge(t){var n=l(w.POSTDATA);if(!me.length&&n.length){me=n.splice(0,20);var r={url:oe.uploadURL+"/up?appid="+oe.appkey,data:me,encryptType:oe.encryptType};if(A({key:r.url,value:me,code:20012}),1===oe.debugMode)return C(me),void(me=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(me),Y({url:r.url,method:"POST",data:r.data,timeout:oe.sendDataTimeout}).then((function(e){C(me),me=[],ge(),t&&t(),A({code:20001}),ye=0})).catch((function(e){me=[],S({code:60008}),ye<3&&(ge(),ye++)}))}}function he(e,t){oe.appkey?oe.uploadURL?(M(e),ge(t)):S({code:60007}):S({code:60006})}var ve={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var i=n.options,o=Object.keys(i);if(o.length){var a="";return o.forEach((function(e,t){t&&(a+="&"),a+=e+"="+i[e]})),r+"?"+a}}return r}return""}function $e(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ae={},Se={xwho:function(){return K()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return oe.debugMode},$is_login:function(){return!!w.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),i=w.SEESIONDATE?new Date(w.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!w.SEESIONID||!w.SEESIONDATE||t-w.SEESIONDATE>18e5||i!==r)&&L(),w.SEESIONID;var e,t,n,r,i},$screen_width:function(){return D.screenWidth},$screen_height:function(){return D.screenHeight},$os:function(){var e=D.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return D.brand},$browser_version:function(){return D.version},$os_version:function(){return D.system?D.system.split(" ")[1]:""},$model:function(){return D.model},$language:function(){return D.language},$network:function(){return V.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!w.ARKFRISTPROFILE},$is_first_day:function(){var e=w.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return w.ARKFRISTPROFILE},$first_visit_language:function(){return D.language},$original_id:function(){return w.ARK_TRACKID||w.ARK_ID},$is_time_calibrated:function(){return!(!oe.allowTimeCheck||!Z)},$scene:function(){return ve.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ve.scene+""}()},$url:function(){return _e(oe.autoCompleteURL)},$url_path:function(){return _e()},$url_domain:function(){return _e()},$utm_campaign_id:function(){return ve.utm_campaign_id},$utm_source:function(){return ve.utm_source},$utm_medium:function(){return ve.utm_medium},$utm_term:function(){return ve.utm_term},$utm_content:function(){return ve.utm_content},$utm_campaign:function(){return ve.utm_campaign},$share_id:function(){return ve.share_id},$share_level:function(){return null==(e=ve.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ve.share_path},$element_content:function(){return $e(Ae.element_content)},$element_id:function(){return $e(Ae.element_id)},$element_type:function(){return $e(Ae.element_type)},$element_function:function(){return $e(Ae.element_function)},$element_name:function(){return $e(Ae.element_name)},$appid:function(){return oe.$appid},$appname:function(){return oe.$appname}};function Ee(e){var t={appid:oe.appkey,xwho:Se.xwho(),xwhat:Se.xwhat(e),xwhen:Se.xwhen(),xcontext:{}},n=g[e];function r(e){var n=Se[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Re={};var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function Te(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var i=Ee("$pageview");Pe.pageview.xwhen=i.xwhen,i.xcontext=Object.assign({},i.xcontext,N(),Re,n),he(i)}function De(e,t,n){var r=Ee(e),i={};c(t)&&(i=t),E(t)&&P(n)&&(i[t]=n),r.xcontext=Object.assign({},r.xcontext,T(i,e)),he(r)}function we(e,t){De("$profile_set_once",e,t)}function be(e,t){De("$profile_set",e,t)}function xe(e,t){De("$profile_increment",e,t)}function Oe(e,t){De("$profile_append",e,t)}function Ie(e){var t,n=Ee("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),he(n)}function Ue(){he(Ee("$profile_delete"))}function Ke(e){var t,n;(n=(t=e).query)&&(ve.utm_campaign_id=t.query.campaign_id,ve.utm_campaign=n.utm_campaign,ve.utm_content=n.utm_content,ve.utm_medium=n.utm_medium,ve.utm_source=n.utm_source,ve.utm_term=n.utm_term),n.share_id&&n.share_level&&n.share_path&&(ve.share_id=n.share_id,ve.share_level=n.share_level,ve.share_path=decodeURIComponent(n.share_path)),t.scene&&(ve.scene=t.scene),function(){for(var e=[],t=0;t-1?"&":"?";return e.path=e.path+a+o,e}var ze=function(){function e(){this.config={appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""},this.appStart=re(Ke),this.pageView=re(Te),this.share=Ye,this.registerSuperProperty=ce,this.registerSuperProperties=se,this.getSuperProperty=fe,this.getSuperProperties=le,this.unRegisterSuperProperty=pe,this.clearSuperProperties=de,this.profileSetOnce=we,this.profileSet=be,this.profileAppend=Oe,this.profileIncrement=xe,this.profileDelete=Ue,this.profileUnset=Ie,this.reset=Le,this.track=re(Me),this.timeEvent=Ne,this.alias=re(ke),this.getPresetProperties=Fe,this.identify=Ce,this.getDistinctId=Ve,this.pageProperty=je,I()}return e.prototype.init=function(e){var t=this;ae(e).then((function(e){t.config=e,A({code:20007})}))},e}();Object.keys({appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""}).forEach((function(e){Object.defineProperty(ze.prototype,e,{get:function(){return this.config[e]},set:function(t){var n,r=this;ae((n={},n[e]=t,n)).then((function(e){r.config=e}))},enumerable:!1,configurable:!0})}));var Be=new ze;e.AnalysysAgent=Be,module.exports=Be; +***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function P(e,t){var n=!1;if(o(e)||i(e)||a(e)||u(e))if(n=!0,o(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var i=e[r];R(r,{code:600023,fn:t,key:r})&&P(i,{code:600022,fn:t,key:r,value:i})&&(n[r]=i)}}return n}var D,w,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=w),e.setStorageSync(t,n)};function x(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^i^o:n|r?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function i(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,i,o),a),c)),r(n(e,u),t)}function o(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,i,o),a),c)),r(n(e,u),t)}function a(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,i,o),a),c)),r(n(e,u),t)}function u(e,t,i,o,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,i,o),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,m,y,g,h,v;for(s=function(e){for(var t,n=e.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),a=0,u=0;u>>29,o}(e),y=1732584193,g=4023233417,h=2562383102,v=271733878,f=0;f=0;n--){var r=w.POSTDATA[n];t[r.xwhen]&&w.POSTDATA.splice(n,1)}b()}var V={networkType:""},j=!1;e.onNetworkStatusChange((function(e){V.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,i){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?i(t):r(t)},fail:function(e){n&&n(e),i(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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 i in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[i]).length<3?("00"+r[i]).substr(("00"+r[i]).length-3,("00"+r[i]).length):r[i]:("00"+r[i]).substr((""+r[i]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var q={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function J(t,n,r){if(!q[t]&&e.AnalysysAgent){var i=e.AnalysysAgent[n];s(i)&&i(r),q[t]=!0}}var H=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){J("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){J("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&j};function re(e,t){return function(){for(var n=[],r=0;roe.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(H(oe),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(oe)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,w.ARKSUPER=Object.assign({},w.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var me=[],ye=0;function ge(t){var n=l(w.POSTDATA);if(!me.length&&n.length){me=n.splice(0,20);var r={url:oe.uploadURL+"/up?appid="+oe.appkey,data:me,encryptType:oe.encryptType};if(A({key:r.url,value:me,code:20012}),1===oe.debugMode)return C(me),void(me=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(me),Y({url:r.url,method:"POST",data:r.data,timeout:oe.sendDataTimeout}).then((function(e){C(me),me=[],ge(),t&&t(),A({code:20001}),ye=0})).catch((function(e){me=[],S({code:60008}),ye<3&&(ge(),ye++)}))}}function he(e,t){oe.appkey?oe.uploadURL?(M(e),ge(t)):S({code:60007}):S({code:60006})}var ve={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var i=n.options,o=Object.keys(i);if(o.length){var a="";return o.forEach((function(e,t){t&&(a+="&"),a+=e+"="+i[e]})),r+"?"+a}}return r}return""}function $e(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ae={},Se={xwho:function(){return K()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return oe.debugMode},$is_login:function(){return!!w.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),i=w.SEESIONDATE?new Date(w.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!w.SEESIONID||!w.SEESIONDATE||t-w.SEESIONDATE>18e5||i!==r)&&L(),w.SEESIONID;var e,t,n,r,i},$screen_width:function(){return D.screenWidth},$screen_height:function(){return D.screenHeight},$os:function(){var e=D.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return D.brand},$browser_version:function(){return D.version},$os_version:function(){return D.system?D.system.split(" ")[1]:""},$model:function(){return D.model},$language:function(){return D.language},$network:function(){return V.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!w.ARKFRISTPROFILE},$is_first_day:function(){var e=w.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return w.ARKFRISTPROFILE},$first_visit_language:function(){return D.language},$original_id:function(){return w.ARK_TRACKID||w.ARK_ID},$is_time_calibrated:function(){return!(!oe.allowTimeCheck||!Z)},$scene:function(){return ve.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ve.scene+""}()},$url:function(){return _e(oe.autoCompleteURL)},$url_path:function(){return _e()},$url_domain:function(){return _e()},$utm_campaign_id:function(){return ve.utm_campaign_id},$utm_source:function(){return ve.utm_source},$utm_medium:function(){return ve.utm_medium},$utm_term:function(){return ve.utm_term},$utm_content:function(){return ve.utm_content},$utm_campaign:function(){return ve.utm_campaign},$share_id:function(){return ve.share_id},$share_level:function(){return null==(e=ve.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ve.share_path},$element_content:function(){return $e(Ae.element_content)},$element_id:function(){return $e(Ae.element_id)},$element_type:function(){return $e(Ae.element_type)},$element_function:function(){return $e(Ae.element_function)},$element_name:function(){return $e(Ae.element_name)},$appid:function(){return oe.$appid},$appname:function(){return oe.$appname}};function Ee(e){var t={appid:oe.appkey,xwho:Se.xwho(),xwhat:Se.xwhat(e),xwhen:Se.xwhen(),xcontext:{}},n=g[e];function r(e){var n=Se[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Re={};var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function Te(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var i=Ee("$pageview");Pe.pageview.xwhen=i.xwhen,i.xcontext=Object.assign({},i.xcontext,N(),Re,n),he(i)}function De(e,t,n){var r=Ee(e),i={};c(t)&&(i=t),E(t)&&P(n)&&(i[t]=n),r.xcontext=Object.assign({},r.xcontext,T(i,e)),he(r)}function we(e,t){De("$profile_set_once",e,t)}function be(e,t){De("$profile_set",e,t)}function xe(e,t){De("$profile_increment",e,t)}function Oe(e,t){De("$profile_append",e,t)}function Ie(e){var t,n=Ee("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),he(n)}function Ue(){he(Ee("$profile_delete"))}function Ke(e){var t,n;(n=(t=e).query)&&(ve.utm_campaign_id=t.query.campaign_id,ve.utm_campaign=n.utm_campaign,ve.utm_content=n.utm_content,ve.utm_medium=n.utm_medium,ve.utm_source=n.utm_source,ve.utm_term=n.utm_term),n.share_id&&n.share_level&&n.share_path&&(ve.share_id=n.share_id,ve.share_level=n.share_level,ve.share_path=decodeURIComponent(n.share_path)),t.scene&&(ve.scene=t.scene),function(){for(var e=[],t=0;t-1?"&":"?";return e.path=e.path+a+o,e}var ze=function(){function e(){this.config={appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""},this.appStart=re(Ke),this.pageView=re(Te),this.share=Ye,this.registerSuperProperty=ce,this.registerSuperProperties=se,this.getSuperProperty=fe,this.getSuperProperties=le,this.unRegisterSuperProperty=pe,this.clearSuperProperties=de,this.profileSetOnce=we,this.profileSet=be,this.profileAppend=Oe,this.profileIncrement=xe,this.profileDelete=Ue,this.profileUnset=Ie,this.reset=Le,this.track=re(Me),this.timeEvent=Ne,this.alias=re(ke),this.getPresetProperties=Fe,this.identify=Ce,this.getDistinctId=Ve,this.pageProperty=je,I()}return e.prototype.init=function(e){var t=this;ae(e).then((function(e){t.config=e,A({code:20007})}))},e}();Object.keys({appkey:"",uploadURL:"",debugMode:0,auto:!0,autoStartUp:!0,autoEnd:!0,autoProfile:!0,encryptType:0,autoShare:!1,allowTimeCheck:!1,maxDiffTimeInterval:30,autoTrack:!1,autoCompleteURL:!0,autoPageViewDuration:!1,sendDataTimeout:1e4,$appid:"",$appname:""}).forEach((function(e){Object.defineProperty(ze.prototype,e,{get:function(){return this.config[e]},set:function(t){var n,r=this;ae((n={},n[e]=t,n)).then((function(e){r.config=e}))},enumerable:!1,configurable:!0})}));var Be=new ze;e.AnalysysAgent=Be,module.exports=Be; diff --git a/dist/AnalysysAgent_WX_SDK.es6.min.js b/dist/AnalysysAgent_WX_SDK.es6.min.js index 16c5d71..08930ef 100644 --- a/dist/AnalysysAgent_WX_SDK.es6.min.js +++ b/dist/AnalysysAgent_WX_SDK.es6.min.js @@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"].map((function(e){n["[object "+e+"]"]=e.toLowerCase()}));var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function w(e,t){var n=!1;if(i(e)||o(e)||a(e)||u(e))if(n=!0,i(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function x(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&w(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var P,T,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=T),e.setStorageSync(t,n)};function D(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function o(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,i),a),c)),r(n(e,u),t)}function i(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,i),a),c)),r(n(e,u),t)}function a(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,i),a),c)),r(n(e,u),t)}function u(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,i),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,g,h,v,m,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u>>29,i}(e),h=1732584193,v=4023233417,m=2562383102,y=271733878,f=0;f=0;n--){var r=T.POSTDATA[n];t[r.xwhen]&&T.POSTDATA.splice(n,1)}b()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rie.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ie),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ie)}))}))}function ue(e,t){var n,r=x(e,t);Object.keys(r).length&&(n=r,T.ARKSUPER=Object.assign({},T.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function ve(t){var n=l(T.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ie.uploadURL+"/up?appid="+ie.appkey,data:ge,encryptType:ie.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ie.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ie.sendDataTimeout}).then((function(e){j(ge),ge=[],ve(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(ve(),he++)}))}}function me(e,t){ie.appkey?ie.uploadURL?(M(e),ve(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}function $e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function Ae(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,i=Object.keys(o);if(i.length){var a="";return i.forEach((function(e,t){t&&(a+="&"),a+=e+"="+o[e]})),r+"?"+a}}return r}return""}function Se(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ee={};function Re(e){Ee.element_function=e.function||"",Ee.element_id=e.id||"",Ee.element_content=e.content||"",Ee.element_type=e.type||"",Ee.element_name=e.name||""}var we={xwho:function(){return U()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return ie.debugMode},$is_login:function(){return!!T.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=T.SEESIONDATE?new Date(T.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!T.SEESIONID||!T.SEESIONDATE||t-T.SEESIONDATE>18e5||o!==r)&&L(),T.SEESIONID;var e,t,n,r,o},$screen_width:function(){return P.screenWidth},$screen_height:function(){return P.screenHeight},$os:function(){var e=P.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return P.brand},$browser_version:function(){return P.version},$os_version:function(){return P.system?P.system.split(" ")[1]:""},$model:function(){return P.model},$language:function(){return P.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!T.ARKFRISTPROFILE},$is_first_day:function(){var e=T.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return T.ARKFRISTPROFILE},$first_visit_language:function(){return P.language},$original_id:function(){return T.ARK_TRACKID||T.ARK_ID},$is_time_calibrated:function(){return!(!ie.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return Ae(ie.autoCompleteURL)},$url_path:function(){return Ae()},$url_domain:function(){return Ae()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Se(Ee.element_content)},$element_id:function(){return Se(Ee.element_id)},$element_type:function(){return Se(Ee.element_type)},$element_function:function(){return Se(Ee.element_function)},$element_name:function(){return Se(Ee.element_name)},$appid:function(){return ie.$appid},$appname:function(){return ie.$appname}};function xe(e){var t={appid:ie.appkey,xwho:we.xwho(),xwhat:we.xwhat(e),xwhen:we.xwhen(),xcontext:{}},n=v[e];function r(e){var n=we[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Pe={};function Te(){return Pe}var be={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=x(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");be.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),Te(),n),me(o)}function Oe(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-be.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),Te(),t),Pe={},me(e)}}function Ie(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&w(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,x(o,e)),me(r)}function Ke(e,t){Ie("$profile_set_once",e,t)}function Ue(e,t){Ie("$profile_set",e,t)}function ke(e,t){Ie("$profile_increment",e,t)}function Le(e,t){Ie("$profile_append",e,t)}function Ne(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),me(n)}function Fe(){me(xe("$profile_delete"))}function Me(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Re(Object.assign(o,{function:n}));var i=xe("$user_click");i.xcontext=Object.assign({},i.xcontext,N(),Te()),me(i)}}function ze(e){Re({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),Te()),me(t)}function Be(){T.ARK_ID=k(),T.ARK_TRACKID="",T.ARK_LOGINID="",T.ARKSUPER={},T.ARKFRISTPROFILE="",T.ARKFRISTPROFILESEND=!1,L(),!0===ie.autoProfile&&Ke({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ge(e){be.timeEvent[e]=W()}function Ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function We(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),x(t,e)),be.timeEvent[e]&&(n.xcontext.$duration=W()-be.timeEvent[e],delete be[e]),me(n)}else S({code:600025,fn:"track",value:e})}function He(t){var n;E(t)?(n=t,T.ARK_TRACKID=n,b(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function qe(e){var t=T.ARK_TRACKID||T.ARK_ID;return e&&e(t),t}function Je(e){var t=x(e,"$pageProperty");!function(e){Pe=Object.assign({},Pe,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function Xe(e,t){var n=U(),r=Ae(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),i={$share_id:n,$share_level:o,$share_path:r},a={};t&&(a=x(t,"$share")),e.xcontext=Object.assign({},e.xcontext,i,N(),a),me(e)}))();var i="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var a=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+a+i,e}var Qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function et(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function tt(e){et(e,"onShow",(function(){if(!0===ie.auto){var e=$e().__wxExparserNodeId__;be.pageview.state[e]||(re(De)(),be.pageview.state[e]=!0)}else be.pageview.xwhen=W()}));var t=function(){var e=$e().__wxExparserNodeId__;be.pageview.state[e]&&delete be.pageview.state[e]};if(et(e,"onHide",(function(){ie.autoPageViewDuration&&Oe(),t()})),et(e,"onUnload",(function(){ie.autoPageViewDuration&&Oe(),t()})),1==ie.autoShare&&et(e,"onShareAppMessage",Xe),1==ie.autoTrack)for(var n in e){var r=e[n];s(r)&&Qe.indexOf(n)<0?et(e,n,Ye):s(r)&&"onTabItemTap"==n&&et(e,n,ze)}}var nt=App,rt=Page,ot=Component;function it(e){et(e,"onLaunch",(function(e){_e(e)})),et(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function w(e,t){var n=!1;if(i(e)||o(e)||a(e)||u(e))if(n=!0,i(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function x(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&w(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var P,T,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=T),e.setStorageSync(t,n)};function D(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function o(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,i),a),c)),r(n(e,u),t)}function i(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,i),a),c)),r(n(e,u),t)}function a(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,i),a),c)),r(n(e,u),t)}function u(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,i),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,g,h,v,m,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u>>29,i}(e),h=1732584193,v=4023233417,m=2562383102,y=271733878,f=0;f=0;n--){var r=T.POSTDATA[n];t[r.xwhen]&&T.POSTDATA.splice(n,1)}b()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rie.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ie),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ie)}))}))}function ue(e,t){var n,r=x(e,t);Object.keys(r).length&&(n=r,T.ARKSUPER=Object.assign({},T.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function ve(t){var n=l(T.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ie.uploadURL+"/up?appid="+ie.appkey,data:ge,encryptType:ie.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ie.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ie.sendDataTimeout}).then((function(e){j(ge),ge=[],ve(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(ve(),he++)}))}}function me(e,t){ie.appkey?ie.uploadURL?(M(e),ve(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}function $e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function Ae(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,i=Object.keys(o);if(i.length){var a="";return i.forEach((function(e,t){t&&(a+="&"),a+=e+"="+o[e]})),r+"?"+a}}return r}return""}function Se(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ee={};function Re(e){Ee.element_function=e.function||"",Ee.element_id=e.id||"",Ee.element_content=e.content||"",Ee.element_type=e.type||"",Ee.element_name=e.name||""}var we={xwho:function(){return U()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return ie.debugMode},$is_login:function(){return!!T.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=T.SEESIONDATE?new Date(T.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!T.SEESIONID||!T.SEESIONDATE||t-T.SEESIONDATE>18e5||o!==r)&&L(),T.SEESIONID;var e,t,n,r,o},$screen_width:function(){return P.screenWidth},$screen_height:function(){return P.screenHeight},$os:function(){var e=P.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return P.brand},$browser_version:function(){return P.version},$os_version:function(){return P.system?P.system.split(" ")[1]:""},$model:function(){return P.model},$language:function(){return P.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!T.ARKFRISTPROFILE},$is_first_day:function(){var e=T.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return T.ARKFRISTPROFILE},$first_visit_language:function(){return P.language},$original_id:function(){return T.ARK_TRACKID||T.ARK_ID},$is_time_calibrated:function(){return!(!ie.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return Ae(ie.autoCompleteURL)},$url_path:function(){return Ae()},$url_domain:function(){return Ae()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Se(Ee.element_content)},$element_id:function(){return Se(Ee.element_id)},$element_type:function(){return Se(Ee.element_type)},$element_function:function(){return Se(Ee.element_function)},$element_name:function(){return Se(Ee.element_name)},$appid:function(){return ie.$appid},$appname:function(){return ie.$appname}};function xe(e){var t={appid:ie.appkey,xwho:we.xwho(),xwhat:we.xwhat(e),xwhen:we.xwhen(),xcontext:{}},n=v[e];function r(e){var n=we[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Pe={};function Te(){return Pe}var be={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=x(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");be.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),Te(),n),me(o)}function Oe(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-be.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),Te(),t),Pe={},me(e)}}function Ie(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&w(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,x(o,e)),me(r)}function Ke(e,t){Ie("$profile_set_once",e,t)}function Ue(e,t){Ie("$profile_set",e,t)}function ke(e,t){Ie("$profile_increment",e,t)}function Le(e,t){Ie("$profile_append",e,t)}function Ne(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),me(n)}function Fe(){me(xe("$profile_delete"))}function Me(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Re(Object.assign(o,{function:n}));var i=xe("$user_click");i.xcontext=Object.assign({},i.xcontext,N(),Te()),me(i)}}function ze(e){Re({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),Te()),me(t)}function Be(){T.ARK_ID=k(),T.ARK_TRACKID="",T.ARK_LOGINID="",T.ARKSUPER={},T.ARKFRISTPROFILE="",T.ARKFRISTPROFILESEND=!1,L(),!0===ie.autoProfile&&Ke({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ge(e){be.timeEvent[e]=W()}function Ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function We(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),x(t,e)),be.timeEvent[e]&&(n.xcontext.$duration=W()-be.timeEvent[e],delete be[e]),me(n)}else S({code:600025,fn:"track",value:e})}function He(t){var n;E(t)?(n=t,T.ARK_TRACKID=n,b(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function qe(e){var t=T.ARK_TRACKID||T.ARK_ID;return e&&e(t),t}function Je(e){var t=x(e,"$pageProperty");!function(e){Pe=Object.assign({},Pe,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function Xe(e,t){var n=U(),r=Ae(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),i={$share_id:n,$share_level:o,$share_path:r},a={};t&&(a=x(t,"$share")),e.xcontext=Object.assign({},e.xcontext,i,N(),a),me(e)}))();var i="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var a=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+a+i,e}var Qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function et(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function tt(e){et(e,"onShow",(function(){if(!0===ie.auto){var e=$e().__wxExparserNodeId__;be.pageview.state[e]||(re(De)(),be.pageview.state[e]=!0)}else be.pageview.xwhen=W()}));var t=function(){var e=$e().__wxExparserNodeId__;be.pageview.state[e]&&delete be.pageview.state[e]};if(et(e,"onHide",(function(){ie.autoPageViewDuration&&Oe(),t()})),et(e,"onUnload",(function(){ie.autoPageViewDuration&&Oe(),t()})),1==ie.autoShare&&et(e,"onShareAppMessage",Xe),1==ie.autoTrack)for(var n in e){var r=e[n];s(r)&&Qe.indexOf(n)<0?et(e,n,Ye):s(r)&&"onTabItemTap"==n&&et(e,n,ze)}}var nt=App,rt=Page,ot=Component;function it(e){et(e,"onLaunch",(function(e){_e(e)})),et(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function w(e,t){var n=!1;if(i(e)||o(e)||a(e)||u(e))if(n=!0,i(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function x(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&w(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var P,T,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=T),e.setStorageSync(t,n)};function D(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function o(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,i),a),c)),r(n(e,u),t)}function i(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,i),a),c)),r(n(e,u),t)}function a(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,i),a),c)),r(n(e,u),t)}function u(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,i),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,g,h,v,m,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u>>29,i}(e),h=1732584193,v=4023233417,m=2562383102,y=271733878,f=0;f=0;n--){var r=T.POSTDATA[n];t[r.xwhen]&&T.POSTDATA.splice(n,1)}b()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rie.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ie),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ie)}))}))}function ue(e,t){var n,r=x(e,t);Object.keys(r).length&&(n=r,T.ARKSUPER=Object.assign({},T.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function ve(t){var n=l(T.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ie.uploadURL+"/up?appid="+ie.appkey,data:ge,encryptType:ie.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ie.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ie.sendDataTimeout}).then((function(e){j(ge),ge=[],ve(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(ve(),he++)}))}}function me(e,t){ie.appkey?ie.uploadURL?(M(e),ve(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}function $e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function Ae(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,i=Object.keys(o);if(i.length){var a="";return i.forEach((function(e,t){t&&(a+="&"),a+=e+"="+o[e]})),r+"?"+a}}return r}return""}function Se(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ee={};function Re(e){Ee.element_function=e.function||"",Ee.element_id=e.id||"",Ee.element_content=e.content||"",Ee.element_type=e.type||"",Ee.element_name=e.name||""}var we={xwho:function(){return U()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return ie.debugMode},$is_login:function(){return!!T.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=T.SEESIONDATE?new Date(T.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!T.SEESIONID||!T.SEESIONDATE||t-T.SEESIONDATE>18e5||o!==r)&&L(),T.SEESIONID;var e,t,n,r,o},$screen_width:function(){return P.screenWidth},$screen_height:function(){return P.screenHeight},$os:function(){var e=P.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return P.brand},$browser_version:function(){return P.version},$os_version:function(){return P.system?P.system.split(" ")[1]:""},$model:function(){return P.model},$language:function(){return P.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!T.ARKFRISTPROFILE},$is_first_day:function(){var e=T.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return T.ARKFRISTPROFILE},$first_visit_language:function(){return P.language},$original_id:function(){return T.ARK_TRACKID||T.ARK_ID},$is_time_calibrated:function(){return!(!ie.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return Ae(ie.autoCompleteURL)},$url_path:function(){return Ae()},$url_domain:function(){return Ae()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Se(Ee.element_content)},$element_id:function(){return Se(Ee.element_id)},$element_type:function(){return Se(Ee.element_type)},$element_function:function(){return Se(Ee.element_function)},$element_name:function(){return Se(Ee.element_name)},$appid:function(){return ie.$appid},$appname:function(){return ie.$appname}};function xe(e){var t={appid:ie.appkey,xwho:we.xwho(),xwhat:we.xwhat(e),xwhen:we.xwhen(),xcontext:{}},n=v[e];function r(e){var n=we[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Pe={};function Te(){return Pe}var be={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=x(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");be.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),Te(),n),me(o)}function Oe(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-be.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),Te(),t),Pe={},me(e)}}function Ie(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&w(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,x(o,e)),me(r)}function Ke(e,t){Ie("$profile_set_once",e,t)}function Ue(e,t){Ie("$profile_set",e,t)}function ke(e,t){Ie("$profile_increment",e,t)}function Le(e,t){Ie("$profile_append",e,t)}function Ne(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),me(n)}function Fe(){me(xe("$profile_delete"))}function Me(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Re(Object.assign(o,{function:n}));var i=xe("$user_click");i.xcontext=Object.assign({},i.xcontext,N(),Te()),me(i)}}function ze(e){Re({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),Te()),me(t)}function Be(){T.ARK_ID=k(),T.ARK_TRACKID="",T.ARK_LOGINID="",T.ARKSUPER={},T.ARKFRISTPROFILE="",T.ARKFRISTPROFILESEND=!1,L(),!0===ie.autoProfile&&Ke({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ge(e){be.timeEvent[e]=W()}function Ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function We(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),x(t,e)),be.timeEvent[e]&&(n.xcontext.$duration=W()-be.timeEvent[e],delete be[e]),me(n)}else S({code:600025,fn:"track",value:e})}function He(t){var n;E(t)?(n=t,T.ARK_TRACKID=n,b(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function qe(e){var t=T.ARK_TRACKID||T.ARK_ID;return e&&e(t),t}function Je(e){var t=x(e,"$pageProperty");!function(e){Pe=Object.assign({},Pe,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function Xe(e,t){var n=U(),r=Ae(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),i={$share_id:n,$share_level:o,$share_path:r},a={};t&&(a=x(t,"$share")),e.xcontext=Object.assign({},e.xcontext,i,N(),a),me(e)}))();var i="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var a=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+a+i,e}var Qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function et(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function tt(e){et(e,"onShow",(function(){if(!0===ie.auto){var e=$e().__wxExparserNodeId__;be.pageview.state[e]||(re(De)(),be.pageview.state[e]=!0)}else be.pageview.xwhen=W()}));var t=function(){var e=$e().__wxExparserNodeId__;be.pageview.state[e]&&delete be.pageview.state[e]};if(et(e,"onHide",(function(){ie.autoPageViewDuration&&Oe(),t()})),et(e,"onUnload",(function(){ie.autoPageViewDuration&&Oe(),t()})),1==ie.autoShare&&et(e,"onShareAppMessage",Xe),1==ie.autoTrack)for(var n in e){var r=e[n];s(r)&&Qe.indexOf(n)<0?et(e,n,Ye):s(r)&&"onTabItemTap"==n&&et(e,n,ze)}}var nt=App,rt=Page,ot=Component;function it(e){et(e,"onLaunch",(function(e){_e(e)})),et(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?p.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function w(e,t){var n=!1;if(i(e)||o(e)||a(e)||u(e))if(n=!0,i(e))E(e,255)||(n=!1);else if(a(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function x(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&w(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var P,T,b=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=T),e.setStorageSync(t,n)};function D(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,a=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function o(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,i),a),c)),r(n(e,u),t)}function i(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,i),a),c)),r(n(e,u),t)}function a(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,i),a),c)),r(n(e,u),t)}function u(e,t,o,i,a,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,i),a),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,l,p,d,g,h,v,m,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),i=Array(o-1),a=0,u=0;u>>29,i}(e),h=1732584193,v=4023233417,m=2562383102,y=271733878,f=0;f=0;n--){var r=T.POSTDATA[n];t[r.xwhen]&&T.POSTDATA.splice(n,1)}b()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rie.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ie),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ie)}))}))}function ue(e,t){var n,r=x(e,t);Object.keys(r).length&&(n=r,T.ARKSUPER=Object.assign({},T.ARKSUPER,n),b(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function le(){return N()}function pe(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function ve(t){var n=l(T.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ie.uploadURL+"/up?appid="+ie.appkey,data:ge,encryptType:ie.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ie.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ie.sendDataTimeout}).then((function(e){j(ge),ge=[],ve(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(ve(),he++)}))}}function me(e,t){ie.appkey?ie.uploadURL?(M(e),ve(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}function $e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function Ae(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,i=Object.keys(o);if(i.length){var a="";return i.forEach((function(e,t){t&&(a+="&"),a+=e+"="+o[e]})),r+"?"+a}}return r}return""}function Se(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Ee={};function Re(e){Ee.element_function=e.function||"",Ee.element_id=e.id||"",Ee.element_content=e.content||"",Ee.element_type=e.type||"",Ee.element_name=e.name||""}var we={xwho:function(){return U()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return ie.debugMode},$is_login:function(){return!!T.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=T.SEESIONDATE?new Date(T.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!T.SEESIONID||!T.SEESIONDATE||t-T.SEESIONDATE>18e5||o!==r)&&L(),T.SEESIONID;var e,t,n,r,o},$screen_width:function(){return P.screenWidth},$screen_height:function(){return P.screenHeight},$os:function(){var e=P.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return P.brand},$browser_version:function(){return P.version},$os_version:function(){return P.system?P.system.split(" ")[1]:""},$model:function(){return P.model},$language:function(){return P.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!T.ARKFRISTPROFILE},$is_first_day:function(){var e=T.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return T.ARKFRISTPROFILE},$first_visit_language:function(){return P.language},$original_id:function(){return T.ARK_TRACKID||T.ARK_ID},$is_time_calibrated:function(){return!(!ie.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return Ae(ie.autoCompleteURL)},$url_path:function(){return Ae()},$url_domain:function(){return Ae()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Se(Ee.element_content)},$element_id:function(){return Se(Ee.element_id)},$element_type:function(){return Se(Ee.element_type)},$element_function:function(){return Se(Ee.element_function)},$element_name:function(){return Se(Ee.element_name)},$appid:function(){return ie.$appid},$appname:function(){return ie.$appname}};function xe(e){var t={appid:ie.appkey,xwho:we.xwho(),xwhat:we.xwhat(e),xwhen:we.xwhen(),xcontext:{}},n=v[e];function r(e){var n=we[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Pe={};function Te(){return Pe}var be={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=x(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");be.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),Te(),n),me(o)}function Oe(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-be.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),Te(),t),Pe={},me(e)}}function Ie(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&w(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,x(o,e)),me(r)}function Ke(e,t){Ie("$profile_set_once",e,t)}function Ue(e,t){Ie("$profile_set",e,t)}function ke(e,t){Ie("$profile_increment",e,t)}function Le(e,t){Ie("$profile_append",e,t)}function Ne(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),me(n)}function Fe(){me(xe("$profile_delete"))}function Me(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Re(Object.assign(o,{function:n}));var i=xe("$user_click");i.xcontext=Object.assign({},i.xcontext,N(),Te()),me(i)}}function ze(e){Re({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),Te()),me(t)}function Be(){T.ARK_ID=k(),T.ARK_TRACKID="",T.ARK_LOGINID="",T.ARKSUPER={},T.ARKFRISTPROFILE="",T.ARKFRISTPROFILESEND=!1,L(),!0===ie.autoProfile&&Ke({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ge(e){be.timeEvent[e]=W()}function Ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function We(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),x(t,e)),be.timeEvent[e]&&(n.xcontext.$duration=W()-be.timeEvent[e],delete be[e]),me(n)}else S({code:600025,fn:"track",value:e})}function He(t){var n;E(t)?(n=t,T.ARK_TRACKID=n,b(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function qe(e){var t=T.ARK_TRACKID||T.ARK_ID;return e&&e(t),t}function Je(e){var t=x(e,"$pageProperty");!function(e){Pe=Object.assign({},Pe,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function Xe(e,t){var n=U(),r=Ae(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),i={$share_id:n,$share_level:o,$share_path:r},a={};t&&(a=x(t,"$share")),e.xcontext=Object.assign({},e.xcontext,i,N(),a),me(e)}))();var i="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var a=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+a+i,e}var Qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function et(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function tt(e){et(e,"onShow",(function(){if(!0===ie.auto){var e=$e().__wxExparserNodeId__;be.pageview.state[e]||(re(De)(),be.pageview.state[e]=!0)}else be.pageview.xwhen=W()}));var t=function(){var e=$e().__wxExparserNodeId__;be.pageview.state[e]&&delete be.pageview.state[e]};if(et(e,"onHide",(function(){ie.autoPageViewDuration&&Oe(),t()})),et(e,"onUnload",(function(){ie.autoPageViewDuration&&Oe(),t()})),1==ie.autoShare&&et(e,"onShareAppMessage",Xe),1==ie.autoTrack)for(var n in e){var r=e[n];s(r)&&Qe.indexOf(n)<0?et(e,n,Ye):s(r)&&"onTabItemTap"==n&&et(e,n,ze)}}var nt=App,rt=Page,ot=Component;function it(e){et(e,"onLaunch",(function(e){_e(e)})),et(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?l.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function x(e,t){var n=!1;if(a(e)||o(e)||i(e)||u(e))if(n=!0,a(e))E(e,255)||(n=!1);else if(i(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&x(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var w,P,D=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=P),e.setStorageSync(t,n)};function b(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function o(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,a),i),c)),r(n(e,u),t)}function a(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,a),i),c)),r(n(e,u),t)}function i(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,a),i),c)),r(n(e,u),t)}function u(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,a),i),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,p,l,d,g,h,m,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),a=Array(o-1),i=0,u=0;u>>29,a}(e),h=1732584193,m=4023233417,v=2562383102,y=271733878,f=0;f=0;n--){var r=P.POSTDATA[n];t[r.xwhen]&&P.POSTDATA.splice(n,1)}D()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rae.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ae),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ae)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,P.ARKSUPER=Object.assign({},P.ARKSUPER,n),D(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function pe(){return N()}function le(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function me(t){var n=p(P.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ae.uploadURL+"/up?appid="+ae.appkey,data:ge,encryptType:ae.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ae.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ae.sendDataTimeout}).then((function(e){j(ge),ge=[],me(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(me(),he++)}))}}function ve(e,t){ae.appkey?ae.uploadURL?(M(e),me(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function $e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,a=Object.keys(o);if(a.length){var i="";return a.forEach((function(e,t){t&&(i+="&"),i+=e+"="+o[e]})),r+"?"+i}}return r}return""}function Ae(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Se={};function Ee(e){Se.element_function=e.function||"",Se.element_id=e.id||"",Se.element_content=e.content||"",Se.element_type=e.type||"",Se.element_name=e.name||""}var Re={xwho:function(){return k()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return ae.debugMode},$is_login:function(){return!!P.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=P.SEESIONDATE?new Date(P.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!P.SEESIONID||!P.SEESIONDATE||t-P.SEESIONDATE>18e5||o!==r)&&L(),P.SEESIONID;var e,t,n,r,o},$screen_width:function(){return w.screenWidth},$screen_height:function(){return w.screenHeight},$os:function(){var e=w.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return w.brand},$browser_version:function(){return w.version},$os_version:function(){return w.system?w.system.split(" ")[1]:""},$model:function(){return w.model},$language:function(){return w.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!P.ARKFRISTPROFILE},$is_first_day:function(){var e=P.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return P.ARKFRISTPROFILE},$first_visit_language:function(){return w.language},$original_id:function(){return P.ARK_TRACKID||P.ARK_ID},$is_time_calibrated:function(){return!(!ae.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return $e(ae.autoCompleteURL)},$url_path:function(){return $e()},$url_domain:function(){return $e()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Ae(Se.element_content)},$element_id:function(){return Ae(Se.element_id)},$element_type:function(){return Ae(Se.element_type)},$element_function:function(){return Ae(Se.element_function)},$element_name:function(){return Ae(Se.element_name)},$appid:function(){return ae.$appid},$appname:function(){return ae.$appname}};function xe(e){var t={appid:ae.appkey,xwho:Re.xwho(),xwhat:Re.xwhat(e),xwhen:Re.xwhen(),xcontext:{}},n=m[e];function r(e){var n=Re[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Te={};function we(){return Te}var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");Pe.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),we(),n),ve(o)}function be(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-Pe.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),we(),t),Te={},ve(e)}}function Oe(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&x(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,T(o,e)),ve(r)}function Ie(e,t){Oe("$profile_set_once",e,t)}function Ue(e,t){Oe("$profile_set",e,t)}function ke(e,t){Oe("$profile_increment",e,t)}function Ke(e,t){Oe("$profile_append",e,t)}function Le(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),ve(n)}function Ne(){ve(xe("$profile_delete"))}function Fe(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Ee(Object.assign(o,{function:n}));var a=xe("$user_click");a.xcontext=Object.assign({},a.xcontext,N(),we()),ve(a)}}function Ce(e){Ee({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),we()),ve(t)}function Ve(){P.ARK_ID=K(),P.ARK_TRACKID="",P.ARK_LOGINID="",P.ARKSUPER={},P.ARKFRISTPROFILE="",P.ARKFRISTPROFILESEND=!1,L(),!0===ae.autoProfile&&Ie({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ye(e){Pe.timeEvent[e]=W()}function ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function Be(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),T(t,e)),Pe.timeEvent[e]&&(n.xcontext.$duration=W()-Pe.timeEvent[e],delete Pe[e]),ve(n)}else S({code:600025,fn:"track",value:e})}function Ge(t){var n;E(t)?(n=t,P.ARK_TRACKID=n,D(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function Ze(e){var t=P.ARK_TRACKID||P.ARK_ID;return e&&e(t),t}function We(e){var t=T(e,"$pageProperty");!function(e){Te=Object.assign({},Te,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function He(e,t){var n=k(),r=$e(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),a={$share_id:n,$share_level:o,$share_path:r},i={};t&&(i=T(t,"$share")),e.xcontext=Object.assign({},e.xcontext,a,N(),i),ve(e)}))();var a="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var i=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+i+a,e}var qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function Je(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function Xe(e){Je(e,"onShow",(function(){if(!0===ae.auto){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]||(re(De)(),Pe.pageview.state[e]=!0)}else Pe.pageview.xwhen=W()}));var t=function(){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]&&delete Pe.pageview.state[e]};if(Je(e,"onHide",(function(){ae.autoPageViewDuration&&be(),t()})),Je(e,"onUnload",(function(){ae.autoPageViewDuration&&be(),t()})),1==ae.autoShare&&Je(e,"onShareAppMessage",He),1==ae.autoTrack)for(var n in e){var r=e[n];s(r)&&qe.indexOf(n)<0?Je(e,n,je):s(r)&&"onTabItemTap"==n&&Je(e,n,Ce)}}var Qe=App,et=Page,tt=Component;function nt(e){Je(e,"onLaunch",(function(e){!function(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}(e)})),Je(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?l.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function x(e,t){var n=!1;if(a(e)||o(e)||i(e)||u(e))if(n=!0,a(e))E(e,255)||(n=!1);else if(i(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&x(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var w,P,D=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=P),e.setStorageSync(t,n)};function b(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function o(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,a),i),c)),r(n(e,u),t)}function a(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,a),i),c)),r(n(e,u),t)}function i(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,a),i),c)),r(n(e,u),t)}function u(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,a),i),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,p,l,d,g,h,m,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),a=Array(o-1),i=0,u=0;u>>29,a}(e),h=1732584193,m=4023233417,v=2562383102,y=271733878,f=0;f=0;n--){var r=P.POSTDATA[n];t[r.xwhen]&&P.POSTDATA.splice(n,1)}D()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rae.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ae),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ae)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,P.ARKSUPER=Object.assign({},P.ARKSUPER,n),D(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function pe(){return N()}function le(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function me(t){var n=p(P.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ae.uploadURL+"/up?appid="+ae.appkey,data:ge,encryptType:ae.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ae.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ae.sendDataTimeout}).then((function(e){j(ge),ge=[],me(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(me(),he++)}))}}function ve(e,t){ae.appkey?ae.uploadURL?(M(e),me(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function $e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,a=Object.keys(o);if(a.length){var i="";return a.forEach((function(e,t){t&&(i+="&"),i+=e+"="+o[e]})),r+"?"+i}}return r}return""}function Ae(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Se={};function Ee(e){Se.element_function=e.function||"",Se.element_id=e.id||"",Se.element_content=e.content||"",Se.element_type=e.type||"",Se.element_name=e.name||""}var Re={xwho:function(){return k()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return ae.debugMode},$is_login:function(){return!!P.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=P.SEESIONDATE?new Date(P.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!P.SEESIONID||!P.SEESIONDATE||t-P.SEESIONDATE>18e5||o!==r)&&L(),P.SEESIONID;var e,t,n,r,o},$screen_width:function(){return w.screenWidth},$screen_height:function(){return w.screenHeight},$os:function(){var e=w.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return w.brand},$browser_version:function(){return w.version},$os_version:function(){return w.system?w.system.split(" ")[1]:""},$model:function(){return w.model},$language:function(){return w.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!P.ARKFRISTPROFILE},$is_first_day:function(){var e=P.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return P.ARKFRISTPROFILE},$first_visit_language:function(){return w.language},$original_id:function(){return P.ARK_TRACKID||P.ARK_ID},$is_time_calibrated:function(){return!(!ae.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return $e(ae.autoCompleteURL)},$url_path:function(){return $e()},$url_domain:function(){return $e()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Ae(Se.element_content)},$element_id:function(){return Ae(Se.element_id)},$element_type:function(){return Ae(Se.element_type)},$element_function:function(){return Ae(Se.element_function)},$element_name:function(){return Ae(Se.element_name)},$appid:function(){return ae.$appid},$appname:function(){return ae.$appname}};function xe(e){var t={appid:ae.appkey,xwho:Re.xwho(),xwhat:Re.xwhat(e),xwhen:Re.xwhen(),xcontext:{}},n=m[e];function r(e){var n=Re[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Te={};function we(){return Te}var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");Pe.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),we(),n),ve(o)}function be(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-Pe.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),we(),t),Te={},ve(e)}}function Oe(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&x(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,T(o,e)),ve(r)}function Ie(e,t){Oe("$profile_set_once",e,t)}function Ue(e,t){Oe("$profile_set",e,t)}function ke(e,t){Oe("$profile_increment",e,t)}function Ke(e,t){Oe("$profile_append",e,t)}function Le(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),ve(n)}function Ne(){ve(xe("$profile_delete"))}function Fe(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Ee(Object.assign(o,{function:n}));var a=xe("$user_click");a.xcontext=Object.assign({},a.xcontext,N(),we()),ve(a)}}function Ce(e){Ee({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),we()),ve(t)}function Ve(){P.ARK_ID=K(),P.ARK_TRACKID="",P.ARK_LOGINID="",P.ARKSUPER={},P.ARKFRISTPROFILE="",P.ARKFRISTPROFILESEND=!1,L(),!0===ae.autoProfile&&Ie({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ye(e){Pe.timeEvent[e]=W()}function ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function Be(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),T(t,e)),Pe.timeEvent[e]&&(n.xcontext.$duration=W()-Pe.timeEvent[e],delete Pe[e]),ve(n)}else S({code:600025,fn:"track",value:e})}function Ge(t){var n;E(t)?(n=t,P.ARK_TRACKID=n,D(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function Ze(e){var t=P.ARK_TRACKID||P.ARK_ID;return e&&e(t),t}function We(e){var t=T(e,"$pageProperty");!function(e){Te=Object.assign({},Te,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function He(e,t){var n=k(),r=$e(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),a={$share_id:n,$share_level:o,$share_path:r},i={};t&&(i=T(t,"$share")),e.xcontext=Object.assign({},e.xcontext,a,N(),i),ve(e)}))();var a="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var i=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+i+a,e}var qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function Je(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function Xe(e){Je(e,"onShow",(function(){if(!0===ae.auto){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]||(re(De)(),Pe.pageview.state[e]=!0)}else Pe.pageview.xwhen=W()}));var t=function(){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]&&delete Pe.pageview.state[e]};if(Je(e,"onHide",(function(){ae.autoPageViewDuration&&be(),t()})),Je(e,"onUnload",(function(){ae.autoPageViewDuration&&be(),t()})),1==ae.autoShare&&Je(e,"onShareAppMessage",He),1==ae.autoTrack)for(var n in e){var r=e[n];s(r)&&qe.indexOf(n)<0?Je(e,n,je):s(r)&&"onTabItemTap"==n&&Je(e,n,Ce)}}var Qe=App,et=Page,tt=Component;function nt(e){Je(e,"onLaunch",(function(e){!function(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}(e)})),Je(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?l.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function x(e,t){var n=!1;if(a(e)||o(e)||i(e)||u(e))if(n=!0,a(e))E(e,255)||(n=!1);else if(i(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&x(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var w,P,D=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=P),e.setStorageSync(t,n)};function b(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function o(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,a),i),c)),r(n(e,u),t)}function a(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,a),i),c)),r(n(e,u),t)}function i(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,a),i),c)),r(n(e,u),t)}function u(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,a),i),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,p,l,d,g,h,m,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),a=Array(o-1),i=0,u=0;u>>29,a}(e),h=1732584193,m=4023233417,v=2562383102,y=271733878,f=0;f=0;n--){var r=P.POSTDATA[n];t[r.xwhen]&&P.POSTDATA.splice(n,1)}D()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rae.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ae),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ae)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,P.ARKSUPER=Object.assign({},P.ARKSUPER,n),D(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function pe(){return N()}function le(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function me(t){var n=p(P.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ae.uploadURL+"/up?appid="+ae.appkey,data:ge,encryptType:ae.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ae.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ae.sendDataTimeout}).then((function(e){j(ge),ge=[],me(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(me(),he++)}))}}function ve(e,t){ae.appkey?ae.uploadURL?(M(e),me(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function $e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,a=Object.keys(o);if(a.length){var i="";return a.forEach((function(e,t){t&&(i+="&"),i+=e+"="+o[e]})),r+"?"+i}}return r}return""}function Ae(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Se={};function Ee(e){Se.element_function=e.function||"",Se.element_id=e.id||"",Se.element_content=e.content||"",Se.element_type=e.type||"",Se.element_name=e.name||""}var Re={xwho:function(){return k()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.4.1"},$platform:function(){return"WeChat"},$debug:function(){return ae.debugMode},$is_login:function(){return!!P.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=P.SEESIONDATE?new Date(P.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!P.SEESIONID||!P.SEESIONDATE||t-P.SEESIONDATE>18e5||o!==r)&&L(),P.SEESIONID;var e,t,n,r,o},$screen_width:function(){return w.screenWidth},$screen_height:function(){return w.screenHeight},$os:function(){var e=w.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return w.brand},$browser_version:function(){return w.version},$os_version:function(){return w.system?w.system.split(" ")[1]:""},$model:function(){return w.model},$language:function(){return w.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!P.ARKFRISTPROFILE},$is_first_day:function(){var e=P.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return P.ARKFRISTPROFILE},$first_visit_language:function(){return w.language},$original_id:function(){return P.ARK_TRACKID||P.ARK_ID},$is_time_calibrated:function(){return!(!ae.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return $e(ae.autoCompleteURL)},$url_path:function(){return $e()},$url_domain:function(){return $e()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Ae(Se.element_content)},$element_id:function(){return Ae(Se.element_id)},$element_type:function(){return Ae(Se.element_type)},$element_function:function(){return Ae(Se.element_function)},$element_name:function(){return Ae(Se.element_name)},$appid:function(){return ae.$appid},$appname:function(){return ae.$appname}};function xe(e){var t={appid:ae.appkey,xwho:Re.xwho(),xwhat:Re.xwhat(e),xwhen:Re.xwhen(),xcontext:{}},n=m[e];function r(e){var n=Re[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Te={};function we(){return Te}var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");Pe.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),we(),n),ve(o)}function be(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-Pe.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),we(),t),Te={},ve(e)}}function Oe(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&x(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,T(o,e)),ve(r)}function Ie(e,t){Oe("$profile_set_once",e,t)}function Ue(e,t){Oe("$profile_set",e,t)}function ke(e,t){Oe("$profile_increment",e,t)}function Ke(e,t){Oe("$profile_append",e,t)}function Le(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),ve(n)}function Ne(){ve(xe("$profile_delete"))}function Fe(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Ee(Object.assign(o,{function:n}));var a=xe("$user_click");a.xcontext=Object.assign({},a.xcontext,N(),we()),ve(a)}}function Ce(e){Ee({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),we()),ve(t)}function Ve(){P.ARK_ID=K(),P.ARK_TRACKID="",P.ARK_LOGINID="",P.ARKSUPER={},P.ARKFRISTPROFILE="",P.ARKFRISTPROFILESEND=!1,L(),!0===ae.autoProfile&&Ie({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ye(e){Pe.timeEvent[e]=W()}function ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function Be(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),T(t,e)),Pe.timeEvent[e]&&(n.xcontext.$duration=W()-Pe.timeEvent[e],delete Pe[e]),ve(n)}else S({code:600025,fn:"track",value:e})}function Ge(t){var n;E(t)?(n=t,P.ARK_TRACKID=n,D(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function Ze(e){var t=P.ARK_TRACKID||P.ARK_ID;return e&&e(t),t}function We(e){var t=T(e,"$pageProperty");!function(e){Te=Object.assign({},Te,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function He(e,t){var n=k(),r=$e(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),a={$share_id:n,$share_level:o,$share_path:r},i={};t&&(i=T(t,"$share")),e.xcontext=Object.assign({},e.xcontext,a,N(),i),ve(e)}))();var a="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var i=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+i+a,e}var qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function Je(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function Xe(e){Je(e,"onShow",(function(){if(!0===ae.auto){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]||(re(De)(),Pe.pageview.state[e]=!0)}else Pe.pageview.xwhen=W()}));var t=function(){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]&&delete Pe.pageview.state[e]};if(Je(e,"onHide",(function(){ae.autoPageViewDuration&&be(),t()})),Je(e,"onUnload",(function(){ae.autoPageViewDuration&&be(),t()})),1==ae.autoShare&&Je(e,"onShareAppMessage",He),1==ae.autoTrack)for(var n in e){var r=e[n];s(r)&&qe.indexOf(n)<0?Je(e,n,je):s(r)&&"onTabItemTap"==n&&Je(e,n,Ce)}}var Qe=App,et=Page,tt=Component;function nt(e){Je(e,"onLaunch",(function(e){!function(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}(e)})),Je(e,"onShow",(function(){for(var e=[],t=0;t=n}function R(e,t){var n=!0;return E(e,99)?l.indexOf(e)>-1?(n=!1,t&&(t.code=600012)):n=/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e):n=!1,t&&t.fn&&!n&&S(t),n}function x(e,t){var n=!1;if(a(e)||o(e)||i(e)||u(e))if(n=!0,a(e))E(e,255)||(n=!1);else if(i(e)){n=e.some((function(e){return E(e,255)}))}return t&&t.fn&&t.key&&!n&&S(t),n}function T(e,t){var n={};if(e){if(!c(e))return S({code:600016,fn:t,value:e}),{};for(var r in e){var o=e[r];R(r,{code:600023,fn:t,key:r})&&x(o,{code:600022,fn:t,key:r,value:o})&&(n[r]=o)}}return n}var w,P,D=function(t,n){void 0===t&&(t="FZ_STROAGE"),void 0===n&&(n=P),e.setStorageSync(t,n)};function b(e,t){function n(e,t){return e<>>32-t}function r(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,i=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(r=1073741824&t)?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function o(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&t|~e&n}(t,o,a),i),c)),r(n(e,u),t)}function a(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e&n|t&~n}(t,o,a),i),c)),r(n(e,u),t)}function i(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return e^t^n}(t,o,a),i),c)),r(n(e,u),t)}function u(e,t,o,a,i,u,c){return e=r(e,r(r(function(e,t,n){return t^(e|~n)}(t,o,a),i),c)),r(n(e,u),t)}function c(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0"+(e>>>8*t&255).toString(16)).substr(r.length-2,2);return n}var s,f,p,l,d,g,h,m,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,o=16*((r-r%64)/64+1),a=Array(o-1),i=0,u=0;u>>29,a}(e),h=1732584193,m=4023233417,v=2562383102,y=271733878,f=0;f=0;n--){var r=P.POSTDATA[n];t[r.xwhen]&&P.POSTDATA.splice(n,1)}D()}var C={networkType:""},V=!1;e.onNetworkStatusChange((function(e){C.networkType=e.networkType}));var Y=function(t,n){return new Promise((function(r,o){e.request(f(f({},t),{success:function(e){var t=e.data;n&&n(e),!t||200!==t.code&&"Status: OK"!==t?o(t):r(t)},fail:function(e){n&&n(e),o(e)}}))}))};function z(e,t){var n=e.getTimezoneOffset(),r={"M+":(e=new Date(e.getTime()+60*n*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))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,3==RegExp.$1.length?(""+r[o]).length<3?("00"+r[o]).substr(("00"+r[o]).length-3,("00"+r[o]).length):r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}var B=0,G=!1,Z=0;function W(){return+new Date+Z}var H={isBeforeStartUp:!1,isAfterStartUp:!1,isBeforePageView:!1,isAfterPageView:!1};function q(t,n,r){if(!H[t]&&e.AnalysysAgent){var o=e.AnalysysAgent[n];s(o)&&o(r),H[t]=!0}}var J=function(t){if(e.AnalysysAgent){var n=e.AnalysysAgent.onReady;s(n)&&n(t)}},X=function(e){q("isBeforeStartUp","onBeforeStartUp",e)},Q=function(e){q("isAfterStartUp","onAfterStartUp",e)},ee=[],te=[],ne=function(){return G&&V};function re(e,t){return function(){for(var n=[],r=0;rae.maxDiffTimeInterval&&(Z=B-n,A({code:20013,value:z(new Date(B),"yyyy-MM-dd hh:mm:ss +SSS"),key:z(new Date(n),"yyyy-MM-dd hh:mm:ss +SSS"),fn:r+"s"}))}G=!0,e(B)}))}))]).then((function(){ne()&&(J(ae),te&&ee.length&&(te.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),te=[]),ee&&ee.length&&(ee.forEach((function(e){return e.fn.apply(e.fn,e.arg)})),ee=[])),r(ae)}))}))}function ue(e,t){var n,r=T(e,t);Object.keys(r).length&&(n=r,P.ARKSUPER=Object.assign({},P.ARKSUPER,n),D(),A({fn:t,code:20002,value:e}))}function ce(e,t){var n;R(e,{code:600023,fn:"$registerSuperProperty",key:e})&&ue(((n={})[e]=t,n),"$registerSuperProperty")}function se(e){ue(e,"$registerSuperProperties")}function fe(e){return N(e)}function pe(){return N()}function le(e){F(e),A({fn:"$unRegisterSuperProperty",code:20003,value:e})}function de(){F(),A({fn:"$clearSuperProperties",code:20004})}var ge=[],he=0;function me(t){var n=p(P.POSTDATA);if(!ge.length&&n.length){ge=n.splice(0,20);var r={url:ae.uploadURL+"/up?appid="+ae.appkey,data:ge,encryptType:ae.encryptType};if(A({key:r.url,value:ge,code:20012}),1===ae.debugMode)return j(ge),void(ge=[]);e.AnalysysAgent.encrypt&&s(e.AnalysysAgent.encrypt.uploadData)&&(r=e.AnalysysAgent.encrypt.uploadData(r)),e.AnalysysModal&&e.AnalysysModal(ge),Y({url:r.url,method:"POST",data:r.data,timeout:ae.sendDataTimeout}).then((function(e){j(ge),ge=[],me(),t&&t(),A({code:20001}),he=0})).catch((function(e){ge=[],S({code:60008}),he<3&&(me(),he++)}))}}function ve(e,t){ae.appkey?ae.uploadURL?(M(e),me(t)):S({code:60007}):S({code:60006})}var ye={scene:null,utm_campaign_id:"",utm_source:"",utm_medium:"",utm_term:"",utm_content:"",utm_campaign:"",share_id:"",share_level:"",share_path:""};function _e(){var e=getCurrentPages();return e&&e.length?e[e.length-1]:{}}function $e(e){var t=getCurrentPages();if(t.length){var n=t[t.length-1],r=n.route;if(e){var o=n.options,a=Object.keys(o);if(a.length){var i="";return a.forEach((function(e,t){t&&(i+="&"),i+=e+"="+o[e]})),r+"?"+i}}return r}return""}function Ae(e){return null==e?"":c(e)?JSON.stringify(e):e+""}var Se={};function Ee(e){Se.element_function=e.function||"",Se.element_id=e.id||"",Se.element_content=e.content||"",Se.element_type=e.type||"",Se.element_name=e.name||""}var Re={xwho:function(){return k()},xwhen:function(){return W()},xwhat:function(e){return e},$lib:function(){return"WeChat"},$lib_version:function(){return"5.0.5"},$platform:function(){return"WeChat"},$debug:function(){return ae.debugMode},$is_login:function(){return!!P.ARK_LOGINID},$session_id:function(){return e=new Date,t=e.getTime(),n=e.getTimezoneOffset(),r=new Date(t+60*n*1e3+288e5).getDate(),o=P.SEESIONDATE?new Date(P.SEESIONDATE+60*n*1e3+288e5).getDate():0,(!P.SEESIONID||!P.SEESIONDATE||t-P.SEESIONDATE>18e5||o!==r)&&L(),P.SEESIONID;var e,t,n,r,o},$screen_width:function(){return w.screenWidth},$screen_height:function(){return w.screenHeight},$os:function(){var e=w.system;return e?e.split(" ")[0]:""},$browser:function(){return""},$brand:function(){return w.brand},$browser_version:function(){return w.version},$os_version:function(){return w.system?w.system.split(" ")[1]:""},$model:function(){return w.model},$language:function(){return w.language},$network:function(){return C.networkType},$time_zone:function(){return"GMT"+(e=(new Date).getTimezoneOffset(),n=e%60,r="-",((t=e/60)<=0||n<0)&&(r="+",t=-t,n<0&&(n=-n)),1==(t+="").length&&(t="0"+t),1==(n+="").length&&(n="0"+n),r+t+":"+n);var e,t,n,r},$startup_time:function(){return""},$is_first_time:function(){return!P.ARKFRISTPROFILE},$is_first_day:function(){var e=P.ARKFRISTPROFILE;return!e||z(new Date(W()),"yyyyMMdd")===z(new Date(e),"yyyyMMdd")},$first_visit_time:function(){return P.ARKFRISTPROFILE},$first_visit_language:function(){return w.language},$original_id:function(){return P.ARK_TRACKID||P.ARK_ID},$is_time_calibrated:function(){return!(!ae.allowTimeCheck||!Z)},$scene:function(){return ye.scene.toString()},$referrer:function(){return function(){var e=getCurrentPages();if(e&&e.length){var t=e[e.length-2];if(t)return t.route}return ye.scene+""}()},$url:function(){return $e(ae.autoCompleteURL)},$url_path:function(){return $e()},$url_domain:function(){return $e()},$utm_campaign_id:function(){return ye.utm_campaign_id},$utm_source:function(){return ye.utm_source},$utm_medium:function(){return ye.utm_medium},$utm_term:function(){return ye.utm_term},$utm_content:function(){return ye.utm_content},$utm_campaign:function(){return ye.utm_campaign},$share_id:function(){return ye.share_id},$share_level:function(){return null==(e=ye.share_level)||""===e?"":e>=-1/0?e-0:"";var e},$share_path:function(){return ye.share_path},$element_content:function(){return Ae(Se.element_content)},$element_id:function(){return Ae(Se.element_id)},$element_type:function(){return Ae(Se.element_type)},$element_function:function(){return Ae(Se.element_function)},$element_name:function(){return Ae(Se.element_name)},$appid:function(){return ae.$appid},$appname:function(){return ae.$appname}};function xe(e){var t={appid:ae.appkey,xwho:Re.xwho(),xwhat:Re.xwhat(e),xwhen:Re.xwhen(),xcontext:{}},n=m[e];function r(e){var n=Re[e];if(n){var r=n();""!==r&&null!=r&&(t.xcontext[e]=r)}}return d.forEach((function(e){r(e)})),n&&n.forEach((function(e){r(e)})),t}var Te={};function we(){return Te}var Pe={startup:{state:!1,xwhen:0},pageview:{xwhen:0,state:{}},timeEvent:{}};function De(e,t){var n={},r={};E(e)&&(n.$title=e,t&&(r=T(t,"$pageview"))),n=Object.assign({},r,n);var o=xe("$pageview");Pe.pageview.xwhen=o.xwhen,o.xcontext=Object.assign({},o.xcontext,N(),we(),n),ve(o)}function be(){var e=xe("page_close");if(!e.xcontext||e.xcontext.$url){var t={pagestaytime:e.xwhen-Pe.pageview.xwhen};e.xcontext=Object.assign({},e.xcontext,N(),we(),t),Te={},ve(e)}}function Oe(e,t,n){var r=xe(e),o={};c(t)&&(o=t),E(t)&&x(n)&&(o[t]=n),r.xcontext=Object.assign({},r.xcontext,T(o,e)),ve(r)}function Ie(e,t){Oe("$profile_set_once",e,t)}function Ue(e,t){Oe("$profile_set",e,t)}function ke(e,t){Oe("$profile_increment",e,t)}function Ke(e,t){Oe("$profile_append",e,t)}function Le(e){var t,n=xe("$profile_unset");R(e)?n.xcontext=Object.assign({},n.xcontext,((t={})[e]="",t)):S({code:600010,fn:"profileUnset",key:e}),ve(n)}function Ne(){ve(xe("$profile_delete"))}function Fe(){for(var e=[],t=0;t0&&e[0]&&c(e[0])&&("tap"==e[0].type||"longtap"==e[0].type||"longpress"==e[0].type)){var n=e[1];try{var r=e[0].target.dataset.eventOpts;r&&(n=r[0][1][0][0])}catch(e){console.log(e)}var o=e[0]&&e[0].currentTarget&&e[0].currentTarget.dataset?e[0].currentTarget.dataset:{};Ee(Object.assign(o,{function:n}));var a=xe("$user_click");a.xcontext=Object.assign({},a.xcontext,N(),we()),ve(a)}}function Ce(e){Ee({function:"onTabItemTap",name:e.text});var t=xe("$user_click");t.xcontext=Object.assign({},t.xcontext,N(),we()),ve(t)}function Ve(){P.ARK_ID=K(),P.ARK_TRACKID="",P.ARK_LOGINID="",P.ARKSUPER={},P.ARKFRISTPROFILE="",P.ARKFRISTPROFILESEND=!1,L(),!0===ae.autoProfile&&Ie({$reset_time:z(new Date,"yyyy-MM-dd hh:mm:ss.SSS")}),A({fn:"$reset",code:20005})}function Ye(e){Pe.timeEvent[e]=W()}function ze(){var e=xe("$getPresetProperties");return delete e.xcontext.$is_login,A({code:20010,fn:"getPresetProperties",value:e.xcontext}),e.xcontext}function Be(e,t){if(/^[a-zA-Z$][a-zA-Z0-9_]{1,99}$|^[a-zA-Z]$/.test(e)){var n=xe("track");n.xwhat=e,n.xcontext=Object.assign({},n.xcontext,N(),T(t,e)),Pe.timeEvent[e]&&(n.xcontext.$duration=W()-Pe.timeEvent[e],delete Pe[e]),ve(n)}else S({code:600025,fn:"track",value:e})}function Ge(t){var n;E(t)?(n=t,P.ARK_TRACKID=n,D(),A({code:20002,value:t,fn:"identify"}),e.AnalysysModal&&e.AnalysysModal([{xwhat:"$identify",xwho:t}])):S({code:60009,fn:"identify",value:t})}function Ze(e){var t=P.ARK_TRACKID||P.ARK_ID;return e&&e(t),t}function We(e){var t=T(e,"$pageProperty");!function(e){Te=Object.assign({},Te,e)}(t),Object.keys(t).length&&A({fn:"$pageProperty",code:20002,value:e})}function He(e,t){var n=k(),r=$e(),o=Number(ye.share_level)+1;c(e)||(e={path:r});re((function(){var e=xe("$share"),a={$share_id:n,$share_level:o,$share_path:r},i={};t&&(i=T(t,"$share")),e.xcontext=Object.assign({},e.xcontext,a,N(),i),ve(e)}))();var a="share_id="+n+"&share_level="+o+"&share_path="+encodeURIComponent(r);e.path=e.path||r;var i=e.path.indexOf("?")>-1?"&":"?";return e.path=e.path+i+a,e}var qe=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onShareTimeline","onAddToFavorites","onPageScroll","onResize","onTabItemTap","onSaveExitState"];function Je(e,t,n){var r=e[t];r?e[t]="onShareAppMessage"===t?function(e){return n(r.call(this,e))}:function(e){var o=r.apply(this,arguments);return n(e,t),o}:"onShareAppMessage"!==t&&(e[t]=function(e){n(e)})}function Xe(e){Je(e,"onShow",(function(){if(!0===ae.auto){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]||(re(De)(),Pe.pageview.state[e]=!0)}else Pe.pageview.xwhen=W()}));var t=function(){var e=_e().__wxExparserNodeId__;Pe.pageview.state[e]&&delete Pe.pageview.state[e]};if(Je(e,"onHide",(function(){ae.autoPageViewDuration&&be(),t()})),Je(e,"onUnload",(function(){ae.autoPageViewDuration&&be(),t()})),1==ae.autoShare&&Je(e,"onShareAppMessage",He),1==ae.autoTrack)for(var n in e){var r=e[n];s(r)&&qe.indexOf(n)<0?Je(e,n,je):s(r)&&"onTabItemTap"==n&&Je(e,n,Ce)}}var Qe=App,et=Page,tt=Component;function nt(e){Je(e,"onLaunch",(function(e){!function(e){var t=e.query;t&&(ye.utm_campaign_id=e.query.campaign_id,ye.utm_campaign=t.utm_campaign,ye.utm_content=t.utm_content,ye.utm_medium=t.utm_medium,ye.utm_source=t.utm_source,ye.utm_term=t.utm_term),t.share_id&&t.share_level&&t.share_path&&(ye.share_id=t.share_id,ye.share_level=t.share_level,ye.share_path=decodeURIComponent(t.share_path)),e.scene&&(ye.scene=e.scene)}(e)})),Je(e,"onShow",(function(){for(var e=[],t=0;t