@xyz-fe/log 3.6.2

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 ADDED
@@ -0,0 +1,38 @@
1
+ # x-log
2
+
3
+ 序言泽日志 JSSDK,支持小程序端和 web 端。
4
+
5
+ ## 功能特色
6
+
7
+ - 支持启动、打点、事件三种类型日志上报;
8
+ - 启动日志逻辑自动处理上报;
9
+ - 大部分参数内部封装,公参更新自动缓存;
10
+ - 活动打点和事件日志调用简单方便。
11
+
12
+ ## 参与开发
13
+
14
+ ```sh
15
+ # 安装
16
+ pnpm i
17
+
18
+ # 日志调试(仅支持H5)
19
+ pnpm dev
20
+
21
+ # 单元测试(待完善)
22
+ pnpm test
23
+
24
+ # 代码更新提交
25
+ git add .
26
+ git commit -m 'feat: xxx' # 提交msg需要遵守commitlint配置规范
27
+
28
+ # 更新version版本和changelog日志并打包
29
+ pnpm release:patch # 补丁版本
30
+ pnpm release:minor # 小版本
31
+ pnpm release:major # 大版本
32
+
33
+ # 发布到仓库(npm.tt.cn)
34
+ # 发布前要先保证已经登录过仓库账号,否则发布失败。
35
+ pnpm dp
36
+ ```
37
+
38
+ [日志 SDK 使用教程](http://gitlab.tt.cn/research_fe/npm/x-log/blob/master/docs/使用说明.md)
@@ -0,0 +1,12 @@
1
+ declare const __BUILD_VERSION__: string;
2
+ declare const __BUILD_DATE__: string;
3
+ declare const wx: any; // 微信
4
+ declare const tt: any; // 字节
5
+ declare const qq: any; // QQ
6
+ declare const swan: any; // 百度
7
+ declare const ks: any; // 快手
8
+ declare const my: any; // 蚂蚁
9
+ declare const jd: any; // 京东
10
+ interface Navigator {
11
+ standalone?: boolean;
12
+ }
@@ -0,0 +1,282 @@
1
+ declare enum EGender {
2
+ Unknown = 0,
3
+ Male = 1,
4
+ Female = 2
5
+ }
6
+ interface TCommonParams {
7
+ openid?: string;
8
+ unionid?: string;
9
+ accid?: string;
10
+ apptypeid?: string;
11
+ appcqid?: string;
12
+ srcqid?: string;
13
+ userinfo?: string;
14
+ appver?: string;
15
+ }
16
+ interface ICommonParams extends TCommonParams {
17
+ appverint?: string;
18
+ platform?: string | number;
19
+ appqid?: string;
20
+ os?: string;
21
+ osversion?: string;
22
+ device?: string;
23
+ devicebrand?: string;
24
+ pixel?: string;
25
+ network?: string;
26
+ obatchid?: string;
27
+ }
28
+ interface IOpenLogParams {
29
+ openway: 0 | 1 | 5;
30
+ wakeway?: string | number;
31
+ xmlog: string;
32
+ isreturn?: 0 | 1 | 2;
33
+ }
34
+ interface IActiveLogParams {
35
+ actentryid?: string;
36
+ subactid?: string;
37
+ type: 'show' | 'click' | 'close';
38
+ }
39
+ interface IEventLogParams {
40
+ event1?: string;
41
+ event2?: string;
42
+ event3?: string;
43
+ event4?: string;
44
+ value1?: string;
45
+ value2?: string;
46
+ value3?: string;
47
+ value4?: string;
48
+ }
49
+ interface IAdLogParams {
50
+ type: string;
51
+ code?: string;
52
+ codeinfo?: string;
53
+ pagetype?: string;
54
+ gametype?: string;
55
+ adslot?: string;
56
+ adunitid?: string;
57
+ adbatchid?: string;
58
+ ecpm?: string;
59
+ }
60
+ interface IOnlineLogParams {
61
+ onlinetime?: string;
62
+ endtime?: string;
63
+ starttime: string;
64
+ }
65
+ declare type IOnlineLogParamsWithCommon = ICommonParams & IOnlineLogParams;
66
+ interface IUserInfo {
67
+ [k: string | number]: any;
68
+ }
69
+ interface IExtraInfo extends IUserInfo {
70
+ language: string;
71
+ wxVersion: string;
72
+ SDKVersion: string;
73
+ benchmarkLevel: number;
74
+ theme: string;
75
+ }
76
+ interface IDomain {
77
+ open?: string;
78
+ act?: string;
79
+ ad?: string;
80
+ event?: string;
81
+ online?: string;
82
+ }
83
+ interface IDomainWithEnv {
84
+ testing: IDomain;
85
+ prod: IDomain;
86
+ }
87
+ interface MiniprogramShowOptions {
88
+ path: string;
89
+ scene: number;
90
+ query: Record<string | number, any>;
91
+ shareTicket: string;
92
+ referrerInfo: {
93
+ appId: string;
94
+ extraData: Record<string | number, any>;
95
+ };
96
+ }
97
+ declare type TPlatform = 'h5' | 'pc' | 'pwa';
98
+ interface InitParams {
99
+ isPro?: boolean;
100
+ domain?: IDomain;
101
+ commonParams?: TCommonParams;
102
+ sendOpenLog?: boolean;
103
+ consoleLog?: boolean;
104
+ }
105
+ interface THwCommonParams {
106
+ accid?: string;
107
+ apptypeid?: string;
108
+ appcqid?: string;
109
+ appver?: string;
110
+ userinfo?: string;
111
+ region?: string;
112
+ province?: string;
113
+ srcinfo?: string;
114
+ uid?: string;
115
+ platform?: string;
116
+ }
117
+ interface IHwCommonParams extends THwCommonParams {
118
+ ua?: string;
119
+ timezone?: string;
120
+ device?: string;
121
+ devicebrand?: string;
122
+ os?: string;
123
+ osversion?: string;
124
+ pixel?: string;
125
+ network?: string;
126
+ url?: string;
127
+ obatchid?: string;
128
+ xmlog?: string;
129
+ }
130
+ interface IHwDomain {
131
+ open?: string;
132
+ act?: string;
133
+ ad?: string;
134
+ }
135
+ interface HwInitParams {
136
+ isPro?: boolean;
137
+ domain?: IHwDomain;
138
+ commonParams?: THwCommonParams;
139
+ sendOpenLog?: boolean;
140
+ consoleLog?: boolean;
141
+ ignoreUrlParams?: string[];
142
+ }
143
+ interface IHwOpenLogParams {
144
+ openway: 0 | 1 | 5 | 6;
145
+ platform_from?: string;
146
+ url_from?: string;
147
+ }
148
+ interface IHwActiveLogParams {
149
+ actentryid?: string;
150
+ subactid?: string;
151
+ type: 'show' | 'click' | 'close';
152
+ memo1?: string;
153
+ memo2?: string;
154
+ memo3?: string;
155
+ }
156
+ interface IHwAdLogParams {
157
+ type: string;
158
+ code?: string;
159
+ codeinfo?: string;
160
+ pagetype?: string;
161
+ gametype?: string;
162
+ adslot?: string;
163
+ adunitid?: string;
164
+ adbatchid?: string;
165
+ ecpm?: string;
166
+ adfrom?: string;
167
+ }
168
+
169
+ declare class XLog$1 {
170
+ version: string;
171
+ buildDate: string;
172
+ private _openUrl;
173
+ private _eventUrl;
174
+ private _actUrl;
175
+ private _adUrl;
176
+ private _onlineUrl;
177
+ private _startTime;
178
+ private _extraInfo?;
179
+ private _commonParams;
180
+ get commonParams(): ICommonParams;
181
+ private _isPro;
182
+ private _sendOpenLog;
183
+ private _isColdStartUp;
184
+ private _systemInfo;
185
+ private _mp;
186
+ private _platform;
187
+ private _consoleLog;
188
+ constructor({ domain, commonParams, isPro, sendOpenLog, consoleLog, }: InitParams);
189
+ /** 启动 */
190
+ private _init;
191
+ private _getMp;
192
+ private _visibilityChange;
193
+ private _getStorage;
194
+ private _setStorage;
195
+ private _getBatchId;
196
+ private _coldStartUp;
197
+ private _getApis;
198
+ /**
199
+ * 缓存公参
200
+ * @param {object} obj 公共参数对象
201
+ */
202
+ private _cacheCommonParams;
203
+ private _getInitParams;
204
+ private _initCommonParams;
205
+ private _getNetworkType;
206
+ /**
207
+ * 获取用户信息
208
+ * @param {IUserInfo} userInfo 用户信息
209
+ * @returns {string} JSON.stringify序列化字符串
210
+ */
211
+ private _getUserInfo;
212
+ private _filterParams;
213
+ /** 设置、更新日志参数 */
214
+ setParams(params?: TCommonParams): void;
215
+ private _updateCommonParams;
216
+ /** 获取appqid */
217
+ private _getAppqid;
218
+ private _request;
219
+ /** 上报启动日志 */
220
+ _open(params: Omit<IOpenLogParams, 'xmlog'>): void;
221
+ /** 上报事件日志 */
222
+ event(params: IEventLogParams): void;
223
+ /** 上报用户行为、打点日志 */
224
+ act(params: IActiveLogParams): void;
225
+ /** 上报广告日志 */
226
+ ad(params: IAdLogParams): void;
227
+ private _sendOnline;
228
+ private _setOnlineBatchData;
229
+ private _getOnlineBatchData;
230
+ private _clearOnlineBatchData;
231
+ private _online;
232
+ }
233
+
234
+ declare class XLog {
235
+ version: string;
236
+ buildDate: string;
237
+ private _openUrl;
238
+ private _eventUrl;
239
+ private _actUrl;
240
+ private _urlParams;
241
+ private _commonParams;
242
+ get commonParams(): ICommonParams;
243
+ private _isPro;
244
+ private _sendOpenLog;
245
+ private _consoleLog;
246
+ constructor({ domain, commonParams, isPro, sendOpenLog, consoleLog, }: InitParams);
247
+ private _init;
248
+ private _visibilityChange;
249
+ private _getScreen;
250
+ private _getNetWorkType;
251
+ private _getBatchId;
252
+ private _coldStartUp;
253
+ private _getApis;
254
+ /**
255
+ * 缓存公参
256
+ * @param {object} obj 公共参数对象
257
+ */
258
+ private _cacheCommonParams;
259
+ private _getInitParams;
260
+ private _initCommonParams;
261
+ /**
262
+ * 获取用户信息
263
+ * @param {IUserInfo} userInfo 用户信息
264
+ * @returns {string} JSON.stringify序列化字符串
265
+ */
266
+ private _getUserInfo;
267
+ private _filterParams;
268
+ /** 设置、更新日志参数 */
269
+ setParams(params?: TCommonParams): void;
270
+ private _updateCommonParams;
271
+ /** 获取appqid */
272
+ private _getAppqid;
273
+ private _request;
274
+ /** 上报启动日志 */
275
+ _open(openway: 0 | 1 | 5): void;
276
+ /** 上报事件日志 */
277
+ event(params: IEventLogParams): void;
278
+ /** 上报用户行为、打点日志 */
279
+ act(params: IActiveLogParams): void;
280
+ }
281
+
282
+ export { EGender, HwInitParams, IActiveLogParams, IAdLogParams, ICommonParams, IDomain, IDomainWithEnv, IEventLogParams, IExtraInfo, IHwActiveLogParams, IHwAdLogParams, IHwCommonParams, IHwDomain, IHwOpenLogParams, IOnlineLogParams, IOnlineLogParamsWithCommon, IOpenLogParams, IUserInfo, InitParams, MiniprogramShowOptions, TCommonParams, THwCommonParams, TPlatform, XLog$1 as XLogMp, XLog as XLogWeb };
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * @xyz-fe/log v3.6.2
3
+ * (c) lizhigao <lizhigao@021.com>
4
+ * Released under the MIT License.
5
+ */
6
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});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;exports.EGender=void 0,(c=exports.EGender||(exports.EGender={}))[c.Unknown=0]="Unknown",c[c.Male=1]="Male",c[c.Female=2]="Female";var p=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.6.2",this.buildDate="7/19/2024, 6:43: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(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:n.query})}),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.6.2"});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||""});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}(),l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},u={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",g="smarttv",b="wearable",v="embedded",_="Amazon",y="Apple",x="ASUS",O="BlackBerry",S="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===a&&-1!==X(t).indexOf(X(e))},X=function(e){return e.toLowerCase()},j=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,S]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,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,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],[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,q],[l,h]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[u,q],[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,O],[l,h]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[u,x],[l,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[u,x],[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,L],[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,L],[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,L],[l,f]],[/smart-tv.+(samsung)/i],[u,[l,g]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[u,U],[l,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,A],[l,g]],[/(apple) ?tv/i],[u,[c,"Apple TV"],[l,g]],[/crkey/i],[[c,"Chromecast"],[u,k],[l,g]],[/droid.+aft(\w)( bui|\))/i],[c,[u,_],[l,g]],[/\(dtv[\);].+(aquos)/i],[c,[u,"Sharp"],[l,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,j],[c,j],[l,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,g]],[/((pebble))app/i],[u,c,[l,b]],[/droid.+; (glass) \d/i],[c,[u,k],[l,b]],[/droid.+; (wt63?0{2,3})\)/i],[c,[u,I],[l,b]],[/(quest( 2)?)/i],[c,[u,E],[l,b]],[/(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,O]],[/(?: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?j(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,g,w,b,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:l)}(u,u.exports);var d=new u.exports.UAParser,m=d.getBrowser();m.name,m.version;var f=d.getEngine();f.name,f.version;var h=function(){var e=(0,d.getOS)();return{os:e.name,osversion:e.version}}(),w=h.os,g=h.osversion,b=function(){var e=(0,d.getDevice)();return{device:e.model,devicebrand:e.vendor}}(),v=b.device,_=b.devicebrand;w=w||"",g=g||"",v=v||"",_=_||"";var y={exports:{}},x={exports:{}},O=1e3,S=60*O,k=60*S,P=24*k,A=365.25*P,L=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*A;case"days":case"day":case"d":return o*P;case"hours":case"hour":case"hrs":case"hr":case"h":return o*k;case"minutes":case"minute":case"mins":case"min":case"m":return o*S;case"seconds":case"second":case"secs":case"sec":case"s":return o*O;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 q(e,P,"day")||q(e,k,"hour")||q(e,S,"minute")||q(e,O,"second")||e+" ms"}(e):function(e){if(e>=P)return Math.round(e/P)+"d";if(e>=k)return Math.round(e/k)+"h";if(e>=S)return Math.round(e/S)+"m";if(e>=O)return Math.round(e/O)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function q(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=L,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())}(y,y.exports);var C=y.exports("jsonp"),U=function(e,t,o){"function"==typeof t&&(o=t,t={});t||(t={});var i,n,r=t.prefix||"__jp",s=t.name||r+N++,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]=T,n&&clearTimeout(n)}return window[s]=function(e){C("jsonp got",e),u(),o&&o(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+a+"="+p(s)).replace("?&","?"),C('jsonp req "%s"',e),(i=document.createElement("script")).src=e,l.parentNode.insertBefore(i,l),function(){window[s]&&u()}},N=0;function T(){}function I(e,t){return void 0===t&&(t={}),new Promise((function(o,i){var n;U("".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 E=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.6.2",this.buildDate="7/19/2024, 6:43: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:w,osversion:g,device:v,devicebrand:_,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){I(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.6.2"});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||""});this._consoleLog&&console.log("[XLOG] PARAMS(ACT)",o),this._request(this._actUrl,o)},c}();exports.XLogMp=p,exports.XLogWeb=E;
7
+ //# sourceMappingURL=index.js.map