@xyz-fe/log 3.8.0 → 3.8.1

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,7 @@
1
1
  /*!
2
- * @xyz-fe/log v3.8.0
2
+ * @xyz-fe/log v3.8.1
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.8.0",d="1/20/2025, 7:49:08 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,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.8.1",d="2/20/2025, 10:28:18 AM",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})}));
7
7
  //# sourceMappingURL=index.min.js.map