@xyz-fe/log 3.9.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -1,7 +1,9 @@
1
1
  /*!
2
- * @xyz-fe/log v3.9.0
2
+ * @xyz-fe/log v4.1.0
3
3
  * (c) lizhigao <lizhigao@021.com>
4
4
  * Released under the MIT License.
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).index={})}(this,(function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.apply(this,arguments)},o="XYZ_LOG_";function i(e){return void 0!==typeof localStorage?localStorage.getItem(o+e):null}function n(e,t){void 0!==typeof localStorage&&localStorage.setItem(o+e,t)}function r(e,t){void 0===e&&(e=18),void 0===t&&(t=0);for(var o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[],n=Math.random,r=e,s=t||o.length,a=0;a<r;a++)i[a]=o[0|n()*s];return i.join("")}function s(e){void 0===e&&(e="UID");var t=i(e);return t||n(e,t=r()),t}function a(e){try{return e&&"string"==typeof e?e.split(".").map((function(e){return 1===e.length?"0"+e:e})).join(""):""}catch(t){return console.error('[transferVersion] ver("'.concat(e,'")格式异常:'),t),""}}function c(){var e=new Date,t=e.getFullYear().toString(),o=(e.getMonth()+1).toString(),i=e.getDate().toString();return(t=t.toString().substr(-2))+(o=Number(o)<10?"0"+o:o)+(i=Number(i)<10?"0"+i:i)}function p(e,o){var i=t({},e),n=t({},o);return Object.keys(i).forEach((function(e){n[e]||delete n[e]})),t(t({},i),n)}var l,u="3.9.0",d="2/28/2025, 2:27:01 PM",m="organic";e.EGender=void 0,(l=e.EGender||(e.EGender={}))[l.Unknown=0]="Unknown",l[l.Male=1]="Male",l[l.Female=2]="Female";var f=function(){function e(e){var t,o=e.domain,i=e.commonParams,n=e.isPro,r=void 0===n||n,s=e.sendOpenLog,a=void 0===s||s,c=e.consoleLog,p=void 0===c||c;this.version=u,this.buildDate=d,this._openUrl="",this._eventUrl="",this._actUrl="",this._adUrl="",this._onlineUrl="",this._startTime=Date.now(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._isColdStartUp=!0,this._systemInfo={},this._mp={},this._consoleLog=!0,this._isPro=r,this._sendOpenLog=a,this._consoleLog=p;var l=this._getApis(o),m=l.openUrl,f=l.eventUrl,h=l.actUrl,w=l.adUrl,b=l.onlineUrl;this._openUrl=m,this._eventUrl=f,this._actUrl=h,this._adUrl=w,this._onlineUrl=b;var g,v=this._getMp(),_=v.mp,y=v.platform;this._mp=_,this._platform=y,!_||(g=_)&&0===Object.keys(g).length&&g.constructor===Object?console.error("[XLOG] 日志SDK初始化失败,当前环境为非小程序环境!"):this._consoleLog&&console.log("[XLOG] 小程序对象:",_);try{this._systemInfo=(null===(t=this._mp)||void 0===t?void 0:t.getSystemInfoSync())||{}}catch(e){console.error("[XLOG] getSystemInfoSync error",e)}this._extraInfo={language:this._systemInfo.language,wxVersion:this._systemInfo.version,SDKVersion:this._systemInfo.SDKVersion,benchmarkLevel:this._systemInfo.benchmarkLevel||-1,theme:this._systemInfo.theme},this._init(i)}return Object.defineProperty(e.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),e.prototype._init=function(e){var t=this;this._initCommonParams(this._filterParams(e)),this._coldStartUp(),this._visibilityChange((function(){t._isColdStartUp||t._getNetworkType().then((function(e){t._updateCommonParams({network:e}),t._open({openway:1})})),t._startTime=Date.now();var e=t._getOnlineBatchData();e&&t._online(e)}),(function(){t._isColdStartUp=!1,t._open({openway:5}),t._sendOnline()}))},e.prototype._getMp=function(){var e={mp:null,platform:7};return"undefined"!=typeof tt?(e.mp=tt,e.platform=2):"undefined"!=typeof ks?(e.mp=ks,e.platform=3):"undefined"!=typeof swan?(e.mp=swan,e.platform=4):"undefined"!=typeof qq?(e.mp=qq,e.platform=5):"undefined"!=typeof wx?(e.mp=wx,e.platform=1):"undefined"!=typeof my?e.mp=my:"undefined"!=typeof jd&&(e.mp=jd),e},e.prototype._visibilityChange=function(e,t){var o,i,n,r,s=this;void 0===e&&(e=function(){}),void 0===t&&(t=function(){});try{var a=(null===(o=this._mp)||void 0===o?void 0:o.onAppShow)||(null===(i=this._mp)||void 0===i?void 0:i.onShow)||function(){},c=(null===(n=this._mp)||void 0===n?void 0:n.onAppHide)||(null===(r=this._mp)||void 0===r?void 0:r.onHide)||function(){};a((function(){s._consoleLog&&console.log("[XLOG] onAppShow"),e()})),c((function(){s._consoleLog&&console.log("[XLOG] onAppHide"),t()}))}catch(e){console.error("[XLOG] onAppShow or onAppHide error",e)}},e.prototype._getStorage=function(e){var t;try{return null===(t=this._mp)||void 0===t?void 0:t.getStorageSync("XYZ_LOG_".concat(e))}catch(e){console.error("[XLOG] getStorageSync error",e)}},e.prototype._setStorage=function(e,t){var o;try{null===(o=this._mp)||void 0===o||o.setStorageSync("XYZ_LOG_".concat(e),t)}catch(e){console.error("[XLOG] setStorageSync error",e)}},e.prototype._getBatchId=function(){var e=this._getStorage("BATCH_ID");return e&&!this._isColdStartUp||(e=r(),this._setStorage("BATCH_ID",e)),e},e.prototype._coldStartUp=function(){var e=this;this._getNetworkType().then((function(t){e._updateCommonParams({network:t}),e._open({openway:0})}))},e.prototype._getApis=function(e){var o=this._isPro?{open:"webopen-inside.tt.cn",event:"webevent-inside.tt.cn",act:"webact-inside.tt.cn",ad:"webadv-inside.tt.cn",online:"webact-inside.tt.cn"}:{open:"test-webopen-inside.tt.cn",event:"test-webevent-inside.tt.cn",act:"test-webact-inside.tt.cn",ad:"test-webadv-inside.tt.cn",online:"test-webact-inside.tt.cn"},i=t(t({},o),e);return{openUrl:"https://".concat(i.open,"/gamefunction_logs/applet/open"),eventUrl:"https://".concat(i.event,"/gamefunction_logs/applet/event"),actUrl:"https://".concat(i.act,"/gamefunction_logs/applet/activity"),adUrl:"https://".concat(i.ad,"/gamefunction_logs/applet/adv"),onlineUrl:"https://".concat(i.online,"/gamefunction_logs/applet/onlineTime")}},e.prototype._cacheCommonParams=function(e){this._setStorage("COMMON_PARAMS",JSON.stringify(e))},e.prototype._getInitParams=function(){return{platform:this._platform,appcqid:m,appqid:m+c(),os:this._systemInfo.platform,osversion:this._systemInfo.system&&this._systemInfo.system.split(" ")[1],device:this._systemInfo.model,devicebrand:this._systemInfo.brand,pixel:this._systemInfo.screenWidth+"*"+this._systemInfo.screenHeight,userinfo:this._getUserInfo()}},e.prototype._initCommonParams=function(e){var o=this._getInitParams(),i=this._getStorage("COMMON_PARAMS");i&&(o=t(t({},o),JSON.parse(i))),o=e?p(o,e):o,this._updateCommonParams(t(t({},o),{obatchid:this._getBatchId()}))},e.prototype._getNetworkType=function(){var e=this;return new Promise((function(t){var o;try{null===(o=e._mp)||void 0===o||o.getNetworkType({success:function(e){t(e.networkType)},fail:function(){t("none")}})}catch(e){t("none"),console.error("[XLOG] getNetworkType error",e)}}))},e.prototype._getUserInfo=function(e){var o={};if(e)try{o=JSON.parse(e)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format!')}var i={};if(this.commonParams.userinfo)try{i=JSON.parse(this.commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(t(t(t({},this._extraInfo),i),o))},e.prototype._filterParams=function(e){var t={};if(e){var o=["openid","unionid","accid","apptypeid","appcqid","srcqid","appver","userinfo"];for(var i in e){var n=e[i];o.includes(i)&&n&&(t[i]=n)}}return t},e.prototype.setParams=function(e){if(e){this._consoleLog&&console.log("[XLOG] setParams",e);var t=this._commonParams.openid,o=this._commonParams.unionid;e=this._filterParams(e),this._updateCommonParams(e),(e.openid&&e.openid!==t||e.unionid&&e.unionid!==o)&&this._open({isreturn:e.openid?1:2,openway:0})}},e.prototype._updateCommonParams=function(e){this._consoleLog&&console.log("[XLOG] _updateCommonParams",e),e.userinfo&&(e.userinfo=this._getUserInfo(e.userinfo)),e.appcqid&&(e.appqid=e.appcqid+c()),e.appver&&(e.appverint=a(e.appver)),this._commonParams=p(this._commonParams,e),this._cacheCommonParams(this._commonParams)},e.prototype._getAppqid=function(){return this._commonParams.appcqid+c()},e.prototype._request=function(e,t,o){var i=this;return void 0===o&&(o="application/x-www-form-urlencoded"),new Promise((function(n,r){var s;try{null===(s=i._mp)||void 0===s||s.request({url:e,data:t,method:"POST",header:{"content-type":o},success:function(o){i._consoleLog&&console.log("[XLOG] SUCCESS: ".concat(e),t,o),n(o)},fail:function(o){i._consoleLog&&console.log("[XLOG] FAIL: ".concat(e),t,o),r(o)}})}catch(e){console.error("[XLOG] request error",e)}}))},e.prototype.open=function(e){this._open({querystring:e.querystring,isreturn:3,openway:0})},e.prototype._open=function(e){var o,i,n=null;try{n=((null===(o=this._mp)||void 0===o?void 0:o.getEnterOptionsSync)||(null===(i=this._mp)||void 0===i?void 0:i.getLaunchOptionsSync)||function(){})()}catch(e){console.error("[XLOG] getEnterOptionsSync error",e)}if((null==n?void 0:n.query)?this._updateCommonParams({userinfo:JSON.stringify({querystring:t(t({},n.query),e.querystring)})}):this._updateCommonParams({userinfo:JSON.stringify({querystring:e.querystring})}),this._sendOpenLog){var r=t(t({},this._commonParams),{appqid:this._getAppqid(),wakeway:e.wakeway||(null==n?void 0:n.scene)||"",openway:e.openway,isreturn:e.isreturn||0,xmlog:u});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",r),this._request(this._openUrl,r)}},e.prototype.event=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),event1:e.event1||"",event2:e.event2||"",event3:e.event3||"",event4:e.event4||"",value1:e.value1||"",value2:e.value2||"",value3:e.value3||"",value4:e.value4||""});this._consoleLog&&console.log("[XLOG] PARAMS(EVENT)",o),this._request(this._eventUrl,o)},e.prototype.act=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),actentryid:e.actentryid||"",subactid:e.subactid||"",type:e.type||"",custom:e.custom||"",batchid:e.batchid||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},e.prototype.ad=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),type:e.type||"",code:e.code||"",codeinfo:e.codeinfo||"",pagetype:e.pagetype||"",gametype:e.gametype||"",adslot:e.adslot||"",adunitid:e.adunitid||"",adbatchid:e.adbatchid||"",ecpm:e.ecpm||""});this._consoleLog&&console.log("[XLOG] PARAMS(AD)",o),this._request(this._adUrl,o,"application/json")},e.prototype._sendOnline=function(){var e=Date.now(),o=t(t({},this._commonParams),{appqid:this._getAppqid(),onlinetime:"".concat(e-this._startTime),endtime:e.toString(),starttime:this._startTime.toString()});this._online([o])},e.prototype._setOnlineBatchData=function(e){this._setStorage("ONLINE_BACH_DATA",e)},e.prototype._getOnlineBatchData=function(){return this._getStorage("ONLINE_BACH_DATA")},e.prototype._clearOnlineBatchData=function(){this._setStorage("ONLINE_BACH_DATA","")},e.prototype._online=function(e){var t=this;this._consoleLog&&console.log("[XLOG] PARAMS(ONLINE)",e),this._clearOnlineBatchData(),this._request(this._onlineUrl,{batch:JSON.stringify(e)}).catch((function(o){t._setOnlineBatchData(e)}))},e}(),h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},w={exports:{}};!function(e,t){!function(o,i){var n="function",r="undefined",s="object",a="string",c="model",p="name",l="type",u="vendor",d="version",m="architecture",f="console",h="mobile",w="tablet",b="smarttv",g="wearable",v="embedded",_="Amazon",y="Apple",S="ASUS",x="BlackBerry",O="Firefox",k="Google",P="Huawei",A="LG",q="Microsoft",L="Motorola",C="Opera",U="Samsung",N="Sony",T="Xiaomi",I="Zebra",E="Facebook",M=function(e){for(var t={},o=0;o<e.length;o++)t[e[o].toUpperCase()]=e[o];return t},G=function(e,t){return typeof e===a&&-1!==j(t).indexOf(j(e))},j=function(e){return e.toLowerCase()},X=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===r?e:e.substring(0,255)},D=function(e,t){for(var o,r,a,c,p,l,u=0;u<t.length&&!p;){var d=t[u],m=t[u+1];for(o=r=0;o<d.length&&!p;)if(p=d[o++].exec(e))for(a=0;a<m.length;a++)l=p[++r],typeof(c=m[a])===s&&c.length>0?2===c.length?typeof c[1]==n?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?typeof c[1]!==n||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):i:this[c[0]]=l?c[1].call(this,l,c[2]):i:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):i):this[c]=l||i;u+=2}},B=function(e,t){for(var o in t)if(typeof t[o]===s&&t[o].length>0){for(var n=0;n<t[o].length;n++)if(G(t[o][n],e))return"?"===o?i:o}else if(G(t[o],e))return"?"===o?i:o;return e},R={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,d],[/opios[\/ ]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[d,[p,C]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/\bfocus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[d,[p,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,E],d],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[p,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[d,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[d,B,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,j]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",j]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[u,U],[l,w]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[u,U],[l,h]],[/\((ip(?:hone|od)[\w ]*);/i],[c,[u,y],[l,h]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[u,y],[l,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[u,P],[l,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[c,[u,P],[l,h]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[u,T],[l,h]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[u,T],[l,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[u,"OPPO"],[l,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[u,"Vivo"],[l,h]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[c,[u,"Realme"],[l,h]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[u,L],[l,h]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[u,L],[l,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[u,A],[l,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[u,A],[l,h]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[u,"Lenovo"],[l,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[u,"Nokia"],[l,h]],[/(pixel c)\b/i],[c,[u,k],[l,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[u,k],[l,h]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[u,N],[l,h]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[u,N],[l,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[u,"OnePlus"],[l,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[u,_],[l,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[u,_],[l,h]],[/(playbook);[-\w\),; ]+(rim)/i],[c,u,[l,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[u,x],[l,h]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[u,S],[l,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[u,S],[l,h]],[/(nexus 9)/i],[c,[u,"HTC"],[l,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[u,[c,/_/g," "],[l,h]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[u,"Acer"],[l,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[u,"Meizu"],[l,h]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[u,"Sharp"],[l,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,c,[l,h]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,c,[l,w]],[/(surface duo)/i],[c,[u,q],[l,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[u,"Fairphone"],[l,h]],[/(u304aa)/i],[c,[u,"AT&T"],[l,h]],[/\bsie-(\w*)/i],[c,[u,"Siemens"],[l,h]],[/\b(rct\w+) b/i],[c,[u,"RCA"],[l,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[u,"Dell"],[l,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[u,"Verizon"],[l,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[u,"Barnes & Noble"],[l,w]],[/\b(tm\d{3}\w+) b/i],[c,[u,"NuVision"],[l,w]],[/\b(k88) b/i],[c,[u,"ZTE"],[l,w]],[/\b(nx\d{3}j) b/i],[c,[u,"ZTE"],[l,h]],[/\b(gen\d{3}) b.+49h/i],[c,[u,"Swiss"],[l,h]],[/\b(zur\d{3}) b/i],[c,[u,"Swiss"],[l,w]],[/\b((zeki)?tb.*\b) b/i],[c,[u,"Zeki"],[l,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],c,[l,w]],[/\b(ns-?\w{0,9}) b/i],[c,[u,"Insignia"],[l,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[u,"NextBook"],[l,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],c,[l,h]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],c,[l,h]],[/\b(ph-1) /i],[c,[u,"Essential"],[l,h]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[u,"Envizen"],[l,w]],[/\b(trio[-\w\. ]+) b/i],[c,[u,"MachSpeed"],[l,w]],[/\btu_(1491) b/i],[c,[u,"Rotor"],[l,w]],[/(shield[\w ]+) b/i],[c,[u,"Nvidia"],[l,w]],[/(sprint) (\w+)/i],[u,c,[l,h]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[u,q],[l,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[u,I],[l,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[u,I],[l,h]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,c,[l,f]],[/droid.+; (shield) bui/i],[c,[u,"Nvidia"],[l,f]],[/(playstation [345portablevi]+)/i],[c,[u,N],[l,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[u,q],[l,f]],[/smart-tv.+(samsung)/i],[u,[l,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[u,U],[l,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,A],[l,b]],[/(apple) ?tv/i],[u,[c,"Apple TV"],[l,b]],[/crkey/i],[[c,"Chromecast"],[u,k],[l,b]],[/droid.+aft(\w)( bui|\))/i],[c,[u,_],[l,b]],[/\(dtv[\);].+(aquos)/i],[c,[u,"Sharp"],[l,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,X],[c,X],[l,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,b]],[/((pebble))app/i],[u,c,[l,g]],[/droid.+; (glass) \d/i],[c,[u,k],[l,g]],[/droid.+; (wt63?0{2,3})\)/i],[c,[u,I],[l,g]],[/(quest( 2)?)/i],[c,[u,E],[l,g]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[c,[l,h]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[l,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,w]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,h]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,d],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[d,B,R]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,"Windows"],[d,B,R]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[d,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,d],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[p,d]]},J=function(e,t){if(typeof e===s&&(t=e,e=i),!(this instanceof J))return new J(e,t).getResult();var n=e||(typeof o!==r&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),c=t?function(e,t){var o={};for(var i in e)t[i]&&t[i].length%2==0?o[i]=t[i].concat(e[i]):o[i]=e[i];return o}(z,t):z;return this.getBrowser=function(){var e,t={};return t.name=i,t.version=i,D.call(t,n,c.browser),t.major=typeof(e=t.version)===a?e.replace(/[^\d\.]/g,"").split(".")[0]:i,t},this.getCPU=function(){var e={};return e.architecture=i,D.call(e,n,c.cpu),e},this.getDevice=function(){var e={};return e.vendor=i,e.model=i,e.type=i,D.call(e,n,c.device),e},this.getEngine=function(){var e={};return e.name=i,e.version=i,D.call(e,n,c.engine),e},this.getOS=function(){var e={};return e.name=i,e.version=i,D.call(e,n,c.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===a&&e.length>255?X(e,255):e,this},this.setUA(n),this};J.VERSION="1.0.2",J.BROWSER=M([p,d,"major"]),J.CPU=M([m]),J.DEVICE=M([c,u,l,f,h,b,w,g,v]),J.ENGINE=J.OS=M([p,d]),e.exports&&(t=e.exports=J),t.UAParser=J;var H=typeof o!==r&&(o.jQuery||o.Zepto);if(H&&!H.ua){var V=new J;H.ua=V.getResult(),H.ua.get=function(){return V.getUA()},H.ua.set=function(e){V.setUA(e);var t=V.getResult();for(var o in t)H.ua[o]=t[o]}}}("object"==typeof window?window:h)}(w,w.exports);var b=new w.exports.UAParser,g=b.getBrowser();g.name,g.version;var v=b.getEngine();v.name,v.version;var _=function(){var e=(0,b.getOS)();return{os:e.name,osversion:e.version}}(),y=_.os,S=_.osversion,x=function(){var e=(0,b.getDevice)();return{device:e.model,devicebrand:e.vendor}}(),O=x.device,k=x.devicebrand;y=y||"",S=S||"",O=O||"",k=k||"";var P={exports:{}},A={exports:{}},q=1e3,L=60*q,C=60*L,U=24*C,N=365.25*U,T=function(e,t){t=t||{};var o=typeof e;if("string"===o&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return o*N;case"days":case"day":case"d":return o*U;case"hours":case"hour":case"hrs":case"hr":case"h":return o*C;case"minutes":case"minute":case"mins":case"min":case"m":return o*L;case"seconds":case"second":case"secs":case"sec":case"s":return o*q;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===o&&!1===isNaN(e))return t.long?function(e){return I(e,U,"day")||I(e,C,"hour")||I(e,L,"minute")||I(e,q,"second")||e+" ms"}(e):function(e){if(e>=U)return Math.round(e/U)+"d";if(e>=C)return Math.round(e/C)+"h";if(e>=L)return Math.round(e/L)+"m";if(e>=q)return Math.round(e/q)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function I(e,t,o){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}!function(e,t){var o;function i(e){function i(){if(i.enabled){var e=i,n=+new Date,r=n-(o||n);e.diff=r,e.prev=o,e.curr=n,o=n;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(o,i){if("%%"===o)return o;c++;var n=t.formatters[i];if("function"==typeof n){var r=s[c];o=n.call(e,r),s.splice(c,1),c--}return o})),t.formatArgs.call(e,s);var p=i.log||t.log||console.log.bind(console);p.apply(e,s)}}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=function(e){var o,i=0;for(o in e)i=(i<<5)-i+e.charCodeAt(o),i|=0;return t.colors[Math.abs(i)%t.colors.length]}(e),"function"==typeof t.init&&t.init(i),i}(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var o=("string"==typeof e?e:"").split(/[\s,]+/),i=o.length,n=0;n<i;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var o,i;for(o=0,i=t.skips.length;o<i;o++)if(t.skips[o].test(e))return!1;for(o=0,i=t.names.length;o<i;o++)if(t.names[o].test(e))return!0;return!1},t.humanize=T,t.names=[],t.skips=[],t.formatters={}}(A,A.exports),function(e,t){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=A.exports).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var o=this.useColors;if(e[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+e[0]+(o?"%c ":" ")+"+"+t.humanize(this.diff),!o)return;var i="color: "+this.color;e.splice(1,0,i,"color: inherit");var n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(r=n))})),e.splice(r,0,i)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}(P,P.exports);var E=P.exports("jsonp"),M=function(e,t,o){"function"==typeof t&&(o=t,t={});t||(t={});var i,n,r=t.prefix||"__jp",s=t.name||r+G++,a=t.param||"callback",c=null!=t.timeout?t.timeout:6e4,p=encodeURIComponent,l=document.getElementsByTagName("script")[0]||document.head;c&&(n=setTimeout((function(){u(),o&&o(new Error("Timeout"))}),c));function u(){i.parentNode&&i.parentNode.removeChild(i),window[s]=j,n&&clearTimeout(n)}return window[s]=function(e){E("jsonp got",e),u(),o&&o(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+a+"="+p(s)).replace("?&","?"),E('jsonp req "%s"',e),(i=document.createElement("script")).src=e,l.parentNode.insertBefore(i,l),function(){window[s]&&u()}},G=0;function j(){}function X(e,t){return void 0===t&&(t={}),new Promise((function(o,i){var n;M("".concat(e,"?").concat((n=t,Object.keys(n).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(n[e])})).join("&"))),{param:"jsonp",name:"__jsonp_cb_".concat(Date.now(),"__")},(function(e,t){e?i(e):o(t)}))}))}var D=function(){function e(e){var t=e.domain,o=e.commonParams,i=e.isPro,n=void 0===i||i,r=e.sendOpenLog,s=void 0===r||r,a=e.consoleLog,c=void 0===a||a;this.version=u,this.buildDate=d,this._urlParams=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=location.href);var o=new URL(t).search.substring(1),i={};return o&&o.split("&").forEach((function(e){i[e.split("=")[0]]=e.split("=")[1]})),Object.keys(i).forEach((function(t){e.includes(t)&&delete i[t]})),i}(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._consoleLog=!0,this._isPro=n,this._sendOpenLog=s,this._consoleLog=c;var p=this._getApis(t),l=p.openUrl,m=p.eventUrl,f=p.actUrl;this._openUrl=l,this._eventUrl=m,this._actUrl=f,this._updateCommonParams(this._filterParams(o)),this._init()}return Object.defineProperty(e.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),e.prototype._init=function(){var e=this;this._initCommonParams(),this._coldStartUp(),this._visibilityChange((function(){e._updateCommonParams({network:e._getNetWorkType()}),e._open(1)}),(function(){e._open(5)}))},e.prototype._visibilityChange=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=function(){});document.addEventListener("visibilitychange",(function(){"visible"===(null===document||void 0===document?void 0:document.visibilityState)?e():t()}),!1)},e.prototype._getScreen=function(){var e=window.screen,t=e.width,o=e.height;return"".concat(t,"*").concat(o)},e.prototype._getNetWorkType=function(){var e=window.navigator,t=(null==e?void 0:e.connection)||(null==e?void 0:e.mozConnection)||(null==e?void 0:e.webkitConnection);return(null==t?void 0:t.type)||(null==t?void 0:t.effectiveType)||"other"},e.prototype._getBatchId=function(){var e,t=(e="BATCH_ID",void 0!==typeof sessionStorage?sessionStorage.getItem(o+e):null);return t||function(e,t){void 0!==typeof sessionStorage&&sessionStorage.setItem(o+e,t)}("BATCH_ID",t=r()),t},e.prototype._coldStartUp=function(){var e=0;""==window.name?(e=0,window.name="isReload"):"isReload"==window.name&&(e=1),this._open(e)},e.prototype._getApis=function(e){var o=this._isPro?{open:"webopen-inside.tt.cn",event:"webevent-inside.tt.cn",act:"webact-inside.tt.cn"}:{open:"test-webopen-inside.tt.cn",event:"test-webevent-inside.tt.cn",act:"test-webact-inside.tt.cn"},i=t(t({},o),e);return{openUrl:"https://".concat(i.open,"/gamefunction_logs/applet/open"),eventUrl:"https://".concat(i.event,"/gamefunction_logs/applet/event"),actUrl:"https://".concat(i.act,"/gamefunction_logs/applet/activity")}},e.prototype._cacheCommonParams=function(e){n("COMMON_PARAMS",JSON.stringify(e))},e.prototype._getInitParams=function(){return{os:y,osversion:S,device:O,devicebrand:k,platform:7,openid:s(),appcqid:m,appqid:m+c(),pixel:this._getScreen(),userinfo:this._getUserInfo()}},e.prototype._initCommonParams=function(){var e=this._getInitParams(),o=i("COMMON_PARAMS");o&&(e=t(t({},e),JSON.parse(o))),e=p(e,this._commonParams),this._updateCommonParams(t(t({},e),{obatchid:this._getBatchId(),network:this._getNetWorkType()}))},e.prototype._getUserInfo=function(e){var o={};if(e)try{o=JSON.parse(e)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format!')}var i={};if(this._commonParams.userinfo)try{i=JSON.parse(this._commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(t(t({querystring:this._urlParams},i),o))},e.prototype._filterParams=function(e){var t={};if(e){var o=["accid","apptypeid","appcqid","srcqid","appver","userinfo"];for(var i in e){var n=e[i];o.includes(i)&&n&&(t[i]=n)}}return t},e.prototype.setParams=function(e){e&&(this._consoleLog&&console.log("[XLOG] setParams",e),e=this._filterParams(e),this._updateCommonParams(e))},e.prototype._updateCommonParams=function(e){this._consoleLog&&console.log("[XLOG] _updateCommonParams",e),e.userinfo&&(e.userinfo=this._getUserInfo(e.userinfo)),e.appcqid&&(e.appqid=e.appcqid+c()),e.appver&&(e.appverint=a(e.appver)),this._commonParams=p(this._commonParams,e),this._cacheCommonParams(this._commonParams)},e.prototype._getAppqid=function(){return this._commonParams.appcqid+c()},e.prototype._request=function(e,t){!function(e,t){X(e,t)}(e,t)},e.prototype._open=function(e){if(this._sendOpenLog){var o=t(t({},this._commonParams),{openway:e,appqid:this._getAppqid(),xmlog:u});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",o),this._request(this._openUrl,o)}},e.prototype.event=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),event1:e.event1||"",event2:e.event2||"",event3:e.event3||"",event4:e.event4||"",value1:e.value1||"",value2:e.value2||"",value3:e.value3||"",value4:e.value4||""});this._consoleLog&&console.log("[XLOG] PARAMS(EVENT)",o),this._request(this._eventUrl,o)},e.prototype.act=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),actentryid:e.actentryid||"",subactid:e.subactid||"",type:e.type||"",custom:e.custom||"",batchid:e.batchid||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},e}();e.XLogMp=f,e.XLogWeb=D,Object.defineProperty(e,"__esModule",{value:!0})}));
6
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).index={})}(this,(function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function o(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}function n(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{c(n.next(e))}catch(e){r(e)}}function s(e){try{c(n.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function i(e,t){var o,n,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function r(e,t,o){if(o||2===arguments.length)for(var n,i=0,r=t.length;i<r;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var a="XYZ_LOG_";function s(e){return void 0!==typeof localStorage?localStorage.getItem(a+e):null}function c(e,t){void 0!==typeof localStorage&&localStorage.setItem(a+e,t)}function p(e){return void 0!==typeof sessionStorage?sessionStorage.getItem(a+e):null}function u(e,t){void 0!==typeof sessionStorage&&sessionStorage.setItem(a+e,t)}function l(e,t){void 0===e&&(e=18),void 0===t&&(t=0);for(var o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[],i=Math.random,r=e,a=t||o.length,s=0;s<r;s++)n[s]=o[0|i()*a];return n.join("")}function d(e){void 0===e&&(e="UID");var t=s(e);return t||c(e,t=l()),t}function m(e){try{return e&&"string"==typeof e?e.split(".").map((function(e){return 1===e.length?"0"+e:e})).join(""):""}catch(t){return console.error('[transferVersion] ver("'.concat(e,'")格式异常:'),t),""}}function f(){var e=new Date,t=e.getFullYear().toString(),o=(e.getMonth()+1).toString(),n=e.getDate().toString();return(t=t.toString().substr(-2))+(o=Number(o)<10?"0"+o:o)+(n=Number(n)<10?"0"+n:n)}function h(e,t){void 0===e&&(e=[]),void 0===t&&(t=location.href);var o=new URL(t).search.substring(1),n={};return o&&o.split("&").forEach((function(e){n[e.split("=")[0]]=e.split("=")[1]})),Object.keys(n).forEach((function(t){e.includes(t)&&delete n[t]})),n}function g(e,o){var n=t({},e),i=t({},o);return Object.keys(n).forEach((function(e){i[e]||delete i[e]})),t(t({},n),i)}function v(e){for(var t,o,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!n.length)return e;var a=n.shift();if(a&&"object"==typeof a)for(var s in a)a[s]&&"object"==typeof a[s]?(e[s]||Object.assign(e,((t={})[s]={},t)),v(e[s],a[s])):Object.assign(e,((o={})[s]=a[s],o));return v.apply(void 0,r([e],n,!1))}var b=function(){return"standalone"==(navigator.standalone||window.matchMedia("(display-mode: standalone)").matches?"standalone":"browser")?"pwa":(e=navigator.userAgent,["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].some((function(t){return e.includes(t)}))?"h5":"pc");var e};var _,w="4.1.0",y="3/13/2025, 3:10:44 PM",O="organic";e.EGender=void 0,(_=e.EGender||(e.EGender={}))[_.Unknown=0]="Unknown",_[_.Male=1]="Male",_[_.Female=2]="Female";var P=function(){function e(e){var t,o=e.domain,n=e.commonParams,i=e.isPro,r=void 0===i||i,a=e.sendOpenLog,s=void 0===a||a,c=e.consoleLog,p=void 0===c||c;this.version=w,this.buildDate=y,this._openUrl="",this._eventUrl="",this._actUrl="",this._adUrl="",this._onlineUrl="",this._businessDomain="",this._startTime=Date.now(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._isColdStartUp=!0,this._systemInfo={},this._mp={},this._consoleLog=!0,this._isPro=r,this._sendOpenLog=s,this._consoleLog=p;var u=this._getApis(o),l=u.openUrl,d=u.eventUrl,m=u.actUrl,f=u.adUrl,h=u.onlineUrl;this._openUrl=l,this._eventUrl=d,this._actUrl=m,this._adUrl=f,this._onlineUrl=h,this._businessDomain=this._isPro?"https://applet-xx.mop.com":"https://test-applet-xx.mop.com";var g,v=this._getMp(),b=v.mp,_=v.platform;this._mp=b,this._platform=_,!b||(g=b)&&0===Object.keys(g).length&&g.constructor===Object?console.error("[XLOG] 日志SDK初始化失败,当前环境为非小程序环境!"):this._consoleLog&&console.log("[XLOG] 小程序对象:",b);try{this._systemInfo=(null===(t=this._mp)||void 0===t?void 0:t.getSystemInfoSync())||{}}catch(e){console.error("[XLOG] getSystemInfoSync error",e)}this._extraInfo={language:this._systemInfo.language,wxVersion:this._systemInfo.version,SDKVersion:this._systemInfo.SDKVersion,benchmarkLevel:this._systemInfo.benchmarkLevel||-1,theme:this._systemInfo.theme,pixelRatio:this._systemInfo.pixelRatio},this._init(n)}return Object.defineProperty(e.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),e.prototype._getLaunchOptions=function(){var e,t,o=null;try{o=((null===(e=this._mp)||void 0===e?void 0:e.getEnterOptionsSync)||(null===(t=this._mp)||void 0===t?void 0:t.getLaunchOptionsSync)||function(){})()}catch(e){console.error("[XLOG] getEnterOptionsSync or getLaunchOptionsSync error",e)}return o},e.prototype._updateQuerystring=function(e,o){void 0===e&&(e=null),void 0===o&&(o={}),(null==e?void 0:e.query)?this._updateCommonParams({srcqid:e.query.channel||"",userinfo:JSON.stringify({querystring:t(t({},e.query),o)})}):this._updateCommonParams({userinfo:JSON.stringify({querystring:o})})},e.prototype._init=function(e){var t=this;this._initCommonParams(this._filterParams(e));var o=this._getLaunchOptions();this._updateQuerystring(o),this._coldStartUp(),this._visibilityChange((function(){t._isColdStartUp||t._getNetworkType().then((function(e){t._updateCommonParams({network:e}),t._open({openway:1})})),t._startTime=Date.now();var e=t._getOnlineBatchData();e&&t._online(e)}),(function(){t._isColdStartUp=!1,t._open({openway:5}),t._sendOnline()}))},e.prototype._getMp=function(){var e={mp:null,platform:7};return"undefined"!=typeof tt?(e.mp=tt,e.platform=2):"undefined"!=typeof ks?(e.mp=ks,e.platform=3):"undefined"!=typeof swan?(e.mp=swan,e.platform=4):"undefined"!=typeof qq?(e.mp=qq,e.platform=5):"undefined"!=typeof wx?(e.mp=wx,e.platform=1):"undefined"!=typeof my?e.mp=my:"undefined"!=typeof jd&&(e.mp=jd),e},e.prototype._visibilityChange=function(e,t){var o,n,i,r,a=this;void 0===e&&(e=function(){}),void 0===t&&(t=function(){});try{var s=(null===(o=this._mp)||void 0===o?void 0:o.onAppShow)||(null===(n=this._mp)||void 0===n?void 0:n.onShow)||function(){},c=(null===(i=this._mp)||void 0===i?void 0:i.onAppHide)||(null===(r=this._mp)||void 0===r?void 0:r.onHide)||function(){};s((function(){a._consoleLog&&console.log("[XLOG] onAppShow"),e()})),c((function(){a._consoleLog&&console.log("[XLOG] onAppHide"),t()}))}catch(e){console.error("[XLOG] onAppShow or onAppHide error",e)}},e.prototype._getStorage=function(e){var t;try{return null===(t=this._mp)||void 0===t?void 0:t.getStorageSync("XYZ_LOG_".concat(e))}catch(e){console.error("[XLOG] getStorageSync error",e)}},e.prototype._setStorage=function(e,t){var o;try{null===(o=this._mp)||void 0===o||o.setStorageSync("XYZ_LOG_".concat(e),t)}catch(e){console.error("[XLOG] setStorageSync error",e)}},e.prototype._getBatchId=function(){var e=this._getStorage("BATCH_ID");return e&&!this._isColdStartUp||(e=l(),this._setStorage("BATCH_ID",e)),e},e.prototype._coldStartUp=function(){var e=this;this._getNetworkType().then((function(t){e._updateCommonParams({network:t}),e._open({openway:0})}))},e.prototype._getApis=function(e){var o=this._isPro?{open:"webopen-inside.tt.cn",event:"webevent-inside.tt.cn",act:"webact-inside.tt.cn",ad:"webadv-inside.tt.cn",online:"webact-inside.tt.cn"}:{open:"test-webopen-inside.tt.cn",event:"test-webevent-inside.tt.cn",act:"test-webact-inside.tt.cn",ad:"test-webadv-inside.tt.cn",online:"test-webact-inside.tt.cn"},n=t(t({},o),e);return{openUrl:"https://".concat(n.open,"/gamefunction_logs/applet/open"),eventUrl:"https://".concat(n.event,"/gamefunction_logs/applet/event"),actUrl:"https://".concat(n.act,"/gamefunction_logs/applet/activity"),adUrl:"https://".concat(n.ad,"/gamefunction_logs/applet/adv"),onlineUrl:"https://".concat(n.online,"/gamefunction_logs/applet/onlineTime")}},e.prototype._cacheCommonParams=function(e){this._setStorage("COMMON_PARAMS",JSON.stringify(e))},e.prototype._getInitParams=function(){var e,t=(null===(e=this._systemInfo.system)||void 0===e?void 0:e.includes(" "))?this._systemInfo.system.split(" ")[1]:this._systemInfo.system;return{platform:this._platform,appcqid:O,appqid:O+f(),os:this._systemInfo.platform,osversion:t,device:this._systemInfo.model,devicebrand:this._systemInfo.brand,pixel:this._systemInfo.screenWidth+"*"+this._systemInfo.screenHeight,userinfo:this._getUserInfo()}},e.prototype._initCommonParams=function(e){var o=this._getInitParams(),n=this._getStorage("COMMON_PARAMS");n&&(o=t(t({},o),JSON.parse(n))),o=e?g(o,e):o,this._updateCommonParams(t(t({},o),{obatchid:this._getBatchId()}))},e.prototype._getNetworkType=function(){var e=this;return new Promise((function(t){var o;try{null===(o=e._mp)||void 0===o||o.getNetworkType({success:function(e){t(e.networkType)},fail:function(){t("none")}})}catch(e){t("none"),console.error("[XLOG] getNetworkType error",e)}}))},e.prototype._getUserInfo=function(e){var o={};if(e)try{o=JSON.parse(e)}catch(t){console.error('[XLOG] The parameter "userinfo" is not in JSON string format: ',e)}var n={};if(this.commonParams.userinfo)try{n=JSON.parse(this.commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(t(t(t({},this._extraInfo),n),o))},e.prototype._filterParams=function(e){var t={};if(e){var o=["openid","unionid","accid","apptypeid","appsubid","appcqid","srcqid","appver","userinfo"];for(var n in e){var i=e[n];o.includes(n)&&i&&(t[n]=i)}}return t},e.prototype.setParams=function(e){if(e){this._consoleLog&&console.log("[XLOG] setParams",e);var t=this._commonParams.openid,o=this._commonParams.unionid;e=this._filterParams(e),this._updateCommonParams(e),(e.openid&&e.openid!==t||e.unionid&&e.unionid!==o)&&this._open({isreturn:e.openid?1:2,openway:0})}},e.prototype._updateCommonParams=function(e){this._consoleLog&&console.log("[XLOG] _updateCommonParams",e),e.userinfo&&(e.appsubid&&(e.userinfo=JSON.stringify(t(t({},JSON.parse(e.userinfo)),{appsubid:e.appsubid}))),e.userinfo=this._getUserInfo(e.userinfo)),e.appcqid&&(e.appqid=e.appcqid+f()),e.appver&&(e.appverint=m(e.appver)),this._commonParams=g(this._commonParams,e),this._cacheCommonParams(this._commonParams)},e.prototype._getAppqid=function(){return this._commonParams.appcqid+f()},e.prototype._request=function(e,t,o){var n=this;return void 0===o&&(o="application/x-www-form-urlencoded"),new Promise((function(i,r){var a;try{null===(a=n._mp)||void 0===a||a.request({url:e,data:t,method:"POST",header:{"content-type":o},success:function(o){n._consoleLog&&console.log("[XLOG] SUCCESS: ".concat(e),t,o),i(o)},fail:function(o){n._consoleLog&&console.log("[XLOG] FAIL: ".concat(e),t,o),r(o)}})}catch(e){console.error("[XLOG] request error",e),r(e)}}))},e.prototype.open=function(e){this._open({querystring:e.querystring,isreturn:3,openway:0,manual:!0})},e.prototype._open=function(e){if(this._sendOpenLog||e.manual){var o=this._getLaunchOptions();this._updateQuerystring(o,e.querystring);var n=t(t({},this._commonParams),{appqid:this._getAppqid(),wakeway:e.wakeway||(null==o?void 0:o.scene)||"",openway:e.openway,isreturn:e.isreturn||0,xmlog:w});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",n),this._request(this._openUrl,n)}},e.prototype.event=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),event1:e.event1||"",event2:e.event2||"",event3:e.event3||"",event4:e.event4||"",value1:e.value1||"",value2:e.value2||"",value3:e.value3||"",value4:e.value4||""});this._consoleLog&&console.log("[XLOG] PARAMS(EVENT)",o),this._request(this._eventUrl,o)},e.prototype.act=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),actentryid:e.actentryid||"",subactid:e.subactid||"",type:e.type||"",custom:e.custom||"",batchid:e.batchid||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},e.prototype.ad=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),type:e.type||"",code:e.code||"",codeinfo:e.codeinfo||"",pagetype:e.pagetype||"",gametype:e.gametype||"",adslot:e.adslot||"",adunitid:e.adunitid||"",adbatchid:e.adbatchid||"",ecpm:e.ecpm||""});this._consoleLog&&console.log("[XLOG] PARAMS(AD)",o),this._request(this._adUrl,o,"application/json")},e.prototype.code2session=function(e){return n(this,void 0,void 0,(function(){var t,o;return i(this,(function(n){switch(n.label){case 0:return t="",1===this._platform?t="wx/":3===this._platform&&(t="ks/"),o="".concat(this._businessDomain,"/AppletUtils/").concat(t,"code2session"),[4,this._request(o,{appTypeId:e.apptypeid,code:e.code,testNet:e.testNet},"application/json")];case 1:return[2,n.sent().data]}}))}))},e.prototype.getSubsidy=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._request("".concat(this._businessDomain,"/AppletUtils/pay/ks/subsidy"),{apptypeid:e.apptypeid,os:this._systemInfo.platform,openId:e.openId},"application/json")];case 1:return[2,t.sent().data]}}))}))},e.prototype.getUserProps=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._request("".concat(this._businessDomain,"/AppletUtils/pay/ks/userProps"),{appTypeId:e.apptypeid,openId:e.openId},"application/json")];case 1:return[2,t.sent().data]}}))}))},e.prototype.checkOrder=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._request("".concat(this._businessDomain,"/AppletUtils/pay/ks/chkOrder"),{appTypeId:e.apptypeid,os:this._systemInfo.platform,openId:e.openId,orderId:e.orderId},"application/json")];case 1:return[2,t.sent().data]}}))}))},e.prototype.createOrder=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._request("".concat(this._businessDomain,"/AppletUtils/pay/ks/crtOrder"),{appTypeId:e.apptypeid,os:this._systemInfo.platform,openId:e.openId,productId:e.productId,payPlatform:e.payPlatform},"application/json")];case 1:return[2,t.sent().data]}}))}))},e.prototype._sendOnline=function(){var e=Date.now(),o=t(t({},this._commonParams),{appqid:this._getAppqid(),onlinetime:"".concat(e-this._startTime),endtime:e.toString(),starttime:this._startTime.toString()});this._online([o])},e.prototype._setOnlineBatchData=function(e){this._setStorage("ONLINE_BACH_DATA",e)},e.prototype._getOnlineBatchData=function(){return this._getStorage("ONLINE_BACH_DATA")},e.prototype._clearOnlineBatchData=function(){this._setStorage("ONLINE_BACH_DATA","")},e.prototype._online=function(e){var t=this;this._consoleLog&&console.log("[XLOG] PARAMS(ONLINE)",e),this._clearOnlineBatchData(),this._request(this._onlineUrl,{batch:JSON.stringify(e)}).catch((function(o){t._setOnlineBatchData(e)}))},e}(),S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},x={exports:{}};!function(e,t){!function(o,n){var i="function",r="undefined",a="object",s="string",c="model",p="name",u="type",l="vendor",d="version",m="architecture",f="console",h="mobile",g="tablet",v="smarttv",b="wearable",_="embedded",w="Amazon",y="Apple",O="ASUS",P="BlackBerry",S="Firefox",x="Google",k="Huawei",U="LG",A="Microsoft",L="Motorola",C="Opera",I="Samsung",N="Sony",q="Xiaomi",T="Zebra",D="Facebook",E=function(e){for(var t={},o=0;o<e.length;o++)t[e[o].toUpperCase()]=e[o];return t},R=function(e,t){return typeof e===s&&-1!==j(t).indexOf(j(e))},j=function(e){return e.toLowerCase()},M=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===r?e:e.substring(0,255)},G=function(e,t){for(var o,r,s,c,p,u,l=0;l<t.length&&!p;){var d=t[l],m=t[l+1];for(o=r=0;o<d.length&&!p;)if(p=d[o++].exec(e))for(s=0;s<m.length;s++)u=p[++r],typeof(c=m[s])===a&&c.length>0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,u):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=u?u.replace(c[1],c[2]):n:this[c[0]]=u?c[1].call(this,u,c[2]):n:4===c.length&&(this[c[0]]=u?c[3].call(this,u.replace(c[1],c[2])):n):this[c]=u||n;l+=2}},B=function(e,t){for(var o in t)if(typeof t[o]===a&&t[o].length>0){for(var i=0;i<t[o].length;i++)if(R(t[o][i],e))return"?"===o?n:o}else if(R(t[o],e))return"?"===o?n:o;return e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,d],[/opios[\/ ]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[d,[p,C]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/\bfocus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[d,[p,S]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,D],d],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[p,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[d,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[d,B,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,j]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",j]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,j]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[l,I],[u,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[l,I],[u,h]],[/\((ip(?:hone|od)[\w ]*);/i],[c,[l,y],[u,h]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[l,y],[u,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[l,k],[u,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[c,[l,k],[u,h]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[l,q],[u,h]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[l,q],[u,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[l,"OPPO"],[u,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[l,"Vivo"],[u,h]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[c,[l,"Realme"],[u,h]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[l,L],[u,h]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[l,L],[u,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[l,U],[u,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[l,U],[u,h]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[l,"Lenovo"],[u,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[l,"Nokia"],[u,h]],[/(pixel c)\b/i],[c,[l,x],[u,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[l,x],[u,h]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[l,N],[u,h]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[l,N],[u,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[l,"OnePlus"],[u,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[l,w],[u,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[l,w],[u,h]],[/(playbook);[-\w\),; ]+(rim)/i],[c,l,[u,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[l,P],[u,h]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[l,O],[u,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[l,O],[u,h]],[/(nexus 9)/i],[c,[l,"HTC"],[u,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[l,[c,/_/g," "],[u,h]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[l,"Acer"],[u,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[l,"Meizu"],[u,h]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[l,"Sharp"],[u,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[l,c,[u,h]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[l,c,[u,g]],[/(surface duo)/i],[c,[l,A],[u,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[l,"Fairphone"],[u,h]],[/(u304aa)/i],[c,[l,"AT&T"],[u,h]],[/\bsie-(\w*)/i],[c,[l,"Siemens"],[u,h]],[/\b(rct\w+) b/i],[c,[l,"RCA"],[u,g]],[/\b(venue[\d ]{2,7}) b/i],[c,[l,"Dell"],[u,g]],[/\b(q(?:mv|ta)\w+) b/i],[c,[l,"Verizon"],[u,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[l,"Barnes & Noble"],[u,g]],[/\b(tm\d{3}\w+) b/i],[c,[l,"NuVision"],[u,g]],[/\b(k88) b/i],[c,[l,"ZTE"],[u,g]],[/\b(nx\d{3}j) b/i],[c,[l,"ZTE"],[u,h]],[/\b(gen\d{3}) b.+49h/i],[c,[l,"Swiss"],[u,h]],[/\b(zur\d{3}) b/i],[c,[l,"Swiss"],[u,g]],[/\b((zeki)?tb.*\b) b/i],[c,[l,"Zeki"],[u,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[l,"Dragon Touch"],c,[u,g]],[/\b(ns-?\w{0,9}) b/i],[c,[l,"Insignia"],[u,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[l,"NextBook"],[u,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[l,"Voice"],c,[u,h]],[/\b(lvtel\-)?(v1[12]) b/i],[[l,"LvTel"],c,[u,h]],[/\b(ph-1) /i],[c,[l,"Essential"],[u,h]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[l,"Envizen"],[u,g]],[/\b(trio[-\w\. ]+) b/i],[c,[l,"MachSpeed"],[u,g]],[/\btu_(1491) b/i],[c,[l,"Rotor"],[u,g]],[/(shield[\w ]+) b/i],[c,[l,"Nvidia"],[u,g]],[/(sprint) (\w+)/i],[l,c,[u,h]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[l,A],[u,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[l,T],[u,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[l,T],[u,h]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[l,c,[u,f]],[/droid.+; (shield) bui/i],[c,[l,"Nvidia"],[u,f]],[/(playstation [345portablevi]+)/i],[c,[l,N],[u,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[l,A],[u,f]],[/smart-tv.+(samsung)/i],[l,[u,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[l,I],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[l,U],[u,v]],[/(apple) ?tv/i],[l,[c,"Apple TV"],[u,v]],[/crkey/i],[[c,"Chromecast"],[l,x],[u,v]],[/droid.+aft(\w)( bui|\))/i],[c,[l,w],[u,v]],[/\(dtv[\);].+(aquos)/i],[c,[l,"Sharp"],[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[l,M],[c,M],[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/((pebble))app/i],[l,c,[u,b]],[/droid.+; (glass) \d/i],[c,[l,x],[u,b]],[/droid.+; (wt63?0{2,3})\)/i],[c,[l,T],[u,b]],[/(quest( 2)?)/i],[c,[l,D],[u,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[l,[u,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[c,[u,h]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[u,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,g]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[u,h]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[l,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,d],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[d,B,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,"Windows"],[d,B,X]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[d,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,P]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,d],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[p,d]]},z=function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof z))return new z(e,t).getResult();var i=e||(typeof o!==r&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),c=t?function(e,t){var o={};for(var n in e)t[n]&&t[n].length%2==0?o[n]=t[n].concat(e[n]):o[n]=e[n];return o}(J,t):J;return this.getBrowser=function(){var e,t={};return t.name=n,t.version=n,G.call(t,i,c.browser),t.major=typeof(e=t.version)===s?e.replace(/[^\d\.]/g,"").split(".")[0]:n,t},this.getCPU=function(){var e={};return e.architecture=n,G.call(e,i,c.cpu),e},this.getDevice=function(){var e={};return e.vendor=n,e.model=n,e.type=n,G.call(e,i,c.device),e},this.getEngine=function(){var e={};return e.name=n,e.version=n,G.call(e,i,c.engine),e},this.getOS=function(){var e={};return e.name=n,e.version=n,G.call(e,i,c.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===s&&e.length>255?M(e,255):e,this},this.setUA(i),this};z.VERSION="1.0.2",z.BROWSER=E([p,d,"major"]),z.CPU=E([m]),z.DEVICE=E([c,l,u,f,h,v,g,b,_]),z.ENGINE=z.OS=E([p,d]),e.exports&&(t=e.exports=z),t.UAParser=z;var H=typeof o!==r&&(o.jQuery||o.Zepto);if(H&&!H.ua){var F=new z;H.ua=F.getResult(),H.ua.get=function(){return F.getUA()},H.ua.set=function(e){F.setUA(e);var t=F.getResult();for(var o in t)H.ua[o]=t[o]}}}("object"==typeof window?window:S)}(x,x.exports);var k=new x.exports.UAParser,U=k.getBrowser(),A=U.name,L=U.version,C=k.getEngine(),I=C.name,N=C.version,q=function(){var e=(0,k.getOS)();return{os:e.name,osversion:e.version}}(),T=q.os,D=q.osversion,E=function(){var e=(0,k.getDevice)();return{device:e.model,devicebrand:e.vendor}}(),R=E.device,j=E.devicebrand;T=T||"",D=D||"",R=R||"",j=j||"";var M={exports:{}},G={exports:{}},B=1e3,X=60*B,J=60*X,z=24*J,H=365.25*z,F=function(e,t){t=t||{};var o=typeof e;if("string"===o&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return o*H;case"days":case"day":case"d":return o*z;case"hours":case"hour":case"hrs":case"hr":case"h":return o*J;case"minutes":case"minute":case"mins":case"min":case"m":return o*X;case"seconds":case"second":case"secs":case"sec":case"s":return o*B;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===o&&!1===isNaN(e))return t.long?function(e){return W(e,z,"day")||W(e,J,"hour")||W(e,X,"minute")||W(e,B,"second")||e+" ms"}(e):function(e){if(e>=z)return Math.round(e/z)+"d";if(e>=J)return Math.round(e/J)+"h";if(e>=X)return Math.round(e/X)+"m";if(e>=B)return Math.round(e/B)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function W(e,t,o){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}!function(e,t){var o;function n(e){function n(){if(n.enabled){var e=n,i=+new Date,r=i-(o||i);e.diff=r,e.prev=o,e.curr=i,o=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(o,n){if("%%"===o)return o;c++;var i=t.formatters[n];if("function"==typeof i){var r=a[c];o=i.call(e,r),a.splice(c,1),c--}return o})),t.formatArgs.call(e,a);var p=n.log||t.log||console.log.bind(console);p.apply(e,a)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var o,n=0;for(o in e)n=(n<<5)-n+e.charCodeAt(o),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var o=("string"==typeof e?e:"").split(/[\s,]+/),n=o.length,i=0;i<n;i++)o[i]&&("-"===(e=o[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var o,n;for(o=0,n=t.skips.length;o<n;o++)if(t.skips[o].test(e))return!1;for(o=0,n=t.names.length;o<n;o++)if(t.names[o].test(e))return!0;return!1},t.humanize=F,t.names=[],t.skips=[],t.formatters={}}(G,G.exports),function(e,t){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=G.exports).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var o=this.useColors;if(e[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+e[0]+(o?"%c ":" ")+"+"+t.humanize(this.diff),!o)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(r=i))})),e.splice(r,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}(M,M.exports);var V=M.exports("jsonp"),Z=function(e,t,o){"function"==typeof t&&(o=t,t={});t||(t={});var n,i,r=t.prefix||"__jp",a=t.name||r+$++,s=t.param||"callback",c=null!=t.timeout?t.timeout:6e4,p=encodeURIComponent,u=document.getElementsByTagName("script")[0]||document.head;c&&(i=setTimeout((function(){l(),o&&o(new Error("Timeout"))}),c));function l(){n.parentNode&&n.parentNode.removeChild(n),window[a]=Y,i&&clearTimeout(i)}return window[a]=function(e){V("jsonp got",e),l(),o&&o(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+s+"="+p(a)).replace("?&","?"),V('jsonp req "%s"',e),(n=document.createElement("script")).src=e,u.parentNode.insertBefore(n,u),function(){window[a]&&l()}},$=0;function Y(){}function K(e,t){return void 0===t&&(t={}),new Promise((function(o,n){var i;Z("".concat(e,"?").concat((i=t,Object.keys(i).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(i[e])})).join("&"))),{param:"jsonp",name:"__jsonp_cb_".concat(Date.now(),"__")},(function(e,t){e?n(e):o(t)}))}))}var Q=function(e,t){return K(e,t)},ee=function(){function e(e){var t=e.domain,o=e.commonParams,n=e.isPro,i=void 0===n||n,r=e.sendOpenLog,a=void 0===r||r,s=e.consoleLog,c=void 0===s||s;this.version=w,this.buildDate=y,this._urlParams=h(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._consoleLog=!0,this._isPro=i,this._sendOpenLog=a,this._consoleLog=c;var p=this._getApis(t),u=p.openUrl,l=p.eventUrl,d=p.actUrl;this._openUrl=u,this._eventUrl=l,this._actUrl=d,this._updateCommonParams(this._filterParams(o)),this._init()}return Object.defineProperty(e.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),e.prototype._init=function(){var e=this;this._initCommonParams(),this._coldStartUp(),this._visibilityChange((function(){e._updateCommonParams({network:e._getNetWorkType()}),e._open(1)}),(function(){e._open(5)}))},e.prototype._visibilityChange=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=function(){});document.addEventListener("visibilitychange",(function(){"visible"===(null===document||void 0===document?void 0:document.visibilityState)?e():t()}),!1)},e.prototype._getScreen=function(){var e=window.screen,t=e.width,o=e.height;return"".concat(t,"*").concat(o)},e.prototype._getNetWorkType=function(){var e=window.navigator,t=(null==e?void 0:e.connection)||(null==e?void 0:e.mozConnection)||(null==e?void 0:e.webkitConnection);return(null==t?void 0:t.type)||(null==t?void 0:t.effectiveType)||"other"},e.prototype._getBatchId=function(){var e=p("BATCH_ID");return e||u("BATCH_ID",e=l()),e},e.prototype._coldStartUp=function(){var e=0;""==window.name?(e=0,window.name="isReload"):"isReload"==window.name&&(e=1),this._open(e)},e.prototype._getApis=function(e){var o=this._isPro?{open:"webopen-inside.tt.cn",event:"webevent-inside.tt.cn",act:"webact-inside.tt.cn"}:{open:"test-webopen-inside.tt.cn",event:"test-webevent-inside.tt.cn",act:"test-webact-inside.tt.cn"},n=t(t({},o),e);return{openUrl:"https://".concat(n.open,"/gamefunction_logs/applet/open"),eventUrl:"https://".concat(n.event,"/gamefunction_logs/applet/event"),actUrl:"https://".concat(n.act,"/gamefunction_logs/applet/activity")}},e.prototype._cacheCommonParams=function(e){c("COMMON_PARAMS",JSON.stringify(e))},e.prototype._getInitParams=function(){return{os:T,osversion:D,device:R,devicebrand:j,platform:7,openid:d(),appcqid:O,appqid:O+f(),pixel:this._getScreen(),userinfo:this._getUserInfo()}},e.prototype._initCommonParams=function(){var e=this._getInitParams(),o=s("COMMON_PARAMS");o&&(e=t(t({},e),JSON.parse(o))),e=g(e,this._commonParams),this._updateCommonParams(t(t({},e),{obatchid:this._getBatchId(),network:this._getNetWorkType()}))},e.prototype._getUserInfo=function(e){var o={};if(e)try{o=JSON.parse(e)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format!')}var n={};if(this._commonParams.userinfo)try{n=JSON.parse(this._commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(t(t({querystring:this._urlParams},n),o))},e.prototype._filterParams=function(e){var t={};if(e){var o=["accid","apptypeid","appcqid","srcqid","appver","userinfo"];for(var n in e){var i=e[n];o.includes(n)&&i&&(t[n]=i)}}return t},e.prototype.setParams=function(e){e&&(this._consoleLog&&console.log("[XLOG] setParams",e),e=this._filterParams(e),this._updateCommonParams(e))},e.prototype._updateCommonParams=function(e){this._consoleLog&&console.log("[XLOG] _updateCommonParams",e),e.userinfo&&(e.userinfo=this._getUserInfo(e.userinfo)),e.appcqid&&(e.appqid=e.appcqid+f()),e.appver&&(e.appverint=m(e.appver)),this._commonParams=g(this._commonParams,e),this._cacheCommonParams(this._commonParams)},e.prototype._getAppqid=function(){return this._commonParams.appcqid+f()},e.prototype._request=function(e,t){Q(e,t)},e.prototype._open=function(e){if(this._sendOpenLog){var o=t(t({},this._commonParams),{openway:e,appqid:this._getAppqid(),xmlog:w});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",o),this._request(this._openUrl,o)}},e.prototype.event=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),event1:e.event1||"",event2:e.event2||"",event3:e.event3||"",event4:e.event4||"",value1:e.value1||"",value2:e.value2||"",value3:e.value3||"",value4:e.value4||""});this._consoleLog&&console.log("[XLOG] PARAMS(EVENT)",o),this._request(this._eventUrl,o)},e.prototype.act=function(e){var o=t(t({},this._commonParams),{appqid:this._getAppqid(),actentryid:e.actentryid||"",subactid:e.subactid||"",type:e.type||"",custom:e.custom||"",batchid:e.batchid||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},e}();
7
+ /*! js-cookie v3.0.5 | MIT */
8
+ function te(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)e[n]=o[n]}return e}var oe=function e(t,o){function n(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=te({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var a in i)i[a]&&(r+="; "+a,!0!==i[a]&&(r+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+r}}return Object.create({set:n,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var o=document.cookie?document.cookie.split("; "):[],n={},i=0;i<o.length;i++){var r=o[i].split("="),a=r.slice(1).join("=");try{var s=decodeURIComponent(r[0]);if(n[s]=t.read(a,s),e===s)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",te({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,te({},this.attributes,t))},withConverter:function(t){return e(te({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),ne="XYZ_LOG_HW_",ie="".concat(ne,"COMMON_PARAMS"),re="".concat(ne,"ONLINE_BACH_DATA"),ae=function(){function e(e){var t=e.domain,o=e.commonParams,n=e.isPro,i=void 0===n||n,r=e.sendOpenLog,a=void 0===r||r,s=e.consoleLog,c=void 0===s||s,p=e.ignoreUrlParams,u=void 0===p?[]:p;this.version=w,this.buildDate=y,this._startTime=Date.now(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._consoleLog=!0,this._ignoreUrlParams=[],this._isPro=i,this._ignoreUrlParams=u,this._sendOpenLog=a,this._consoleLog=c;var l=this._getApis(t),d=l.openUrl,m=l.actUrl,f=l.adUrl,h=l.onlineUrl;this._openUrl=d,this._actUrl=m,this._adUrl=f,this._onlineUrl=h,this._init(o)}return Object.defineProperty(e.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),e.prototype._init=function(e){var o=this;this._updateCommonParams(t(t({},this._filterParams(e)),{obatchid:this._getBatchId()})),this._coldStartUp(),this._visibilityChange((function(){o._updateCommonParams({}),o._open(1),o._startTime=Date.now();var e=o._getOnlineBatchData();e&&o._online(e)}),(function(){o._open(5),o._sendOnline()}))},e.prototype._visibilityChange=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=function(){});document.addEventListener("visibilitychange",(function(){"visible"===(null===document||void 0===document?void 0:document.visibilityState)?e():t()}),!1)},e.prototype._getScreen=function(){var e=window.screen,t=e.width,o=e.height;return"".concat(t,"*").concat(o)},e.prototype._getNetWorkType=function(){var e=window.navigator,t=(null==e?void 0:e.connection)||(null==e?void 0:e.mozConnection)||(null==e?void 0:e.webkitConnection);return(null==t?void 0:t.type)||(null==t?void 0:t.effectiveType)||"other"},e.prototype._getBatchId=function(){var e=p("BATCH_ID");return e||u("BATCH_ID",e=l()),e},e.prototype._coldStartUp=function(){var e=0;""==window.name?(e=0,window.name="isReload"):"isReload"==window.name&&(e=1),this._open(e)},e.prototype._getApis=function(e){var o=this._isPro?{open:"https://wappubog.snake.cc",act:"https://wappubog.snake.cc",ad:"https://wappubog.snake.cc",onlineUrl:"https://wappubog.snake.cc"}:{open:"http://test-wappubog.snake.cc",act:"http://test-wappubog.snake.cc",ad:"http://test-wappubog.snake.cc",onlineUrl:"http://test-wappubog.snake.cc"},n=t(t({},o),e);return{openUrl:"".concat(n.open,"/wappubog/h5/open"),actUrl:"".concat(n.act,"/wappubog/h5/activity"),adUrl:"".concat(n.ad,"/gamefunction_logs/h5/advlog"),onlineUrl:"".concat(n.onlineUrl,"/gamefunction_logs/applet/onlineTime")}},e.prototype._cacheCommonParams=function(e){var n=s(ie),i=this._getInitParams(),r=i.userinfo,a=o(i,["userinfo"]),p=JSON.parse(n||"{}"),u=p.userinfo,l=o(p,["userinfo"]),d=e.userinfo,m=o(e,["userinfo"]),f=t(t(t({},JSON.parse(r||"{}")),JSON.parse(u||"{}")),JSON.parse(d||"{}")),h=g(g(a,l),m);this._commonParams=t(t({},h),{userinfo:JSON.stringify(f)}),this._consoleLog&&console.log("[XLOG] _cacheCommonParams",this._commonParams),c(ie,JSON.stringify(this._commonParams))},e.prototype._getInitParams=function(){return{osversion:D,device:R,devicebrand:j,os:T,platform:b(),uid:d(),appcqid:O,pixel:this._getScreen(),userinfo:this._getUserInfo(),ua:encodeURI(navigator.userAgent),timezone:(e=(new Date).getTimezoneOffset(),t=Math.abs(Math.floor(e/60)),"".concat(e>0?"-":"+").concat(t)),url:encodeURI(location.href)};var e,t},e.prototype._getUserInfo=function(e){var t={};if(e)try{t=JSON.parse(e)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format!')}var o={};if(this._commonParams.userinfo)try{o=JSON.parse(this._commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(v({lang:navigator.language,browser:A,browserversion:L,engine:I,engineversion:N,platform:b(),querystring:h(this._ignoreUrlParams),fbc:oe.get("_fbc"),fbp:oe.get("_fbp"),ttp:oe.get("_ttp")},o,t))},e.prototype._filterParams=function(e){var t={};if(e){var o=["openid","accid","apptypeid","appcqid","appver","srcqid","userinfo","srcinfo","region","province","uid","platform"];for(var n in e){var i=n,r=e[i];o.includes(i)&&r&&(t[i]=r)}}return t},e.prototype.setParams=function(e){if(e){this._consoleLog&&console.log("[XLOG] setParams",e);var t=this._commonParams.region,o=this._commonParams.province;e=this._filterParams(e),this._updateCommonParams(e),(e.region&&e.region!==t||e.province&&e.province!==o)&&this._open(6)}},e.prototype.replaceParams=function(e){if(e){this._consoleLog&&console.log("[XLOG] replaceParams",e);var t=this._commonParams.region,o=this._commonParams.province;this._updateCommonParams(e),(e.region&&e.region!==t||e.province&&e.province!==o)&&this._open(6)}},e.prototype._updateCommonParams=function(e){var o;this._consoleLog&&console.log("[XLOG] _updateCommonParams",e),e.userinfo?e.userinfo=this._getUserInfo(e.userinfo):e.userinfo=this._getUserInfo();try{o=JSON.parse(e.userinfo)}catch(t){console.error('[XLOG] userinfo "'.concat(e.userinfo,'" parse error'),t)}e.platform&&(e.userinfo=this._getUserInfo(JSON.stringify(t(t({},o),{platform:e.platform})))),this._cacheCommonParams(t(t({},e),{url:encodeURI(location.href),network:this._getNetWorkType()}))},e.prototype._request=function(e,t){var o=this;return Q(e,t).then((function(n){return o._consoleLog&&console.log("[XLOG] SUCCESS: ".concat(e),t,n),n})).catch((function(o){return console.error("[XLOG] ERROR: ".concat(e),t,o),Promise.reject(o)}))},e.prototype._open=function(e){if(this._sendOpenLog){var o=t(t({},this._commonParams),{userinfo:encodeURI(this._commonParams.userinfo||""),url:encodeURI(location.href),xmlog:w,url_from:document.referrer,openway:e});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",o),this._request(this._openUrl,o)}},e.prototype.act=function(e){var o=t(t({},this._commonParams),{userinfo:encodeURI(this._commonParams.userinfo||""),url:encodeURI(location.href),actentryid:e.actentryid||"",subactid:e.subactid||"",type:e.type||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},e.prototype.ad=function(e){var o=t(t({},this._commonParams),{userinfo:encodeURI(this._commonParams.userinfo||""),url:encodeURI(location.href),type:e.type||"",code:e.code||"",codeinfo:e.codeinfo||"",pagetype:e.pagetype||"",gametype:e.gametype||"",adslot:e.adslot||"",adunitid:e.adunitid||"",adbatchid:e.adbatchid||"",ecpm:e.ecpm||"",adfrom:e.adfrom||""});this._consoleLog&&console.log("[XLOG] PARAMS(AD)",o),this._request(this._adUrl,o)},e.prototype._sendOnline=function(){var e=Date.now(),o=t(t({},this._commonParams),{onlinetime:"".concat(e-this._startTime),endtime:e.toString(),starttime:this._startTime.toString()});this._online([o])},e.prototype._setOnlineBatchData=function(e){c(re,JSON.stringify(e))},e.prototype._getOnlineBatchData=function(){var e=s(re);return e?JSON.parse(e):""},e.prototype._clearOnlineBatchData=function(){c(re,"")},e.prototype._online=function(e){var t=this;this._consoleLog&&console.log("[XLOG] PARAMS(ONLINE)",e),this._clearOnlineBatchData(),this._request(this._onlineUrl,{batch:JSON.stringify(e)}).catch((function(o){console.error(o),t._setOnlineBatchData(e)}))},e}();e.XLogMp=P,e.XLogWeb=ee,e.XLogWebHw=ae,Object.defineProperty(e,"__esModule",{value:!0})}));
7
9
  //# sourceMappingURL=index.min.js.map
package/dist/index.mjs CHANGED
@@ -1,7 +1,9 @@
1
1
  /*!
2
- * @xyz-fe/log v3.9.0
2
+ * @xyz-fe/log v4.1.0
3
3
  * (c) lizhigao <lizhigao@021.com>
4
4
  * Released under the MIT License.
5
5
  */
6
- var e=function(){return e=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},e.apply(this,arguments)};function t(e){return void 0!==typeof localStorage?localStorage.getItem("XYZ_LOG_"+e):null}function o(e,t){void 0!==typeof localStorage&&localStorage.setItem("XYZ_LOG_"+e,t)}function i(e,t){void 0===e&&(e=18),void 0===t&&(t=0);for(var o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[],n=Math.random,r=e,s=t||o.length,a=0;a<r;a++)i[a]=o[0|n()*s];return i.join("")}function n(e){void 0===e&&(e="UID");var n=t(e);return n||o(e,n=i()),n}function r(e){try{return e&&"string"==typeof e?e.split(".").map((function(e){return 1===e.length?"0"+e:e})).join(""):""}catch(t){return console.error('[transferVersion] ver("'.concat(e,'")格式异常:'),t),""}}function s(){var e=new Date,t=e.getFullYear().toString(),o=(e.getMonth()+1).toString(),i=e.getDate().toString();return(t=t.toString().substr(-2))+(o=Number(o)<10?"0"+o:o)+(i=Number(i)<10?"0"+i:i)}function a(t,o){var i=e({},t),n=e({},o);return Object.keys(i).forEach((function(e){n[e]||delete n[e]})),e(e({},i),n)}var c;!function(e){e[e.Unknown=0]="Unknown",e[e.Male=1]="Male",e[e.Female=2]="Female"}(c||(c={}));var p,l,u=function(){function t(e){var t,o=e.domain,i=e.commonParams,n=e.isPro,r=void 0===n||n,s=e.sendOpenLog,a=void 0===s||s,c=e.consoleLog,p=void 0===c||c;this.version="3.9.0",this.buildDate="2/28/2025, 2:27:01 PM",this._openUrl="",this._eventUrl="",this._actUrl="",this._adUrl="",this._onlineUrl="",this._startTime=Date.now(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._isColdStartUp=!0,this._systemInfo={},this._mp={},this._consoleLog=!0,this._isPro=r,this._sendOpenLog=a,this._consoleLog=p;var l=this._getApis(o),u=l.openUrl,d=l.eventUrl,m=l.actUrl,f=l.adUrl,h=l.onlineUrl;this._openUrl=u,this._eventUrl=d,this._actUrl=m,this._adUrl=f,this._onlineUrl=h;var w,g=this._getMp(),b=g.mp,v=g.platform;this._mp=b,this._platform=v,!b||(w=b)&&0===Object.keys(w).length&&w.constructor===Object?console.error("[XLOG] 日志SDK初始化失败,当前环境为非小程序环境!"):this._consoleLog&&console.log("[XLOG] 小程序对象:",b);try{this._systemInfo=(null===(t=this._mp)||void 0===t?void 0:t.getSystemInfoSync())||{}}catch(e){console.error("[XLOG] getSystemInfoSync error",e)}this._extraInfo={language:this._systemInfo.language,wxVersion:this._systemInfo.version,SDKVersion:this._systemInfo.SDKVersion,benchmarkLevel:this._systemInfo.benchmarkLevel||-1,theme:this._systemInfo.theme},this._init(i)}return Object.defineProperty(t.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),t.prototype._init=function(e){var t=this;this._initCommonParams(this._filterParams(e)),this._coldStartUp(),this._visibilityChange((function(){t._isColdStartUp||t._getNetworkType().then((function(e){t._updateCommonParams({network:e}),t._open({openway:1})})),t._startTime=Date.now();var e=t._getOnlineBatchData();e&&t._online(e)}),(function(){t._isColdStartUp=!1,t._open({openway:5}),t._sendOnline()}))},t.prototype._getMp=function(){var e={mp:null,platform:7};return"undefined"!=typeof tt?(e.mp=tt,e.platform=2):"undefined"!=typeof ks?(e.mp=ks,e.platform=3):"undefined"!=typeof swan?(e.mp=swan,e.platform=4):"undefined"!=typeof qq?(e.mp=qq,e.platform=5):"undefined"!=typeof wx?(e.mp=wx,e.platform=1):"undefined"!=typeof my?e.mp=my:"undefined"!=typeof jd&&(e.mp=jd),e},t.prototype._visibilityChange=function(e,t){var o,i,n,r,s=this;void 0===e&&(e=function(){}),void 0===t&&(t=function(){});try{var a=(null===(o=this._mp)||void 0===o?void 0:o.onAppShow)||(null===(i=this._mp)||void 0===i?void 0:i.onShow)||function(){},c=(null===(n=this._mp)||void 0===n?void 0:n.onAppHide)||(null===(r=this._mp)||void 0===r?void 0:r.onHide)||function(){};a((function(){s._consoleLog&&console.log("[XLOG] onAppShow"),e()})),c((function(){s._consoleLog&&console.log("[XLOG] onAppHide"),t()}))}catch(e){console.error("[XLOG] onAppShow or onAppHide error",e)}},t.prototype._getStorage=function(e){var t;try{return null===(t=this._mp)||void 0===t?void 0:t.getStorageSync("XYZ_LOG_".concat(e))}catch(e){console.error("[XLOG] getStorageSync error",e)}},t.prototype._setStorage=function(e,t){var o;try{null===(o=this._mp)||void 0===o||o.setStorageSync("XYZ_LOG_".concat(e),t)}catch(e){console.error("[XLOG] setStorageSync error",e)}},t.prototype._getBatchId=function(){var e=this._getStorage("BATCH_ID");return e&&!this._isColdStartUp||(e=i(),this._setStorage("BATCH_ID",e)),e},t.prototype._coldStartUp=function(){var e=this;this._getNetworkType().then((function(t){e._updateCommonParams({network:t}),e._open({openway:0})}))},t.prototype._getApis=function(t){var o=this._isPro?{open:"webopen-inside.tt.cn",event:"webevent-inside.tt.cn",act:"webact-inside.tt.cn",ad:"webadv-inside.tt.cn",online:"webact-inside.tt.cn"}:{open:"test-webopen-inside.tt.cn",event:"test-webevent-inside.tt.cn",act:"test-webact-inside.tt.cn",ad:"test-webadv-inside.tt.cn",online:"test-webact-inside.tt.cn"},i=e(e({},o),t);return{openUrl:"https://".concat(i.open,"/gamefunction_logs/applet/open"),eventUrl:"https://".concat(i.event,"/gamefunction_logs/applet/event"),actUrl:"https://".concat(i.act,"/gamefunction_logs/applet/activity"),adUrl:"https://".concat(i.ad,"/gamefunction_logs/applet/adv"),onlineUrl:"https://".concat(i.online,"/gamefunction_logs/applet/onlineTime")}},t.prototype._cacheCommonParams=function(e){this._setStorage("COMMON_PARAMS",JSON.stringify(e))},t.prototype._getInitParams=function(){return{platform:this._platform,appcqid:"organic",appqid:"organic"+s(),os:this._systemInfo.platform,osversion:this._systemInfo.system&&this._systemInfo.system.split(" ")[1],device:this._systemInfo.model,devicebrand:this._systemInfo.brand,pixel:this._systemInfo.screenWidth+"*"+this._systemInfo.screenHeight,userinfo:this._getUserInfo()}},t.prototype._initCommonParams=function(t){var o=this._getInitParams(),i=this._getStorage("COMMON_PARAMS");i&&(o=e(e({},o),JSON.parse(i))),o=t?a(o,t):o,this._updateCommonParams(e(e({},o),{obatchid:this._getBatchId()}))},t.prototype._getNetworkType=function(){var e=this;return new Promise((function(t){var o;try{null===(o=e._mp)||void 0===o||o.getNetworkType({success:function(e){t(e.networkType)},fail:function(){t("none")}})}catch(e){t("none"),console.error("[XLOG] getNetworkType error",e)}}))},t.prototype._getUserInfo=function(t){var o={};if(t)try{o=JSON.parse(t)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format!')}var i={};if(this.commonParams.userinfo)try{i=JSON.parse(this.commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(e(e(e({},this._extraInfo),i),o))},t.prototype._filterParams=function(e){var t={};if(e){var o=["openid","unionid","accid","apptypeid","appcqid","srcqid","appver","userinfo"];for(var i in e){var n=e[i];o.includes(i)&&n&&(t[i]=n)}}return t},t.prototype.setParams=function(e){if(e){this._consoleLog&&console.log("[XLOG] setParams",e);var t=this._commonParams.openid,o=this._commonParams.unionid;e=this._filterParams(e),this._updateCommonParams(e),(e.openid&&e.openid!==t||e.unionid&&e.unionid!==o)&&this._open({isreturn:e.openid?1:2,openway:0})}},t.prototype._updateCommonParams=function(e){this._consoleLog&&console.log("[XLOG] _updateCommonParams",e),e.userinfo&&(e.userinfo=this._getUserInfo(e.userinfo)),e.appcqid&&(e.appqid=e.appcqid+s()),e.appver&&(e.appverint=r(e.appver)),this._commonParams=a(this._commonParams,e),this._cacheCommonParams(this._commonParams)},t.prototype._getAppqid=function(){return this._commonParams.appcqid+s()},t.prototype._request=function(e,t,o){var i=this;return void 0===o&&(o="application/x-www-form-urlencoded"),new Promise((function(n,r){var s;try{null===(s=i._mp)||void 0===s||s.request({url:e,data:t,method:"POST",header:{"content-type":o},success:function(o){i._consoleLog&&console.log("[XLOG] SUCCESS: ".concat(e),t,o),n(o)},fail:function(o){i._consoleLog&&console.log("[XLOG] FAIL: ".concat(e),t,o),r(o)}})}catch(e){console.error("[XLOG] request error",e)}}))},t.prototype.open=function(e){this._open({querystring:e.querystring,isreturn:3,openway:0})},t.prototype._open=function(t){var o,i,n=null;try{n=((null===(o=this._mp)||void 0===o?void 0:o.getEnterOptionsSync)||(null===(i=this._mp)||void 0===i?void 0:i.getLaunchOptionsSync)||function(){})()}catch(e){console.error("[XLOG] getEnterOptionsSync error",e)}if((null==n?void 0:n.query)?this._updateCommonParams({userinfo:JSON.stringify({querystring:e(e({},n.query),t.querystring)})}):this._updateCommonParams({userinfo:JSON.stringify({querystring:t.querystring})}),this._sendOpenLog){var r=e(e({},this._commonParams),{appqid:this._getAppqid(),wakeway:t.wakeway||(null==n?void 0:n.scene)||"",openway:t.openway,isreturn:t.isreturn||0,xmlog:"3.9.0"});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",r),this._request(this._openUrl,r)}},t.prototype.event=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),event1:t.event1||"",event2:t.event2||"",event3:t.event3||"",event4:t.event4||"",value1:t.value1||"",value2:t.value2||"",value3:t.value3||"",value4:t.value4||""});this._consoleLog&&console.log("[XLOG] PARAMS(EVENT)",o),this._request(this._eventUrl,o)},t.prototype.act=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),actentryid:t.actentryid||"",subactid:t.subactid||"",type:t.type||"",custom:t.custom||"",batchid:t.batchid||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},t.prototype.ad=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),type:t.type||"",code:t.code||"",codeinfo:t.codeinfo||"",pagetype:t.pagetype||"",gametype:t.gametype||"",adslot:t.adslot||"",adunitid:t.adunitid||"",adbatchid:t.adbatchid||"",ecpm:t.ecpm||""});this._consoleLog&&console.log("[XLOG] PARAMS(AD)",o),this._request(this._adUrl,o,"application/json")},t.prototype._sendOnline=function(){var t=Date.now(),o=e(e({},this._commonParams),{appqid:this._getAppqid(),onlinetime:"".concat(t-this._startTime),endtime:t.toString(),starttime:this._startTime.toString()});this._online([o])},t.prototype._setOnlineBatchData=function(e){this._setStorage("ONLINE_BACH_DATA",e)},t.prototype._getOnlineBatchData=function(){return this._getStorage("ONLINE_BACH_DATA")},t.prototype._clearOnlineBatchData=function(){this._setStorage("ONLINE_BACH_DATA","")},t.prototype._online=function(e){var t=this;this._consoleLog&&console.log("[XLOG] PARAMS(ONLINE)",e),this._clearOnlineBatchData(),this._request(this._onlineUrl,{batch:JSON.stringify(e)}).catch((function(o){t._setOnlineBatchData(e)}))},t}(),d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m={exports:{}};p=m,l=m.exports,function(e,t){var o="function",i="undefined",n="object",r="string",s="model",a="name",c="type",u="vendor",d="version",m="architecture",f="console",h="mobile",w="tablet",g="smarttv",b="wearable",v="embedded",_="Amazon",y="Apple",S="ASUS",O="BlackBerry",x="Firefox",k="Google",P="Huawei",A="LG",L="Microsoft",q="Motorola",C="Opera",U="Samsung",N="Sony",T="Xiaomi",I="Zebra",E="Facebook",M=function(e){for(var t={},o=0;o<e.length;o++)t[e[o].toUpperCase()]=e[o];return t},G=function(e,t){return typeof e===r&&-1!==X(t).indexOf(X(e))},X=function(e){return e.toLowerCase()},j=function(e,t){if(typeof e===r)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===i?e:e.substring(0,255)},D=function(e,i){for(var r,s,a,c,p,l,u=0;u<i.length&&!p;){var d=i[u],m=i[u+1];for(r=s=0;r<d.length&&!p;)if(p=d[r++].exec(e))for(a=0;a<m.length;a++)l=p[++s],typeof(c=m[a])===n&&c.length>0?2===c.length?typeof c[1]==o?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?typeof c[1]!==o||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):t:this[c[0]]=l?c[1].call(this,l,c[2]):t:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):t):this[c]=l||t;u+=2}},B=function(e,o){for(var i in o)if(typeof o[i]===n&&o[i].length>0){for(var r=0;r<o[i].length;r++)if(G(o[i][r],e))return"?"===i?t:i}else if(G(o[i],e))return"?"===i?t:i;return e},R={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[a,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[a,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[a,d],[/opios[\/ ]+([\w\.]+)/i],[d,[a,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[d,[a,C]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[a,d],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[a,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[d,[a,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[a,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[a,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[a,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[a,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[a,/(.+)/,"$1 Secure Browser"],d],[/\bfocus\/([\w\.]+)/i],[d,[a,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[d,[a,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[a,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[a,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[a,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[a,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[d,[a,x]],[/\bqihu|(qi?ho?o?|360)browser/i],[[a,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[a,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[a,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[a],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[a,E],d],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[a,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[a,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[a,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[a,"Chrome WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[a,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[a,d],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[d,[a,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[d,a],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[a,[d,B,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[a,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[a,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[a,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[a,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,X]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",X]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,X]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[u,U],[c,w]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[s,[u,U],[c,h]],[/\((ip(?:hone|od)[\w ]*);/i],[s,[u,y],[c,h]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[u,y],[c,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[u,P],[c,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[s,[u,P],[c,h]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[s,/_/g," "],[u,T],[c,h]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[u,T],[c,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[u,"OPPO"],[c,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[u,"Vivo"],[c,h]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[s,[u,"Realme"],[c,h]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[u,q],[c,h]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[u,q],[c,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[u,A],[c,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[u,A],[c,h]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[u,"Lenovo"],[c,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[u,"Nokia"],[c,h]],[/(pixel c)\b/i],[s,[u,k],[c,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[u,k],[c,h]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,N],[c,h]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[u,N],[c,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[u,"OnePlus"],[c,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[u,_],[c,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[u,_],[c,h]],[/(playbook);[-\w\),; ]+(rim)/i],[s,u,[c,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[u,O],[c,h]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[u,S],[c,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[u,S],[c,h]],[/(nexus 9)/i],[s,[u,"HTC"],[c,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[u,[s,/_/g," "],[c,h]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[u,"Acer"],[c,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[u,"Meizu"],[c,h]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[u,"Sharp"],[c,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,s,[c,h]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,s,[c,w]],[/(surface duo)/i],[s,[u,L],[c,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[u,"Fairphone"],[c,h]],[/(u304aa)/i],[s,[u,"AT&T"],[c,h]],[/\bsie-(\w*)/i],[s,[u,"Siemens"],[c,h]],[/\b(rct\w+) b/i],[s,[u,"RCA"],[c,w]],[/\b(venue[\d ]{2,7}) b/i],[s,[u,"Dell"],[c,w]],[/\b(q(?:mv|ta)\w+) b/i],[s,[u,"Verizon"],[c,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[u,"Barnes & Noble"],[c,w]],[/\b(tm\d{3}\w+) b/i],[s,[u,"NuVision"],[c,w]],[/\b(k88) b/i],[s,[u,"ZTE"],[c,w]],[/\b(nx\d{3}j) b/i],[s,[u,"ZTE"],[c,h]],[/\b(gen\d{3}) b.+49h/i],[s,[u,"Swiss"],[c,h]],[/\b(zur\d{3}) b/i],[s,[u,"Swiss"],[c,w]],[/\b((zeki)?tb.*\b) b/i],[s,[u,"Zeki"],[c,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],s,[c,w]],[/\b(ns-?\w{0,9}) b/i],[s,[u,"Insignia"],[c,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[u,"NextBook"],[c,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],s,[c,h]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],s,[c,h]],[/\b(ph-1) /i],[s,[u,"Essential"],[c,h]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[u,"Envizen"],[c,w]],[/\b(trio[-\w\. ]+) b/i],[s,[u,"MachSpeed"],[c,w]],[/\btu_(1491) b/i],[s,[u,"Rotor"],[c,w]],[/(shield[\w ]+) b/i],[s,[u,"Nvidia"],[c,w]],[/(sprint) (\w+)/i],[u,s,[c,h]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,L],[c,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[u,I],[c,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[u,I],[c,h]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,s,[c,f]],[/droid.+; (shield) bui/i],[s,[u,"Nvidia"],[c,f]],[/(playstation [345portablevi]+)/i],[s,[u,N],[c,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[u,L],[c,f]],[/smart-tv.+(samsung)/i],[u,[c,g]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,U],[c,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,A],[c,g]],[/(apple) ?tv/i],[u,[s,"Apple TV"],[c,g]],[/crkey/i],[[s,"Chromecast"],[u,k],[c,g]],[/droid.+aft(\w)( bui|\))/i],[s,[u,_],[c,g]],[/\(dtv[\);].+(aquos)/i],[s,[u,"Sharp"],[c,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,j],[s,j],[c,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,g]],[/((pebble))app/i],[u,s,[c,b]],[/droid.+; (glass) \d/i],[s,[u,k],[c,b]],[/droid.+; (wt63?0{2,3})\)/i],[s,[u,I],[c,b]],[/(quest( 2)?)/i],[s,[u,E],[c,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[c,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[s,[c,h]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[c,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,w]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[c,h]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[a,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[a,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[a,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,a]],os:[[/microsoft (windows) (vista|xp)/i],[a,d],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[a,[d,B,R]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[a,"Windows"],[d,B,R]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[a,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[a,"Mac OS"],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[d,a],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[a,d],[/\(bb(10);/i],[d,[a,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[a,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[a,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[a,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[a,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[a,"Chromium OS"],d],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[a,d],[/(sunos) ?([\w\.\d]*)/i],[[a,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[a,d]]},J=function(o,s){if(typeof o===n&&(s=o,o=t),!(this instanceof J))return new J(o,s).getResult();var a=o||(typeof e!==i&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:""),c=s?function(e,t){var o={};for(var i in e)t[i]&&t[i].length%2==0?o[i]=t[i].concat(e[i]):o[i]=e[i];return o}(z,s):z;return this.getBrowser=function(){var e,o={};return o.name=t,o.version=t,D.call(o,a,c.browser),o.major=typeof(e=o.version)===r?e.replace(/[^\d\.]/g,"").split(".")[0]:t,o},this.getCPU=function(){var e={};return e.architecture=t,D.call(e,a,c.cpu),e},this.getDevice=function(){var e={};return e.vendor=t,e.model=t,e.type=t,D.call(e,a,c.device),e},this.getEngine=function(){var e={};return e.name=t,e.version=t,D.call(e,a,c.engine),e},this.getOS=function(){var e={};return e.name=t,e.version=t,D.call(e,a,c.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return a},this.setUA=function(e){return a=typeof e===r&&e.length>255?j(e,255):e,this},this.setUA(a),this};J.VERSION="1.0.2",J.BROWSER=M([a,d,"major"]),J.CPU=M([m]),J.DEVICE=M([s,u,c,f,h,g,w,b,v]),J.ENGINE=J.OS=M([a,d]),p.exports&&(l=p.exports=J),l.UAParser=J;var H=typeof e!==i&&(e.jQuery||e.Zepto);if(H&&!H.ua){var V=new J;H.ua=V.getResult(),H.ua.get=function(){return V.getUA()},H.ua.set=function(e){V.setUA(e);var t=V.getResult();for(var o in t)H.ua[o]=t[o]}}}("object"==typeof window?window:d);var f=new m.exports.UAParser,h=f.getBrowser();h.name,h.version;var w=f.getEngine();w.name,w.version;var g=function(){var e=(0,f.getOS)();return{os:e.name,osversion:e.version}}(),b=g.os,v=g.osversion,_=function(){var e=(0,f.getDevice)();return{device:e.model,devicebrand:e.vendor}}(),y=_.device,S=_.devicebrand;b=b||"",v=v||"",y=y||"",S=S||"";var O={exports:{}},x={exports:{}},k=1e3,P=60*k,A=60*P,L=24*A,q=365.25*L,C=function(e,t){t=t||{};var o=typeof e;if("string"===o&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return o*q;case"days":case"day":case"d":return o*L;case"hours":case"hour":case"hrs":case"hr":case"h":return o*A;case"minutes":case"minute":case"mins":case"min":case"m":return o*P;case"seconds":case"second":case"secs":case"sec":case"s":return o*k;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===o&&!1===isNaN(e))return t.long?function(e){return U(e,L,"day")||U(e,A,"hour")||U(e,P,"minute")||U(e,k,"second")||e+" ms"}(e):function(e){if(e>=L)return Math.round(e/L)+"d";if(e>=A)return Math.round(e/A)+"h";if(e>=P)return Math.round(e/P)+"m";if(e>=k)return Math.round(e/k)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function U(e,t,o){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}!function(e,t){var o;function i(e){function i(){if(i.enabled){var e=i,n=+new Date,r=n-(o||n);e.diff=r,e.prev=o,e.curr=n,o=n;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(o,i){if("%%"===o)return o;c++;var n=t.formatters[i];if("function"==typeof n){var r=s[c];o=n.call(e,r),s.splice(c,1),c--}return o})),t.formatArgs.call(e,s);var p=i.log||t.log||console.log.bind(console);p.apply(e,s)}}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=function(e){var o,i=0;for(o in e)i=(i<<5)-i+e.charCodeAt(o),i|=0;return t.colors[Math.abs(i)%t.colors.length]}(e),"function"==typeof t.init&&t.init(i),i}(t=x.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var o=("string"==typeof e?e:"").split(/[\s,]+/),i=o.length,n=0;n<i;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var o,i;for(o=0,i=t.skips.length;o<i;o++)if(t.skips[o].test(e))return!1;for(o=0,i=t.names.length;o<i;o++)if(t.names[o].test(e))return!0;return!1},t.humanize=C,t.names=[],t.skips=[],t.formatters={}}(0,x.exports),function(e,t){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=x.exports).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var o=this.useColors;if(e[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+e[0]+(o?"%c ":" ")+"+"+t.humanize(this.diff),!o)return;var i="color: "+this.color;e.splice(1,0,i,"color: inherit");var n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(r=n))})),e.splice(r,0,i)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}(O,O.exports);var N=O.exports("jsonp"),T=function(e,t,o){"function"==typeof t&&(o=t,t={});t||(t={});var i,n,r=t.prefix||"__jp",s=t.name||r+I++,a=t.param||"callback",c=null!=t.timeout?t.timeout:6e4,p=encodeURIComponent,l=document.getElementsByTagName("script")[0]||document.head;c&&(n=setTimeout((function(){u(),o&&o(new Error("Timeout"))}),c));function u(){i.parentNode&&i.parentNode.removeChild(i),window[s]=E,n&&clearTimeout(n)}return window[s]=function(e){N("jsonp got",e),u(),o&&o(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+a+"="+p(s)).replace("?&","?"),N('jsonp req "%s"',e),(i=document.createElement("script")).src=e,l.parentNode.insertBefore(i,l),function(){window[s]&&u()}},I=0;function E(){}function M(e,t){return void 0===t&&(t={}),new Promise((function(o,i){var n;T("".concat(e,"?").concat((n=t,Object.keys(n).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(n[e])})).join("&"))),{param:"jsonp",name:"__jsonp_cb_".concat(Date.now(),"__")},(function(e,t){e?i(e):o(t)}))}))}var G=function(){function c(e){var t=e.domain,o=e.commonParams,i=e.isPro,n=void 0===i||i,r=e.sendOpenLog,s=void 0===r||r,a=e.consoleLog,c=void 0===a||a;this.version="3.9.0",this.buildDate="2/28/2025, 2:27:01 PM",this._urlParams=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=location.href);var o=new URL(t).search.substring(1),i={};return o&&o.split("&").forEach((function(e){i[e.split("=")[0]]=e.split("=")[1]})),Object.keys(i).forEach((function(t){e.includes(t)&&delete i[t]})),i}(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._consoleLog=!0,this._isPro=n,this._sendOpenLog=s,this._consoleLog=c;var p=this._getApis(t),l=p.openUrl,u=p.eventUrl,d=p.actUrl;this._openUrl=l,this._eventUrl=u,this._actUrl=d,this._updateCommonParams(this._filterParams(o)),this._init()}return Object.defineProperty(c.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),c.prototype._init=function(){var e=this;this._initCommonParams(),this._coldStartUp(),this._visibilityChange((function(){e._updateCommonParams({network:e._getNetWorkType()}),e._open(1)}),(function(){e._open(5)}))},c.prototype._visibilityChange=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=function(){});document.addEventListener("visibilitychange",(function(){"visible"===(null===document||void 0===document?void 0:document.visibilityState)?e():t()}),!1)},c.prototype._getScreen=function(){var e=window.screen,t=e.width,o=e.height;return"".concat(t,"*").concat(o)},c.prototype._getNetWorkType=function(){var e=window.navigator,t=(null==e?void 0:e.connection)||(null==e?void 0:e.mozConnection)||(null==e?void 0:e.webkitConnection);return(null==t?void 0:t.type)||(null==t?void 0:t.effectiveType)||"other"},c.prototype._getBatchId=function(){var e,t=(e="BATCH_ID",void 0!==typeof sessionStorage?sessionStorage.getItem("XYZ_LOG_"+e):null);return t||function(e,t){void 0!==typeof sessionStorage&&sessionStorage.setItem("XYZ_LOG_"+e,t)}("BATCH_ID",t=i()),t},c.prototype._coldStartUp=function(){var e=0;""==window.name?(e=0,window.name="isReload"):"isReload"==window.name&&(e=1),this._open(e)},c.prototype._getApis=function(t){var o=this._isPro?{open:"webopen-inside.tt.cn",event:"webevent-inside.tt.cn",act:"webact-inside.tt.cn"}:{open:"test-webopen-inside.tt.cn",event:"test-webevent-inside.tt.cn",act:"test-webact-inside.tt.cn"},i=e(e({},o),t);return{openUrl:"https://".concat(i.open,"/gamefunction_logs/applet/open"),eventUrl:"https://".concat(i.event,"/gamefunction_logs/applet/event"),actUrl:"https://".concat(i.act,"/gamefunction_logs/applet/activity")}},c.prototype._cacheCommonParams=function(e){o("COMMON_PARAMS",JSON.stringify(e))},c.prototype._getInitParams=function(){return{os:b,osversion:v,device:y,devicebrand:S,platform:7,openid:n(),appcqid:"organic",appqid:"organic"+s(),pixel:this._getScreen(),userinfo:this._getUserInfo()}},c.prototype._initCommonParams=function(){var o=this._getInitParams(),i=t("COMMON_PARAMS");i&&(o=e(e({},o),JSON.parse(i))),o=a(o,this._commonParams),this._updateCommonParams(e(e({},o),{obatchid:this._getBatchId(),network:this._getNetWorkType()}))},c.prototype._getUserInfo=function(t){var o={};if(t)try{o=JSON.parse(t)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format!')}var i={};if(this._commonParams.userinfo)try{i=JSON.parse(this._commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(e(e({querystring:this._urlParams},i),o))},c.prototype._filterParams=function(e){var t={};if(e){var o=["accid","apptypeid","appcqid","srcqid","appver","userinfo"];for(var i in e){var n=e[i];o.includes(i)&&n&&(t[i]=n)}}return t},c.prototype.setParams=function(e){e&&(this._consoleLog&&console.log("[XLOG] setParams",e),e=this._filterParams(e),this._updateCommonParams(e))},c.prototype._updateCommonParams=function(e){this._consoleLog&&console.log("[XLOG] _updateCommonParams",e),e.userinfo&&(e.userinfo=this._getUserInfo(e.userinfo)),e.appcqid&&(e.appqid=e.appcqid+s()),e.appver&&(e.appverint=r(e.appver)),this._commonParams=a(this._commonParams,e),this._cacheCommonParams(this._commonParams)},c.prototype._getAppqid=function(){return this._commonParams.appcqid+s()},c.prototype._request=function(e,t){!function(e,t){M(e,t)}(e,t)},c.prototype._open=function(t){if(this._sendOpenLog){var o=e(e({},this._commonParams),{openway:t,appqid:this._getAppqid(),xmlog:"3.9.0"});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",o),this._request(this._openUrl,o)}},c.prototype.event=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),event1:t.event1||"",event2:t.event2||"",event3:t.event3||"",event4:t.event4||"",value1:t.value1||"",value2:t.value2||"",value3:t.value3||"",value4:t.value4||""});this._consoleLog&&console.log("[XLOG] PARAMS(EVENT)",o),this._request(this._eventUrl,o)},c.prototype.act=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),actentryid:t.actentryid||"",subactid:t.subactid||"",type:t.type||"",custom:t.custom||"",batchid:t.batchid||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},c}();export{c as EGender,u as XLogMp,G as XLogWeb};
6
+ var e=function(){return e=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},e.apply(this,arguments)};function t(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}function o(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{c(n.next(e))}catch(e){r(e)}}function s(e){try{c(n.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function n(e,t){var o,n,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function i(e,t,o){if(o||2===arguments.length)for(var n,i=0,r=t.length;i<r;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function r(e){return void 0!==typeof localStorage?localStorage.getItem("XYZ_LOG_"+e):null}function a(e,t){void 0!==typeof localStorage&&localStorage.setItem("XYZ_LOG_"+e,t)}function s(e){return void 0!==typeof sessionStorage?sessionStorage.getItem("XYZ_LOG_"+e):null}function c(e,t){void 0!==typeof sessionStorage&&sessionStorage.setItem("XYZ_LOG_"+e,t)}function p(e,t){void 0===e&&(e=18),void 0===t&&(t=0);for(var o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[],i=Math.random,r=e,a=t||o.length,s=0;s<r;s++)n[s]=o[0|i()*a];return n.join("")}function u(e){void 0===e&&(e="UID");var t=r(e);return t||a(e,t=p()),t}function l(e){try{return e&&"string"==typeof e?e.split(".").map((function(e){return 1===e.length?"0"+e:e})).join(""):""}catch(t){return console.error('[transferVersion] ver("'.concat(e,'")格式异常:'),t),""}}function d(){var e=new Date,t=e.getFullYear().toString(),o=(e.getMonth()+1).toString(),n=e.getDate().toString();return(t=t.toString().substr(-2))+(o=Number(o)<10?"0"+o:o)+(n=Number(n)<10?"0"+n:n)}function m(e,t){void 0===e&&(e=[]),void 0===t&&(t=location.href);var o=new URL(t).search.substring(1),n={};return o&&o.split("&").forEach((function(e){n[e.split("=")[0]]=e.split("=")[1]})),Object.keys(n).forEach((function(t){e.includes(t)&&delete n[t]})),n}function f(t,o){var n=e({},t),i=e({},o);return Object.keys(n).forEach((function(e){i[e]||delete i[e]})),e(e({},n),i)}function h(e){for(var t,o,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!n.length)return e;var a=n.shift();if(a&&"object"==typeof a)for(var s in a)a[s]&&"object"==typeof a[s]?(e[s]||Object.assign(e,((t={})[s]={},t)),h(e[s],a[s])):Object.assign(e,((o={})[s]=a[s],o));return h.apply(void 0,i([e],n,!1))}var g=function(){return"standalone"==(navigator.standalone||window.matchMedia("(display-mode: standalone)").matches?"standalone":"browser")?"pwa":(e=navigator.userAgent,["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].some((function(t){return e.includes(t)}))?"h5":"pc");var e};var v,b="3/13/2025, 3:10:44 PM";!function(e){e[e.Unknown=0]="Unknown",e[e.Male=1]="Male",e[e.Female=2]="Female"}(v||(v={}));var _,w,y=function(){function t(e){var t,o=e.domain,n=e.commonParams,i=e.isPro,r=void 0===i||i,a=e.sendOpenLog,s=void 0===a||a,c=e.consoleLog,p=void 0===c||c;this.version="4.1.0",this.buildDate=b,this._openUrl="",this._eventUrl="",this._actUrl="",this._adUrl="",this._onlineUrl="",this._businessDomain="",this._startTime=Date.now(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._isColdStartUp=!0,this._systemInfo={},this._mp={},this._consoleLog=!0,this._isPro=r,this._sendOpenLog=s,this._consoleLog=p;var u=this._getApis(o),l=u.openUrl,d=u.eventUrl,m=u.actUrl,f=u.adUrl,h=u.onlineUrl;this._openUrl=l,this._eventUrl=d,this._actUrl=m,this._adUrl=f,this._onlineUrl=h,this._businessDomain=this._isPro?"https://applet-xx.mop.com":"https://test-applet-xx.mop.com";var g,v=this._getMp(),_=v.mp,w=v.platform;this._mp=_,this._platform=w,!_||(g=_)&&0===Object.keys(g).length&&g.constructor===Object?console.error("[XLOG] 日志SDK初始化失败,当前环境为非小程序环境!"):this._consoleLog&&console.log("[XLOG] 小程序对象:",_);try{this._systemInfo=(null===(t=this._mp)||void 0===t?void 0:t.getSystemInfoSync())||{}}catch(e){console.error("[XLOG] getSystemInfoSync error",e)}this._extraInfo={language:this._systemInfo.language,wxVersion:this._systemInfo.version,SDKVersion:this._systemInfo.SDKVersion,benchmarkLevel:this._systemInfo.benchmarkLevel||-1,theme:this._systemInfo.theme,pixelRatio:this._systemInfo.pixelRatio},this._init(n)}return Object.defineProperty(t.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),t.prototype._getLaunchOptions=function(){var e,t,o=null;try{o=((null===(e=this._mp)||void 0===e?void 0:e.getEnterOptionsSync)||(null===(t=this._mp)||void 0===t?void 0:t.getLaunchOptionsSync)||function(){})()}catch(e){console.error("[XLOG] getEnterOptionsSync or getLaunchOptionsSync error",e)}return o},t.prototype._updateQuerystring=function(t,o){void 0===t&&(t=null),void 0===o&&(o={}),(null==t?void 0:t.query)?this._updateCommonParams({srcqid:t.query.channel||"",userinfo:JSON.stringify({querystring:e(e({},t.query),o)})}):this._updateCommonParams({userinfo:JSON.stringify({querystring:o})})},t.prototype._init=function(e){var t=this;this._initCommonParams(this._filterParams(e));var o=this._getLaunchOptions();this._updateQuerystring(o),this._coldStartUp(),this._visibilityChange((function(){t._isColdStartUp||t._getNetworkType().then((function(e){t._updateCommonParams({network:e}),t._open({openway:1})})),t._startTime=Date.now();var e=t._getOnlineBatchData();e&&t._online(e)}),(function(){t._isColdStartUp=!1,t._open({openway:5}),t._sendOnline()}))},t.prototype._getMp=function(){var e={mp:null,platform:7};return"undefined"!=typeof tt?(e.mp=tt,e.platform=2):"undefined"!=typeof ks?(e.mp=ks,e.platform=3):"undefined"!=typeof swan?(e.mp=swan,e.platform=4):"undefined"!=typeof qq?(e.mp=qq,e.platform=5):"undefined"!=typeof wx?(e.mp=wx,e.platform=1):"undefined"!=typeof my?e.mp=my:"undefined"!=typeof jd&&(e.mp=jd),e},t.prototype._visibilityChange=function(e,t){var o,n,i,r,a=this;void 0===e&&(e=function(){}),void 0===t&&(t=function(){});try{var s=(null===(o=this._mp)||void 0===o?void 0:o.onAppShow)||(null===(n=this._mp)||void 0===n?void 0:n.onShow)||function(){},c=(null===(i=this._mp)||void 0===i?void 0:i.onAppHide)||(null===(r=this._mp)||void 0===r?void 0:r.onHide)||function(){};s((function(){a._consoleLog&&console.log("[XLOG] onAppShow"),e()})),c((function(){a._consoleLog&&console.log("[XLOG] onAppHide"),t()}))}catch(e){console.error("[XLOG] onAppShow or onAppHide error",e)}},t.prototype._getStorage=function(e){var t;try{return null===(t=this._mp)||void 0===t?void 0:t.getStorageSync("XYZ_LOG_".concat(e))}catch(e){console.error("[XLOG] getStorageSync error",e)}},t.prototype._setStorage=function(e,t){var o;try{null===(o=this._mp)||void 0===o||o.setStorageSync("XYZ_LOG_".concat(e),t)}catch(e){console.error("[XLOG] setStorageSync error",e)}},t.prototype._getBatchId=function(){var e=this._getStorage("BATCH_ID");return e&&!this._isColdStartUp||(e=p(),this._setStorage("BATCH_ID",e)),e},t.prototype._coldStartUp=function(){var e=this;this._getNetworkType().then((function(t){e._updateCommonParams({network:t}),e._open({openway:0})}))},t.prototype._getApis=function(t){var o=this._isPro?{open:"webopen-inside.tt.cn",event:"webevent-inside.tt.cn",act:"webact-inside.tt.cn",ad:"webadv-inside.tt.cn",online:"webact-inside.tt.cn"}:{open:"test-webopen-inside.tt.cn",event:"test-webevent-inside.tt.cn",act:"test-webact-inside.tt.cn",ad:"test-webadv-inside.tt.cn",online:"test-webact-inside.tt.cn"},n=e(e({},o),t);return{openUrl:"https://".concat(n.open,"/gamefunction_logs/applet/open"),eventUrl:"https://".concat(n.event,"/gamefunction_logs/applet/event"),actUrl:"https://".concat(n.act,"/gamefunction_logs/applet/activity"),adUrl:"https://".concat(n.ad,"/gamefunction_logs/applet/adv"),onlineUrl:"https://".concat(n.online,"/gamefunction_logs/applet/onlineTime")}},t.prototype._cacheCommonParams=function(e){this._setStorage("COMMON_PARAMS",JSON.stringify(e))},t.prototype._getInitParams=function(){var e,t=(null===(e=this._systemInfo.system)||void 0===e?void 0:e.includes(" "))?this._systemInfo.system.split(" ")[1]:this._systemInfo.system;return{platform:this._platform,appcqid:"organic",appqid:"organic"+d(),os:this._systemInfo.platform,osversion:t,device:this._systemInfo.model,devicebrand:this._systemInfo.brand,pixel:this._systemInfo.screenWidth+"*"+this._systemInfo.screenHeight,userinfo:this._getUserInfo()}},t.prototype._initCommonParams=function(t){var o=this._getInitParams(),n=this._getStorage("COMMON_PARAMS");n&&(o=e(e({},o),JSON.parse(n))),o=t?f(o,t):o,this._updateCommonParams(e(e({},o),{obatchid:this._getBatchId()}))},t.prototype._getNetworkType=function(){var e=this;return new Promise((function(t){var o;try{null===(o=e._mp)||void 0===o||o.getNetworkType({success:function(e){t(e.networkType)},fail:function(){t("none")}})}catch(e){t("none"),console.error("[XLOG] getNetworkType error",e)}}))},t.prototype._getUserInfo=function(t){var o={};if(t)try{o=JSON.parse(t)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format: ',t)}var n={};if(this.commonParams.userinfo)try{n=JSON.parse(this.commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(e(e(e({},this._extraInfo),n),o))},t.prototype._filterParams=function(e){var t={};if(e){var o=["openid","unionid","accid","apptypeid","appsubid","appcqid","srcqid","appver","userinfo"];for(var n in e){var i=e[n];o.includes(n)&&i&&(t[n]=i)}}return t},t.prototype.setParams=function(e){if(e){this._consoleLog&&console.log("[XLOG] setParams",e);var t=this._commonParams.openid,o=this._commonParams.unionid;e=this._filterParams(e),this._updateCommonParams(e),(e.openid&&e.openid!==t||e.unionid&&e.unionid!==o)&&this._open({isreturn:e.openid?1:2,openway:0})}},t.prototype._updateCommonParams=function(t){this._consoleLog&&console.log("[XLOG] _updateCommonParams",t),t.userinfo&&(t.appsubid&&(t.userinfo=JSON.stringify(e(e({},JSON.parse(t.userinfo)),{appsubid:t.appsubid}))),t.userinfo=this._getUserInfo(t.userinfo)),t.appcqid&&(t.appqid=t.appcqid+d()),t.appver&&(t.appverint=l(t.appver)),this._commonParams=f(this._commonParams,t),this._cacheCommonParams(this._commonParams)},t.prototype._getAppqid=function(){return this._commonParams.appcqid+d()},t.prototype._request=function(e,t,o){var n=this;return void 0===o&&(o="application/x-www-form-urlencoded"),new Promise((function(i,r){var a;try{null===(a=n._mp)||void 0===a||a.request({url:e,data:t,method:"POST",header:{"content-type":o},success:function(o){n._consoleLog&&console.log("[XLOG] SUCCESS: ".concat(e),t,o),i(o)},fail:function(o){n._consoleLog&&console.log("[XLOG] FAIL: ".concat(e),t,o),r(o)}})}catch(e){console.error("[XLOG] request error",e),r(e)}}))},t.prototype.open=function(e){this._open({querystring:e.querystring,isreturn:3,openway:0,manual:!0})},t.prototype._open=function(t){if(this._sendOpenLog||t.manual){var o=this._getLaunchOptions();this._updateQuerystring(o,t.querystring);var n=e(e({},this._commonParams),{appqid:this._getAppqid(),wakeway:t.wakeway||(null==o?void 0:o.scene)||"",openway:t.openway,isreturn:t.isreturn||0,xmlog:"4.1.0"});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",n),this._request(this._openUrl,n)}},t.prototype.event=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),event1:t.event1||"",event2:t.event2||"",event3:t.event3||"",event4:t.event4||"",value1:t.value1||"",value2:t.value2||"",value3:t.value3||"",value4:t.value4||""});this._consoleLog&&console.log("[XLOG] PARAMS(EVENT)",o),this._request(this._eventUrl,o)},t.prototype.act=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),actentryid:t.actentryid||"",subactid:t.subactid||"",type:t.type||"",custom:t.custom||"",batchid:t.batchid||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},t.prototype.ad=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),type:t.type||"",code:t.code||"",codeinfo:t.codeinfo||"",pagetype:t.pagetype||"",gametype:t.gametype||"",adslot:t.adslot||"",adunitid:t.adunitid||"",adbatchid:t.adbatchid||"",ecpm:t.ecpm||""});this._consoleLog&&console.log("[XLOG] PARAMS(AD)",o),this._request(this._adUrl,o,"application/json")},t.prototype.code2session=function(e){return o(this,void 0,void 0,(function(){var t,o;return n(this,(function(n){switch(n.label){case 0:return t="",1===this._platform?t="wx/":3===this._platform&&(t="ks/"),o="".concat(this._businessDomain,"/AppletUtils/").concat(t,"code2session"),[4,this._request(o,{appTypeId:e.apptypeid,code:e.code,testNet:e.testNet},"application/json")];case 1:return[2,n.sent().data]}}))}))},t.prototype.getSubsidy=function(e){return o(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,this._request("".concat(this._businessDomain,"/AppletUtils/pay/ks/subsidy"),{apptypeid:e.apptypeid,os:this._systemInfo.platform,openId:e.openId},"application/json")];case 1:return[2,t.sent().data]}}))}))},t.prototype.getUserProps=function(e){return o(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,this._request("".concat(this._businessDomain,"/AppletUtils/pay/ks/userProps"),{appTypeId:e.apptypeid,openId:e.openId},"application/json")];case 1:return[2,t.sent().data]}}))}))},t.prototype.checkOrder=function(e){return o(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,this._request("".concat(this._businessDomain,"/AppletUtils/pay/ks/chkOrder"),{appTypeId:e.apptypeid,os:this._systemInfo.platform,openId:e.openId,orderId:e.orderId},"application/json")];case 1:return[2,t.sent().data]}}))}))},t.prototype.createOrder=function(e){return o(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,this._request("".concat(this._businessDomain,"/AppletUtils/pay/ks/crtOrder"),{appTypeId:e.apptypeid,os:this._systemInfo.platform,openId:e.openId,productId:e.productId,payPlatform:e.payPlatform},"application/json")];case 1:return[2,t.sent().data]}}))}))},t.prototype._sendOnline=function(){var t=Date.now(),o=e(e({},this._commonParams),{appqid:this._getAppqid(),onlinetime:"".concat(t-this._startTime),endtime:t.toString(),starttime:this._startTime.toString()});this._online([o])},t.prototype._setOnlineBatchData=function(e){this._setStorage("ONLINE_BACH_DATA",e)},t.prototype._getOnlineBatchData=function(){return this._getStorage("ONLINE_BACH_DATA")},t.prototype._clearOnlineBatchData=function(){this._setStorage("ONLINE_BACH_DATA","")},t.prototype._online=function(e){var t=this;this._consoleLog&&console.log("[XLOG] PARAMS(ONLINE)",e),this._clearOnlineBatchData(),this._request(this._onlineUrl,{batch:JSON.stringify(e)}).catch((function(o){t._setOnlineBatchData(e)}))},t}(),O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},P={exports:{}};_=P,w=P.exports,function(e,t){var o="function",n="undefined",i="object",r="string",a="model",s="name",c="type",p="vendor",u="version",l="architecture",d="console",m="mobile",f="tablet",h="smarttv",g="wearable",v="embedded",b="Amazon",y="Apple",O="ASUS",P="BlackBerry",S="Firefox",k="Google",x="Huawei",U="LG",L="Microsoft",A="Motorola",C="Opera",I="Samsung",N="Sony",q="Xiaomi",T="Zebra",D="Facebook",R=function(e){for(var t={},o=0;o<e.length;o++)t[e[o].toUpperCase()]=e[o];return t},E=function(e,t){return typeof e===r&&-1!==G(t).indexOf(G(e))},G=function(e){return e.toLowerCase()},j=function(e,t){if(typeof e===r)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===n?e:e.substring(0,255)},M=function(e,n){for(var r,a,s,c,p,u,l=0;l<n.length&&!p;){var d=n[l],m=n[l+1];for(r=a=0;r<d.length&&!p;)if(p=d[r++].exec(e))for(s=0;s<m.length;s++)u=p[++a],typeof(c=m[s])===i&&c.length>0?2===c.length?typeof c[1]==o?this[c[0]]=c[1].call(this,u):this[c[0]]=c[1]:3===c.length?typeof c[1]!==o||c[1].exec&&c[1].test?this[c[0]]=u?u.replace(c[1],c[2]):t:this[c[0]]=u?c[1].call(this,u,c[2]):t:4===c.length&&(this[c[0]]=u?c[3].call(this,u.replace(c[1],c[2])):t):this[c]=u||t;l+=2}},X=function(e,o){for(var n in o)if(typeof o[n]===i&&o[n].length>0){for(var r=0;r<o[n].length;r++)if(E(o[n][r],e))return"?"===n?t:n}else if(E(o[n],e))return"?"===n?t:n;return e},B={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,u],[/opios[\/ ]+([\w\.]+)/i],[u,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[u,[s,C]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[s,u],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[u,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[u,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[u,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],u],[/\bfocus\/([\w\.]+)/i],[u,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[u,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[u,[s,S]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,u],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,D],u],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,u],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,u],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[u,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[u,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[u,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[s,u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[s,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[s,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[l,"amd64"]],[/(ia32(?=;))/i],[[l,G]],[/((?:i[346]|x)86)[;\)]/i],[[l,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[l,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[l,"armhf"]],[/windows (ce|mobile); ppc;/i],[[l,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[l,/ower/,"",G]],[/(sun4\w)[;\)]/i],[[l,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[l,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[p,I],[c,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[p,I],[c,m]],[/\((ip(?:hone|od)[\w ]*);/i],[a,[p,y],[c,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[p,y],[c,f]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[p,x],[c,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[a,[p,x],[c,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[a,/_/g," "],[p,q],[c,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[p,q],[c,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[p,"OPPO"],[c,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[p,"Vivo"],[c,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[p,"Realme"],[c,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[a,[p,A],[c,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[p,A],[c,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[p,U],[c,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[p,U],[c,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[p,"Lenovo"],[c,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[p,"Nokia"],[c,m]],[/(pixel c)\b/i],[a,[p,k],[c,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[p,k],[c,m]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[p,N],[c,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[p,N],[c,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[p,"OnePlus"],[c,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[p,b],[c,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[p,b],[c,m]],[/(playbook);[-\w\),; ]+(rim)/i],[a,p,[c,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[p,P],[c,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[p,O],[c,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[p,O],[c,m]],[/(nexus 9)/i],[a,[p,"HTC"],[c,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[p,[a,/_/g," "],[c,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[p,"Acer"],[c,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[p,"Meizu"],[c,m]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[p,"Sharp"],[c,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,a,[c,m]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,a,[c,f]],[/(surface duo)/i],[a,[p,L],[c,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[p,"Fairphone"],[c,m]],[/(u304aa)/i],[a,[p,"AT&T"],[c,m]],[/\bsie-(\w*)/i],[a,[p,"Siemens"],[c,m]],[/\b(rct\w+) b/i],[a,[p,"RCA"],[c,f]],[/\b(venue[\d ]{2,7}) b/i],[a,[p,"Dell"],[c,f]],[/\b(q(?:mv|ta)\w+) b/i],[a,[p,"Verizon"],[c,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[p,"Barnes & Noble"],[c,f]],[/\b(tm\d{3}\w+) b/i],[a,[p,"NuVision"],[c,f]],[/\b(k88) b/i],[a,[p,"ZTE"],[c,f]],[/\b(nx\d{3}j) b/i],[a,[p,"ZTE"],[c,m]],[/\b(gen\d{3}) b.+49h/i],[a,[p,"Swiss"],[c,m]],[/\b(zur\d{3}) b/i],[a,[p,"Swiss"],[c,f]],[/\b((zeki)?tb.*\b) b/i],[a,[p,"Zeki"],[c,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],a,[c,f]],[/\b(ns-?\w{0,9}) b/i],[a,[p,"Insignia"],[c,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[p,"NextBook"],[c,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],a,[c,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],a,[c,m]],[/\b(ph-1) /i],[a,[p,"Essential"],[c,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[p,"Envizen"],[c,f]],[/\b(trio[-\w\. ]+) b/i],[a,[p,"MachSpeed"],[c,f]],[/\btu_(1491) b/i],[a,[p,"Rotor"],[c,f]],[/(shield[\w ]+) b/i],[a,[p,"Nvidia"],[c,f]],[/(sprint) (\w+)/i],[p,a,[c,m]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[p,L],[c,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[p,T],[c,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[p,T],[c,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,a,[c,d]],[/droid.+; (shield) bui/i],[a,[p,"Nvidia"],[c,d]],[/(playstation [345portablevi]+)/i],[a,[p,N],[c,d]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[p,L],[c,d]],[/smart-tv.+(samsung)/i],[p,[c,h]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[p,I],[c,h]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,U],[c,h]],[/(apple) ?tv/i],[p,[a,"Apple TV"],[c,h]],[/crkey/i],[[a,"Chromecast"],[p,k],[c,h]],[/droid.+aft(\w)( bui|\))/i],[a,[p,b],[c,h]],[/\(dtv[\);].+(aquos)/i],[a,[p,"Sharp"],[c,h]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[p,j],[a,j],[c,h]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,h]],[/((pebble))app/i],[p,a,[c,g]],[/droid.+; (glass) \d/i],[a,[p,k],[c,g]],[/droid.+; (wt63?0{2,3})\)/i],[a,[p,T],[c,g]],[/(quest( 2)?)/i],[a,[p,D],[c,g]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[c,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[c,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[c,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,f]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[c,m]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[s,u],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,u],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[u,X,B]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[u,X,B]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[u,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[u,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,u],[/\(bb(10);/i],[u,[s,P]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[u,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[u,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],u],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,u],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],u],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,u]]},z=function(o,a){if(typeof o===i&&(a=o,o=t),!(this instanceof z))return new z(o,a).getResult();var s=o||(typeof e!==n&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:""),c=a?function(e,t){var o={};for(var n in e)t[n]&&t[n].length%2==0?o[n]=t[n].concat(e[n]):o[n]=e[n];return o}(J,a):J;return this.getBrowser=function(){var e,o={};return o.name=t,o.version=t,M.call(o,s,c.browser),o.major=typeof(e=o.version)===r?e.replace(/[^\d\.]/g,"").split(".")[0]:t,o},this.getCPU=function(){var e={};return e.architecture=t,M.call(e,s,c.cpu),e},this.getDevice=function(){var e={};return e.vendor=t,e.model=t,e.type=t,M.call(e,s,c.device),e},this.getEngine=function(){var e={};return e.name=t,e.version=t,M.call(e,s,c.engine),e},this.getOS=function(){var e={};return e.name=t,e.version=t,M.call(e,s,c.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return s},this.setUA=function(e){return s=typeof e===r&&e.length>255?j(e,255):e,this},this.setUA(s),this};z.VERSION="1.0.2",z.BROWSER=R([s,u,"major"]),z.CPU=R([l]),z.DEVICE=R([a,p,c,d,m,h,f,g,v]),z.ENGINE=z.OS=R([s,u]),_.exports&&(w=_.exports=z),w.UAParser=z;var H=typeof e!==n&&(e.jQuery||e.Zepto);if(H&&!H.ua){var W=new z;H.ua=W.getResult(),H.ua.get=function(){return W.getUA()},H.ua.set=function(e){W.setUA(e);var t=W.getResult();for(var o in t)H.ua[o]=t[o]}}}("object"==typeof window?window:O);var S=new P.exports.UAParser,k=S.getBrowser(),x=k.name,U=k.version,L=S.getEngine(),A=L.name,C=L.version,I=function(){var e=(0,S.getOS)();return{os:e.name,osversion:e.version}}(),N=I.os,q=I.osversion,T=function(){var e=(0,S.getDevice)();return{device:e.model,devicebrand:e.vendor}}(),D=T.device,R=T.devicebrand;N=N||"",q=q||"",D=D||"",R=R||"";var E={exports:{}},G={exports:{}},j=1e3,M=60*j,X=60*M,B=24*X,J=365.25*B,z=function(e,t){t=t||{};var o=typeof e;if("string"===o&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return o*J;case"days":case"day":case"d":return o*B;case"hours":case"hour":case"hrs":case"hr":case"h":return o*X;case"minutes":case"minute":case"mins":case"min":case"m":return o*M;case"seconds":case"second":case"secs":case"sec":case"s":return o*j;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===o&&!1===isNaN(e))return t.long?function(e){return H(e,B,"day")||H(e,X,"hour")||H(e,M,"minute")||H(e,j,"second")||e+" ms"}(e):function(e){if(e>=B)return Math.round(e/B)+"d";if(e>=X)return Math.round(e/X)+"h";if(e>=M)return Math.round(e/M)+"m";if(e>=j)return Math.round(e/j)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function H(e,t,o){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}!function(e,t){var o;function n(e){function n(){if(n.enabled){var e=n,i=+new Date,r=i-(o||i);e.diff=r,e.prev=o,e.curr=i,o=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(o,n){if("%%"===o)return o;c++;var i=t.formatters[n];if("function"==typeof i){var r=a[c];o=i.call(e,r),a.splice(c,1),c--}return o})),t.formatArgs.call(e,a);var p=n.log||t.log||console.log.bind(console);p.apply(e,a)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var o,n=0;for(o in e)n=(n<<5)-n+e.charCodeAt(o),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=G.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var o=("string"==typeof e?e:"").split(/[\s,]+/),n=o.length,i=0;i<n;i++)o[i]&&("-"===(e=o[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var o,n;for(o=0,n=t.skips.length;o<n;o++)if(t.skips[o].test(e))return!1;for(o=0,n=t.names.length;o<n;o++)if(t.names[o].test(e))return!0;return!1},t.humanize=z,t.names=[],t.skips=[],t.formatters={}}(0,G.exports),function(e,t){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=G.exports).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var o=this.useColors;if(e[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+e[0]+(o?"%c ":" ")+"+"+t.humanize(this.diff),!o)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(r=i))})),e.splice(r,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}(E,E.exports);var W=E.exports("jsonp"),F=function(e,t,o){"function"==typeof t&&(o=t,t={});t||(t={});var n,i,r=t.prefix||"__jp",a=t.name||r+V++,s=t.param||"callback",c=null!=t.timeout?t.timeout:6e4,p=encodeURIComponent,u=document.getElementsByTagName("script")[0]||document.head;c&&(i=setTimeout((function(){l(),o&&o(new Error("Timeout"))}),c));function l(){n.parentNode&&n.parentNode.removeChild(n),window[a]=Z,i&&clearTimeout(i)}return window[a]=function(e){W("jsonp got",e),l(),o&&o(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+s+"="+p(a)).replace("?&","?"),W('jsonp req "%s"',e),(n=document.createElement("script")).src=e,u.parentNode.insertBefore(n,u),function(){window[a]&&l()}},V=0;function Z(){}function Y(e,t){return void 0===t&&(t={}),new Promise((function(o,n){var i;F("".concat(e,"?").concat((i=t,Object.keys(i).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(i[e])})).join("&"))),{param:"jsonp",name:"__jsonp_cb_".concat(Date.now(),"__")},(function(e,t){e?n(e):o(t)}))}))}var $=function(e,t){return Y(e,t)},K=function(){function t(e){var t=e.domain,o=e.commonParams,n=e.isPro,i=void 0===n||n,r=e.sendOpenLog,a=void 0===r||r,s=e.consoleLog,c=void 0===s||s;this.version="4.1.0",this.buildDate=b,this._urlParams=m(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._consoleLog=!0,this._isPro=i,this._sendOpenLog=a,this._consoleLog=c;var p=this._getApis(t),u=p.openUrl,l=p.eventUrl,d=p.actUrl;this._openUrl=u,this._eventUrl=l,this._actUrl=d,this._updateCommonParams(this._filterParams(o)),this._init()}return Object.defineProperty(t.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),t.prototype._init=function(){var e=this;this._initCommonParams(),this._coldStartUp(),this._visibilityChange((function(){e._updateCommonParams({network:e._getNetWorkType()}),e._open(1)}),(function(){e._open(5)}))},t.prototype._visibilityChange=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=function(){});document.addEventListener("visibilitychange",(function(){"visible"===(null===document||void 0===document?void 0:document.visibilityState)?e():t()}),!1)},t.prototype._getScreen=function(){var e=window.screen,t=e.width,o=e.height;return"".concat(t,"*").concat(o)},t.prototype._getNetWorkType=function(){var e=window.navigator,t=(null==e?void 0:e.connection)||(null==e?void 0:e.mozConnection)||(null==e?void 0:e.webkitConnection);return(null==t?void 0:t.type)||(null==t?void 0:t.effectiveType)||"other"},t.prototype._getBatchId=function(){var e=s("BATCH_ID");return e||c("BATCH_ID",e=p()),e},t.prototype._coldStartUp=function(){var e=0;""==window.name?(e=0,window.name="isReload"):"isReload"==window.name&&(e=1),this._open(e)},t.prototype._getApis=function(t){var o=this._isPro?{open:"webopen-inside.tt.cn",event:"webevent-inside.tt.cn",act:"webact-inside.tt.cn"}:{open:"test-webopen-inside.tt.cn",event:"test-webevent-inside.tt.cn",act:"test-webact-inside.tt.cn"},n=e(e({},o),t);return{openUrl:"https://".concat(n.open,"/gamefunction_logs/applet/open"),eventUrl:"https://".concat(n.event,"/gamefunction_logs/applet/event"),actUrl:"https://".concat(n.act,"/gamefunction_logs/applet/activity")}},t.prototype._cacheCommonParams=function(e){a("COMMON_PARAMS",JSON.stringify(e))},t.prototype._getInitParams=function(){return{os:N,osversion:q,device:D,devicebrand:R,platform:7,openid:u(),appcqid:"organic",appqid:"organic"+d(),pixel:this._getScreen(),userinfo:this._getUserInfo()}},t.prototype._initCommonParams=function(){var t=this._getInitParams(),o=r("COMMON_PARAMS");o&&(t=e(e({},t),JSON.parse(o))),t=f(t,this._commonParams),this._updateCommonParams(e(e({},t),{obatchid:this._getBatchId(),network:this._getNetWorkType()}))},t.prototype._getUserInfo=function(t){var o={};if(t)try{o=JSON.parse(t)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format!')}var n={};if(this._commonParams.userinfo)try{n=JSON.parse(this._commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(e(e({querystring:this._urlParams},n),o))},t.prototype._filterParams=function(e){var t={};if(e){var o=["accid","apptypeid","appcqid","srcqid","appver","userinfo"];for(var n in e){var i=e[n];o.includes(n)&&i&&(t[n]=i)}}return t},t.prototype.setParams=function(e){e&&(this._consoleLog&&console.log("[XLOG] setParams",e),e=this._filterParams(e),this._updateCommonParams(e))},t.prototype._updateCommonParams=function(e){this._consoleLog&&console.log("[XLOG] _updateCommonParams",e),e.userinfo&&(e.userinfo=this._getUserInfo(e.userinfo)),e.appcqid&&(e.appqid=e.appcqid+d()),e.appver&&(e.appverint=l(e.appver)),this._commonParams=f(this._commonParams,e),this._cacheCommonParams(this._commonParams)},t.prototype._getAppqid=function(){return this._commonParams.appcqid+d()},t.prototype._request=function(e,t){$(e,t)},t.prototype._open=function(t){if(this._sendOpenLog){var o=e(e({},this._commonParams),{openway:t,appqid:this._getAppqid(),xmlog:"4.1.0"});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",o),this._request(this._openUrl,o)}},t.prototype.event=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),event1:t.event1||"",event2:t.event2||"",event3:t.event3||"",event4:t.event4||"",value1:t.value1||"",value2:t.value2||"",value3:t.value3||"",value4:t.value4||""});this._consoleLog&&console.log("[XLOG] PARAMS(EVENT)",o),this._request(this._eventUrl,o)},t.prototype.act=function(t){var o=e(e({},this._commonParams),{appqid:this._getAppqid(),actentryid:t.actentryid||"",subactid:t.subactid||"",type:t.type||"",custom:t.custom||"",batchid:t.batchid||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},t}();
7
+ /*! js-cookie v3.0.5 | MIT */
8
+ function Q(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)e[n]=o[n]}return e}var ee=function e(t,o){function n(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=Q({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var a in i)i[a]&&(r+="; "+a,!0!==i[a]&&(r+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+r}}return Object.create({set:n,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var o=document.cookie?document.cookie.split("; "):[],n={},i=0;i<o.length;i++){var r=o[i].split("="),a=r.slice(1).join("=");try{var s=decodeURIComponent(r[0]);if(n[s]=t.read(a,s),e===s)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",Q({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Q({},this.attributes,t))},withConverter:function(t){return e(Q({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),te="".concat("XYZ_LOG_HW_","COMMON_PARAMS"),oe="".concat("XYZ_LOG_HW_","ONLINE_BACH_DATA"),ne=function(){function o(e){var t=e.domain,o=e.commonParams,n=e.isPro,i=void 0===n||n,r=e.sendOpenLog,a=void 0===r||r,s=e.consoleLog,c=void 0===s||s,p=e.ignoreUrlParams,u=void 0===p?[]:p;this.version="4.1.0",this.buildDate=b,this._startTime=Date.now(),this._commonParams={},this._isPro=!0,this._sendOpenLog=!0,this._consoleLog=!0,this._ignoreUrlParams=[],this._isPro=i,this._ignoreUrlParams=u,this._sendOpenLog=a,this._consoleLog=c;var l=this._getApis(t),d=l.openUrl,m=l.actUrl,f=l.adUrl,h=l.onlineUrl;this._openUrl=d,this._actUrl=m,this._adUrl=f,this._onlineUrl=h,this._init(o)}return Object.defineProperty(o.prototype,"commonParams",{get:function(){return this._commonParams},enumerable:!1,configurable:!0}),o.prototype._init=function(t){var o=this;this._updateCommonParams(e(e({},this._filterParams(t)),{obatchid:this._getBatchId()})),this._coldStartUp(),this._visibilityChange((function(){o._updateCommonParams({}),o._open(1),o._startTime=Date.now();var e=o._getOnlineBatchData();e&&o._online(e)}),(function(){o._open(5),o._sendOnline()}))},o.prototype._visibilityChange=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=function(){});document.addEventListener("visibilitychange",(function(){"visible"===(null===document||void 0===document?void 0:document.visibilityState)?e():t()}),!1)},o.prototype._getScreen=function(){var e=window.screen,t=e.width,o=e.height;return"".concat(t,"*").concat(o)},o.prototype._getNetWorkType=function(){var e=window.navigator,t=(null==e?void 0:e.connection)||(null==e?void 0:e.mozConnection)||(null==e?void 0:e.webkitConnection);return(null==t?void 0:t.type)||(null==t?void 0:t.effectiveType)||"other"},o.prototype._getBatchId=function(){var e=s("BATCH_ID");return e||c("BATCH_ID",e=p()),e},o.prototype._coldStartUp=function(){var e=0;""==window.name?(e=0,window.name="isReload"):"isReload"==window.name&&(e=1),this._open(e)},o.prototype._getApis=function(t){var o=this._isPro?{open:"https://wappubog.snake.cc",act:"https://wappubog.snake.cc",ad:"https://wappubog.snake.cc",onlineUrl:"https://wappubog.snake.cc"}:{open:"http://test-wappubog.snake.cc",act:"http://test-wappubog.snake.cc",ad:"http://test-wappubog.snake.cc",onlineUrl:"http://test-wappubog.snake.cc"},n=e(e({},o),t);return{openUrl:"".concat(n.open,"/wappubog/h5/open"),actUrl:"".concat(n.act,"/wappubog/h5/activity"),adUrl:"".concat(n.ad,"/gamefunction_logs/h5/advlog"),onlineUrl:"".concat(n.onlineUrl,"/gamefunction_logs/applet/onlineTime")}},o.prototype._cacheCommonParams=function(o){var n=r(te),i=this._getInitParams(),s=i.userinfo,c=t(i,["userinfo"]),p=JSON.parse(n||"{}"),u=p.userinfo,l=t(p,["userinfo"]),d=o.userinfo,m=t(o,["userinfo"]),h=e(e(e({},JSON.parse(s||"{}")),JSON.parse(u||"{}")),JSON.parse(d||"{}")),g=f(f(c,l),m);this._commonParams=e(e({},g),{userinfo:JSON.stringify(h)}),this._consoleLog&&console.log("[XLOG] _cacheCommonParams",this._commonParams),a(te,JSON.stringify(this._commonParams))},o.prototype._getInitParams=function(){return{osversion:q,device:D,devicebrand:R,os:N,platform:g(),uid:u(),appcqid:"organic",pixel:this._getScreen(),userinfo:this._getUserInfo(),ua:encodeURI(navigator.userAgent),timezone:(e=(new Date).getTimezoneOffset(),t=Math.abs(Math.floor(e/60)),"".concat(e>0?"-":"+").concat(t)),url:encodeURI(location.href)};var e,t},o.prototype._getUserInfo=function(e){var t={};if(e)try{t=JSON.parse(e)}catch(e){console.error('[XLOG] The parameter "userinfo" is not in JSON string format!')}var o={};if(this._commonParams.userinfo)try{o=JSON.parse(this._commonParams.userinfo)}catch(e){console.error("[XLOG] parse error",e)}return JSON.stringify(h({lang:navigator.language,browser:x,browserversion:U,engine:A,engineversion:C,platform:g(),querystring:m(this._ignoreUrlParams),fbc:ee.get("_fbc"),fbp:ee.get("_fbp"),ttp:ee.get("_ttp")},o,t))},o.prototype._filterParams=function(e){var t={};if(e){var o=["openid","accid","apptypeid","appcqid","appver","srcqid","userinfo","srcinfo","region","province","uid","platform"];for(var n in e){var i=n,r=e[i];o.includes(i)&&r&&(t[i]=r)}}return t},o.prototype.setParams=function(e){if(e){this._consoleLog&&console.log("[XLOG] setParams",e);var t=this._commonParams.region,o=this._commonParams.province;e=this._filterParams(e),this._updateCommonParams(e),(e.region&&e.region!==t||e.province&&e.province!==o)&&this._open(6)}},o.prototype.replaceParams=function(e){if(e){this._consoleLog&&console.log("[XLOG] replaceParams",e);var t=this._commonParams.region,o=this._commonParams.province;this._updateCommonParams(e),(e.region&&e.region!==t||e.province&&e.province!==o)&&this._open(6)}},o.prototype._updateCommonParams=function(t){var o;this._consoleLog&&console.log("[XLOG] _updateCommonParams",t),t.userinfo?t.userinfo=this._getUserInfo(t.userinfo):t.userinfo=this._getUserInfo();try{o=JSON.parse(t.userinfo)}catch(e){console.error('[XLOG] userinfo "'.concat(t.userinfo,'" parse error'),e)}t.platform&&(t.userinfo=this._getUserInfo(JSON.stringify(e(e({},o),{platform:t.platform})))),this._cacheCommonParams(e(e({},t),{url:encodeURI(location.href),network:this._getNetWorkType()}))},o.prototype._request=function(e,t){var o=this;return $(e,t).then((function(n){return o._consoleLog&&console.log("[XLOG] SUCCESS: ".concat(e),t,n),n})).catch((function(o){return console.error("[XLOG] ERROR: ".concat(e),t,o),Promise.reject(o)}))},o.prototype._open=function(t){if(this._sendOpenLog){var o=e(e({},this._commonParams),{userinfo:encodeURI(this._commonParams.userinfo||""),url:encodeURI(location.href),xmlog:"4.1.0",url_from:document.referrer,openway:t});this._consoleLog&&console.log("[XLOG] PARAMS(OPEN)",o),this._request(this._openUrl,o)}},o.prototype.act=function(t){var o=e(e({},this._commonParams),{userinfo:encodeURI(this._commonParams.userinfo||""),url:encodeURI(location.href),actentryid:t.actentryid||"",subactid:t.subactid||"",type:t.type||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},o.prototype.ad=function(t){var o=e(e({},this._commonParams),{userinfo:encodeURI(this._commonParams.userinfo||""),url:encodeURI(location.href),type:t.type||"",code:t.code||"",codeinfo:t.codeinfo||"",pagetype:t.pagetype||"",gametype:t.gametype||"",adslot:t.adslot||"",adunitid:t.adunitid||"",adbatchid:t.adbatchid||"",ecpm:t.ecpm||"",adfrom:t.adfrom||""});this._consoleLog&&console.log("[XLOG] PARAMS(AD)",o),this._request(this._adUrl,o)},o.prototype._sendOnline=function(){var t=Date.now(),o=e(e({},this._commonParams),{onlinetime:"".concat(t-this._startTime),endtime:t.toString(),starttime:this._startTime.toString()});this._online([o])},o.prototype._setOnlineBatchData=function(e){a(oe,JSON.stringify(e))},o.prototype._getOnlineBatchData=function(){var e=r(oe);return e?JSON.parse(e):""},o.prototype._clearOnlineBatchData=function(){a(oe,"")},o.prototype._online=function(e){var t=this;this._consoleLog&&console.log("[XLOG] PARAMS(ONLINE)",e),this._clearOnlineBatchData(),this._request(this._onlineUrl,{batch:JSON.stringify(e)}).catch((function(o){console.error(o),t._setOnlineBatchData(e)}))},o}();export{v as EGender,y as XLogMp,K as XLogWeb,ne as XLogWebHw};
7
9
  //# sourceMappingURL=index.mjs.map