@xyz-fe/log 3.8.1 → 3.9.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/README.md +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/mp.d.ts +3 -1
- package/dist/mp.js +2 -2
- package/dist/mp.js.map +1 -1
- package/dist/mp.min.js +2 -2
- package/dist/mp.min.js.map +1 -1
- package/dist/mp.mjs +2 -2
- package/dist/mp.mjs.map +1 -1
- package/dist/web-hw.d.ts +10 -1
- package/dist/web-hw.js +3 -3
- package/dist/web-hw.js.map +1 -1
- package/dist/web-hw.min.js +3 -3
- package/dist/web-hw.min.js.map +1 -1
- package/dist/web-hw.mjs +3 -3
- package/dist/web-hw.mjs.map +1 -1
- package/dist/web.d.ts +3 -1
- package/dist/web.js +2 -2
- package/dist/web.js.map +1 -1
- package/dist/web.min.js +2 -2
- package/dist/web.min.js.map +1 -1
- package/dist/web.mjs +2 -2
- package/dist/web.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @xyz-fe/log v3.
|
|
2
|
+
* @xyz-fe/log v3.9.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.8.1",this.buildDate="2/20/2025, 10:28:18 AM",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.8.1"});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.8.1",this.buildDate="2/20/2025, 10:28:18 AM",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.8.1"});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,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};
|
|
7
7
|
//# sourceMappingURL=index.mjs.map
|